Changeset 31 in svn
- Timestamp:
- Nov 13, 2008, 5:15:34 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/interface/SmearUtil.h
r11 r31 128 128 bool Btaggedjet(const TLorentzVector &JET, const TSimpleArray<TRootGenParticle> &subarray); 129 129 130 //******************************isolation criteria************************************** 131 bool Isolation(Float_t phi,Float_t eta,const vector<TLorentzVector> &tracks,float PT_TRACK2); 132 130 133 }; 131 134 -
trunk/src/SmearUtil.cc
r22 r31 180 180 pow(ELG_Sfwd*sqrt(energy),2) ) ); 181 181 } 182 float theta=electron.Theta(); 183 float phi=electron.Phi(); 184 float px = energyS * sin(theta) * cos(phi); 185 float py = energyS * sin(theta) * sin(phi); 186 float pz = energyS * cos(theta); 187 //cout<<" px "<<px<<" py "<<py<<" pz "<<pz<<endl; 182 188 electron.SetPtEtaPhiE(energyS/cosh(electron.Eta()), electron.Eta(), electron.Phi(), energyS); 183 189 //cout<<"nous "<<electron.Px()<<" "<<electron.Py()<<" "<<electron.Pz()<<endl; 184 190 if(electron.E() < 0)electron.SetPxPyPzE(0,0,0,0); // no negative values after smearing ! 185 191 } … … 212 218 // some of the particles decay mostly in the ecal, some mostly in the hcal 213 219 214 float energyS1,energyS2;220 float energyS1,energyS2; 215 221 if(fabs(hadron.Eta()) < MAX_CALO_CEN) { 216 222 energyS1 = gRandom->Gaus(energy_hcal, sqrt( … … 302 308 } 303 309 310 //***********************Isolation criteria*********************** 311 //**************************************************************** 312 bool RESOLution::Isolation(Float_t phi,Float_t eta,const vector<TLorentzVector> &tracks,float PT_TRACK2) 313 { 314 bool isolated = false; 315 Float_t deltar=5000.; // Initial value; should be high; no further repercussion 316 // loop on all final charged particles, with p_t >2, close enough from the electron 317 for(unsigned int i=0; i < tracks.size(); i++) 318 { 319 if(tracks[i].Pt() < PT_TRACK2)continue; 320 Float_t genDeltaR = DeltaR(phi,eta,tracks[i].Phi(),tracks[i].Eta()); // slower to evaluate 321 if( 322 (genDeltaR > deltar) || 323 (genDeltaR==0) 324 ) continue ; 325 deltar=genDeltaR; 326 } 327 if(deltar > 0.5)isolated = true; // returns the closest distance 328 return isolated; 329 } 330 331 304 332 //**************************** Returns the delta Phi **************************** 305 333 float DeltaPhi(const float phi1, const float phi2) {
Note:
See TracChangeset
for help on using the changeset viewer.