ATLAS Offline Software
Loading...
Searching...
No Matches
PFOPlots.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7namespace PFO {
8
9 PFOPlots::PFOPlots(PlotBase* pParent, const std::string & sDir, const std::string & sFEContainerName) : PlotBase(pParent, sDir), m_sFEContainerName(sFEContainerName){
10
11 }
12
14 if(!m_sFEContainerName.empty()){
15 //book Flow Element histograms
16 m_FE_pt = Book1D("_Pt",m_sFEContainerName + "_Pt (Entries/1 GeV)",30,-10.0,20.0);
17 m_FE_eta = Book1D("_Eta",m_sFEContainerName + "_Eta (Entries/0.1)",100,-5.0,5.0);
18 m_FE_phi = Book1D("_Phi",m_sFEContainerName + "_Phi (Entries/0.1)",64,-3.2,3.2);
19 m_FE_m = Book1D("_m",m_sFEContainerName + "_m (Entries/100 MeV)",10,0.0,0.5);
20 m_FE_charge = Book1D("_charge",m_sFEContainerName + "_charge (Entries/unit charge)",5,-2,2);
21
22 m_FE_pt_low = Book1D("_Pt_low",m_sFEContainerName + "_Pt_low (Entries/1 GeV, pT <= 5 GeV)",15,-10.0,5.0);
23 m_FE_pt_middle = Book1D("_Pt_middle",m_sFEContainerName + "_Pt_middle (Entries/1 GeV), 20 > pT > 5 GeV",45,5.0,50.0);
24 m_FE_pt_high = Book1D("_Pt_high",m_sFEContainerName + "_Pt_high (Entries/1 GeV), Pt > 20 GeV",45,5.0,50.0);
25
26 m_FE_pt_etaBinA = Book1D("_Pt_A",m_sFEContainerName + "_Pt (Entries/1 GeV, |eta| < 1 )",30,-10.0,20.0);
27 m_FE_pt_etaBinB = Book1D("_Pt_B",m_sFEContainerName + "_Pt (Entries/1 GeV, 1 <= |eta| < 2 )",30,-10.0,20.0);
28 m_FE_pt_etaBinC = Book1D("_Pt_C",m_sFEContainerName + "_Pt (Entries/1 GeV, |eta| >= 2 )",30,-10.0,20.0);
29 m_FE_eta_posE=Book1D("_EtaPosE",m_sFEContainerName+"_Eta (E>0) (Entries/0.1)",100,-5.0,5.0);
30 }
31 }
32
33 void PFOPlots::fill(const xAOD::FlowElement& FE, const xAOD::EventInfo& eventInfo){
34 m_FE_pt->Fill(FE.pt()/1000.0,eventInfo.beamSpotWeight());
35 m_FE_eta->Fill(FE.eta(),eventInfo.beamSpotWeight());
36 m_FE_phi->Fill(FE.phi(),eventInfo.beamSpotWeight());
37 m_FE_m->Fill(FE.m()/1000.0,eventInfo.beamSpotWeight());
38 m_FE_charge->Fill(FE.charge(),eventInfo.beamSpotWeight());
39
40 if (FE.pt()/1000.0 <= 5) m_FE_pt_low->Fill(FE.pt()/1000.0,eventInfo.beamSpotWeight());
41 else if (20 >= FE.pt()/1000.0 && FE.pt()/1000.0 > 4) m_FE_pt_middle->Fill(FE.pt()/1000.0,eventInfo.beamSpotWeight());
42 else m_FE_pt_high->Fill(FE.pt()/1000.0,eventInfo.beamSpotWeight());
43
44 if (fabs(FE.eta()) < 1) m_FE_pt_etaBinA->Fill(FE.pt()/1000.0,eventInfo.beamSpotWeight());
45 else if (fabs(FE.eta()) < 2) m_FE_pt_etaBinB->Fill(FE.pt()/1000.0,eventInfo.beamSpotWeight());
46 else m_FE_pt_etaBinC->Fill(FE.pt()/1000.0,eventInfo.beamSpotWeight());
47 // additional debug plot: Eta given FlowElem energy>0
48 if (FE.e()>0){
49 m_FE_eta_posE->Fill(FE.eta(),eventInfo.beamSpotWeight());
50 }
51 }
52
53}
void initializePlots()
Definition PFOPlots.cxx:13
TH1 * m_FE_pt_high
Definition PFOPlots.h:35
PFOPlots(PlotBase *pParent, const std::string &sDir, const std::string &sFEContainerName)
Definition PFOPlots.cxx:9
TH1 * m_FE_charge
Definition PFOPlots.h:30
std::string m_sFEContainerName
Definition PFOPlots.h:45
TH1 * m_FE_eta
Definition PFOPlots.h:27
TH1 * m_FE_pt_etaBinC
Definition PFOPlots.h:42
TH1 * m_FE_m
Definition PFOPlots.h:29
TH1 * m_FE_phi
Definition PFOPlots.h:28
TH1 * m_FE_pt_middle
Definition PFOPlots.h:34
TH1 * m_FE_eta_posE
Definition PFOPlots.h:37
TH1 * m_FE_pt
Definition PFOPlots.h:26
TH1 * m_FE_pt_etaBinB
Definition PFOPlots.h:41
TH1 * m_FE_pt_low
Pt Hisrogram binned in pt.
Definition PFOPlots.h:33
TH1 * m_FE_pt_etaBinA
Pt Histogram binned in eta.
Definition PFOPlots.h:40
void fill(const xAOD::FlowElement &FE, const xAOD::EventInfo &eventInfo)
Definition PFOPlots.cxx:33
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
float beamSpotWeight() const
Weight for beam spot size reweighting.
virtual double pt() const override
virtual double m() const override
The invariant mass of the particle.
virtual double phi() const override
The azimuthal angle ( ) of the particle.
virtual double eta() const override
The pseudorapidity ( ) of the particle.
float charge() const
virtual double e() const override
The total energy of the particle.
EventInfo_v1 EventInfo
Definition of the latest event info version.
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition FlowElement.h:16