Fork me on GitHub

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

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

new header in all files

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