Fork me on GitHub

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

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

copy-constructors ; operator=

File size: 2.4 KB
RevLine 
[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
20using namespace std;
21
[63]22class TriggerBit {
23
[52]24 public:
25
[63]26 TriggerBit();
[243]27 TriggerBit(const TriggerBit& tb);
28 TriggerBit& operator=(const TriggerBit& tb);
29 ~TriggerBit();
[52]30
[221]31 void GetTrigCondition(const string& trigger_algorithm);
32 void PrintTrigCondition(const string& LogName, const int i);
[72]33 bool GetResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
34 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
35 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig);
[243]36 vector<float> GetCuts(const vector<string> &Sequences);
[63]37
38 private:
[243]39
[63]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;
[52]47};
48
[63]49
50class TriggerTable {
51
52 public:
53
54 TriggerTable();
[243]55 ~TriggerTable() { list_of_trigger_bits.clear();};
56 TriggerTable& operator=(TriggerTable& tt);
57 TriggerTable(const TriggerTable& tt);
[63]58
[221]59 void TriggerCardReader(const string& filename="data/trigger.dat");
[63]60 // avant, ça s'appellait TriggerReader
61 // appelle la méthode TriggerBit::GetTrigCondition
62
63
[221]64 void PrintTriggerTable(const string& LogName);
[63]65 // fait un cout des triggers bits, c'est toujours pratique
66 // appelle la méthode TriggerBit::PriniTrigCondition
67
[72]68 bool GetGlobalResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
69 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
70 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig,ExRootTreeBranch *branchTrigger);
[63]71
72 void WriteResult();
73 // sauve dans le TTree
74 // ce nom est stupide, faut le changer
75
76 private:
[221]77 //bool Evaluate( int event_i );
[63]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;
[243]87 int event_i;
[63]88
89};
90
[52]91#endif
Note: See TracBrowser for help on using the repository browser.