ATLAS Offline Software
Loading...
Searching...
No Matches
ClusterPlots.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 ClusterPlots::ClusterPlots(PlotBase* pParent, const std::string & sDir, SG::ReadHandleKey<xAOD::CaloClusterContainer>& sClusterContainerName) : PlotBase(pParent, sDir), m_sClusterContainerName(sClusterContainerName){}
10
12
13 m_Cluster_pt = Book1D("Cluster_Pt",m_sClusterContainerName.key() + "_Pt (Entries/1 GeV)",300,-100.0,200.0);
14 m_Cluster_eta = Book1D("Cluster_Eta",m_sClusterContainerName.key() + "_Eta (Entries/0.1)",100,-5.0,5.0);
15 m_Cluster_phi = Book1D("Cluster_Phi",m_sClusterContainerName.key() + "_Phi (Entries/0.1)",64,-3.2,3.2);
16 m_Cluster_m = Book1D("Cluster_m",m_sClusterContainerName.key() + "_m (Entries/100 MeV)",100,0.0,10.0);
17
18 m_Cluster_ptEM = Book1D("Cluster_PtEM",m_sClusterContainerName.key() + "_PtEM (Entries/1 GeV)",300,-100.0,200.0);
19 m_Cluster_etaEM = Book1D("Cluster_EtaEM",m_sClusterContainerName.key() + "_EtaEM (Entries/0.1)",100,-5.0,5.0);
20 m_Cluster_phiEM = Book1D("Cluster_PhiEM",m_sClusterContainerName.key() + "_PhiEM (Entries/0.1)",64,-3.2,3.2);
21 m_Cluster_mEM = Book1D("Cluster_mEM",m_sClusterContainerName.key() + "_mEM (Entries/100 MeV)",100,0.0,10.0);
22
23 m_Cluster_time = Book1D("Cluster_time",m_sClusterContainerName.key() + "_time (Entries)",30,-200.0,100.0);
24 m_Cluster_clusterSize = Book1D("Cluster_clusterSize",m_sClusterContainerName.key() + "_clusterSize (Entries)",20,0.0,20.0);
25
26 m_Cluster_eta_lowpt = Book1D("Cluster_Eta_lowPt",m_sClusterContainerName.key() + "_Eta_lowPt (Entries/0.1)",100,-5.0,5.0);
27 m_Cluster_pt_interval = Book1D("Cluster_Pt_interval",m_sClusterContainerName.key() + "_Pt_interval (Entries/1 GeV)", 980, 20.0, 1000.0);
28 m_Cluster_pt_zoom = Book1D("Cluster_Pt_zoom",m_sClusterContainerName.key() + "_Pt_zomm (Entries/0.1 GeV)",3000,-100.0,200.0);
29
30 m_Cluster_eSample_EM = Book1D("Cluster_eSample_EM",m_sClusterContainerName.key() +"_eSample_EM (Entries/1 GeV) ",300,-100.0,200.0);
31 m_Cluster_eSample_HAD = Book1D("Cluster_eSample_HAD",m_sClusterContainerName.key() +"_eSample_HAD (Entries/1 GeV) ",300,-100.0,200.0);
32
33 }
34
35 void ClusterPlots::fill(const xAOD::CaloCluster& Cluster, const xAOD::EventInfo& eventInfo){
36 m_Cluster_pt->Fill(Cluster.pt()/1000.0,eventInfo.beamSpotWeight());
37 m_Cluster_eta->Fill(Cluster.eta(),eventInfo.beamSpotWeight());
38 m_Cluster_phi->Fill(Cluster.phi(),eventInfo.beamSpotWeight());
39 m_Cluster_m->Fill(Cluster.m()/1000.0,eventInfo.beamSpotWeight());
40
41 m_Cluster_ptEM->Fill((Cluster.rawE()/cosh(Cluster.rawEta()))/1000.0,eventInfo.beamSpotWeight());
42 m_Cluster_etaEM->Fill(Cluster.rawEta(),eventInfo.beamSpotWeight());
43 m_Cluster_phiEM->Fill(Cluster.rawPhi(),eventInfo.beamSpotWeight());
44 m_Cluster_mEM->Fill(Cluster.rawM()/1000.0,eventInfo.beamSpotWeight());
45
46 m_Cluster_time->Fill(Cluster.time(),eventInfo.beamSpotWeight());
47 m_Cluster_clusterSize->Fill(Cluster.clusterSize(),eventInfo.beamSpotWeight());
48
49 if (Cluster.pt()/1000.0 > -20 && Cluster.pt()/1000.0 < 20){
50 m_Cluster_eta_lowpt->Fill(Cluster.eta(),eventInfo.beamSpotWeight());
51 }
52 m_Cluster_pt_interval->Fill(Cluster.pt()/1000.0,eventInfo.beamSpotWeight());
53 m_Cluster_pt_zoom->Fill(Cluster.pt()/1000.0,eventInfo.beamSpotWeight());
54
55 float eSample_EM;
56 eSample_EM = Cluster.eSample(CaloSampling::PreSamplerB) + Cluster.eSample(CaloSampling::EMB1) + Cluster.eSample(CaloSampling::EMB2) + Cluster.eSample(CaloSampling::EMB3) + Cluster.eSample(CaloSampling::PreSamplerE) + Cluster.eSample(CaloSampling::EME1) + Cluster.eSample(CaloSampling::EME2) + Cluster.eSample(CaloSampling::EME3) + Cluster.eSample(CaloSampling::FCAL0);
57 m_Cluster_eSample_EM->Fill((double)eSample_EM/1000.0,eventInfo.beamSpotWeight());
58
59
60
61 float eSample_HAD;
62 eSample_HAD = Cluster.eSample(CaloSampling::TileBar0) + Cluster.eSample(CaloSampling::TileBar1) + Cluster.eSample(CaloSampling::TileBar2) + Cluster.eSample(CaloSampling::HEC0) + Cluster.eSample(CaloSampling::HEC1) + Cluster.eSample(CaloSampling::HEC2) + Cluster.eSample(CaloSampling::HEC3) + Cluster.eSample(CaloSampling::FCAL1) + Cluster.eSample(CaloSampling::FCAL2);
63 m_Cluster_eSample_HAD->Fill((double)eSample_HAD/1000.0,eventInfo.beamSpotWeight());
64
65 }
66
67}
ClusterPlots(PlotBase *pParent, const std::string &sDir, SG::ReadHandleKey< xAOD::CaloClusterContainer > &sClusterContainerName)
void fill(const xAOD::CaloCluster &Cluster, const xAOD::EventInfo &eventInfo)
TH1 * m_Cluster_clusterSize
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_sClusterContainerName
TH1 * m_Cluster_eSample_HAD
TH1 * m_Cluster_pt_interval
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
Property holding a SG store/key/clid from which a ReadHandle is made.
ClusterSize clusterSize() const
Get cluster size.
flt_t rawE() const
virtual double pt() const
The transverse momentum ( ) of the particle (negative for negative-energy clusters)
flt_t rawM() const
Get mass in signal state UNCALIBRATED.
virtual double m() const
The invariant mass of the particle.
flt_t time() const
Access cluster time.
virtual double eta() const
The pseudorapidity ( ) of the particle.
flt_t rawPhi() const
Get in signal state UNCALIBRATED.
flt_t rawEta() const
Get in signal state UNCALIBRATED.
float eSample(const CaloSample sampling) const
virtual double phi() const
The azimuthal angle ( ) of the particle.
float beamSpotWeight() const
Weight for beam spot size reweighting.
EventInfo_v1 EventInfo
Definition of the latest event info version.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.