[52] | 1 | #ifndef _TRIGUTIL_H_
|
---|
| 2 | #define _TRIGUTIL_H_
|
---|
| 3 |
|
---|
[260] | 4 | /***********************************************************************
|
---|
| 5 | ** **
|
---|
| 6 | ** /----------------------------------------------\ **
|
---|
| 7 | ** | Delphes, a framework for the fast simulation | **
|
---|
| 8 | ** | of a generic collider experiment | **
|
---|
| 9 | ** \----------------------------------------------/ **
|
---|
| 10 | ** **
|
---|
| 11 | ** **
|
---|
| 12 | ** This package uses: **
|
---|
| 13 | ** ------------------ **
|
---|
| 14 | ** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] **
|
---|
| 15 | ** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] **
|
---|
| 16 | ** FROG: [hep-ex/0901.2718v1] **
|
---|
| 17 | ** **
|
---|
| 18 | ** ------------------------------------------------------------------ **
|
---|
| 19 | ** **
|
---|
| 20 | ** Main authors: **
|
---|
| 21 | ** ------------- **
|
---|
| 22 | ** **
|
---|
| 23 | ** Severine Ovyn Xavier Rouby **
|
---|
| 24 | ** severine.ovyn@uclouvain.be xavier.rouby@cern **
|
---|
| 25 | ** **
|
---|
| 26 | ** Center for Particle Physics and Phenomenology (CP3) **
|
---|
| 27 | ** Universite catholique de Louvain (UCL) **
|
---|
| 28 | ** Louvain-la-Neuve, Belgium **
|
---|
| 29 | ** **
|
---|
| 30 | ** Copyright (C) 2008-2009, **
|
---|
| 31 | ** All rights reserved. **
|
---|
| 32 | ** **
|
---|
| 33 | ***********************************************************************/
|
---|
[52] | 34 |
|
---|
[260] | 35 |
|
---|
[52] | 36 | #include <vector>
|
---|
[72] | 37 | #include "TClonesArray.h"
|
---|
[52] | 38 |
|
---|
[221] | 39 | #include "BlockClasses.h"
|
---|
[250] | 40 | #include "Utilities/ExRootAnalysis/interface/TSimpleArray.h"
|
---|
[72] | 41 | #include "Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h"
|
---|
[52] | 42 |
|
---|
| 43 | using namespace std;
|
---|
| 44 |
|
---|
[63] | 45 | class TriggerBit {
|
---|
| 46 |
|
---|
[52] | 47 | public:
|
---|
| 48 |
|
---|
[250] | 49 | TriggerBit(){};
|
---|
[243] | 50 | TriggerBit(const TriggerBit& tb);
|
---|
| 51 | TriggerBit& operator=(const TriggerBit& tb);
|
---|
| 52 | ~TriggerBit();
|
---|
[52] | 53 |
|
---|
[221] | 54 | void GetTrigCondition(const string& trigger_algorithm);
|
---|
| 55 | void PrintTrigCondition(const string& LogName, const int i);
|
---|
[72] | 56 | bool GetResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
|
---|
| 57 | TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
|
---|
| 58 | TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig);
|
---|
[243] | 59 | vector<float> GetCuts(const vector<string> &Sequences);
|
---|
[250] | 60 | TSimpleArray<TRootJet> SubArrayBjets(TClonesArray *JET);
|
---|
| 61 | TSimpleArray<TRootElectron> SubArrayIElec(TClonesArray *ELEC);
|
---|
| 62 | TSimpleArray<TRootMuon> SubArrayIMuon(TClonesArray *MUON);
|
---|
[63] | 63 |
|
---|
| 64 | private:
|
---|
[243] | 65 |
|
---|
[63] | 66 | vector<float> ElecValues;
|
---|
[250] | 67 | vector<float> IElecValues;
|
---|
[63] | 68 | vector<float> MuonValues;
|
---|
[250] | 69 | vector<float> IMuonValues;
|
---|
[63] | 70 | vector<float> JetValues;
|
---|
[250] | 71 | vector<float> BjetValues;
|
---|
[63] | 72 | vector<float> TauJetValues;
|
---|
| 73 | vector<float> EtmisValues;
|
---|
| 74 | vector<float> GammaValues;
|
---|
| 75 | bool Result;
|
---|
[52] | 76 | };
|
---|
| 77 |
|
---|
[63] | 78 |
|
---|
| 79 | class TriggerTable {
|
---|
| 80 |
|
---|
| 81 | public:
|
---|
| 82 |
|
---|
| 83 | TriggerTable();
|
---|
[243] | 84 | ~TriggerTable() { list_of_trigger_bits.clear();};
|
---|
| 85 | TriggerTable& operator=(TriggerTable& tt);
|
---|
| 86 | TriggerTable(const TriggerTable& tt);
|
---|
[63] | 87 |
|
---|
[221] | 88 | void TriggerCardReader(const string& filename="data/trigger.dat");
|
---|
| 89 | void PrintTriggerTable(const string& LogName);
|
---|
[72] | 90 | bool GetGlobalResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
|
---|
| 91 | TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
|
---|
| 92 | TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig,ExRootTreeBranch *branchTrigger);
|
---|
[63] | 93 |
|
---|
| 94 | void WriteResult();
|
---|
| 95 |
|
---|
| 96 | private:
|
---|
| 97 |
|
---|
| 98 | vector<TriggerBit> list_of_trigger_bits;
|
---|
| 99 | bool has_been_evaluated;
|
---|
| 100 | bool GlobalResult;
|
---|
| 101 |
|
---|
| 102 | };
|
---|
| 103 |
|
---|
[52] | 104 | #endif
|
---|