Fork me on GitHub

Changeset 70 in svn for trunk/Delphes.cpp


Ignore:
Timestamp:
Dec 2, 2008, 8:50:30 PM (16 years ago)
Author:
severine ovyn
Message:

remove bug trigger

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Delphes.cpp

    r68 r70  
    2929#include "interface/VeryForward.h"
    3030#include "interface/JetUtils.h"
    31 
    3231
    3332#include <vector>
     
    346345      // Should test all the trigger table on the event, based on reconstructed objects
    347346      treeWriter->Fill();
    348      
     347      
    349348    } // Loop over all events
    350 
    351 
     349 
    352350  treeWriter->Write();
    353351  delete treeWriter;
    354 
     352 
    355353  if(DET->DOTRIGGER == 1)
    356354    {
     
    358356      chainT.Add(outputfilename.c_str());
    359357      ExRootTreeReader *treeReaderT = new ExRootTreeReader(&chainT);
    360 
     358     
    361359      const TClonesArray *branchElecTrig = treeReaderT->UseBranch("Electron");
    362360      const TClonesArray *branchMuonTrig = treeReaderT->UseBranch("Muon");
     
    365363      const TClonesArray *branchPhotonTrig = treeReaderT->UseBranch("Photon");
    366364      const TClonesArray *branchETmisTrig = treeReaderT->UseBranch("ETmis");
    367  
     365     
    368366      ExRootTreeWriter *treeWriterT = new ExRootTreeWriter(outputfilename, "Trigger");
    369       ExRootTreeBranch *branchTrigger = treeWriterT->NewBranch("Trigger", TRootTrigger::Class());
    370 
     367      ExRootTreeBranch *branchTrigger = treeWriterT->NewBranch("TrigResult", TRootTrigger::Class());
     368     
    371369      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)
    376374        {
    377           treeWriterT->Clear();
    378 //          treeReaderT->ReadEntry(entry);
     375          treeWriterT->Clear();
     376          treeReaderT->ReadEntry(entry);
    379377          elementTrigger = (TRootTrigger*) branchTrigger->NewEntry();
    380           elementTrigger->Accepted=true;
     378          elementTrigger->Accepted=1;
    381379          treeWriterT->Fill();
    382380        }
    383 
    384     treeWriterT->Write();
    385     delete treeWriterT;
    386    }
    387 
     381     
     382      treeWriterT->Write();
     383      delete treeWriterT;
     384    }
     385 
    388386  cout << "** Exiting..." << endl;
    389387 
     
    391389  delete DET;
    392390  if(converter) delete converter;
    393 
     391 
    394392  todo("TODO");
    395393}
Note: See TracChangeset for help on using the changeset viewer.