00001 /* @version $Revision: 1416 $ * @modifiedby $Author: jacquem $ * @lastmodified $Date: 2011-11-18 16:11:02 +0100 (Fri, 18 Nov 2011) $ */ 00002 00003 #ifndef ROOT_CALOEVENT 00004 #define ROOT_CALOEVENT 00005 00006 #include "TObject.h" 00007 #include "TClonesArray.h" 00008 00009 00010 00011 /*! 00012 * \file CaloEvent.hh 00013 * \brief Describe calorimeter event 00014 * 00015 * -pointer to event's hits collection: fHits 00016 * 00017 * -event Id: fEventId 00018 * 00019 * -number of hits : fNHits 00020 * 00021 * -Position of track extrapolated at m2 prototype along X : fXExtrapol 00022 * 00023 * -Position of track extrapolated at m2 prototype along Y : fXExtrapol 00024 * 00025 * \author Jean and Max 00026 * \version "$Revision: 1416 $" 00027 */ 00028 00029 ////////////////////////////////////////////////////////////////////////// 00030 // // 00031 // CaloEvent 00032 // // 00033 ////////////////////////////////////////////////////////////////////////// 00034 00035 class CaloHit; 00036 class MTEvent; 00037 00038 /*! 00039 * \class CaloEvent 00040 * \brief Describe calorimeter event 00041 * 00042 * -pointer to event's hits collection: fHits 00043 * 00044 * -event Id: fEventId 00045 * 00046 * -number of hits : fNHits 00047 * 00048 * -value along x axis for telescope : fXTelescope 00049 * 00050 * -value along y axis for telescope : fYTelescope 00051 * 00052 */ 00053 00054 class CaloEvent : public TObject { 00055 00056 public: 00057 /*! 00058 * \brief Constructor 00059 * 00060 * CaloEvent class constructor 00061 * 00062 * \param none 00063 */ 00064 00065 CaloEvent(); 00066 /*! 00067 * \brief copy assignment operator 00068 * 00069 * CaloEvent copy assignment operator. Copy MTEvent to CaloEvent 00070 * 00071 * \param const reference of MTEvent to copy 00072 */ 00073 CaloEvent& operator=( const MTEvent& rhs) ; 00074 /*! 00075 * \brief Destructor 00076 * 00077 * CaloEvent class destructor 00078 * 00079 * \param none 00080 */ 00081 virtual ~CaloEvent(); // virtual to call ~TObject 00082 00083 /** 00084 * \fn AddHit(const CaloHit& ahit) 00085 * \brief Add hits to this event. 00086 * \param const reference on CaloHit. 00087 * 00088 * \Create new CaloHit and store it into class fHits TClonesArray. 00089 * \return pouinter to the new created CaloHit. 00090 */ 00091 00092 CaloHit* AddHit(const CaloHit& ahit); 00093 00094 /** 00095 * \fn Clear(Option_t *option ="") 00096 * \brief Clear fHits TClonesArray and set number of hit for this event to zero 00097 * \param Option_t for TClonesArray::Clear method 00098 * 00099 */ 00100 void Clear(Option_t *option =""); 00101 00102 /** 00103 * \fn GetHits(void) 00104 * \brief Getter for fHits TClonesArray. 00105 * \param void. 00106 * \return pointer to fHits TClonesArray 00107 */ 00108 inline TClonesArray* GetHits() const { return fHits; }; 00109 00110 /** 00111 * \fn GetNHits(void) 00112 * \brief Getter for number of event's hits, fNHits . 00113 * \param void. 00114 * \return fNHits, number of eventÅ› hits 00115 */ 00116 inline UInt_t GetNHits() const { return fNHits; }; 00117 00118 /** 00119 * \fn GetXExtrapol(void) const 00120 * \brief Getter expected position along x axis of CaloHit (calculated from telescope info) 00121 * \param void. 00122 * \return fXExtrapol 00123 */ 00124 inline Float_t GetXExtrapol(void) const { return fXExtrapol; }; 00125 00126 /** 00127 * \fn GetYExtrapol(void) const 00128 * \brief Getter expected position along y axis of CaloHit (calculated from telescope info) 00129 * \param void. 00130 * \return fYExtrapol 00131 */ 00132 inline Float_t GetYExtrapol(void) const { return fYExtrapol; }; 00133 00134 /** 00135 * \fn UInt_t GetTrkQuality(void) { return fTrkQuality; } ; 00136 * \brief Getter for quality of trak from pad telescope 00137 * \param UInt_t value = 0,1,2 00138 * 0: track (aligned 3x3 cm2 clusters in all chambers) 00139 * 1: straight track (aligned max. in all chambers) 00140 * 2: stiff track (single hit in all chambers) 00141 * \return track quality 00142 */ 00143 inline UInt_t GetTrkQuality(void) { return fTrkQuality; } ; 00144 00145 /** 00146 * \fn GetEventId() 00147 * \brief Getter for fEventId . 00148 * \param void. 00149 * \return fEventI 00150 */ 00151 inline UInt_t GetEventId(void) { return fEventId; } ; 00152 00153 /** 00154 * \fn SetEventId(const UInt_t value) 00155 * \brief Setter for event id 00156 * \param UInt_t new event id. 00157 * \return none 00158 */ 00159 inline void SetEventId(const UInt_t value) { fEventId = value; } ; 00160 00161 /** 00162 * \fn GetDeltaTmax() 00163 * \brief Getter for deltaT candidate (number of hits upper than threshold) fDeltaTmax . 00164 * \param void. 00165 * \return fDeltaTmaxNHits, deltaT candidate 00166 */ 00167 inline UInt_t GetDeltaTmax(void) { return fDeltaTmax; } ; 00168 00169 /** 00170 * \fn GetBcIdAbs() 00171 * \brief Getter for fBcIdAbs. BcIdAbs is RAMFull record time (identical for all CalEvent of a Lcio record) 00172 * \param void. 00173 * \return fBcIdAbs 00174 */ 00175 inline UInt_t GetBcIdAbs(void) { return fBcIdAbs; } ; 00176 00177 /** 00178 * \fn SetBcIdAbs() 00179 * \brief Setter for fBcIdAbs. BcIdAbs is RAMFull record time (identical for all CalEvent of a Lcio record) 00180 * \param UInt_t new bcIdAbs value. 00181 * \return none 00182 */ 00183 void SetBcIdAbs(UInt_t value) { fBcIdAbs = value; } ; 00184 00185 /** 00186 * \fn SetXExtrapol(const Float_t value) 00187 * \brief Setter for expected position along x axis of CaloHit (calculated from telescope info) 00188 * \param Float_t new telescope value along x axis 00189 * \return none 00190 */ 00191 inline void SetXExtrapol(const Float_t value) { fXExtrapol = value; } ; 00192 00193 /** 00194 * \fn SetYExtrapol(const Float_t value) 00195 * \brief Setter for expected position along y axis of CaloHit (calculated from telescope info) 00196 * \param Float_t new telescope value along y axis 00197 * \return none 00198 */ 00199 inline void SetYExtrapol(const Float_t value) { fYExtrapol = value; } ; 00200 00201 /** 00202 * \fn SetTrkQuality(const UInt_t value) { fTrkQuality = value; } ; 00203 * \brief Setter for quality of trak from pad telescope 00204 * \param UInt_t value = 0,1,2 00205 * 0: track (aligned 3x3 cm2 clusters in all chambers) 00206 * 1: straight track (aligned max. in all chambers) 00207 * 2: stiff track (single hit in all chambers) 00208 * \return none 00209 */ 00210 inline void SetTrkQuality(const UInt_t value) { fTrkQuality = value; } ; 00211 00212 /** 00213 * \fn SetDeltaTmax() 00214 * \brief Setter for number of event's hits, fNHits . 00215 e \param void. 00216 * \return fNHits, number of eventÅ› hits 00217 */ 00218 inline void SetDeltaTmax(const UInt_t dtmax) { fDeltaTmax = dtmax; } ; 00219 00220 00221 00222 00223 private: 00224 static TClonesArray *fgHits; 00225 UInt_t fEventId; 00226 TClonesArray *fHits; //->array with all hits 00227 Int_t fNHits; //Number of hit for this event 00228 Float_t fXExtrapol; 00229 Float_t fYExtrapol; 00230 UInt_t fTrkQuality; 00231 UInt_t fDeltaTmax; 00232 UInt_t fBcIdAbs; 00233 00234 00235 00236 00237 00238 00239 ClassDef(CaloEvent, 34) //MTEvent structure 00240 00241 }; 00242 00243 #endif