- Timestamp:
- Dec 3, 2008, 5:22:43 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Delphes.cpp
r72 r73 177 177 vector<PhysicsTower> towers; 178 178 179 vector<TLorentzVector> electron; 180 vector<int> elecPID; 181 vector<TLorentzVector> muon; 182 vector<int> muonPID; 179 vector<ParticleUtil> electron; 180 vector<ParticleUtil> muon; 183 181 TSimpleArray<TRootGenParticle> NFCentralQ; 184 182 … … 197 195 electron.clear(); 198 196 muon.clear(); 199 elecPID.clear();200 muonPID.clear();201 197 NFCentralQ.Clear(); 202 198 … … 231 227 TRACP->Propagation(particle,genMomentum); 232 228 float eta=fabs(genMomentum.Eta()); 229 233 230 switch(pid) { 234 231 235 232 case pE: // all electrons with eta < DET->MAX_CALO_FWD 236 233 DET->SmearElectron(genMomentum); 237 electron.push_back(genMomentum); 238 elecPID.push_back(particle->PID); 234 electron.push_back(ParticleUtil(genMomentum,particle->PID)); 239 235 break; // case pE 240 236 case pGAMMA: // all photons with eta < DET->MAX_CALO_FWD … … 247 243 case pMU: // all muons with eta < DET->MAX_MU 248 244 DET->SmearMu(genMomentum); 249 muonPID.push_back(particle->PID); 250 muon.push_back(genMomentum); 245 muon.push_back(ParticleUtil(genMomentum,particle->PID)); 251 246 break; // case pMU 252 247 case pLAMBDA: // all lambdas with eta < DET->MAX_CALO_FWD … … 304 299 } // while 305 300 306 for(unsigned int i=0; i < electron.size(); i++) {301 for(unsigned int i=0; i < electron.size(); i++) { 307 302 if(electron[i].E()!=0 && fabs(electron[i].Eta()) < DET->MAX_TRACKER && electron[i].Pt() > DET->ELEC_pt) 308 303 { 309 304 elementElec = (TRootElectron*) branchElectron->NewEntry(); 310 elementElec->Set(electron[i] );311 elementElec->Charge = sign(elec PID[i]);305 elementElec->Set(electron[i].Px(),electron[i].Py(),electron[i].Pz(),electron[i].E()); 306 elementElec->Charge = sign(electron[i].PID()); 312 307 elementElec->IsolFlag = DET->Isolation(electron[i].Phi(),electron[i].Eta(),TrackCentral,2.0); 313 308 } … … 317 312 { 318 313 elementMu = (TRootMuon*) branchMuon->NewEntry(); 319 elementMu->Charge = sign(muon PID[i]);320 elementMu->Set(muon[i] );314 elementMu->Charge = sign(muon[i].PID()); 315 elementMu->Set(muon[i].Px(),muon[i].Py(),muon[i].Pz(),muon[i].E()); 321 316 elementMu->IsolFlag = DET->Isolation(muon[i].Phi(),muon[i].Eta(),TrackCentral,2.0); 322 317 } -
trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h
r72 r73 13 13 * present in the data members of the Block TRoot class. 14 14 * 15 * $Date: 2008-12-03 1 1:01:04$16 * $Revision: 1. 6$15 * $Date: 2008-12-03 16:22:42 $ 16 * $Revision: 1.7 $ 17 17 * 18 18 * … … 159 159 160 160 void Set(const TLorentzVector& momentum); 161 void Set(float px,float py,float pz, float e); 161 162 static TCompare *fgCompare; //! 162 163 const TCompare *GetCompare() const { return fgCompare; } -
trunk/Utilities/ExRootAnalysis/src/BlockClasses.cc
r70 r73 11 11 * to preserve mother-dautherlinks between particles. 12 12 * 13 * $Date: 2008-12-0 2 19:50:30$14 * $Revision: 1. 3$13 * $Date: 2008-12-03 16:22:43 $ 14 * $Revision: 1.4 $ 15 15 * 16 16 * … … 21 21 #include "Utilities/ExRootAnalysis/interface/BlockClasses.h" 22 22 #include "Utilities/ExRootAnalysis/interface/BlockCompare.h" 23 24 #include "TLorentzVector.h" 23 25 24 26 TCompare *TRootGenParticle::fgCompare = 0; … … 47 49 Phi = momentum.Phi(); 48 50 } 51 void TRootParticle::Set(float px,float py,float pz, float e) { 52 TLorentzVector toFill; 53 toFill.SetPxPyPzE(px,py,pz,e); 54 E = e; 55 Px = px; 56 Py = py; 57 Pz = pz; 58 PT = toFill.Pt(); 59 Eta = toFill.Eta(); 60 Phi = toFill.Phi(); 61 } 49 62 63 -
trunk/interface/SmearUtil.h
r72 r73 23 23 24 24 #include "Utilities/Fastjet/plugins/CDFCones/interface/PhysicsTower.hh" 25 26 #include <iostream> 27 #include <sstream> 28 #include <fstream> 29 #include <iomanip> 30 25 31 using namespace std; 32 33 class ParticleUtil { 34 35 public: 36 37 TLorentzVector TLVector; 38 int Pid; 39 40 ParticleUtil(const TLorentzVector &genMomentum,const int &pid) : TLVector(genMomentum) , Pid(pid) {} 41 42 float E() {return TLVector.E();} // particle energy in GeV 43 float Px() {return TLVector.Px();} // particle energy in GeV 44 float Py() {return TLVector.Py();} // particle energy in GeV 45 float Pz() {return TLVector.Pz();} // particle energy in GeV 46 float Pt() {return TLVector.Pt();} // particle energy in GeV 47 float Eta() {return TLVector.Eta();} // particle energy in GeV 48 float Phi() {return TLVector.Phi();} // particle energy in GeV 49 float PID() {return Pid;} // particle energy in GeV 50 51 private: 52 53 }; 54 26 55 27 56 class RESOLution -
trunk/src/SmearUtil.cc
r72 r73 573 573 if(hadron.E() < 0)hadron.SetPxPyPzE(0,0,0,0); 574 574 } 575 /* 576 void RESOLution::SortedVector() 577 { 578 int i,j = 0; 579 TLorentzVector tmp; 580 bool en_desordre = true; 581 for(i = 0 ; (i < numjetT) && en_desordre; i++) 582 { 583 en_desordre = false; 584 for(j = 1 ; j < numjetT - i ; j++) 585 { 586 if ( Wjets[j].Eta() > Wjets[j-1].Eta() ) 587 { 588 TLorentzVector tmp = Wjets[j-1]; 589 Wjets[j-1] = Wjets[j]; 590 Wjets[j] = tmp; 591 en_desordre = true; 592 } 593 } 594 } 595 596 }*/ 575 597 576 598 // **********Provides the energy in the cone of radius TAU_CONE_ENERGY for the tau identification******** … … 684 706 if (phi > PI-dphi) iPhi = PI-dphi; 685 707 } 686 708 /* 709 ParticleUtil::ParticleUtil(const TLorentzVector genMomentum,int pid){ 710 E=genMomentum.E(); 711 Px=genMomentum.Px(); 712 Py=genMomentum.Py(); 713 Pz=genMomentum.Pz(); 714 PT=genMomentum.Pt(); 715 Phi=genMomentum.Phi(); 716 Eta=genMomentum.Eta(); 717 PID=pid; 718 719 } 720 */ 721 /* 722 void ParticleUtil::GetInfo() 723 { 724 725 } 726 */ 687 727 688 728 //**************************** Returns the delta Phi ****************************
Note:
See TracChangeset
for help on using the changeset viewer.