Fork me on GitHub

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

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

add header

File size: 4.1 KB
Line 
1#ifndef _TRIGUTIL_H_
2#define _TRIGUTIL_H_
3
4/***********************************************************************
5** **
6** /----------------------------------------------\ **
7** | Delphes, a framework for the fast simulation | **
8** | of a generic collider experiment | **
9** \----------------------------------------------/ **
10** **
11** **
12** This package uses: **
13** ------------------ **
14** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] **
15** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] **
16** FROG: [hep-ex/0901.2718v1] **
17** **
18** ------------------------------------------------------------------ **
19** **
20** Main authors: **
21** ------------- **
22** **
23** Severine Ovyn Xavier Rouby **
24** severine.ovyn@uclouvain.be xavier.rouby@cern **
25** **
26** Center for Particle Physics and Phenomenology (CP3) **
27** Universite catholique de Louvain (UCL) **
28** Louvain-la-Neuve, Belgium **
29** **
30** Copyright (C) 2008-2009, **
31** All rights reserved. **
32** **
33***********************************************************************/
34
35
36#include <vector>
37#include "TClonesArray.h"
38
39#include "BlockClasses.h"
40#include "Utilities/ExRootAnalysis/interface/TSimpleArray.h"
41#include "Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h"
42
43using namespace std;
44
45class TriggerBit {
46
47 public:
48
49 TriggerBit(){};
50 TriggerBit(const TriggerBit& tb);
51 TriggerBit& operator=(const TriggerBit& tb);
52 ~TriggerBit();
53
54 void GetTrigCondition(const string& trigger_algorithm);
55 void PrintTrigCondition(const string& LogName, const int i);
56 bool GetResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
57 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
58 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig);
59 vector<float> GetCuts(const vector<string> &Sequences);
60 TSimpleArray<TRootJet> SubArrayBjets(TClonesArray *JET);
61 TSimpleArray<TRootElectron> SubArrayIElec(TClonesArray *ELEC);
62 TSimpleArray<TRootMuon> SubArrayIMuon(TClonesArray *MUON);
63
64 private:
65
66 vector<float> ElecValues;
67 vector<float> IElecValues;
68 vector<float> MuonValues;
69 vector<float> IMuonValues;
70 vector<float> JetValues;
71 vector<float> BjetValues;
72 vector<float> TauJetValues;
73 vector<float> EtmisValues;
74 vector<float> GammaValues;
75 bool Result;
76};
77
78
79class TriggerTable {
80
81 public:
82
83 TriggerTable();
84 ~TriggerTable() { list_of_trigger_bits.clear();};
85 TriggerTable& operator=(TriggerTable& tt);
86 TriggerTable(const TriggerTable& tt);
87
88 void TriggerCardReader(const string& filename="data/trigger.dat");
89 void PrintTriggerTable(const string& LogName);
90 bool GetGlobalResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
91 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
92 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig,ExRootTreeBranch *branchTrigger);
93
94 void WriteResult();
95
96 private:
97
98 vector<TriggerBit> list_of_trigger_bits;
99 bool has_been_evaluated;
100 bool GlobalResult;
101
102};
103
104#endif
Note: See TracBrowser for help on using the repository browser.