CFEL - ASG Software Suite
2.5.0
CASS
|
copy and correct detectorhit properties More...
#include <momenta_calculator.h>
Public Member Functions | |
void | loadSettings (CASSSettings &s) |
load the settings More... | |
particleHit_t | operator() (const detectorHit_t &dethit) const |
correct the position in the detector plane More... | |
Private Attributes | |
double | _t0 |
the correction factor of the time of flight More... | |
std::pair< double, double > | _pos0 |
the correction of the position More... | |
std::pair< double, double > | _scalefactors |
the correction of the scale More... | |
double | _angle |
the angle to rotate the position More... | |
copy and correct detectorhit properties
copy the position and time value from the detectorhit and then correct those values.
AcqirisDetectors/%detectorname%/Particles/%particlename%/Corrections/{T0}
Time in ns that should be substracted from the recorded time of the detectorhit. Default is 0.
AcqirisDetectors/%detectorname%/Particles/%particlename%/Corrections/{CorrectX|CorrectY}
Position in mm that should be substracted from the x and y position of the detectorhit. Default is 0|0.
AcqirisDetectors/%detectorname%/%particlename%/Corrections/{ScaleX|ScaleY}
Factor by which the corrected position should be multiplied, to get a right sized image. Default is 1|1.
AcqirisDetectors/%detectorname%/Particles/%particlename%/Corrections/{Angle}
Angle in degree around which the corrected and scaled position should be roated. Default is 0.
Definition at line 46 of file momenta_calculator.h.
void HitCorrector::loadSettings | ( | CASSSettings & | s | ) |
load the settings
load the correction factors from the .ini file
s | the CASSSettings object to read the information from |
Definition at line 437 of file momenta_calculator.cpp.
References _angle, _pos0, _scalefactors, _t0, QSettings::beginGroup(), QSettings::endGroup(), cass::ACQIRIS::Pi(), and QSettings::value().
particleHit_t HitCorrector::operator() | ( | const detectorHit_t & | dethit | ) | const |
correct the position in the detector plane
Create a particlehit. Then copy the position and the time from the dethit to the particlehit. Then correct this position, then scale the correted position and finaly rotate the corrected scaled positition around the given angle. Then substract _t0 form the time of the detectorhit
[in] | dethit | the detector hit to correct |
Definition at line 451 of file momenta_calculator.cpp.
References _angle, _pos0, _scalefactors, _t0, cass::ACQIRIS::NbrParticleHitDefinitions, cass::ACQIRIS::t, cass::ACQIRIS::tof_ns, cass::ACQIRIS::tofCor_ns, cass::ACQIRIS::x, cass::ACQIRIS::x_mm, cass::ACQIRIS::xCor_mm, cass::ACQIRIS::xCorScal_mm, cass::ACQIRIS::xCorScalRot_mm, cass::ACQIRIS::y, cass::ACQIRIS::y_mm, cass::ACQIRIS::yCor_mm, cass::ACQIRIS::yCorScal_mm, and cass::ACQIRIS::yCorScalRot_mm.
|
private |
the angle to rotate the position
Definition at line 81 of file momenta_calculator.h.
Referenced by loadSettings(), and operator()().
|
private |
the correction of the position
Definition at line 75 of file momenta_calculator.h.
Referenced by loadSettings(), and operator()().
|
private |
the correction of the scale
Definition at line 78 of file momenta_calculator.h.
Referenced by loadSettings(), and operator()().
|
private |
the correction factor of the time of flight
Definition at line 72 of file momenta_calculator.h.
Referenced by loadSettings(), and operator()().