Changeset 65 in svn
- Timestamp:
- Dec 2, 2008, 11:16:48 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Delphes.cpp
r64 r65 30 30 #include "interface/JetUtils.h" 31 31 32 #include "Utilities/FROG/Examples/Sim_Delphes/FrogUtil.h" 32 33 33 34 #include <vector> … … 232 233 { 233 234 genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E); 234 //cout<<"avant "<<genMomentum.Pt()<<endl; 235 TRACP->Propagation(particle,genMomentum); 236 //cout<<"apres "<<genMomentum.Pt()<<endl; 235 //TRACP->Propagation(particle,genMomentum); 237 236 float eta=fabs(genMomentum.Eta()); 238 237 switch(pid) { … … 241 240 DET->SmearElectron(genMomentum); 242 241 electron.push_back(genMomentum); 243 // cout<<"apres le smearing "<<genMomentum.Pt()<<endl;244 245 242 elecPID.push_back(particle->PID); 246 243 break; // case pE … … 276 273 // back of the input_particles vector 277 274 input_particles.push_back(fastjet::PseudoJet(genMomentum.Px(),genMomentum.Py(),genMomentum.Pz(), genMomentum.E())); 278 // cout<<"on remplie avec "<<pid<<" Pt "<<genMomentum.Pt()<<" Eta "<<genMomentum.Eta()<<" Phi "<<genMomentum.Eta()<<endl;279 275 280 276 genMomentumCalo.SetPxPyPzE(CaloTower.fourVector.px,CaloTower.fourVector.py,CaloTower.fourVector.pz,CaloTower.fourVector.E); … … 310 306 311 307 } // while 312 // cout<<"*************"<<endl; 308 309 // computes the Missing Transverse Momentum 310 TLorentzVector Att(0.,0.,0.,0.); 311 for(unsigned int i=0; i < towers.size(); i++) 312 { 313 Att.SetPxPyPzE(towers[i].fourVector.px,towers[i].fourVector.py,towers[i].fourVector.pz,towers[i].fourVector.E); 314 PTmis = PTmis + Att; 315 } 316 elementEtmis = (TRootETmis*) branchETmis->NewEntry(); 317 elementEtmis->ET = (PTmis).Pt(); 318 elementEtmis->Phi = (-PTmis).Phi(); 319 elementEtmis->Px = (-PTmis).Px(); 320 elementEtmis->Py = (-PTmis).Py(); 321 //***************************** 322 313 323 for(unsigned int i=0; i < electron.size(); i++) { 314 324 if(electron[i].E()!=0 && fabs(electron[i].Eta()) < DET->MAX_TRACKER && electron[i].Pt() > DET->ELEC_pt) … … 330 340 } 331 341 332 // computes the Missing Transverse Momentum333 TLorentzVector Att(0.,0.,0.,0.);334 for(unsigned int i=0; i < towers.size(); i++)335 {336 Att.SetPxPyPzE(towers[i].fourVector.px,towers[i].fourVector.py,towers[i].fourVector.pz,towers[i].fourVector.E);337 PTmis = PTmis + Att;338 }339 elementEtmis = (TRootETmis*) branchETmis->NewEntry();340 elementEtmis->ET = (PTmis).Pt();341 elementEtmis->Phi = (-PTmis).Phi();342 elementEtmis->Px = (-PTmis).Px();343 elementEtmis->Py = (-PTmis).Py();344 345 //*****************************346 treeWriter->Fill();347 348 342 sorted_jets=JETRUN->RunJets(input_particles); 349 343 JETRUN->RunJetBtagging(treeWriter, branchJet,sorted_jets,NFCentralQ); … … 352 346 // Add here the trigger 353 347 // Should test all the trigger table on the event, based on reconstructed objects 348 treeWriter->Fill(); 354 349 355 350 } // Loop over all events 356 351 352 357 353 treeWriter->Write(); 358 354 delete treeWriter; 355 356 /* if(DET->DOTRIGGER == 1) 357 { 358 // TChain chainT("Analysis"); 359 // chainT.Add(outputfilename.c_str()); 360 ExRootTreeReader *treeReaderT = new ExRootTreeReader("Analysis"); 361 362 363 const TClonesArray *branchElecTrig = treeReaderT->UseBranch("Electron"); 364 const TClonesArray *branchMuonTrig = treeReaderT->UseBranch("Muon"); 365 const TClonesArray *branchJetTrig = treeReaderT->UseBranch("Jet"); 366 const TClonesArray *branchTauJetTrig = treeReaderT->UseBranch("TauJet"); 367 const TClonesArray *branchPhotonTrig = treeReaderT->UseBranch("Photon"); 368 const TClonesArray *branchETmisTrig = treeReaderT->UseBranch("ETmis"); 369 370 // Loop over all events 371 Long64_t entryT, allEntriesT = treeReaderT->GetEntries(); 372 cout << "** Chain contains " << allEntriesT << " events" << endl; 373 for(entryT = 0; entryT < allEntriesT; ++entryT) 374 { 375 //cout<<"entry "<<entryT<<endl; 376 } 377 } 378 */ 379 359 380 cout << "** Exiting..." << endl; 360 381 361 delete treeWriter;362 382 delete treeReader; 363 383 delete DET; -
trunk/src/JetUtils.cc
r53 r65 106 106 } 107 107 } // for itJet : loop on all jets 108 treeWriter->Fill();109 108 110 109 } … … 131 130 } // for itJet : loop on all jets 132 131 133 treeWriter->Fill();134 132 135 133 } -
trunk/src/VeryForward.cc
r53 r65 80 80 elementZdc->side = sign(eta); 81 81 82 treeWriter->Fill();83 82 84 83 } … … 140 139 141 140 } 142 treeWriter->Fill();143 141 // if(p1.stopped(beamline) && (p1.getStoppingElement()->getS() > 100)) 144 142 // cout << "Eloss =" << 7000.-p1.getE() << " ; " << p1.getStoppingElement()->getName() << endl;
Note:
See TracChangeset
for help on using the changeset viewer.