Fork me on GitHub

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

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

add isolation and b-tag

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/TSimpleArray.h"
19#include "Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h"
20
21using namespace std;
22
23class TriggerBit {
24
25 public:
26
27 TriggerBit(){};
28 TriggerBit(const TriggerBit& tb);
29 TriggerBit& operator=(const TriggerBit& tb);
30 ~TriggerBit();
31
32 void GetTrigCondition(const string& trigger_algorithm);
33 void PrintTrigCondition(const string& LogName, const int i);
34 bool GetResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
35 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
36 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig);
37 vector<float> GetCuts(const vector<string> &Sequences);
38 TSimpleArray<TRootJet> SubArrayBjets(TClonesArray *JET);
39 TSimpleArray<TRootElectron> SubArrayIElec(TClonesArray *ELEC);
40 TSimpleArray<TRootMuon> SubArrayIMuon(TClonesArray *MUON);
41
42 private:
43
44 vector<float> ElecValues;
45 vector<float> IElecValues;
46 vector<float> MuonValues;
47 vector<float> IMuonValues;
48 vector<float> JetValues;
49 vector<float> BjetValues;
50 vector<float> TauJetValues;
51 vector<float> EtmisValues;
52 vector<float> GammaValues;
53 bool Result;
54};
55
56
57class TriggerTable {
58
59 public:
60
61 TriggerTable();
62 ~TriggerTable() { list_of_trigger_bits.clear();};
63 TriggerTable& operator=(TriggerTable& tt);
64 TriggerTable(const TriggerTable& tt);
65
66 void TriggerCardReader(const string& filename="data/trigger.dat");
67 void PrintTriggerTable(const string& LogName);
68 bool GetGlobalResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
69 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
70 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig,ExRootTreeBranch *branchTrigger);
71
72 void WriteResult();
73
74 private:
75
76 vector<TriggerBit> list_of_trigger_bits;
77 bool has_been_evaluated;
78 bool GlobalResult;
79
80};
81
82#endif
Note: See TracBrowser for help on using the repository browser.