#include <emcRawDataCalibratorV2.h>
Inherits emcCalibrator.
Inheritance diagram for emcRawDataCalibratorV2:
? FIXME ?
This class should probably be re-written some days. It has lots of hard-wiring, some parts are quite not easy to maintain... etc... The whole calibration design should probably be rethought.
First thing is to remove dependency on emcFEMtuple hierarchy which is to disappear. That should be no big problem.
L.A.
Definition at line 51 of file emcRawDataCalibratorV2.h.
Public Member Functions | |
emcRawDataCalibratorV2 () | |
ctor | |
virtual | ~emcRawDataCalibratorV2 () |
dtor | |
virtual bool | Calibrate (const emcRawDataObject &rdo, emcMixedDataObject &mdo, const PHTimeStamp &when) |
Changes raw data into mixed data. | |
virtual bool | Calibrate (const emcMixedDataObject &mdo, emcCalibratedDataObject &cdo, const PHTimeStamp &when) |
Changes mixed data into calibrated data. | |
virtual bool | Calibrate (const emcRawDataObject &rdo, emcCalibratedDataObject &cdo, const PHTimeStamp &when) |
short cut to go from raw to calibrated | |
virtual void | SetCollectionStatus (const char *type) |
Set status of collecting data if they were collected outside of calibrator For the moment type can be "Pedestals", "HLRatios", "Tofs", "Gains" or "*" (i.e. | |
virtual bool | GetCollectionStatus (const char *type) const |
Get status of last try of collecting data. | |
virtual void | Print () const |
the print utility to inform what the calibrator is doing | |
virtual void | printData (const emcRawDataObject &rdo, const int towerId) const |
the print utility to print data for individual tower | |
virtual void | Reset (void) |
Complete reset. | |
virtual bool | SelectSource (const char *type, emcManageable::EStorage source) |
select the source of the calibration parameters. | |
virtual void | SetExtraRejectListFilename (const char *filename="") |
Set the filename of a file containing a list of extra towers to be rejected, as compared to those in Q&A objects. | |
virtual void | SetSMBasedCorrectionFilename (const char *filename="") |
Set the filename of a file containing a list of corrections to be applied to calibration coefficients in individual supermodules. | |
virtual void | SetTwrGlobalT0 (char *filename=0) |
Set Global T0 for every calorimeter Tower. | |
bool | CalibrateEnergy (Float_t &adc, const Int_t index, const Int_t TowerId, int incrementalTime) |
bool | CalibrateTime (Float_t &tdc, float adc, const Int_t index, const Int_t TowerId, int incrementalTime) |
void | CollectForMDO (const PHTimeStamp &when) |
void | CollectForCDO (const PHTimeStamp &when) |
bool | GetECalAtT0 (const PHTimeStamp &when, bool normalizationON=false) |
Private Attributes | |
std::string | fExtraRejectListFilename |
std::string | fSMBasedCorrectionFilename |
emcQAs * | fQA |
Q&A object. | |
std::vector< float > | fECalAtT0 |
energy calibration at time 0 | |
emcManageable::EStorage | fPedestalsSource |
tells where to load pedestals data from | |
emcManageable::EStorage | fHLRatiosSource |
tells where to load high/low gain ratios data from | |
emcManageable::EStorage | fGainsSource |
tells where to load gain data from | |
emcManageable::EStorage | fTofSource |
tells where to load ToF data from | |
emcManageable::EStorage | fQASource |
tells where to load Q&A data from | |
emcManageable::EStorage | fIniCalSource |
tells where to load Initial Calibration data from | |
bool | fCollectPedestalStatus |
Status of the last try of collecting Pedestals. | |
bool | fCollectHLRatioStatus |
Status of the last try of collecting HLRatios. | |
bool | fCollectGainStatus |
Status of the last try of collecting Gains. | |
bool | fCollectTofStatus |
Status of the last try of collecting TOF LC and WALKS. | |
Int_t | maxFailPed |
Maximum Number of failed attempts to collect Monitoring Data of a given kind. | |
Int_t | maxFailHLR |
Int_t | maxFailGain |
Int_t | maxFailTof |
emcPedestals5 * | fPedestals |
emcHLRatios * | fHLRatios |
emcGains * | fGains |
emcLCTofs * | fLCTofs |
emcWalkTofs * | fWalkTofs |
emcTofT0s * | fTofT0s |
emcTacPeds * | fTacPeds |
bool | fMustCollectForMDO |
bool | fMustCollectForCDO |
pbscTimingFixes * | tf |
|
ctor
Definition at line 81 of file emcRawDataCalibratorV2.C. References emcCalibrator::fName, and Reset(). |
|
dtor
Definition at line 88 of file emcRawDataCalibratorV2.C. |
|
short cut to go from raw to calibrated This method only call the 2 other Calibrate methods. It makes the calling program simpler, but has an efficiency pay-off, due to the re-allocation of a new mdo at each call. Implements emcCalibrator. Definition at line 361 of file emcRawDataCalibratorV2.C. References Calibrate(). |
|
Changes mixed data into calibrated data.
Implements emcCalibrator. Definition at line 276 of file emcRawDataCalibratorV2.C. References fECalAtT0, and GetECalAtT0(). |
|
Changes raw data into mixed data.
Implements emcCalibrator. Definition at line 93 of file emcRawDataCalibratorV2.C. References emcDataObject::AddDataError(), CollectForMDO(), fCollectHLRatioStatus, fCollectPedestalStatus, fMustCollectForMDO, fQA, emcDataObject::GetDataDescriptionPointers(), emcDataObject::GetDead(), emcQAs::GetDeadMap(), emcDataObject::GetItemId(), emcDataObject::GetMaxSize(), emcDataObject::GetSize(), emcQAs::GetWarnMap(), emcQAs::IamDeadMask(), scale(), emcDataObject::SetDataDescriptionPointers(), emcMixedDataObject::SetHLRatioFlag(), emcMixedDataObject::SetMaxSize(), emcMixedDataObject::SetPedestalFlag(), and emcMixedDataObject::SetToZero(). Referenced by Calibrate(). |
|
Definition at line 377 of file emcRawDataCalibratorV2.C. References fCollectGainStatus, fECalAtT0, fGains, emcCalibrator::fVerbose, emcFEMtuple::getValue(), EmcIndexer::isPbGl(), and EmcIndexer::isPbSc(). |
|
Definition at line 403 of file emcRawDataCalibratorV2.C. References fCollectTofStatus, fLCTofs, fWalkTofs, emcCalibrator::GetGlobalT0(), emcWalkTofs::GetValue1(), emcLCTofs::GetValue1(), and emcWalkTofs::GetValue2(). |
|
Definition at line 470 of file emcRawDataCalibratorV2.C. References emcDataManager::Collect(), fCollectGainStatus, fCollectTofStatus, fGains, fGainsSource, fLCTofs, fTofSource, emcCalibrator::fVerbose, fWalkTofs, emcDataManager::GetInstance(), emcManageable::kNone, maxFailGain, maxFailTof, and emcManageable::SetSource(). |
|
Definition at line 539 of file emcRawDataCalibratorV2.C. References emcDataManager::Collect(), fCollectHLRatioStatus, fCollectPedestalStatus, fExtraRejectListFilename, fHLRatios, fHLRatiosSource, fPedestals, fPedestalsSource, fQA, fQASource, emcCalibrator::fUseOnlyLowGain, emcDataManager::GetInstance(), emcManageable::kNone, maxFailHLR, maxFailPed, emcQAs::SetExtraRejectListFilename(), and emcManageable::SetSource(). Referenced by Calibrate(). |
|
Get status of last try of collecting data. For the moment type can be "Pedestals", "HLRatios", "Tofs", or "*" (i.e. all) Reimplemented from emcCalibrator. Definition at line 680 of file emcRawDataCalibratorV2.C. References fCollectGainStatus, fCollectHLRatioStatus, fCollectPedestalStatus, and fCollectTofStatus. |
|
Definition at line 604 of file emcRawDataCalibratorV2.C. References fECalAtT0. Referenced by Calibrate(). |
|
the print utility to inform what the calibrator is doing
Implements emcCalibrator. Definition at line 732 of file emcRawDataCalibratorV2.C. References fGainsSource, fHLRatiosSource, fIniCalSource, fPedestalsSource, fQASource, fTofSource, emcCalibrator::fUseAmpPedestals, emcCalibrator::fUseOnlyLowGain, emcCalibrator::fZeroSuppression, emcCalibrator::GetHighLowLimit(), emcCalibrator::GetThresholdADC(), emcManageable::kDB_Construction, emcManageable::kDB_Objy, emcManageable::kDB_Pg, and emcManageable::kFile_ASCII. |
|
the print utility to print data for individual tower
Implements emcCalibrator. Definition at line 832 of file emcRawDataCalibratorV2.C. References fCollectGainStatus, fCollectHLRatioStatus, fCollectPedestalStatus, fECalAtT0, fGains, fHLRatios, fPedestals, emcRawDataObject::Get(), emcDataObject::GetMaxSize(), and emcFEMtuple::getValue(). |
|
Complete reset.
Implements emcCalibrator. Definition at line 859 of file emcRawDataCalibratorV2.C. References fCollectGainStatus, fCollectHLRatioStatus, fCollectPedestalStatus, fCollectTofStatus, fECalAtT0, fGains, fGainsSource, fHLRatios, fHLRatiosSource, fIniCalSource, fLCTofs, fMustCollectForCDO, fMustCollectForMDO, fPedestals, fPedestalsSource, fQA, fQASource, fTofSource, fTofT0s, fWalkTofs, emcCalibrator::fZeroSuppression, emcManageable::kNone, maxFailGain, maxFailHLR, maxFailPed, maxFailTof, SetExtraRejectListFilename(), and tf. Referenced by emcRawDataCalibratorV2(). |
|
select the source of the calibration parameters. Valid types are: Pedestals, HLRatios, ToF, QAs, IniCal Valid sources are: kDB_Objy = Objectivity Data base, kFile_ASCII = ASCII Files. Implements emcCalibrator. Definition at line 886 of file emcRawDataCalibratorV2.C. References emcRawDataAccessor::GetDynamicData(), emcRawDataAccessor::GetInstance(), EmcDynamicData::getMapStyle(), and emcManageable::kNone. |
|
Set status of collecting data if they were collected outside of calibrator For the moment type can be "Pedestals", "HLRatios", "Tofs", "Gains" or "*" (i.e. all) Definition at line 707 of file emcRawDataCalibratorV2.C. References fCollectGainStatus, fCollectHLRatioStatus, fCollectPedestalStatus, and fCollectTofStatus. |
|
Set the filename of a file containing a list of extra towers to be rejected, as compared to those in Q&A objects.
Reimplemented from emcCalibrator. Definition at line 104 of file emcRawDataCalibratorV2.h. References fExtraRejectListFilename. Referenced by Reset(). |
|
Set the filename of a file containing a list of corrections to be applied to calibration coefficients in individual supermodules.
Reimplemented from emcCalibrator. Definition at line 107 of file emcRawDataCalibratorV2.h. References fSMBasedCorrectionFilename. |
|
Set Global T0 for every calorimeter Tower.
Reimplemented from emcCalibrator. Definition at line 953 of file emcRawDataCalibratorV2.C. References emcCalibrator::fTwrGlobalT0, emcRawDataAccessor::GetInstance(), emcDataObject::GetMaxSize(), and emcRawDataAccessor::GetRawDataObject(). |
|
Status of the last try of collecting Gains.
Definition at line 151 of file emcRawDataCalibratorV2.h. Referenced by CalibrateEnergy(), CollectForCDO(), GetCollectionStatus(), printData(), Reset(), and SetCollectionStatus(). |
|
Status of the last try of collecting HLRatios.
Definition at line 149 of file emcRawDataCalibratorV2.h. Referenced by Calibrate(), CollectForMDO(), GetCollectionStatus(), printData(), Reset(), and SetCollectionStatus(). |
|
Status of the last try of collecting Pedestals.
Definition at line 147 of file emcRawDataCalibratorV2.h. Referenced by Calibrate(), CollectForMDO(), GetCollectionStatus(), printData(), Reset(), and SetCollectionStatus(). |
|
Status of the last try of collecting TOF LC and WALKS.
Definition at line 153 of file emcRawDataCalibratorV2.h. Referenced by CalibrateTime(), CollectForCDO(), GetCollectionStatus(), Reset(), and SetCollectionStatus(). |
|
energy calibration at time 0
Definition at line 132 of file emcRawDataCalibratorV2.h. Referenced by Calibrate(), CalibrateEnergy(), GetECalAtT0(), printData(), and Reset(). |
|
Definition at line 126 of file emcRawDataCalibratorV2.h. Referenced by CollectForMDO(), and SetExtraRejectListFilename(). |
|
Definition at line 159 of file emcRawDataCalibratorV2.h. Referenced by CalibrateEnergy(), CollectForCDO(), printData(), and Reset(). |
|
tells where to load gain data from
Definition at line 138 of file emcRawDataCalibratorV2.h. Referenced by CollectForCDO(), Print(), and Reset(). |
|
Definition at line 158 of file emcRawDataCalibratorV2.h. Referenced by CollectForMDO(), printData(), and Reset(). |
|
tells where to load high/low gain ratios data from
Definition at line 136 of file emcRawDataCalibratorV2.h. Referenced by CollectForMDO(), Print(), and Reset(). |
|
tells where to load Initial Calibration data from
Definition at line 144 of file emcRawDataCalibratorV2.h. |
|
Definition at line 160 of file emcRawDataCalibratorV2.h. Referenced by CalibrateTime(), CollectForCDO(), and Reset(). |
|
Definition at line 166 of file emcRawDataCalibratorV2.h. Referenced by Reset(). |
|
Definition at line 165 of file emcRawDataCalibratorV2.h. Referenced by Calibrate(), and Reset(). |
|
Definition at line 157 of file emcRawDataCalibratorV2.h. Referenced by CollectForMDO(), printData(), and Reset(). |
|
tells where to load pedestals data from
Definition at line 134 of file emcRawDataCalibratorV2.h. Referenced by CollectForMDO(), Print(), and Reset(). |
|
Q&A object.
Definition at line 130 of file emcRawDataCalibratorV2.h. Referenced by Calibrate(), CollectForMDO(), and Reset(). |
|
tells where to load Q&A data from
Definition at line 142 of file emcRawDataCalibratorV2.h. Referenced by CollectForMDO(), Print(), and Reset(). |
|
Definition at line 127 of file emcRawDataCalibratorV2.h. Referenced by SetSMBasedCorrectionFilename(). |
|
Definition at line 163 of file emcRawDataCalibratorV2.h. |
|
tells where to load ToF data from
Definition at line 140 of file emcRawDataCalibratorV2.h. Referenced by CollectForCDO(), Print(), and Reset(). |
|
Definition at line 162 of file emcRawDataCalibratorV2.h. Referenced by Reset(). |
|
Definition at line 161 of file emcRawDataCalibratorV2.h. Referenced by CalibrateTime(), CollectForCDO(), and Reset(). |
|
Definition at line 155 of file emcRawDataCalibratorV2.h. Referenced by CollectForCDO(), and Reset(). |
|
Definition at line 155 of file emcRawDataCalibratorV2.h. Referenced by CollectForMDO(), and Reset(). |
|
Maximum Number of failed attempts to collect Monitoring Data of a given kind.
Definition at line 155 of file emcRawDataCalibratorV2.h. Referenced by CollectForMDO(), and Reset(). |
|
Definition at line 155 of file emcRawDataCalibratorV2.h. Referenced by CollectForCDO(), and Reset(). |
|
Definition at line 167 of file emcRawDataCalibratorV2.h. Referenced by Reset(). |