emcTowerContentv3.h

Go to the documentation of this file.
00001 #ifndef __EMCTOWERCONTENTV3_H__
00002 #define __EMCTOWERCONTENTV3_H__
00003 
00004 #ifndef __EMCTOWERCONTENT_H__
00005 #include "emcTowerContent.h"
00006 #endif
00007 
00012 class emcTowerContentv3 : public emcTowerContent 
00013 {
00014 
00015 public:
00016 
00017   emcTowerContentv3();
00018   emcTowerContentv3(const emcTowerContentv3&);
00019   emcTowerContentv3& operator=(const emcTowerContentv3&);
00020 
00021   virtual ~emcTowerContentv3();
00022 
00023   emcTowerContentv3* clone() const { return new emcTowerContentv3(*this); }
00024   emcTowerContentv3* create() const { return new emcTowerContentv3; }
00025 
00026   int ADC(void) const { return fADC; }
00027   
00028   int AMUPre(void) const { return fAMUPre; }
00029   
00030   int AMUPost(void) const { return fAMUPost; }
00031   
00032   int AMUTAC(void) const { return fAMUTAC; }
00033   
00034   int BeamClock(void) const { return fBeamClock; }
00035   
00036   int Channel(void) const { return fChannel; }
00037   
00038   int DataError(void) const { return fDataError; }
00039   
00040   float Energy(void) const { return fEnergy; }
00041   
00042   unsigned int ErrorNeighbours(void) const { return fErrorNeighbours; }
00043   
00044   int FEM(void) const { return fFEM; }
00045   
00046   bool hasCalib(void) const { return fHasCalib; }
00047   bool hasDC(void) const { return fHasDC; }
00048   bool hasGain(void) const { return true; }
00049   bool hasRaw(void) const { return fHasRaw; }
00050 
00051   bool canHaveCalib() const { return true; }
00052   bool canHaveDC() const { return true; }
00053   bool canHaveGain() const { return true; }
00054   bool canHaveRaw() const { return true; }
00055   
00056   int HG(void) const { return fHG; }
00057   int HGPost(void) const { return fHGPost; }
00058   int HGPre(void) const { return fHGPre; }
00059   
00060   float Gain(void) const { return fGain; }
00061 
00062   void identify(std::ostream& os=std::cout) const;
00063   
00064   int isValid() const;
00065 
00066   bool isSimulated(void) const { return false; }
00067 
00068   bool isMerged(void) const { return false; }
00069 
00070   bool isZero(void) const;
00071   
00072   int LG(void) const { return fLG; }
00073   int LGPost(void) const { return fLGPost; }
00074   int LGPre(void) const { return fLGPre; }
00075   
00076   void print(std::ostream& out=std::cout, int level=0) const;
00077   
00078   void Reset();
00079   
00080   void SetADCTDC(int adc, int tdc, int hg=0, int lg=0);
00081   
00082   void SetCalibrated(float energy, float tof);
00083   
00084   void SetDataError(int dataerror);
00085 
00086   void SetGain(float gain);
00087 
00088   void SetID(int fem, int channel);
00089 
00090   void SetNeighbours(unsigned int error, unsigned int warning);
00091   
00092   void SetRaw(int hgpost, int hgpre, 
00093               int lgpost, int lgpre,
00094               int tac,
00095               int amupre=0,
00096               int amupost=0,
00097               int amutac=0,
00098               int beamclock=0);
00099 
00100   void SetSimFrac(float simfrac); 
00101 
00102   float SimFrac() const { return fSimFrac; }
00103 
00104   void SetToF(float tof);
00105 
00106   int TAC(void) const { return fTAC; }
00107   int TDC(void) const { return fTDC; }
00108   float ToF(void) const { return fTOF; }
00109   float UncorrectedToF(void) const { return fUncorrectedTOF; }
00110 
00111   int TowerID(void) const { return fTowerID; }
00112   
00113   unsigned int WarnNeighbours(void) const { return fWarnNeighbours; }
00114   
00115   void Zero(void);
00116   
00117 private:
00118   void copyTo(emcTowerContentv3& dest) const;
00119 
00120 private:
00121   
00122   bool fHasCalib;
00123   bool fHasDC;
00124   bool fHasRaw;
00125   int fFEM;
00126   int fChannel;
00127   int fDataError;
00128   unsigned int fErrorNeighbours;
00129   unsigned int fWarnNeighbours;
00130   int fHGPost;
00131   int fHGPre;
00132   int fLGPost;
00133   int fLGPre;
00134   int fTAC;
00135   int fTDC;
00136   int fADC;
00137   int fHG;
00138   int fLG;
00139   int fTowerID;
00140   int fBeamClock;
00141   short fAMUPre;
00142   short fAMUPost;
00143   short fAMUTAC;
00144   float fEnergy;
00145   float fTOF;
00146   float fGain;
00147   float fSimFrac;
00148   float fUncorrectedTOF;
00149 
00150   ClassDef(emcTowerContentv3,1) // EMCAL Tower data Version 3
00151 };
00152 
00153 #endif