Changeset 264 in svn for trunk/Resolutions.cpp
- Timestamp:
- Feb 11, 2009, 10:22:30 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Resolutions.cpp
r260 r264 1 /*********************************************************************** 2 ** ** 3 ** /----------------------------------------------\ ** 4 ** | Delphes, a framework for the fast simulation | ** 5 ** | of a generic collider experiment | ** 6 ** \----------------------------------------------/ ** 7 ** ** 8 ** ** 9 ** This package uses: ** 10 ** ------------------ ** 11 ** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] ** 12 ** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] ** 13 ** FROG: [hep-ex/0901.2718v1] ** 14 ** ** 15 ** ------------------------------------------------------------------ ** 16 ** ** 17 ** Main authors: ** 18 ** ------------- ** 19 ** ** 20 ** Severine Ovyn Xavier Rouby ** 21 ** severine.ovyn@uclouvain.be xavier.rouby@cern ** 22 ** ** 23 ** Center for Particle Physics and Phenomenology (CP3) ** 24 ** Universite catholique de Louvain (UCL) ** 25 ** Louvain-la-Neuve, Belgium ** 26 ** ** 27 ** Copyright (C) 2008-2009, ** 28 ** All rights reserved. ** 29 ** ** 30 ***********************************************************************/ 1 /* 2 ---- FastSim ---- 3 A Fast Simulator for general purpose LHC detector 4 S. Ovyn ~~~~ severine.ovyn@uclouvain.be 5 6 Center for Particle Physics and Phenomenology (CP3) 7 Universite Catholique de Louvain (UCL) 8 Louvain-la-Neuve, Belgium 9 */ 10 11 /// \file Smearing.cpp 12 /// \brief executable for the FastSim 31 13 32 14 #include "TChain.h" … … 47 29 #include "JetsUtil.h" 48 30 #include "BFieldProp.h" 31 32 //#include "PseudoJet.hh" 33 //#include "ClusterSequence.hh" 49 34 50 35 #include<vector> … … 75 60 if(abs(gen1->PID)==15) 76 61 { 77 cout<<"au moins on a un tau "<<endl;78 62 int d1=gen1->D1; 79 63 int d2=gen1->D2; 80 cout<<"il a des filles? "<<endl;81 64 if((d1 < array.GetEntries()) && (d1 > 0) && (d2 < array.GetEntries()) && (d2 > 0)) 82 65 { 83 66 tauhad=true; 84 67 for(int d=d1; d < d2+1; d++) 85 { cout<<abs(array[d]->PID)<<" "<<endl;68 { 86 69 if(abs(array[d]->PID)== pE || abs(array[d]->PID)== pMU)tauhad=false; 87 70 } … … 115 98 { 116 99 TLorentzVector Att; 117 Att.SetP xPyPzE(jet->Px,jet->Py,jet->Pz,jet->E);100 Att.SetPtEtaPhiE(jet->PT,jet->Eta,jet->Phi,jet->E); 118 101 if(DeltaR(JET.Phi(),JET.Eta(),Att.Phi(),Att.Eta()) < deltaRtest) 119 102 { … … 137 120 { 138 121 TLorentzVector Att; 139 Att.SetP xPyPzE(elec->Px,elec->Py,elec->Pz,elec->E);122 Att.SetPtEtaPhiE(elec->PT,elec->Eta,elec->Phi,elec->E); 140 123 if(DeltaR(ELEC.Phi(),ELEC.Eta(),Att.Phi(),Att.Eta()) < deltaRtest) 141 124 { … … 313 296 case pE: // all electrons with eta < DET->MAX_CALO_FWD 314 297 PairingElec(recoMomentum,genMomentum,branchElec); 315 if(recoMomentum. Pt()>1){298 if(recoMomentum.E()!=0){ 316 299 elementElec=(RESOLELEC*) branchelec->NewEntry(); 317 300 elementElec->E = genMomentum.E(); … … 331 314 332 315 } // while 333 316 334 317 //compute missing transverse energy from calo towers 335 318 TIter itCalo((TCollection*)branchTowers); … … 340 323 while( (calo = (TRootCalo*) itCalo.Next()) ) 341 324 { 342 //Att.SetPxPyPzE(towers[i].fourVector.px, towers[i].fourVector.py, towers[i].fourVector.pz, towers[i].fourVector.E);343 Att.SetPtEtaPhiE(calo->PT,calo->Eta,calo->Phi,calo->E);344 towers.push_back(Att);345 if(fabs(Att.Eta()) < DET->CEN_max_calo_fwd)346 {347 ScalarEt = ScalarEt + Att.Et();348 PTmisReco = PTmisReco + Att;349 }350 }351 325 if(calo->E !=0){ 326 Att.SetPtEtaPhiE(calo->getET(),calo->Eta,calo->Phi,calo->E); 327 towers.push_back(Att); 328 if(fabs(Att.Eta()) < DET->CEN_max_calo_fwd) 329 { 330 ScalarEt = ScalarEt + calo->getET(); 331 PTmisReco = PTmisReco + Att; 332 } 333 } 334 } 352 335 elementEtmis= (ETMIS*) branchetmis->NewEntry(); 353 336 elementEtmis->Et = (PTmisGEN).Pt(); … … 363 346 364 347 TSimpleArray<TRootGenParticle> TausHadr = TauHadr(branchGen); 365 cout<<"nombre de tau-jets "<<TausHadr.GetEntries()<<endl;366 348 367 349 TLorentzVector JETreco(0,0,0,0); … … 397 379 if( (EnergySmallCone(towers,JETT.Eta(),JETT.Phi(),DET->TAU_energy_scone,DET->JET_seed)/JETT.E()) > 0.95 398 380 && (NumTracks(branchTracks,DET->TAU_track_pt,JETT.Eta(),JETT.Phi(),DET->TAU_track_scone))==1)numTauRec++; 399 400 381 } 401 382 } … … 404 385 405 386 } // for itJet : loop on all jets 387 //cout<<"i"<<endl; 406 388 407 389 treeWriter->Fill(); 408 390 } // Loop over all events 409 391 treeWriter->Write(); 410 411 412 392 float frac = numTauRec/numTau; 393 cout<<numTauRec<<endl; 394 cout<<numTau<<endl; 413 395 414 396 cout << "** Exiting..." << endl;
Note:
See TracChangeset
for help on using the changeset viewer.