- Timestamp:
- Dec 2, 2008, 8:50:30 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 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 } -
trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h
r67 r70 13 13 * present in the data members of the Block TRoot class. 14 14 * 15 * $Date: 2008-12-02 1 1:14:45$16 * $Revision: 1. 4$15 * $Date: 2008-12-02 19:50:30 $ 16 * $Revision: 1.5 $ 17 17 * 18 18 * … … 287 287 }; 288 288 289 //---------------------------------------------------------------------------290 291 289 class TRootTrigger: public TSortableObject 292 290 { 293 291 public: 294 292 TRootTrigger() {}; 295 static TCompare *fgCompare; //! 296 297 bool Accepted; 298 bool GlobalAccepted; 293 294 bool Accepted; // -1 or 1 295 296 static TCompare *fgCompare; //! 297 const TCompare *GetCompare() const { return fgCompare; } 299 298 300 299 ClassDef(TRootTrigger, 1) 301 302 300 }; 303 301 //--------------------------------------------------------------------------- -
trunk/Utilities/ExRootAnalysis/src/BlockClasses.cc
r67 r70 11 11 * to preserve mother-dautherlinks between particles. 12 12 * 13 * $Date: 2008-12-02 1 1:14:45$14 * $Revision: 1. 2$13 * $Date: 2008-12-02 19:50:30 $ 14 * $Revision: 1.3 $ 15 15 * 16 16 *
Note:
See TracChangeset
for help on using the changeset viewer.