Fork me on GitHub

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

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

include statements have been cleaned ; general cleaning

File size: 2.2 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() {};
28
29 void GetTrigCondition(const string& trigger_algorithm);
30 void PrintTrigCondition(const string& LogName, const int i);
31 bool GetResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
32 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
33 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig);
34
35 private:
36
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;
45};
46
47
48class TriggerTable {
49
50 public:
51
52 TriggerTable();
53 ~TriggerTable() {};
54
55 void TriggerCardReader(const string& filename="data/trigger.dat");
56 // avant, ça s'appellait TriggerReader
57 // appelle la méthode TriggerBit::GetTrigCondition
58
59
60 void PrintTriggerTable(const string& LogName);
61 // fait un cout des triggers bits, c'est toujours pratique
62 // appelle la méthode TriggerBit::PriniTrigCondition
63
64 bool GetGlobalResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
65 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
66 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig,ExRootTreeBranch *branchTrigger);
67
68 void WriteResult();
69 // sauve dans le TTree
70 // ce nom est stupide, faut le changer
71 int event_i;
72
73 private:
74 //bool Evaluate( int event_i );
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
87#endif
Note: See TracBrowser for help on using the repository browser.