Fork me on GitHub

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

Last change on this file since 331 was 264, checked in by Xavier Rouby, 16 years ago

first test 2.0

File size: 4.7 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 // avant, ça s'appellait TriggerReader
90 // appelle la méthode TriggerBit::GetTrigCondition
91
92
93 void PrintTriggerTable(const string& LogName);
94 // fait un cout des triggers bits, c'est toujours pratique
95 // appelle la méthode TriggerBit::PriniTrigCondition
96
97 bool GetGlobalResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
98 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
99 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig,ExRootTreeBranch *branchTrigger);
100
101 void WriteResult();
102 // sauve dans le TTree
103 // ce nom est stupide, faut le changer
104
105 private:
106 //bool Evaluate( int event_i );
107 // boucle sur list_of_trigger_bits, comme on a dit
108 // appelle la methode TriggerBit::Evaluate ou TriggerBit::GetResult (à voir)
109 // renvoie la réponse globale du trigger
110 // à la fin, mettre has_been_evaluated = true;
111 // voir le NB ci-dessous
112
113 vector<TriggerBit> list_of_trigger_bits;
114 bool has_been_evaluated;
115 bool GlobalResult;
116 int event_i;
117
118};
119
120#endif
Note: See TracBrowser for help on using the repository browser.