Changeset 264 in svn for trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h
- Timestamp:
- Feb 11, 2009, 10:22:30 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h
r220 r264 13 13 * present in the data members of the Block TRoot class. 14 14 * 15 * $Date: 2009-02- 02 11:32:12$16 * $Revision: 1.1 1$15 * $Date: 2009-02-11 09:19:14 $ 16 * $Revision: 1.12 $ 17 17 * 18 18 * … … 24 24 #include "TObject.h" 25 25 #include "BlockCompare.h" 26 #include "interface/D_Constants.h" 27 #include "interface/CaloUtil.h" 26 28 27 29 class TSortableObject: public TObject … … 147 149 float Pz; // particle momentum vector (z component) in GeV 148 150 149 float PT; // particle transverse momentum in GeV150 151 float Eta; // particle pseudorapidity 151 152 float Phi; // particle azimuthal angle in rad 152 153 154 float EtaCalo; // particle pseudorapidity when entering the calo, 155 float PhiCalo; // particle azimuthal angle in rad when entering the calo 156 153 157 void Set(const TLorentzVector& momentum); 154 158 void Set(const float px, const float py, const float pz, const float e); 155 static TCompare *fgCompare; //! 156 const TCompare *GetCompare() const { return fgCompare; } 159 void SetEtaPhi(const float eta, const float phi) {Eta=eta; Phi=phi;}; 160 void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;}; 161 void SetEtaPhiEET(const float eta, const float phi, const float e, const float et); 162 static TCompare *fgCompare; //! 163 const TCompare *GetCompare() const { return fgCompare; } 164 //void SetEem_Ehad(const float sE_em, const float sE_had) {} ; // sets E_em and E_had, computes E and ET 165 float PT; // particle transverse momentum in GeV 166 //const float getEtaGen() const {return _EtaGen;} 167 //const float getPhiGen() const {return _PhiGen;} 168 169 170 //protected: 171 //float EGen, _EtaGen, _PhiGen; // from the generator: energy, eta, phi 157 172 158 173 ClassDef(TRootParticle, 1) … … 165 180 166 181 public: 167 TRootGenParticle() { };182 TRootGenParticle() {_initialised=false;} 168 183 int PID; // particle HEP ID number [RawHepEventParticle::pid()] 169 184 int Status; // particle status [RawHepEventParticle::status()] … … 172 187 int D1; // particle 1st daughter [RawHepEventParticle::daughter1() - 1] 173 188 int D2; // particle 2nd daughter [RawHepEventParticle::daughter2() - 1] 174 float Charge; // electrical charge175 189 176 190 float T; // particle vertex position (t component) [RawHepEventParticle::t()] … … 179 193 float Z; // particle vertex position (z component) [RawHepEventParticle::z()] 180 194 float M; 181 static TCompare *fgCompare; //! 182 195 void setFractions(); 196 const float getCharge() const {return Charge;}; 197 const float getFem() {if(!_initialised) setFractions(); return _Fem;} 198 const float getFhad() {if(!_initialised) setFractions(); return _Fhad;} 199 200 float Charge; // electrical charge 201 202 static TCompare *fgCompare; //! 203 protected: 204 float _Fem, _Fhad; // fractions of energy deposit 205 bool _initialised; 183 206 ClassDef(TRootGenParticle, 1) 184 207 }; 208 185 209 186 210 //------------------------------------------------------------------------------ … … 225 249 //--------------------------------------------------------------------------- 226 250 227 class TRootTracks: public TRootParticle 228 { 229 public: 230 TRootTracks() : Etaout(0), Phiout(0) {}; 231 static TCompare *fgCompare; //! 232 251 class D_Track : public TSortableObject { 252 //class D_Track : public TRootParticle { 253 public: 254 D_Track(); // needed for storage in ExRootAnalysis 255 D_Track(const D_Track& track); 256 D_Track(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt); 257 D_Track& operator=(const D_Track& track); 258 void Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt); 259 const TLorentzVector GetFourVector() const; 260 const float getEta() const {return Eta;} 261 const float getPhi() const {return Phi;} 262 const float getEtaOuter() const {return EtaOuter;} 263 const float getPhiOuter() const {return PhiOuter;} 264 const float getE() const {return E;} 265 const float getPx() const {return Px;} 266 const float getPy() const {return Py;} 267 const float getPz() const {return Pz;} 268 const float getPT() const {return PT;} 269 270 static TCompare *fgCompare; //! 271 const TCompare *GetCompare() const { return fgCompare; } 272 protected: 273 float Eta, Phi; // (eta,phi) at the beginning of the track 274 float EtaOuter, PhiOuter; // (eta,phi) at the end of the track 275 float PT, E, Px, Py, Pz; // transverse momentum 276 ClassDef(D_Track, 1) 277 }; 278 279 280 class TRootTracks: public TRootParticle { 281 public: 282 TRootTracks() {} // : Etaout(0), Phiout(0) {}; 283 static TCompare *fgCompare; //! 284 TRootTracks(const D_Track& track); 285 float E; // particle energy in GeV 286 float Px; // particle momentum vector (x component) in GeV 287 float Py; // particle momentum vector (y component) in GeV 288 float Pz; // particle momentum vector (z component) in GeV 289 290 float Eta; // particle pseudorapidity 291 float Phi; // particle azimuthal angle in rad 292 293 float EtaCalo; // particle pseudorapidity when entering the calo, 294 float PhiCalo; // particle azimuthal angle in rad when entering the calo 233 295 // float X, Y, Z; // coordinates of the beginning of the track 234 296 // float Xout, Yout, Zout; // coordinates of the end of the track 235 float Etaout, Phiout; // coordinates of the end of the track297 //float Etaout, Phiout; // coordinates of the end of the track 236 298 // void SetPosition(const float x, const float y, const float z) {X=x; Y=y; Z=z;} 237 299 // void SetPositionOut(const float x, const float y, const float z) {Xout=x; Yout=y; Zout=z;} … … 241 303 //--------------------------------------------------------------------------- 242 304 243 class TRootCalo: public TRootParticle 244 { 305 /*class TRootCalo: public TRootParticle 245 306 public: 246 307 TRootCalo() {}; … … 248 309 249 310 ClassDef(TRootCalo, 1) 311 }; 312 */ 313 314 //class TRootCalo: public TSortableObject { 315 class TRootCalo: public TRootParticle { 316 public: 317 TRootCalo() ; 318 TRootCalo(const TRootCalo& cal); 319 TRootCalo& operator=(const TRootCalo& cal); 320 void set(const D_CaloTower& cal); 321 static TCompare *fgCompare; //! 322 // const TCompare *GetCompare() const { return fgCompare; } 323 const float getET() const {return ET;} 324 325 protected: 326 //float Eta, Phi; // segmented eta, phi 327 float E_em, E_had; // electromagnetic and hadronic components of the tower energy 328 //float E; 329 float ET; // total energy and transverse energy 330 ClassDef(TRootCalo, 1) 250 331 }; 251 332 … … 340 421 }; 341 422 342 //---------------------------------------------------------------------------343 344 423 #endif // BLOCKCLASSES_H 345 424
Note:
See TracChangeset
for help on using the changeset viewer.