Fork me on GitHub

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

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

final trigger

File size: 2.3 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>
15#include "TLorentzVector.h"
[72]16#include "TClonesArray.h"
[52]17
18#include "Utilities/ExRootAnalysis/interface/BlockClasses.h"
19#include "Utilities/ExRootAnalysis/interface/TSimpleArray.h"
[72]20#include "Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h"
[52]21
22using namespace std;
23
[63]24class TriggerBit {
25
[52]26 public:
27
[63]28 TriggerBit();
29 ~TriggerBit() {};
[52]30
[63]31 void GetTrigCondition(const std::string& trigger_algorithm);
[52]32
[63]33 void PrintTrigCondition(string LogName,int i);
[52]34
[72]35 bool GetResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
36 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
37 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig);
[63]38
39 private:
[72]40
[63]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;
[52]49};
50
[63]51
52class TriggerTable {
53
54 public:
55
56 TriggerTable();
57 ~TriggerTable() {};
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(string LogName);
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 int event_i;
76
77 private:
78 bool Evaluate( int event_i );
79 // boucle sur list_of_trigger_bits, comme on a dit
80 // appelle la methode TriggerBit::Evaluate ou TriggerBit::GetResult (à voir)
81 // renvoie la réponse globale du trigger
82 // à la fin, mettre has_been_evaluated = true;
83 // voir le NB ci-dessous
84
85 vector<TriggerBit> list_of_trigger_bits;
86 bool has_been_evaluated;
87 bool GlobalResult;
88
89};
90
[52]91#endif
Note: See TracBrowser for help on using the repository browser.