1 #ifndef ChannelCorrection_h
2 #define ChannelCorrection_h 1
12 #include "UTIL/LCFixedObject.h"
14 #define ChannelCorrectionNINTVals 5 // pad id, module id and quality bit
15 #define ChannelCorrectionNFLOATVals 2 // channel gain calibration value and channel time offset
16 #define ChannelCorrectionNDOUBLEVals 0
21 class ChannelCorrection;
23 typedef ChannelCorrection LCChannelCorrection;
38 class ChannelCorrection :
public UTIL::LCFixedObject<ChannelCorrectionNINTVals,ChannelCorrectionNFLOATVals,ChannelCorrectionNDOUBLEVals>
47 ChannelCorrection(
int padID,
int moduleID,
int channelID,
int readoutGroup,
int quality,
float calibrationValue,
float timeOffset);
59 ChannelCorrectionNFLOATVals,
60 ChannelCorrectionNDOUBLEVals>(obj) { }
82 int getQuality()
const;
94 void setQuality(
int quality) ;
95 void setIsDead(
bool toggle) ;
96 void setIsNoisy(
bool toggle) ;
102 static std::string getRevision();
103 static std::string getDefaultColName();
105 void print( std::ostream& os = std::cout )
const;
108 const std::string getTypeName()
const
110 return std::string(
"ChannelCorrection");
112 const std::string getDataDescription()
const
114 return std::string(
"i:padID,moduleID,channelID,readoutGroup,quality,f:calibrationValue,timeOffset");
119 void setGearID(
int padID,
int moduleID);
120 void setHardwareID(
int channelID,
int readoutGroup);
121 std::bitset<4> _qualityBit;
125 std::ostream &operator<<(std::ostream &os,
const ChannelCorrection &p);
Class that combines information on ChannelCorrections for storage.
Definition: ChannelCorrection.h:38
float getTimeOffset() const
time offset should be given in the way, that if you subtract this value from the recorded pulse time ...
Definition: ChannelCorrection.cc:123
void setAddonBitA(bool toggle)
Sets the first of two not predefined quality bits.
Definition: ChannelCorrection.cc:175
virtual ~ChannelCorrection()
Important for memory handling.
Definition: ChannelCorrection.cc:46
bool isAddonBitASet()
One of two not predefined quality bits.
Definition: ChannelCorrection.cc:103
float getCalibrationFactor() const
Get gain calibration factor, should be given in the way, that if you divide the recorded charge by th...
Definition: ChannelCorrection.cc:117
std::pair< int, int > getHardwareID() const
Returns a pair of integers of which the first element ist the channel ID and the second element the r...
Definition: ChannelCorrection.cc:65
bool isAddonBitBSet()
One of two not predefined quality bits.
Definition: ChannelCorrection.cc:110
ChannelCorrection(EVENT::LCObject *obj)
'Copy constructor' needed to interpret LCCollection read from file/database.
Definition: ChannelCorrection.h:58
void setAddonBitB(bool toggle)
Sets the second of two not predefined quality bits.
Definition: ChannelCorrection.cc:184
ChannelCorrection(int padID, int moduleID, int channelID, int readoutGroup, int quality, float calibrationValue, float timeOffset)
Constructor which sets all values of the object at once.
Definition: ChannelCorrection.cc:26
std::pair< int, int > getGearID() const
Returns a pair of integers of which the first element ist the pad ID and the second element the modul...
Definition: ChannelCorrection.cc:49
void setTimeOffset(float timeOffset)
time offset should be given in the way, that if you subtract this value from the recorded pulse time ...
Definition: ChannelCorrection.cc:136
void setCalibrationFactor(float calibrationValue)
Get gain calibration factor, should be given in the way, that if you divide the recorded charge by th...
Definition: ChannelCorrection.cc:130