ATLAS Offline Software
Loading...
Searching...
No Matches
IsolationPlots.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include <utility>
6
7#include "IsolationPlots.h"
8
9using CLHEP::GeV;
10
11namespace Egamma{
12
13
14 IsolationPlots::IsolationPlots(PlotBase* pParent, const std::string& sDir, std::string sParticleType):PlotBase(pParent, sDir),
15 m_sParticleType(std::move(sParticleType)),
16 ptcone20(nullptr),
17 ptcone30(nullptr),
18 ptvarcone20(nullptr),
19 ptvarcone30(nullptr),
20 topoetcone20(nullptr),
21 topoetcone30(nullptr),
22 topoetcone40(nullptr)
23 {}
24
26
27 ptcone20 = Book1D("ptcone20", "p_{T}^{cone20} of "+ m_sParticleType+";p_{T}^{cone20};Entries", 65, -5., 60.);
28 ptcone30 = Book1D("ptcone30", "p_{T}^{cone30} of "+ m_sParticleType+";p_{T}^{cone30};Entries", 65, -5., 60.);
29 ptvarcone20 = Book1D("ptvarcone20", "p_{T}^{varcone20} of "+ m_sParticleType+";p_{T}^{varcone20};Entries", 65, -5., 60.);
30 ptvarcone30 = Book1D("ptvarcone30", "p_{T}^{varcone30} of "+ m_sParticleType+";p_{T}^{varcone30};Entries", 65, -5., 60.);
31 topoetcone20 = Book1D("topoetcone20", "Topo E_{T}^{cone20} of "+ m_sParticleType+";TopoE_{T}^{cone20};Entries", 90, -10., 80.);
32 topoetcone30 = Book1D("topoetcone30", "Topo E_{T}^{cone30} of "+ m_sParticleType+";TopoE_{T}^{cone30};Entries", 90, -10., 80.);
33 topoetcone40 = Book1D("topoetcone40", "Topo E_{T}^{cone40} of "+ m_sParticleType+";TopoE_{T}^{cone40};Entries", 90, -10., 80.);
34
35 }
36
37
38
48
49 void IsolationPlots::FillIsolationPlot(TH1* hist, xAOD::Iso::IsolationType isoType, const xAOD::Egamma& egamma, const xAOD::EventInfo& eventInfo){ //rel20
50// void IsolationPlots::FillIsolationPlot(TH1* hist, xAOD::EgammaParameters::IsolationType isoType, const xAOD::Egamma& egamma){//rel19
51 float val = -10000000;
52 float weight = 1.;
53 weight = eventInfo.beamSpotWeight();
54
55 if(egamma.isolationValue(val, isoType)){
56 hist->Fill(val/GeV,weight);
57 }
58
59 }
60
61
62}
void fill(const xAOD::Egamma &egamma, const xAOD::EventInfo &eventInfo)
static void FillIsolationPlot(TH1 *hist, xAOD::Iso::IsolationType isoType, const xAOD::Egamma &egamma, const xAOD::EventInfo &eventInfo)
virtual void initializePlots()
IsolationPlots(PlotBase *pParent, const std::string &sDir, std::string sParticleType)
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
PlotBase(PlotBase *parent, const std::string &sDir)
Definition PlotBase.cxx:29
elec/gamma data class.
Definition egamma.h:58
float beamSpotWeight() const
Weight for beam spot size reweighting.
STL namespace.
IsolationType
Overall enumeration for isolation types in xAOD files.
@ topoetcone20
Topo-cluster ET-sum.
@ ptcone20
Track isolation.
@ ptvarcone20
Mini-Isolation http://arxiv.org/abs/1007.2221.
EventInfo_v1 EventInfo
Definition of the latest event info version.
Egamma_v1 Egamma
Definition of the current "egamma version".
Definition Egamma.h:17