ATLAS Offline Software
Loading...
Searching...
No Matches
ElectronFrwdPlots.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 "ElectronFrwdPlots.h"
8
9namespace Egamma{
10
11ElectronFrwdPlots::ElectronFrwdPlots(PlotBase* pParent, const std::string& sDir, const std::string& sParticleType):PlotBase(pParent, sDir),
12 m_oKinFrwdAllRecoPlots(this, "All/KinPlots/", "Reco Electron"),
13 m_oKinFrwdIsoRecoPlots(this, "Iso/KinPlots/", "Reco Electron"),
14 m_oKinFrwdTightPlots(this, "FrwdTight/KinPlots/", "FrwdTight Electron"),
15 m_oClustMomAllRecoPlots(this, "All/ClusMomentPlots/", sParticleType ),
16 m_oClustMomIsoRecoPlots(this, "Iso/ClusMomentPlots/", sParticleType ),
17 nParticles(nullptr),
18 nParticles_weighted(nullptr),
19 m_sParticleType(sParticleType)
20
21{}
22
24 nParticles = Book1D("n", "Number of"+ m_sParticleType + "s;#" + m_sParticleType + " electrons;Events", 15, 0., 15.);
25 nParticles_weighted = Book1D("n_weighted", "Number of"+ m_sParticleType + "s;#" + m_sParticleType + " electrons;Events", 15, 0., 15.);
26}
27
28 void ElectronFrwdPlots::fill(const xAOD::Electron& electron, const xAOD::EventInfo& eventInfo, bool isPrompt) {
29
30
31 m_oKinFrwdAllRecoPlots.fill(electron,eventInfo);
32 m_oClustMomAllRecoPlots.fill(electron,eventInfo);
33
34 if(!isPrompt) return;
35
36 m_oKinFrwdIsoRecoPlots.fill(electron,eventInfo);
37 m_oClustMomIsoRecoPlots.fill(electron,eventInfo);
38
39 bool val_tight=false;
40 if(electron.passSelection(val_tight, "Tight")) {
41 m_oKinFrwdTightPlots.fill(electron,eventInfo);
42 }
43
44
45}
46
47}
Egamma::KinematicsPlots m_oKinFrwdTightPlots
void fill(const xAOD::Electron &electron, const xAOD::EventInfo &eventInfo, bool isPrompt)
Egamma::KinematicsPlots m_oKinFrwdIsoRecoPlots
Egamma::ClusMomentumPlots m_oClustMomIsoRecoPlots
Egamma::KinematicsPlots m_oKinFrwdAllRecoPlots
ElectronFrwdPlots(PlotBase *pParent, const std::string &sDir, const std::string &sParticleType)
Egamma::ClusMomentumPlots m_oClustMomAllRecoPlots
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
EventInfo_v1 EventInfo
Definition of the latest event info version.
Electron_v1 Electron
Definition of the current "egamma version".