00001 #ifndef __EMCTOWERCONTENTV1S_H__ 00002 #define __EMCTOWERCONTENTV1S_H__ 00003 00004 #ifndef __EMCTOWERCONTENT_H__ 00005 #include "emcTowerContent.h" 00006 #endif 00007 00012 class emcTowerContentv1S : public emcTowerContent 00013 { 00014 00015 public: 00016 00017 emcTowerContentv1S(); 00018 emcTowerContentv1S(const emcTowerContentv1S&); 00019 emcTowerContentv1S& operator=(const emcTowerContentv1S&); 00020 00021 virtual ~emcTowerContentv1S(); 00022 00023 emcTowerContentv1S* clone() const { return new emcTowerContentv1S(*this); } 00024 emcTowerContentv1S* create() const { return new emcTowerContentv1S; } 00025 00026 int ADC(void) const { return fADC; } 00027 00028 int Channel(void) const { return fChannel; } 00029 00030 int DataError(void) const { return 0; } 00031 00032 float Energy(void) const { return fEnergy; } 00033 00034 unsigned int ErrorNeighbours(void) const { return fErrorNeighbours; } 00035 00036 int FEM(void) const { return fFEM; } 00037 00038 bool hasCalib(void) const { return fHasCalib; } 00039 bool hasDC(void) const { return fHasDC; } 00040 bool hasGain(void) const { return false; } 00041 bool hasRaw(void) const { return false; } 00042 00043 bool canHaveCalib() const { return true; } 00044 bool canHaveDC() const { return true; } 00045 bool canHaveGain() const { return false; } 00046 bool canHaveRaw() const { return false; } 00047 00048 void identify(std::ostream& os=std::cout) const; 00049 00050 int isValid() const; 00051 00052 bool isSimulated(void) const { return true; } 00053 00054 bool isMerged(void) const { return false; } 00055 00056 bool isZero(void) const; 00057 00058 void print(std::ostream& out=std::cout, int level=0) const; 00059 00060 void Reset(); 00061 00062 void SetADCTDC(int adc, int tdc, int hg=0, int lg=0); 00063 00064 void SetCalibrated(float energy, float tof); 00065 00066 void SetDataError(int) {} 00067 00068 void SetID(int fem, int channel); 00069 00070 void SetNeighbours(unsigned int error, unsigned int warning); 00071 00072 void SetSimFrac(float) {} 00073 00074 float SimFrac() const { return 1.0; } 00075 00076 void SetToF(float tof); 00077 00078 int TDC(void) const { return fTDC; } 00079 float ToF(void) const { return fTOF; } 00080 float UncorrectedToF(void) const { return fUncorrectedTOF; } 00081 00082 int TowerID(void) const { return fTowerID; } 00083 00084 unsigned int WarnNeighbours(void) const { return fWarnNeighbours; } 00085 00086 void Zero(void); 00087 00088 private: 00089 void copyTo(emcTowerContentv1S& dest) const; 00090 00091 private: 00092 00093 bool fHasCalib; 00094 bool fHasDC; 00095 int fFEM; 00096 int fChannel; 00097 unsigned int fErrorNeighbours; 00098 unsigned int fWarnNeighbours; 00099 int fTDC; 00100 int fADC; 00101 int fTowerID; 00102 float fEnergy; 00103 float fTOF; 00104 float fUncorrectedTOF; 00105 00107 static float fEnergyThreshold; 00108 00109 ClassDef(emcTowerContentv1S,1) // EMCAL Tower data Version 1 (Simulation) 00110 }; 00111 00112 #endif