Fork me on GitHub

source: svn/trunk/interface/TriggerUtil.h@ 248

Last change on this file since 248 was 243, checked in by Xavier Rouby, 16 years ago

copy-constructors ; operator=

File size: 2.4 KB
Line 
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>
15#include "TClonesArray.h"
16
17#include "BlockClasses.h"
18#include "Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h"
19
20using namespace std;
21
22class TriggerBit {
23
24 public:
25
26 TriggerBit();
27 TriggerBit(const TriggerBit& tb);
28 TriggerBit& operator=(const TriggerBit& tb);
29 ~TriggerBit();
30
31 void GetTrigCondition(const string& trigger_algorithm);
32 void PrintTrigCondition(const string& LogName, const int i);
33 bool GetResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
34 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
35 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig);
36 vector<float> GetCuts(const vector<string> &Sequences);
37
38 private:
39
40 vector<float> ElecValues;
41 vector<float> MuonValues;
42 vector<float> JetValues;
43 vector<float> TauJetValues;
44 vector<float> EtmisValues;
45 vector<float> GammaValues;
46 bool Result;
47};
48
49
50class TriggerTable {
51
52 public:
53
54 TriggerTable();
55 ~TriggerTable() { list_of_trigger_bits.clear();};
56 TriggerTable& operator=(TriggerTable& tt);
57 TriggerTable(const TriggerTable& tt);
58
59 void TriggerCardReader(const string& filename="data/trigger.dat");
60 // avant, ça s'appellait TriggerReader
61 // appelle la méthode TriggerBit::GetTrigCondition
62
63
64 void PrintTriggerTable(const string& LogName);
65 // fait un cout des triggers bits, c'est toujours pratique
66 // appelle la méthode TriggerBit::PriniTrigCondition
67
68 bool GetGlobalResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
69 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
70 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig,ExRootTreeBranch *branchTrigger);
71
72 void WriteResult();
73 // sauve dans le TTree
74 // ce nom est stupide, faut le changer
75
76 private:
77 //bool Evaluate( int event_i );
78 // boucle sur list_of_trigger_bits, comme on a dit
79 // appelle la methode TriggerBit::Evaluate ou TriggerBit::GetResult (à voir)
80 // renvoie la réponse globale du trigger
81 // à la fin, mettre has_been_evaluated = true;
82 // voir le NB ci-dessous
83
84 vector<TriggerBit> list_of_trigger_bits;
85 bool has_been_evaluated;
86 bool GlobalResult;
87 int event_i;
88
89};
90
91#endif
Note: See TracBrowser for help on using the repository browser.