Fork me on GitHub

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

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

first test 2.0

File size: 4.7 KB
RevLine 
[52]1#ifndef _TRIGUTIL_H_
2#define _TRIGUTIL_H_
3
[260]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***********************************************************************/
[52]34
[260]35
[52]36#include <vector>
[72]37#include "TClonesArray.h"
[52]38
[221]39#include "BlockClasses.h"
[250]40#include "Utilities/ExRootAnalysis/interface/TSimpleArray.h"
[72]41#include "Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h"
[52]42
43using namespace std;
44
[63]45class TriggerBit {
46
[52]47 public:
48
[264]49 TriggerBit();
[243]50 TriggerBit(const TriggerBit& tb);
51 TriggerBit& operator=(const TriggerBit& tb);
52 ~TriggerBit();
[52]53
[221]54 void GetTrigCondition(const string& trigger_algorithm);
55 void PrintTrigCondition(const string& LogName, const int i);
[72]56 bool GetResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
57 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
58 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig);
[243]59 vector<float> GetCuts(const vector<string> &Sequences);
[250]60 TSimpleArray<TRootJet> SubArrayBjets(TClonesArray *JET);
61 TSimpleArray<TRootElectron> SubArrayIElec(TClonesArray *ELEC);
62 TSimpleArray<TRootMuon> SubArrayIMuon(TClonesArray *MUON);
[63]63
64 private:
[243]65
[63]66 vector<float> ElecValues;
[250]67 vector<float> IElecValues;
[63]68 vector<float> MuonValues;
[250]69 vector<float> IMuonValues;
[63]70 vector<float> JetValues;
[250]71 vector<float> BjetValues;
[63]72 vector<float> TauJetValues;
73 vector<float> EtmisValues;
74 vector<float> GammaValues;
75 bool Result;
[52]76};
77
[63]78
79class TriggerTable {
80
81 public:
82
83 TriggerTable();
[243]84 ~TriggerTable() { list_of_trigger_bits.clear();};
85 TriggerTable& operator=(TriggerTable& tt);
86 TriggerTable(const TriggerTable& tt);
[63]87
[221]88 void TriggerCardReader(const string& filename="data/trigger.dat");
[264]89 // avant, ça s'appellait TriggerReader
90 // appelle la méthode TriggerBit::GetTrigCondition
91
92
[221]93 void PrintTriggerTable(const string& LogName);
[264]94 // fait un cout des triggers bits, c'est toujours pratique
95 // appelle la méthode TriggerBit::PriniTrigCondition
96
[72]97 bool GetGlobalResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig,
98 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig,
99 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig,ExRootTreeBranch *branchTrigger);
[63]100
101 void WriteResult();
[264]102 // sauve dans le TTree
103 // ce nom est stupide, faut le changer
[63]104
105 private:
[264]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
[63]112
113 vector<TriggerBit> list_of_trigger_bits;
114 bool has_been_evaluated;
115 bool GlobalResult;
[264]116 int event_i;
[63]117
118};
119
[52]120#endif
Note: See TracBrowser for help on using the repository browser.