Changeset 70 in svn for trunk/Delphes.cpp
- Timestamp:
- Dec 2, 2008, 8:50:30 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Delphes.cpp
r68 r70 29 29 #include "interface/VeryForward.h" 30 30 #include "interface/JetUtils.h" 31 32 31 33 32 #include <vector> … … 346 345 // Should test all the trigger table on the event, based on reconstructed objects 347 346 treeWriter->Fill(); 348 347 349 348 } // Loop over all events 350 351 349 352 350 treeWriter->Write(); 353 351 delete treeWriter; 354 352 355 353 if(DET->DOTRIGGER == 1) 356 354 { … … 358 356 chainT.Add(outputfilename.c_str()); 359 357 ExRootTreeReader *treeReaderT = new ExRootTreeReader(&chainT); 360 358 361 359 const TClonesArray *branchElecTrig = treeReaderT->UseBranch("Electron"); 362 360 const TClonesArray *branchMuonTrig = treeReaderT->UseBranch("Muon"); … … 365 363 const TClonesArray *branchPhotonTrig = treeReaderT->UseBranch("Photon"); 366 364 const TClonesArray *branchETmisTrig = treeReaderT->UseBranch("ETmis"); 367 365 368 366 ExRootTreeWriter *treeWriterT = new ExRootTreeWriter(outputfilename, "Trigger"); 369 ExRootTreeBranch *branchTrigger = treeWriterT->NewBranch("Trig ger", TRootTrigger::Class());370 367 ExRootTreeBranch *branchTrigger = treeWriterT->NewBranch("TrigResult", TRootTrigger::Class()); 368 371 369 TRootTrigger *elementTrigger; 372 373 Long64_t entryT, allEntriesT = treeReaderT->GetEntries();374 cout << "** Chain contains " << allEntriesT << " events" << endl;375 for(entryT = 0; entryT < allEntriesT; ++entryT)370 371 Long64_t entryT, allEntriesT = treeReaderT->GetEntries(); 372 cout << "** Chain contains " << allEntriesT << " events" << endl; 373 for(entryT = 0; entryT < allEntriesT; ++entryT) 376 374 { 377 378 //treeReaderT->ReadEntry(entry);375 treeWriterT->Clear(); 376 treeReaderT->ReadEntry(entry); 379 377 elementTrigger = (TRootTrigger*) branchTrigger->NewEntry(); 380 elementTrigger->Accepted= true;378 elementTrigger->Accepted=1; 381 379 treeWriterT->Fill(); 382 380 } 383 384 treeWriterT->Write();385 delete treeWriterT;386 }387 381 382 treeWriterT->Write(); 383 delete treeWriterT; 384 } 385 388 386 cout << "** Exiting..." << endl; 389 387 … … 391 389 delete DET; 392 390 if(converter) delete converter; 393 391 394 392 todo("TODO"); 395 393 }
Note:
See TracChangeset
for help on using the changeset viewer.