Fork me on GitHub

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

Last change on this file since 861 was 443, checked in by Xavier Rouby, 15 years ago

new header in all files

File size: 4.8 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** \------------- arXiv:0903.2225v1 ------------/ **
10** **
11** **
12** This package uses: **
13** ------------------ **
14** ROOT: Nucl. Inst. & Meth. in Phys. Res. A389 (1997) 81-86 **
15** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] **
16** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] **
17** FROG: [hep-ex/0901.2718v1] **
18** HepMC: Comput. Phys. Commun.134 (2001) 41 **
19** **
20** ------------------------------------------------------------------ **
21** **
22** Main authors: **
23** ------------- **
24** **
25** Severine Ovyn Xavier Rouby **
26** severine.ovyn@uclouvain.be xavier.rouby@cern **
27** **
28** Center for Particle Physics and Phenomenology (CP3) **
29** Universite catholique de Louvain (UCL) **
30** Louvain-la-Neuve, Belgium **
31** **
32** Copyright (C) 2008-2009, **
33** All rights reserved. **
34** **
35***********************************************************************/
36
37#include <vector>
38#include "TClonesArray.h"
39
40#include "BlockClasses.h"
41#include "Utilities/ExRootAnalysis/interface/TSimpleArray.h"
42#include "Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h"
43
44using namespace std;
45
46class TriggerBit {
47
48 public:
49
50 TriggerBit();
51 TriggerBit(const TriggerBit& tb);
52 TriggerBit& operator=(const TriggerBit& tb);
53 ~TriggerBit();
54
55 void GetTrigCondition(const string& trigger_algorithm);
56 void PrintTrigCondition(const string& LogName, const int i);
57 bool GetResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
58 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
59 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig);
60 vector<float> GetCuts(const vector<string> &Sequences);
61 TSimpleArray<TRootJet> SubArrayBjets(TClonesArray *JET);
62 TSimpleArray<TRootElectron> SubArrayIElec(TClonesArray *ELEC);
63 TSimpleArray<TRootMuon> SubArrayIMuon(TClonesArray *MUON);
64
65 private:
66
67 vector<float> ElecValues;
68 vector<float> IElecValues;
69 vector<float> MuonValues;
70 vector<float> IMuonValues;
71 vector<float> JetValues;
72 vector<float> BjetValues;
73 vector<float> TauJetValues;
74 vector<float> EtmisValues;
75 vector<float> GammaValues;
76 bool Result;
77};
78
79
80class TriggerTable {
81
82 public:
83
84 TriggerTable();
85 ~TriggerTable() { list_of_trigger_bits.clear();};
86 TriggerTable& operator=(TriggerTable& tt);
87 TriggerTable(const TriggerTable& tt);
88
89 void TriggerCardReader(const string& filename="data/trigger.dat");
90 // avant, ça s'appellait TriggerReader
91 // appelle la méthode TriggerBit::GetTrigCondition
92
93
94 void PrintTriggerTable(const string& LogName);
95 // fait un cout des triggers bits, c'est toujours pratique
96 // appelle la méthode TriggerBit::PriniTrigCondition
97
98 bool GetGlobalResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
99 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
100 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig,ExRootTreeBranch *branchTrigger);
101
102 void WriteResult();
103 // sauve dans le TTree
104 // ce nom est stupide, faut le changer
105
106 private:
107 //bool Evaluate( int event_i );
108 // boucle sur list_of_trigger_bits, comme on a dit
109 // appelle la methode TriggerBit::Evaluate ou TriggerBit::GetResult (à voir)
110 // renvoie la réponse globale du trigger
111 // à la fin, mettre has_been_evaluated = true;
112 // voir le NB ci-dessous
113
114 vector<TriggerBit> list_of_trigger_bits;
115 bool has_been_evaluated;
116 bool GlobalResult;
117 int event_i;
118
119};
120
121#endif
Note: See TracBrowser for help on using the repository browser.