Changeset 264 in svn for trunk/interface/SmearUtil.h
- Timestamp:
- Feb 11, 2009, 10:22:30 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/interface/SmearUtil.h
r260 r264 40 40 #include "TLorentzVector.h" 41 41 42 #include "D_Constants.h" 43 #include "CaloUtil.h" 42 44 #include "BlockClasses.h" 43 45 #include "TSimpleArray.h" … … 46 48 using namespace std; 47 49 48 class ParticleUtil{50 class D_Particle { 49 51 50 52 public: 51 ParticleUtil(const TLorentzVector &genMomentum, int pid); 52 53 float E() {return _e;} // particle energy [GeV] 54 float Px() {return _px;} // horizontal coordinate of momentum [GeV] 55 float Py() {return _py;} // vertical coordinate of momentum [GeV] 56 float Pz() {return _pz;} // longitudinal coordinate of momentum [GeV] 57 float Pt() {return _pt;} // transverse momentum [GeV] 58 float EtaCalo() {return _etaCalo;} // pseudorapidity 59 float Eta() {return _eta;} // pseudorapidity 60 float PhiCalo() {return _phiCalo;} // azimuthal angle 61 float Phi() {return _phi;} // azimuthal angle 62 int PID() {return _pid;} // particle energy in [GeV] 53 D_Particle(const TLorentzVector & p, const int pid, const float etacalo, const float phicalo) : 54 _fourmomentum(p), _pid(pid), _etaCalo(etacalo), _phiCalo(phicalo) {} 55 //D_Particle(const float e, const float eta, const float phi, const float pt, const int pid) : 56 // _pid(pid), _etaCalo(UNDEFINED), _phiCalo(UNDEFINED) { TLorentzVector p; p.SetPtEtaPhiE(pt,eta,phi,e); _fourmomentum = p; } 57 D_Particle(const float px, const float py, const float pz, const float e, const int pid) : 58 _fourmomentum(px,py,pz,e), _pid(pid), _etaCalo(UNDEFINED), _phiCalo(UNDEFINED) {} 59 60 const float E() const {return _fourmomentum.E();} // particle energy [GeV] 61 const float Px() const {return _fourmomentum.Px();} // horizontal coordinate of momentum [GeV] 62 const float Py() const {return _fourmomentum.Py();} // vertical coordinate of momentum [GeV] 63 const float Pz() const {return _fourmomentum.Pz();} // longitudinal coordinate of momentum [GeV] 64 const float Pt() const {return _fourmomentum.Pt();} // transverse momentum [GeV] 65 const float EtaCalo() const {return _etaCalo;} // pseudorapidity 66 const float Eta() const {return _fourmomentum.Eta();} // pseudorapidity 67 const float PhiCalo() const {return _phiCalo;} // azimuthal angle 68 const float Phi() const {return _fourmomentum.Phi();} // azimuthal angle 69 const int PID() const {return _pid;} // particle energy in [GeV] 70 const TLorentzVector& getFourMomentum() const {return _fourmomentum;} 63 71 64 72 private: 65 float _e, _px, _py, _pz, _pt; 66 float _eta, _etaCalo, _phi, _phiCalo; 73 TLorentzVector _fourmomentum; 67 74 int _pid; 75 float _etaCalo, _phiCalo; 68 76 }; 69 70 #ifndef __PI__71 #define __PI__72 extern const float pi = 3.14159265358979312;73 #endif74 77 75 78 class RESOLution … … 93 96 float VFD_s_zdc; // distance of the Zero Degree Calorimeter, from the Interaction poin, in [m] 94 97 95 float 96 float 97 float 98 float 98 float RP_220_s; // distance of the RP to the IP, in meters 99 float RP_220_x; // distance of the RP to the beam, in meters 100 float RP_420_s; // distance of the RP to the IP, in meters 101 float RP_420_x; // distance of the RP to the beam, in meters 99 102 string RP_beam1Card; // 100 103 string RP_beam2Card; // … … 186 189 int FLAG_bfield; //flag for bfield propagation 187 190 int FLAG_vfd; //flag for very forward detector 191 int FLAG_zdc; //flag for very forward detector 188 192 189 193 int NEvents_Frog; … … 191 195 192 196 // to sort a vector 193 void SortedVector(vector<ParticleUtil> &vect); 197 //void SortedVector(vector<ParticleUtil> &vect); 198 void SortedVector(vector<D_Particle> &vect); 194 199 195 200 /// Reads the data card for the initialisation of the parameters … … 227 232 228 233 }; 229 230 231 // particles PID (PDG ID)232 const int pU = 1; // c quark233 const int pD = 2; // b quark234 const int pS = 3; // s quark235 const int pC = 4; // c quark236 const int pB = 5; // b quark237 const int pE = 11; // e238 const int pNU1 = 12; // nu_e239 const int pMU = 13; // mu240 const int pNU2 = 14; // nu_mu241 const int pTAU = 15; // tau242 const int pNU3 = 16; // nu_tau243 const int pGLUON = 21; // gluon244 const int pGAMMA = 22; // gamma245 const int pW = 24; // W246 const int pP = 2212; // proton247 const int pN = 2112; // neutron248 const int pPI0 = 111; // pi_0249 const int pK0L = 130; // K^0_L250 const int pK0S = 310; // K^0_S251 const int pLAMBDA = 3122; // Lambda252 const int pSIGMA0 = 3212; // Sigma^0253 const int pDELTA0 = 2114; // Delta^0254 255 const double speed_of_light = 299792458; // m/s256 const float UNDEFINED=-9999.;257 258 234 259 235 // ** returns the sign (+1 or -1) or an integer
Note:
See TracChangeset
for help on using the changeset viewer.