ATLAS Offline Software
photonMonTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 //
7 // 2014-05-21 Author: Remi Lafaye (Annecy)
8 // 2015-02-15 Author: Bertrand Laforge (LPNHE Paris)
9 //
11 
12 #ifndef photonMonTool_H
13 #define photonMonTool_H
14 
16 #include "GaudiKernel/MsgStream.h"
17 #include "GaudiKernel/StatusCode.h"
18 #include "StoreGate/StoreGateSvc.h"
19 #include "TH1F.h"
20 #include "TH2F.h"
21 #include "egammaMonToolBase.h"
22 #include "xAODEgamma/Electron.h"
26 #include <iostream>
27 #include <string>
28 #include <utility>
29 #include <vector>
30 
32 {
34  {
39  };
40 
41  // Global panel histograms
42  TH1 * m_hNUnconv {}; // Histogram for number of Unconverted photons
43  TH1 * m_hNConv {}; // Histogram for number of Converted photons
44  TH1 * m_hEtUnconv {}; // Histogram for Unconverted photon transverse energies
45  TH1 * m_hEtConv {}; // Histogram for Converted photon transverse energies
46  TH1 * m_hEtaUnconv {};// Histogram for Unconverted photon eta
47  TH1 * m_hEtaConv {}; // Histogram for Converted photon eta
48  TH1 * m_hPhiUnconv {};// Histogram for Unconverted photon phi
49  TH1 * m_hPhiConv {}; // Histogram for Converted photon phi
50  TH2 * m_hEtaPhiUnconv {};// Histogram for Unconverted photon eta,phi
51  TH2 * m_hEtaPhiConv {}; // Histogram for Converted photon eta,phi
52  TH1 * m_hTopoEtCone40Unconv {};// Histogram for calo based Unconverted photon isolation energy
53  TH1 * m_hTopoEtCone40Conv {}; // Histogram for calo based Converted photon isolation energy
54  TH1 * m_hPtCone20Unconv {};// Histogram for track based Unconverted photon isolation energy
55  TH1 * m_hPtCone20Conv {}; // Histogram for track based Converted photon isolation energy
56  TH1 * m_hRConv {}; // Histogram for photon convertion radius distribution
57 
58  // photons per region histograms
59  std::vector<TH1*> m_hvTopoEtCone40Unconv {}; // Histograms for unconv. photon calo-based isolation transverse energies
60  std::vector<TH1*> m_hvPtCone20Unconv {}; // Histograms for unconv. photon track-based isolation transverse energies
61  std::vector<TH1*> m_hvTopoEtCone40Conv {}; // Histograms conv. for photon calo-based isolation transverse energies
62  std::vector<TH1*> m_hvPtCone20Conv {}; // Histograms for conv. photon track-based isolation transverse energies
63 
64  // Converted Photon Trk per region histograms
65  std::vector<TH1*> m_hvConvType {};
66  std::vector<TH1*> m_hvConvTrkMatch1 {};
67  std::vector<TH1*> m_hvConvTrkMatch2 {};
68  std::vector<TH1*> m_hvDeltaEta1 {};
69  std::vector<TH1*> m_hvDeltaPhi2 {};
70  std::vector<TH1*> m_hvNOfBLayerHits {};
71  std::vector<TH1*> m_hvNOfSiHits {};
72  std::vector<TH1*> m_hvNOfTRTHits {};
73  std::vector<TH1*> m_hvNOfTRTHighThresholdHits {};
74  std::vector<TH1*> m_hvd0 {};
75 
76  // Monitoring per lumiblock
77  unsigned int m_nPhotonsInCurrentLB {};
78  unsigned int m_nPhotonsInCurrentLBUnconv {};
79  unsigned int m_nPhotonsInCurrentLBConv {};
80  unsigned int m_nPhotons {};
81  unsigned int m_nPhotonsUnconv {};
82  unsigned int m_nPhotonsConv {};
83  std::vector<int> m_nPhotonsPerLumiBlock {};
84  std::vector<int> m_nPhotonsPerLumiBlockUnconv {};
85  std::vector<int> m_nPhotonsPerLumiBlockConv {};
86  std::vector<int> m_nPhotonsPerRegion {};
87  std::vector<int> m_nPhotonsPerRegionUnconv {};
88  std::vector<int> m_nPhotonsPerRegionConv {};
89 
90  TH1 *m_hLB_NUnconv {}; // Histogram for number of photons vs LB
91  TH1 *m_hLB_NConv {}; // Histogram for number of photons vs LB
92  TH1 *m_hLB_fConv {}; // Histogram of Conv. photon fraction vs LB
93 
94  photonHist(const std::string& name) : egammaBaseHist(name) {}
95 };
96 
97 
99 {
100  public:
101  photonMonTool(const std::string& type, const std::string& name, const IInterface* parent);
102  virtual ~photonMonTool();
103 
104  virtual StatusCode initialize() override;
105  virtual StatusCode bookHistograms() override;
107 
108  virtual StatusCode fillHistograms() override;
110 
111  protected:
112  SG::ReadHandleKey<xAOD::PhotonContainer> m_PhotonContainer{this, "PhotonContainer", "PhotonCollection", "Name of the photon collection"}; // Container name for photons
113 
114  photonHist *m_CbLoosePhotons {}; // Loose cut based photons histograms
115  photonHist *m_CbTightPhotons {}; // Tight cut based photons histograms
116 
123 };
124 
125 #endif
photonMonTool
Definition: photonMonTool.h:99
photonHist::m_hvNOfTRTHits
std::vector< TH1 * > m_hvNOfTRTHits
Definition: photonMonTool.h:72
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
photonHist::m_hvDeltaEta1
std::vector< TH1 * > m_hvDeltaEta1
Definition: photonMonTool.h:68
photonHist::CbMedium
@ CbMedium
Definition: photonMonTool.h:36
photonMonTool::m_PhotonContainer
SG::ReadHandleKey< xAOD::PhotonContainer > m_PhotonContainer
Definition: photonMonTool.h:112
photonHist::m_hvTopoEtCone40Conv
std::vector< TH1 * > m_hvTopoEtCone40Conv
Definition: photonMonTool.h:61
photonHist::m_hvConvTrkMatch1
std::vector< TH1 * > m_hvConvTrkMatch1
Definition: photonMonTool.h:66
photonHist::m_hEtConv
TH1 * m_hEtConv
Definition: photonMonTool.h:45
photonHist::m_hEtaPhiConv
TH2 * m_hEtaPhiConv
Definition: photonMonTool.h:51
photonHist::m_hRConv
TH1 * m_hRConv
Definition: photonMonTool.h:56
photonHist::m_hvPtCone20Conv
std::vector< TH1 * > m_hvPtCone20Conv
Definition: photonMonTool.h:62
photonHist::m_hLB_NConv
TH1 * m_hLB_NConv
Definition: photonMonTool.h:91
photonHist::m_nPhotonsConv
unsigned int m_nPhotonsConv
Definition: photonMonTool.h:82
photonHist::m_hTopoEtCone40Unconv
TH1 * m_hTopoEtCone40Unconv
Definition: photonMonTool.h:52
photonHist::m_hLB_fConv
TH1 * m_hLB_fConv
Definition: photonMonTool.h:92
photonHist::m_nPhotonsPerRegionUnconv
std::vector< int > m_nPhotonsPerRegionUnconv
Definition: photonMonTool.h:87
photonHist::m_nPhotonsPerRegion
std::vector< int > m_nPhotonsPerRegion
Definition: photonMonTool.h:86
egammaMonToolBase.h
photonMonTool::bookHistograms
virtual StatusCode bookHistograms() override
An inheriting class should either override this function or bookHists().
Definition: photonMonTool.cxx:181
photonHist::m_hEtaUnconv
TH1 * m_hEtaUnconv
Definition: photonMonTool.h:46
photonHist::m_nPhotonsInCurrentLB
unsigned int m_nPhotonsInCurrentLB
Definition: photonMonTool.h:77
ElectronxAODHelpers.h
photonMonTool::fillHistograms
virtual StatusCode fillHistograms() override
An inheriting class should either override this function or fillHists().
Definition: photonMonTool.cxx:403
photonHist::m_hEtUnconv
TH1 * m_hEtUnconv
Definition: photonMonTool.h:44
photonHist::m_nPhotonsUnconv
unsigned int m_nPhotonsUnconv
Definition: photonMonTool.h:81
photonMonTool::m_photonUnconvGroup
MonGroup * m_photonUnconvGroup
Definition: photonMonTool.h:119
photonHist::m_nPhotonsPerLumiBlock
std::vector< int > m_nPhotonsPerLumiBlock
Definition: photonMonTool.h:83
photonHist::NumberOfTypesToMonitor
@ NumberOfTypesToMonitor
Definition: photonMonTool.h:38
photonHist::m_hvNOfBLayerHits
std::vector< TH1 * > m_hvNOfBLayerHits
Definition: photonMonTool.h:70
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
photonMonTool::m_photonGroup
MonGroup * m_photonGroup
Definition: photonMonTool.h:117
photonHist::m_hNUnconv
TH1 * m_hNUnconv
Definition: photonMonTool.h:42
photonHist
Definition: photonMonTool.h:32
egammaMonToolBase
Definition: egammaMonToolBase.h:72
ManagedMonitorToolBase::MonGroup
A container of information describing a monitoring object.
Definition: ManagedMonitorToolBase.h:137
photonMonTool::fillHistogramsForOnePhoton
virtual StatusCode fillHistogramsForOnePhoton(xAOD::PhotonContainer::const_iterator g_iter, photonHist &myHist)
Definition: photonMonTool.cxx:199
photonHist::m_hvNOfTRTHighThresholdHits
std::vector< TH1 * > m_hvNOfTRTHighThresholdHits
Definition: photonMonTool.h:73
photonHist::m_hvConvType
std::vector< TH1 * > m_hvConvType
Definition: photonMonTool.h:65
photonMonTool::photonMonTool
photonMonTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: photonMonTool.cxx:84
ElectronContainer.h
photonHist::m_nPhotonsPerLumiBlockUnconv
std::vector< int > m_nPhotonsPerLumiBlockUnconv
Definition: photonMonTool.h:84
photonHist::photonHist
photonHist(const std::string &name)
Definition: photonMonTool.h:94
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
photonMonTool::m_photonRegionGroup
MonGroup * m_photonRegionGroup
Definition: photonMonTool.h:121
photonHist::m_nPhotonsInCurrentLBConv
unsigned int m_nPhotonsInCurrentLBConv
Definition: photonMonTool.h:79
test_pyathena.parent
parent
Definition: test_pyathena.py:15
photonHist::m_hPtCone20Conv
TH1 * m_hPtCone20Conv
Definition: photonMonTool.h:55
AthenaMonManager.h
photonMonTool::~photonMonTool
virtual ~photonMonTool()
Definition: photonMonTool.cxx:93
photonMonTool::m_photonLBGroup
MonGroup * m_photonLBGroup
Definition: photonMonTool.h:122
photonHist::m_hEtaPhiUnconv
TH2 * m_hEtaPhiUnconv
Definition: photonMonTool.h:50
photonHist::CbTight
@ CbTight
Definition: photonMonTool.h:37
photonHist::m_hNConv
TH1 * m_hNConv
Definition: photonMonTool.h:43
photonHist::m_hvd0
std::vector< TH1 * > m_hvd0
Definition: photonMonTool.h:74
photonMonTool::bookHistogramsForOnePhotonType
virtual StatusCode bookHistogramsForOnePhotonType(photonHist &myHist)
Definition: photonMonTool.cxx:107
photonMonTool::m_photonConvGroup
MonGroup * m_photonConvGroup
Definition: photonMonTool.h:118
photonMonTool::m_CbLoosePhotons
photonHist * m_CbLoosePhotons
Definition: photonMonTool.h:114
photonHist::m_hEtaConv
TH1 * m_hEtaConv
Definition: photonMonTool.h:47
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
photonHist::m_hvTopoEtCone40Unconv
std::vector< TH1 * > m_hvTopoEtCone40Unconv
Definition: photonMonTool.h:59
photonMonTool::m_CbTightPhotons
photonHist * m_CbTightPhotons
Definition: photonMonTool.h:115
photonHist::m_hvNOfSiHits
std::vector< TH1 * > m_hvNOfSiHits
Definition: photonMonTool.h:71
photonHist::m_nPhotonsPerLumiBlockConv
std::vector< int > m_nPhotonsPerLumiBlockConv
Definition: photonMonTool.h:85
EventInfo.h
photonHist::m_hvPtCone20Unconv
std::vector< TH1 * > m_hvPtCone20Unconv
Definition: photonMonTool.h:60
photonHist::photonType
photonType
Definition: photonMonTool.h:34
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
photonHist::m_hPhiUnconv
TH1 * m_hPhiUnconv
Definition: photonMonTool.h:48
photonHist::m_hPhiConv
TH1 * m_hPhiConv
Definition: photonMonTool.h:49
photonHist::m_hvConvTrkMatch2
std::vector< TH1 * > m_hvConvTrkMatch2
Definition: photonMonTool.h:67
photonHist::m_nPhotonsPerRegionConv
std::vector< int > m_nPhotonsPerRegionConv
Definition: photonMonTool.h:88
photonHist::m_hvDeltaPhi2
std::vector< TH1 * > m_hvDeltaPhi2
Definition: photonMonTool.h:69
Electron.h
photonHist::m_hTopoEtCone40Conv
TH1 * m_hTopoEtCone40Conv
Definition: photonMonTool.h:53
photonHist::m_hPtCone20Unconv
TH1 * m_hPtCone20Unconv
Definition: photonMonTool.h:54
StoreGateSvc.h
photonHist::m_nPhotonsInCurrentLBUnconv
unsigned int m_nPhotonsInCurrentLBUnconv
Definition: photonMonTool.h:78
egammaBaseHist
Definition: egammaMonToolBase.h:26
photonHist::m_hLB_NUnconv
TH1 * m_hLB_NUnconv
Definition: photonMonTool.h:90
photonMonTool::m_photonIdGroup
MonGroup * m_photonIdGroup
Definition: photonMonTool.h:120
photonMonTool::initialize
virtual StatusCode initialize() override
Definition: photonMonTool.cxx:100
photonHist::CbLoose
@ CbLoose
Definition: photonMonTool.h:35
photonHist::m_nPhotons
unsigned int m_nPhotons
Definition: photonMonTool.h:80