ATLAS Offline Software
Loading...
Searching...
No Matches
TrigDecisionChecker.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5
8
9#ifndef TrigDecisionChecker_TrigDecisionChecker_H
10#define TrigDecisionChecker_TrigDecisionChecker_H
11
12// std stuff
13#include <vector>
14#include <string>
15#include <map>
16#include <fstream>
17#include <iostream>
18
19// Base class
21
22// core stuff
23#include "GaudiKernel/ToolHandle.h"
24
25// Trigger includes
27
28// fwd declare muon printing tool
29namespace Rec {
31}
32
44{
45
46 public:
47
48 TrigDecisionChecker(const std::string &name, ISvcLocator *pSvcLocator);
50
51 // IAlgorithm virtual methods to implement
52 StatusCode initialize();
53 StatusCode execute();
54 StatusCode finalize();
55
56 private:
57 template <class T> StatusCode checkEDM(const std::string& trigItem);
58 StatusCode checkTauEDM(const std::string& trigItem);
59
60 StatusCode checkMuonEDM(const std::string& trigItem);
61
62 StatusCode checkBphysEDM(const std::string& trigItem);
63
64 StatusCode checkBjetEDM(const std::string& trigItem);
65
66 StatusCode checkElectronEDM(const std::string& trigItem);
67
68 StatusCode checkPhotonEDM(const std::string& trigItem);
69
70 StatusCode checkMinBiasEDM(const std::string& trigItem);
75
76 StatusCode checkJetEDM(const std::string& trigItem);
77
78 StatusCode checkMetEDM(const std::string& trigItem);
79
80 Gaudi::Property<bool> m_eventDecisionPrintout{this, "WriteEventDecision", true};
81
82 // write out trigger counts
83 Gaudi::Property<std::string> m_printoutFileName{ this, "WriteOutFilename", "", "when set the stat is saved in this file"};
84
85
86
87
88
89
90 // useful for bookkeeping:
91 std::map<std::string,int> m_L1Summary;
92 std::vector<std::string> m_summary;
93 std::vector<int> m_summaryPass;
94 std::vector<int> m_summaryPassRaw;
95 std::vector<int> m_summaryPassPhys;
96 std::vector<int> m_summaryChainPass;
97 std::vector<int> m_summaryChainPassRaw;
98 std::vector<int> m_summaryChainPassPhys;
99 std::vector<int> m_summaryChainPT;
100 std::vector<int> m_summaryChainPS;
102
103 // tests: check efficiency for a few signatures in blocks on 100 events
104 Gaudi::Property<int> m_monitoringBlockSize{ this, "MonitoringBlock", 100};
105
106 std::vector<int> m_countEvent;
107 std::vector<int> m_runCountSigs;
108 std::vector<std::vector<int>* > m_countSigs;
109 Gaudi::Property<std::vector<std::string>> m_countSigNames{ this, "MonitoredChains", {} };
111 float m_muSum = 0;
112
113 ToolHandle<Trig::TrigDecisionTool> m_trigDec{this, "TrigDecisionTool", "Trig::TrigDecisionTool/TrigDecisionTool"};
114
116 Gaudi::Property<std::vector<std::string>> m_muonItems{ this, "MuonItems", {} };
117
118 // Bjet triggers to test output for
119 Gaudi::Property<std::vector<std::string>> m_bjetItems{ this, "BjetItems", {} };
120
121 Gaudi::Property<std::vector<std::string>> m_bphysItems{ this, "BphysicsItems", {} };
122
123 // Electron triggers to test output for
124 Gaudi::Property<std::vector<std::string>> m_electronItems{ this, "ElectronItems", {} };
125
126 // Photon triggers to test output for
127 Gaudi::Property<std::vector<std::string>> m_photonItems{ this, "PhotonItems", {} };
128
129 // Tau triggers to test output for
130 Gaudi::Property<std::vector<std::string>> m_TauItems{ this, "TauItems", {} };
131
132 // MinBias triggers to test output for
133 Gaudi::Property<std::vector<std::string>> m_minBiasItems{ this, "MinBiasItems", {} };
134
135 // Jet triggers to test output for
136 Gaudi::Property<std::vector<std::string>> m_jetItems{ this, "JetItems", {} };
137
138 // Met triggers to test output for
139 Gaudi::Property<std::vector<std::string>> m_metItems{ this, "MetItems", {} };
140
141 // ...check prescale and passthrough factors
142 std::vector<float> m_chainPrescales;
143 std::vector<float> m_chainPrescalesCalculated;
144 std::vector<float> m_chain_passthrough;
146 std::vector<int> m_lower_chain_accept;
147 std::map<std::string,std::string> m_lowerChainMap;
148
149 // needed for mu value
150 std::string m_eventInfoName;
151
152 // Check pass bits
153 Gaudi::Property<bool> m_checkBits{ this, "CheckTrigPassBits", false, "TrigPassBits retrieval from TDT"};
154
155};
156
157#endif
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
interface for tool that creates a dump output of different detail to strings or files
void checkTrigSpacePointCounts(const Trig::FeatureContainer &fc)
StatusCode checkMuonEDM(const std::string &trigItem)
StatusCode execute()
std Gaudi execute method -> use TrigDecisionTool to 'look' at the trigger data
std::vector< int > m_summaryChainPass
Gaudi::Property< std::vector< std::string > > m_jetItems
std::vector< std::vector< int > * > m_countSigs
std::vector< float > m_chainPrescalesCalculated
Gaudi::Property< std::vector< std::string > > m_photonItems
std::vector< int > m_countEvent
TrigDecisionChecker(const std::string &name, ISvcLocator *pSvcLocator)
std Gaudi Algorithm constructor
StatusCode checkPhotonEDM(const std::string &trigItem)
StatusCode checkEDM(const std::string &trigItem)
StatusCode initialize()
std Gaudi initialize method
Gaudi::Property< std::vector< std::string > > m_muonItems
Muon triggers to test output for.
std::vector< float > m_chain_passthrough
StatusCode checkMetEDM(const std::string &trigItem)
StatusCode checkMinBiasEDM(const std::string &trigItem)
Gaudi::Property< std::vector< std::string > > m_minBiasItems
StatusCode checkBphysEDM(const std::string &trigItem)
Bphysics EDM checker.
Gaudi::Property< std::vector< std::string > > m_bjetItems
~TrigDecisionChecker()
std deconstructor
std::vector< int > m_summaryChainPassPhys
Gaudi::Property< std::vector< std::string > > m_countSigNames
void checkTrigTrackCounts(const Trig::FeatureContainer &fc)
std::vector< int > m_lower_chain_accept
Gaudi::Property< std::vector< std::string > > m_bphysItems
std::vector< int > m_summaryPassRaw
Gaudi::Property< std::vector< std::string > > m_metItems
std::map< std::string, std::string > m_lowerChainMap
Gaudi::Property< std::string > m_printoutFileName
StatusCode checkBjetEDM(const std::string &trigItem)
std::vector< int > m_runCountSigs
std::vector< int > m_summaryPassPhys
StatusCode checkElectronEDM(const std::string &trigItem)
Gaudi::Property< int > m_monitoringBlockSize
Gaudi::Property< std::vector< std::string > > m_TauItems
std::vector< std::string > m_summary
StatusCode checkTauEDM(const std::string &trigItem)
Gaudi::Property< bool > m_checkBits
ToolHandle< Trig::TrigDecisionTool > m_trigDec
interface to use the trigger data: TriggerTool
Gaudi::Property< bool > m_eventDecisionPrintout
std::vector< float > m_chain_passthrough_calculated
std::vector< int > m_summaryChainPS
StatusCode checkJetEDM(const std::string &trigItem)
void checkTrigVertexCounts(const Trig::FeatureContainer &fc)
Gaudi::Property< std::vector< std::string > > m_electronItems
Bphysics chains to test.
std::vector< float > m_chainPrescales
void checkTrigT2MBTSBits(const Trig::FeatureContainer &fc)
std::map< std::string, int > m_L1Summary
std::vector< int > m_summaryChainPassRaw
StatusCode finalize()
std Gaudi finalize method
std::vector< int > m_summaryPass
std::vector< int > m_summaryChainPT
Gaudi Tools.