Fork me on GitHub

Changeset 67 in svn


Ignore:
Timestamp:
Dec 2, 2008, 12:14:45 PM (16 years ago)
Author:
severine ovyn
Message:

start trigger

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Delphes.cpp

    r66 r67  
    3030#include "interface/JetUtils.h"
    3131
     32#include "Utilities/FROG/Examples/Sim_Delphes/FrogUtil.h"
    3233
    3334#include <vector>
     
    353354  delete treeWriter;
    354355
    355 /*  if(DET->DOTRIGGER == 1)
     356  if(DET->DOTRIGGER == 1)
    356357    {
    357 //      TChain chainT("Analysis");
    358 //      chainT.Add(outputfilename.c_str());
    359       ExRootTreeReader *treeReaderT = new ExRootTreeReader("Analysis");
    360 
     358      TChain chainT("Analysis");
     359      chainT.Add(outputfilename.c_str());
     360      ExRootTreeReader *treeReaderT = new ExRootTreeReader(&chainT);
    361361
    362362      const TClonesArray *branchElecTrig = treeReaderT->UseBranch("Electron");
     
    366366      const TClonesArray *branchPhotonTrig = treeReaderT->UseBranch("Photon");
    367367      const TClonesArray *branchETmisTrig = treeReaderT->UseBranch("ETmis");
    368    
    369      // Loop over all events
     368 
     369      ExRootTreeWriter *treeWriterT = new ExRootTreeWriter(outputfilename, "Trigger");
     370      ExRootTreeBranch *branchTrigger = treeWriterT->NewBranch("Trigger", TRootTrigger::Class());
     371
     372      TRootTrigger *elementTrigger;
     373
    370374     Long64_t entryT, allEntriesT = treeReaderT->GetEntries();
    371       cout << "** Chain contains " << allEntriesT << " events" << endl;
     375     cout << "** Chain contains " << allEntriesT << " events" << endl;
    372376     for(entryT = 0; entryT < allEntriesT; ++entryT)
    373377        {
    374 //cout<<"entry "<<entryT<<endl;
     378          treeWriterT->Clear();
     379//          treeReaderT->ReadEntry(entry);
     380          elementTrigger = (TRootTrigger*) branchTrigger->NewEntry();
     381          elementTrigger->Accepted=true;
     382          treeWriterT->Fill();
    375383        }
     384
     385    treeWriterT->Write();
     386    delete treeWriterT;
    376387   }
    377 */
    378388
    379389  cout << "** Exiting..." << endl;
  • trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h

    r56 r67  
    1313 *  present in the data members of the Block TRoot class.
    1414 *
    15  *  $Date: 2008-11-27 18:26:42 $
    16  *  $Revision: 1.3 $
     15 *  $Date: 2008-12-02 11:14:45 $
     16 *  $Revision: 1.4 $
    1717 *
    1818 * 
     
    289289//---------------------------------------------------------------------------
    290290
     291class TRootTrigger: public TSortableObject
     292{
     293public:
     294  TRootTrigger() {};
     295    static TCompare *fgCompare; //!
     296
     297  bool Accepted;
     298  bool GlobalAccepted;
     299
     300  ClassDef(TRootTrigger, 1)
     301
     302};
     303//---------------------------------------------------------------------------
     304
    291305class TRootETmis: public TSortableObject
    292306{
  • trunk/Utilities/ExRootAnalysis/src/BlockClasses.cc

    r3 r67  
    1111 *  to preserve mother-dautherlinks between particles.
    1212 *
    13  *  $Date: 2008-11-04 10:32:26 $
    14  *  $Revision: 1.1 $
     13 *  $Date: 2008-12-02 11:14:45 $
     14 *  $Revision: 1.2 $
    1515 *
    1616 * 
     
    3636TCompare *TRootLHEFParticle::fgCompare = 0;
    3737TCompare *TRootRomanPotHits::fgCompare =0;
     38TCompare *TRootTrigger::fgCompare =0;
    3839
    3940void TRootParticle::Set(const TLorentzVector& momentum) {
  • trunk/Utilities/ExRootAnalysis/src/BlockClassesLinkDef.h

    r3 r67  
    44 *  Lists classes to be included in cint dicitonary
    55 *
    6  *  $Date: 2008-11-04 10:32:26 $
    7  *  $Revision: 1.1 $
     6 *  $Date: 2008-12-02 11:14:45 $
     7 *  $Revision: 1.2 $
    88 *
    99 * 
     
    3434#pragma link C++ class TRootZdcHits;
    3535#pragma link C++ class TRootRomanPotHits;
     36#pragma link C++ class TRootTrigger;
    3637
    3738#pragma link C++ class TRootParticle;
Note: See TracChangeset for help on using the changeset viewer.