Fork me on GitHub

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

Last change on this file since 67 was 63, checked in by severine ovyn, 16 years ago

Trigger log file

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