CFEL - ASG Software Suite
2.5.0
CASS
|
Achims resort routine calibrator. More...
#include <achimcalibrator_hex.h>
Public Types | |
enum | { mcp, u1, u2, v1, v2, w1, w2 } |
enum for accessing the vectors More... | |
enum | { u, v, w } |
![]() | |
typedef std::tr1::shared_ptr< Processor > | shared_pointer |
a shared pointer of this More... | |
typedef std::string | name_t |
define the name type More... | |
typedef std::list< name_t > | names_t |
define the list of names More... | |
typedef CachedList::item_type | result_t |
define the results More... | |
typedef CachedList::item_sp | resultsp_t |
define the shared pointer to the result More... | |
Public Member Functions | |
HexCalibrator (const name_t &name) | |
constructor More... | |
void | process (const CASSEvent &evt, result_t &res) |
create the calibration More... | |
void | loadSettings (size_t) |
load the detector analyzers settings from .ini file More... | |
![]() | |
Processor (const name_t &name) | |
constructor More... | |
virtual | ~Processor () |
virtual destructor More... | |
virtual void | processEvent (const CASSEvent &event) |
process the event More... | |
virtual const result_t & | result (const CASSEvent::id_t eventid=0) |
retrieve a result for a given id. More... | |
virtual void | releaseEvent (const CASSEvent &event) |
tell the list that the result for event can be overwritten More... | |
result_t::shared_pointer | resultCopy (const uint64_t eventid) |
retrieve histogram for id More... | |
virtual void | load () |
load the general settings More... | |
virtual void | aboutToQuit () |
function that will be called when the processor is about to be deleted More... | |
const names_t & | dependencies () |
Define all processors keys a processor depends on. More... | |
void | clearDependencies () |
clear the dependenies More... | |
void | clearHistograms () |
clear the histograms More... | |
virtual void | processCommand (std::string command) |
process command in pp More... | |
const name_t | name () const |
retrieve the name of this processor More... | |
bool | hide () const |
retrieve the hide flag of this processor More... | |
const std::string & | comment () const |
retrieve the comment of this processor More... | |
Private Attributes | |
std::tr1::shared_ptr< sum_walk_calibration_class > | _tsum_calibrator |
the time sum calibrator More... | |
std::tr1::shared_ptr< scalefactors_calibration_class > | _scalefactor_calibrator |
pointer to scalfactor calibrator More... | |
std::vector< std::pair< double, double > > | _timesums |
the timesums and their width More... | |
double | _wLayerOffset |
the w-layer offset More... | |
double | _ratio |
the ratio to check whether the calibration can be started More... | |
QString | _groupname |
the group name of the cass settings for this calibrator More... | |
std::string | _calibrationFilename |
the .ini filename for the sorting information More... | |
std::pair< double, double > | _center |
the center of the image More... | |
std::vector< double > | _scalefactors |
the scalefactors More... | |
double | _maxRuntime |
the maximum runtime More... | |
ACQIRIS::HelperAcqirisDetectors::helperinstancesmap_t::key_type | _detector |
The detector we are there for. More... | |
bool | _calibwritten |
flag to tell wether the calibration has been written already More... | |
Additional Inherited Members | |
![]() | |
virtual void | createHistList (result_t::shared_pointer result) |
create result list. More... | |
void | setupGeneral () |
general setup of the processor More... | |
bool | setupCondition (bool defaultConditionType=true) |
setup the condition. More... | |
shared_pointer | setupDependency (const std::string &depVarName, const name_t &name="") |
setup the dependecy. More... | |
![]() | |
const name_t | _name |
the processors name More... | |
bool | _hide |
flag to tell whether this pp should be hidden in the dropdown list More... | |
std::string | _comment |
optional comment that one can add to a processor. More... | |
CachedList | _resultList |
the list of results More... | |
names_t | _dependencies |
the list of dependencies More... | |
shared_pointer | _condition |
pointer to the processor that will contain the condition More... | |
Achims resort routine calibrator.
this class will use achims resort routine capabilties to calibrate the timesum shift and the scalefactors. The Processor will return the current ratio of full bins.
To set up the channel assignment for the requested detector one needs to set up the detector parameters.
Processor/%name%/{Detector}
Name of the delayline detector that we work on. Default is "blubb" Speciality of this Processor is, that it will only work with hex Delayline detectors and the appropriate HexSorter. Make sure that all settings of the HexSorter are correctly set. See cass::ACQIRIS::HexSorter and cass::ACQIRIS::DelaylineDetector.
Processor/%name%/{RatioFullBins}
The ratio of how many bins in the detector image have to be full before the calibration is started and the results written to the settingsfile.
Definition at line 56 of file achimcalibrator_hex.h.
anonymous enum |
enum for accessing the vectors
Enumerator | |
---|---|
mcp | |
u1 | |
u2 | |
v1 | |
v2 | |
w1 | |
w2 |
Definition at line 61 of file achimcalibrator_hex.h.
anonymous enum |
Enumerator | |
---|---|
u | |
v | |
w |
Definition at line 62 of file achimcalibrator_hex.h.
HexCalibrator::HexCalibrator | ( | const name_t & | name | ) |
|
virtual |
load the detector analyzers settings from .ini file
retrieve all necessary information to be able to calibrate the timesum and the scalefactors. Next to this remember the the groupname of the settings object, so that we later can use it to extract information
Reimplemented from cass::Processor.
Definition at line 196 of file achimcalibrator_hex.cpp.
References _calibrationFilename, _calibwritten, _center, cass::Processor::_condition, _detector, _groupname, _maxRuntime, _ratio, _scalefactor_calibrator, _scalefactors, _timesums, _tsum_calibrator, _wLayerOffset, cass::Log::add(), QSettings::beginGroup(), cass::Processor::createHistList(), QSettings::defaultFormat(), detector, QSettings::endGroup(), QString::fromStdString(), QSettings::group(), cass::Log::INFO, cass::ACQIRIS::DelaylineDetector::isHex(), cass::ACQIRIS::loadDelayDet(), cass::ACQIRIS::DetectorBackend::name(), cass::Processor::name(), cass::Processor::setupCondition(), cass::Processor::setupGeneral(), u, v, QSettings::value(), and w.
Referenced by HexCalibrator().
create the calibration
this won't extract the detector hits but rather just fill the calibrators with the values that they expect.
In order to fill the scalefactor calibrator with only points that are meaningful we check first the time sum for the hit we want to include.
After we filled we check whether we can already output the calibration data. We have enough when either we are told so or when the ratio is better than what the user set as limit. If so, create the a QSettings object that handles the ini file that will contain the calibration data. Extract the name of the .ini file from the settings for this calibrator.
evt | the event to work on |
res | the histogram containing the result |
write the parameters when we are told that we can or our set threshold is reached.but only if it has not been written yet
Reimplemented from cass::Processor.
Definition at line 253 of file achimcalibrator_hex.cpp.
References _calibrationFilename, _calibwritten, _center, _detector, _groupname, _ratio, _scalefactor_calibrator, _scalefactors, _timesums, _tsum_calibrator, _wLayerOffset, QSettings::beginGroup(), QSettings::defaultFormat(), detector, QSettings::endGroup(), cass::ACQIRIS::SignalProducer::firstGood(), QString::fromStdString(), cass::ACQIRIS::DelaylineDetector::layers(), mcp, cass::ACQIRIS::TofDetector::mcp(), cass::Result< T >::setValue(), cass::ACQIRIS::AchimCalibrator::shift_pos(), cass::ACQIRIS::AchimCalibrator::shift_sum(), cass::ACQIRIS::AchimCalibrator::shift_wLayer(), u, u1, u2, v, v1, v2, w, w1, w2, and cass::ACQIRIS::AchimCalibrator::writeCalibData().
|
private |
the .ini filename for the sorting information
Definition at line 129 of file achimcalibrator_hex.h.
Referenced by loadSettings(), and process().
|
private |
flag to tell wether the calibration has been written already
Definition at line 147 of file achimcalibrator_hex.h.
Referenced by loadSettings(), and process().
|
private |
the center of the image
Definition at line 132 of file achimcalibrator_hex.h.
Referenced by loadSettings(), and process().
|
private |
The detector we are there for.
Definition at line 144 of file achimcalibrator_hex.h.
Referenced by loadSettings(), and process().
|
private |
the group name of the cass settings for this calibrator
Definition at line 126 of file achimcalibrator_hex.h.
Referenced by loadSettings(), and process().
|
private |
the maximum runtime
Definition at line 141 of file achimcalibrator_hex.h.
Referenced by loadSettings().
|
private |
the ratio to check whether the calibration can be started
Definition at line 123 of file achimcalibrator_hex.h.
Referenced by loadSettings(), and process().
|
private |
pointer to scalfactor calibrator
this is a class that will help finding the scalefactor and the w-Layer offset of the Hex-Anode.
Definition at line 107 of file achimcalibrator_hex.h.
Referenced by loadSettings(), and process().
|
private |
the scalefactors
the order in the array is given by the enums
Definition at line 138 of file achimcalibrator_hex.h.
Referenced by loadSettings(), and process().
|
private |
the timesums and their width
the order is as follows (first is always timesum and second the timesumwidth):
Definition at line 117 of file achimcalibrator_hex.h.
Referenced by loadSettings(), and process().
|
private |
the time sum calibrator
this will take the timesum and after a while it knows how to correct the timesum to be a straight line
Definition at line 100 of file achimcalibrator_hex.h.
Referenced by loadSettings(), and process().
|
private |
the w-layer offset
Definition at line 120 of file achimcalibrator_hex.h.
Referenced by loadSettings(), and process().