/*********************************************************************** ** ** ** /----------------------------------------------\ ** ** | Delphes, a framework for the fast simulation | ** ** | of a generic collider experiment | ** ** \----------------------------------------------/ ** ** ** ** ** ** This package uses: ** ** ------------------ ** ** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] ** ** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] ** ** FROG: [hep-ex/0901.2718v1] ** ** ** ** ------------------------------------------------------------------ ** ** ** ** Main authors: ** ** ------------- ** ** ** ** Severine Ovyn Xavier Rouby ** ** severine.ovyn@uclouvain.be xavier.rouby@cern ** ** ** ** Center for Particle Physics and Phenomenology (CP3) ** ** Universite catholique de Louvain (UCL) ** ** Louvain-la-Neuve, Belgium ** ** ** ** Copyright (C) 2008-2009, ** ** All rights reserved. ** ** ** ***********************************************************************/ /// \file LHCO_Only.cpp /// \brief standalone executable for running the LHCO-converter #include "TChain.h" #include "TFile.h" #include "TApplication.h" #include "LHCOConverter.h" #include "ExRootTreeReader.h" #include "ExRootTreeWriter.h" #include "ExRootTreeBranch.h" #include "BlockClasses.h" #include #include #include #include using namespace std; int main(int argc, char *argv[]) { int appargc = 2; char *appName= new char[20]; char *appOpt= new char[20]; sprintf(appName,"LHCO_Only"); sprintf(appOpt,"-b"); char *appargv[] = {appName,appOpt}; TApplication app(appName, &appargc, appargv); delete [] appName; delete [] appOpt; if(argc != 2 && argc !=3 ) { cout << " Usage: " << argv[0] << " input_file [runlog_file] " << endl; cout << " input_file - file in Delphes root format," << endl; cout << " [runlog_file] - the corresponding log file (optional) "<TriggerCardReader(TrigDatacard.c_str()); TRIGT->PrintTriggerTable(LogName); TClonesArray *branchElecTrig = treeReaderT->UseBranch("Electron"); TClonesArray *branchMuonTrig = treeReaderT->UseBranch("Muon"); TClonesArray *branchJetTrig = treeReaderT->UseBranch("Jet"); TClonesArray *branchTauJetTrig = treeReaderT->UseBranch("TauJet"); TClonesArray *branchPhotonTrig = treeReaderT->UseBranch("Photon"); TClonesArray *branchETmisTrig = treeReaderT->UseBranch("ETmis"); ExRootTreeWriter *treeWriterT = new ExRootTreeWriter(inputFile, "Trigger"); ExRootTreeBranch *branchTrigger = treeWriterT->NewBranch("TrigResult", TRootTrigger::Class()); Long64_t entryT, allEntriesT = treeReaderT->GetEntries(); cout << "** Chain contains " << allEntriesT << " events" << endl; for(entryT = 0; entryT < allEntriesT; ++entryT) { treeWriterT->Clear(); treeReaderT->ReadEntry(entryT); TRIGT->GetGlobalResult(branchElecTrig, branchMuonTrig,branchJetTrig, branchTauJetTrig,branchPhotonTrig, branchETmisTrig,branchTrigger); treeWriterT->Fill(); } treeWriterT->Write(); delete treeWriterT; delete TRIGT; */ cout << "** Exiting..." << endl; }