ATLAS Offline Software
Loading...
Searching...
No Matches
egammaMonToolBase.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6//
7// 2014-06-28 Author: Remi Lafaye (Annecy)
8//
10
11#ifndef egammaMonToolBase_H
12#define egammaMonToolBase_H
13
14#include <vector>
15#include "TProfile.h"
18#include "TString.h"
19
20class TH1;
21class TH2;
22class TString;
23class TProfile;
24class StoreGateSvc;
25
27 std::string m_nameOfEgammaType {};
28
29 // Global panel histograms
30 TH1 *m_hN {}; // Histogram for number of egammas
31 TH1 *m_hEt {}; // Histogram for egamma transverse energies
32 TH1 *m_hEta {}; // Histogram for egamma eta
33 TH1 *m_hPhi {}; // Histogram for egamma phi
34 TH2 *m_hEtaPhi {}; // Histogram for egamma eta,phi
35 TH2 *m_hEtaPhi4GeV {}; // Histogram for egamma eta,phi (only candidates with a pt greater than 4 GeV)
36 TH2 *m_hEtaPhi20GeV {}; // Histogram for egamma eta,phi (only candidates with a pt greater than 20 GeV)
37 TH1 *m_hTopoEtCone40 {}; // Histogram for egamma isolation energy TopoEtcone40
38 TH1 *m_hPtCone20 {}; // Histogram for egamma isolation energy PtCone20
39 TH1 *m_hTime {}; // Histogram for egamma cluster time
40
41 // egamma ID per region histograms
42 std::vector<TH1*> m_hvEhad1 {};
43 std::vector<TH1*> m_hvCoreEM {};
44 std::vector<TH1*> m_hvF0 {};
45 std::vector<TH1*> m_hvF1 {};
46 std::vector<TH1*> m_hvF2 {};
47 std::vector<TH1*> m_hvF3 {};
48 std::vector<TH1*> m_hvRe233e237 {};
49 std::vector<TH1*> m_hvRe237e277 {};
50
51 // egamma per region histograms
52 std::vector<TH1*> m_hvN {}; // Histograms for number of egammas
53 std::vector<TH1*> m_hvEt {}; // Histograms for egamma transverse energies
54 std::vector<TH1*> m_hvEta {}; // Histograms for egamma transverse eta
55 std::vector<TH1*> m_hvPhi {}; // Histograms for egamma transverse phi
56 std::vector<TH1*> m_hvTopoEtCone40 {}; // Histograms for egamma calo-based isolation transverse energies
57 std::vector<TH1*> m_hvPtCone20 {}; // Histograms for egamma track-based isolation transverse energies
58 std::vector<TH1*> m_hvTime {}; // Histograms for egamma times
59
60 // Monitoring per lumiblock
61 unsigned int m_lumiBlockNumber {};
62
63 TH1 *m_hLB_N {}; // Histogram for number of egamma vs LB
64
65 egammaBaseHist(std::string name)
66 : m_nameOfEgammaType (std::move(name))
67 {
68 }
69};
70
72{
73 public:
74
75 egammaMonToolBase(const std::string& type, const std::string& name, const IInterface* parent);
76
77 virtual ~egammaMonToolBase();
78
79 virtual StatusCode initialize() override;
80 virtual StatusCode bookHistograms() override;
81 virtual StatusCode fillHistograms() override;
82 virtual StatusCode procHistograms() override;
83
84 protected:
85
87
88 bool hasBadLar(const EventContext& ctx);
89 static int GetRegion(float eta);
90 static int GetForwardRegion(float eta);
91 void bookTH1F(TH1* &h, MonGroup& mygroup, const std::string& hname, const std::string& htitle, int nbins, float low, float high);
92 void bookTH1F(TH1* &h, MonGroup& mygroup, const std::string& hname_prefix, const std::string& htitle_prefix, int nbins, float low, float high, std::string &nameOfEgammaType);
93 void bookTH2F(TH2* &h, MonGroup& mygroup, const std::string& hname, const std::string& htitle, int nbinsx, float xlow, float xhigh, int nbinsy, float ylow, float yhigh);
94 void bookTH2F(TH2* &h, MonGroup& mygroup, const std::string& hname_prefix, const std::string& htitle_prefix, int nbinsx, float xlow, float xhigh, int nbinsy, float ylow, float yhigh, std::string &nameOfEgammaType);
95 void bookTProfile(TProfile* &h, MonGroup& mygroup, const std::string& hname, const std::string& htitle, int nbins, float xlow, float xhigh, float ylow, float yhigh);
96 void bookTH1FperRegion(std::vector<TH1*> &vhist, MonGroup& mygroup, const std::string& hname, const std::string& htitle, int nbins, float low, float high, unsigned int min_region, unsigned int max_region);
97 void bookTH1FperRegion(std::vector<TH1*> &vhist, MonGroup& mygroup, const std::string& hname_prefix, const std::string& htitle, int nbins, float low, float high, unsigned int min_region, unsigned int max_region, std::string &nameOfEgammaType);
98 void bookTH2FperRegion(std::vector<TH2*> &vhist, MonGroup& mygroup, const std::string& hname, const std::string& htitle, int nbinsx, float xlow, float xhigh, int nbinsy, float ylow, float yhigh, unsigned int min_region, unsigned int max_region);
99 void bookTH2FperRegion(std::vector<TH2*> &vhist, MonGroup& mygroup, const std::string& hname_prefix, const std::string& htitle_prefix, int nbinsx, float xlow, float xhigh, int nbinsy, float ylow, float yhigh, unsigned int min_region, unsigned int max_region, std::string &nameOfEgammaType);
100 static void fillTH1FperRegion(std::vector<TH1*> &vhist, unsigned int ir, float x);
101 static void fillTH2FperRegion(std::vector<TH2*> &vhist, unsigned int ir, float x, float y);
102 void fillEfficiencies(TH1* h, TH1* href);
103 bool hasGoodTrigger(const std::string& comment);
104 unsigned int getCurrentLB(const EventContext& ctx);
105
106 std::vector<std::string> m_Trigger; // generic Trigger Name
107 ToolHandle<Trig::TrigDecisionTool> m_trigdec; // Trigger Decision Tool Handle
108 bool m_UseTrigger; // Use Trigger ?
109
110 std::string m_GroupExtension;
111
112 unsigned int m_currentLB;
113 SG::ReadHandleKey<xAOD::EventInfo> m_EventInfoKey{this, "EventInfoKey", "EventInfo"};
114
115 private:
116 std::vector<std::string> m_region;
117};
118
119#endif
Scalar eta() const
pseudorapidity method
#define y
#define x
Header file for AthHistogramAlgorithm.
ManagedMonitorToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Property holding a SG store/key/clid from which a ReadHandle is made.
The Athena Transient Store API.
virtual StatusCode initialize() override
std::string m_GroupExtension
void bookTH1FperRegion(std::vector< TH1 * > &vhist, MonGroup &mygroup, const std::string &hname, const std::string &htitle, int nbins, float low, float high, unsigned int min_region, unsigned int max_region)
void bookTProfile(TProfile *&h, MonGroup &mygroup, const std::string &hname, const std::string &htitle, int nbins, float xlow, float xhigh, float ylow, float yhigh)
unsigned int getCurrentLB(const EventContext &ctx)
bool hasBadLar(const EventContext &ctx)
void bookTH2FperRegion(std::vector< TH2 * > &vhist, MonGroup &mygroup, const std::string &hname, const std::string &htitle, int nbinsx, float xlow, float xhigh, int nbinsy, float ylow, float yhigh, unsigned int min_region, unsigned int max_region)
bool hasGoodTrigger(const std::string &comment)
void bookTH2F(TH2 *&h, MonGroup &mygroup, const std::string &hname, const std::string &htitle, int nbinsx, float xlow, float xhigh, int nbinsy, float ylow, float yhigh)
static void fillTH2FperRegion(std::vector< TH2 * > &vhist, unsigned int ir, float x, float y)
virtual StatusCode procHistograms() override
An inheriting class should either override this function or finalHists().
egammaMonToolBase(const std::string &type, const std::string &name, const IInterface *parent)
static int GetForwardRegion(float eta)
std::vector< std::string > m_Trigger
virtual StatusCode bookHistograms() override
An inheriting class should either override this function or bookHists().
ToolHandle< Trig::TrigDecisionTool > m_trigdec
static void fillTH1FperRegion(std::vector< TH1 * > &vhist, unsigned int ir, float x)
static int GetRegion(float eta)
virtual StatusCode fillHistograms() override
An inheriting class should either override this function or fillHists().
SG::ReadHandleKey< xAOD::EventInfo > m_EventInfoKey
void bookTH1F(TH1 *&h, MonGroup &mygroup, const std::string &hname, const std::string &htitle, int nbins, float low, float high)
void fillEfficiencies(TH1 *h, TH1 *href)
std::vector< std::string > m_region
int ir
counter of the current depth
Definition fastadd.cxx:49
STL namespace.
std::vector< TH1 * > m_hvTopoEtCone40
std::vector< TH1 * > m_hvF2
egammaBaseHist(std::string name)
std::vector< TH1 * > m_hvEt
std::vector< TH1 * > m_hvCoreEM
std::vector< TH1 * > m_hvN
std::vector< TH1 * > m_hvRe233e237
std::string m_nameOfEgammaType
std::vector< TH1 * > m_hvF3
std::vector< TH1 * > m_hvEta
std::vector< TH1 * > m_hvRe237e277
unsigned int m_lumiBlockNumber
std::vector< TH1 * > m_hvF1
std::vector< TH1 * > m_hvF0
std::vector< TH1 * > m_hvEhad1
std::vector< TH1 * > m_hvPtCone20
std::vector< TH1 * > m_hvTime
std::vector< TH1 * > m_hvPhi