Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
PhotonConversionPlots.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 
9 namespace Egamma {
10  PhotonConversionPlots::PhotonConversionPlots(PlotBase* pParent, const std::string& sDir, const std::string& sParticleType):
11  PlotBase(pParent, sDir),
12  m_sParticleType(sParticleType),
13  m_nVtx(nullptr),
14  m_convR(nullptr),
15  m_convZ(nullptr),
16  m_convRvsEta(nullptr),
17  m_convRvsType(nullptr),
18  m_convType(nullptr),
19  m_convDeltaEta(nullptr),
20  m_convDeltaPhi(nullptr)
21  {}
22 
24  m_nVtx = Book1D("nVtx", "Number of vertices; Number of conversion vertices; Entries", 10, 0., 10);
25  m_convR = Book1D("convR", "Conversion radius; Conversion radius (mm); Entries", 100, 0., 1000);
26  m_convZ = Book1D("convZ", "Conversion z; Conversion z (mm); Entries", 100, -1000., 1000);
27  m_convRvsEta = Book2D("convRvsEta", "Conversion radius vs #eta; #eta; Conversion radius (mm)", 1000, -5., 5., 100, 0., 1000);
28  m_convRvsType = Book2D("convRvsType", "Conversion radius vs type; Type; Conversion radius (mm)", 10, 0., 10., 100, 0., 1000);
29  m_convType = Book1D("convType", "Conversion type; Conversion type; Entries", 10, 0., 10);
30  m_convDeltaEta = Book1D("convDeltaEta", "Conversion #Delta#eta; Conversion #Delta#eta; Entries", 250, -0.5, 0.5);
31  m_convDeltaPhi = Book1D("convDeltaPhi", "Conversion #Delta#phi; Conversion #Delta#phi; Entries", 250, -0.5, 0.5);
32  }
33 
34  void PhotonConversionPlots::fill(const xAOD::Photon& photon, const xAOD::EventInfo& eventInfo) {
35  const float weight = eventInfo.beamSpotWeight();
36 
37  m_nVtx->Fill(photon.nVertices(), weight);
38  const auto* vertex = photon.vertex();
39 
40  const float vtxRad = xAOD::EgammaHelpers::conversionRadius(&photon);
41  m_convR->Fill(vtxRad, weight);
42  m_convZ->Fill(vertex ? vertex->position().z() : -9999., weight);
43  m_convRvsEta->Fill(photon.eta(), vtxRad, weight);
46 
47  float cnvDeltaEta1;
48  float cnvDeltaPhi1;
49  photon.vertexCaloMatchValue(cnvDeltaEta1, xAOD::EgammaParameters::convMatchDeltaEta1);
50  photon.vertexCaloMatchValue(cnvDeltaPhi1, xAOD::EgammaParameters::convMatchDeltaPhi1);
51  m_convDeltaEta->Fill(cnvDeltaEta1, weight);
52  m_convDeltaPhi->Fill(cnvDeltaPhi1, weight);
53 
54  }
55 }
Egamma::PhotonConversionPlots::fill
void fill(const xAOD::Photon &photon, const xAOD::EventInfo &eventInfo)
Definition: PhotonConversionPlots.cxx:34
Egamma::PhotonConversionPlots::m_nVtx
TH1 * m_nVtx
Definition: PhotonConversionPlots.h:23
PlotBase
Definition: PlotBase.h:34
Egamma::PhotonConversionPlots::m_convDeltaPhi
TH1 * m_convDeltaPhi
Definition: PhotonConversionPlots.h:30
Egamma::PhotonConversionPlots::m_convRvsEta
TH2 * m_convRvsEta
Definition: PhotonConversionPlots.h:26
Egamma
Definition: ClusMomentumPlots.cxx:11
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
Egamma::PhotonConversionPlots::m_convZ
TH1 * m_convZ
Definition: PhotonConversionPlots.h:25
PlotBase::Book2D
TH2F * Book2D(const std::string &name, const std::string &labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, bool prependDir=true)
Book a TH2F histogram.
Definition: PlotBase.cxx:123
Egamma::PhotonConversionPlots::m_convR
TH1 * m_convR
Definition: PhotonConversionPlots.h:24
Egamma::PhotonConversionPlots::m_convType
TH1 * m_convType
Definition: PhotonConversionPlots.h:28
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
PlotBase::Book1D
TH1D * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition: PlotBase.cxx:94
Egamma::PhotonConversionPlots::m_convRvsType
TH2 * m_convRvsType
Definition: PhotonConversionPlots.h:27
EgammaxAODHelpers.h
PhotonxAODHelpers.h
xAOD::EgammaParameters::convMatchDeltaPhi1
@ convMatchDeltaPhi1
difference between the cluster phi and the phi of the first track of the vertex extrapolated to the s...
Definition: EgammaEnums.h:253
Egamma::PhotonConversionPlots::initializePlots
virtual void initializePlots()
Definition: PhotonConversionPlots.cxx:23
Egamma::PhotonConversionPlots::m_convDeltaEta
TH1 * m_convDeltaEta
Definition: PhotonConversionPlots.h:29
Egamma::PhotonConversionPlots::PhotonConversionPlots
PhotonConversionPlots(PlotBase *pParent, const std::string &sDir, const std::string &sParticleType)
Definition: PhotonConversionPlots.cxx:10
xAOD::EgammaHelpers::conversionRadius
float conversionRadius(const xAOD::Vertex *vx)
return the conversion radius or 9999.
Definition: PhotonxAODHelpers.cxx:77
PhotonConversionPlots.h
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
xAOD::Photon_v1
Definition: Photon_v1.h:37
xAOD::EgammaParameters::convMatchDeltaEta1
@ convMatchDeltaEta1
difference between the cluster eta and the eta of the first track of the vertex extrapolated to the s...
Definition: EgammaEnums.h:243
xAOD::EgammaHelpers::conversionType
xAOD::EgammaParameters::ConversionType conversionType(const xAOD::Photon *ph)
return the photon conversion type (see EgammaEnums)
Definition: PhotonxAODHelpers.cxx:27