[52] | 1 | #ifndef _TRIGUTIL_H_
|
---|
| 2 | #define _TRIGUTIL_H_
|
---|
| 3 |
|
---|
| 4 | /*
|
---|
| 5 | ---- Delphes ----
|
---|
| 6 | A Fast Simulator for general purpose LHC detector
|
---|
| 7 | S. Ovyn ~~~~ severine.ovyn@uclouvain.be
|
---|
| 8 |
|
---|
| 9 | Center for Particle Physics and Phenomenology (CP3)
|
---|
| 10 | Universite Catholique de Louvain (UCL)
|
---|
| 11 | Louvain-la-Neuve, Belgium
|
---|
| 12 | */
|
---|
| 13 |
|
---|
| 14 | #include <vector>
|
---|
[72] | 15 | #include "TClonesArray.h"
|
---|
[52] | 16 |
|
---|
[221] | 17 | #include "BlockClasses.h"
|
---|
[72] | 18 | #include "Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h"
|
---|
[52] | 19 |
|
---|
| 20 | using namespace std;
|
---|
| 21 |
|
---|
[63] | 22 | class TriggerBit {
|
---|
| 23 |
|
---|
[52] | 24 | public:
|
---|
| 25 |
|
---|
[63] | 26 | TriggerBit();
|
---|
| 27 | ~TriggerBit() {};
|
---|
[52] | 28 |
|
---|
[221] | 29 | void GetTrigCondition(const string& trigger_algorithm);
|
---|
| 30 | void PrintTrigCondition(const string& LogName, const int i);
|
---|
[72] | 31 | bool GetResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
|
---|
| 32 | TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
|
---|
| 33 | TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig);
|
---|
[63] | 34 |
|
---|
| 35 | private:
|
---|
[72] | 36 |
|
---|
[63] | 37 | vector<float> GetCuts(const vector<string> &Sequences);
|
---|
| 38 | vector<float> ElecValues;
|
---|
| 39 | vector<float> MuonValues;
|
---|
| 40 | vector<float> JetValues;
|
---|
| 41 | vector<float> TauJetValues;
|
---|
| 42 | vector<float> EtmisValues;
|
---|
| 43 | vector<float> GammaValues;
|
---|
| 44 | bool Result;
|
---|
[52] | 45 | };
|
---|
| 46 |
|
---|
[63] | 47 |
|
---|
| 48 | class TriggerTable {
|
---|
| 49 |
|
---|
| 50 | public:
|
---|
| 51 |
|
---|
| 52 | TriggerTable();
|
---|
| 53 | ~TriggerTable() {};
|
---|
| 54 |
|
---|
[221] | 55 | void TriggerCardReader(const string& filename="data/trigger.dat");
|
---|
[63] | 56 | // avant, ça s'appellait TriggerReader
|
---|
| 57 | // appelle la méthode TriggerBit::GetTrigCondition
|
---|
| 58 |
|
---|
| 59 |
|
---|
[221] | 60 | void PrintTriggerTable(const string& LogName);
|
---|
[63] | 61 | // fait un cout des triggers bits, c'est toujours pratique
|
---|
| 62 | // appelle la méthode TriggerBit::PriniTrigCondition
|
---|
| 63 |
|
---|
[72] | 64 | bool GetGlobalResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
|
---|
| 65 | TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
|
---|
| 66 | TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig,ExRootTreeBranch *branchTrigger);
|
---|
[63] | 67 |
|
---|
| 68 | void WriteResult();
|
---|
| 69 | // sauve dans le TTree
|
---|
| 70 | // ce nom est stupide, faut le changer
|
---|
| 71 | int event_i;
|
---|
| 72 |
|
---|
| 73 | private:
|
---|
[221] | 74 | //bool Evaluate( int event_i );
|
---|
[63] | 75 | // boucle sur list_of_trigger_bits, comme on a dit
|
---|
| 76 | // appelle la methode TriggerBit::Evaluate ou TriggerBit::GetResult (Ã voir)
|
---|
| 77 | // renvoie la réponse globale du trigger
|
---|
| 78 | // Ã la fin, mettre has_been_evaluated = true;
|
---|
| 79 | // voir le NB ci-dessous
|
---|
| 80 |
|
---|
| 81 | vector<TriggerBit> list_of_trigger_bits;
|
---|
| 82 | bool has_been_evaluated;
|
---|
| 83 | bool GlobalResult;
|
---|
| 84 |
|
---|
| 85 | };
|
---|
| 86 |
|
---|
[52] | 87 | #endif
|
---|