ATLAS Offline Software
ClusterPlots.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 namespace PFO {
9 
10  ClusterPlots::ClusterPlots(PlotBase* pParent, std::string sDir, SG::ReadHandleKey<xAOD::CaloClusterContainer>& sClusterContainerName) : PlotBase(pParent, sDir), m_sClusterContainerName(sClusterContainerName){}
11 
13 
14  m_Cluster_pt = Book1D("Cluster_Pt",m_sClusterContainerName.key() + "_Pt (Entries/1 GeV)",300,-100.0,200.0);
15  m_Cluster_eta = Book1D("Cluster_Eta",m_sClusterContainerName.key() + "_Eta (Entries/0.1)",100,-5.0,5.0);
16  m_Cluster_phi = Book1D("Cluster_Phi",m_sClusterContainerName.key() + "_Phi (Entries/0.1)",64,-3.2,3.2);
17  m_Cluster_m = Book1D("Cluster_m",m_sClusterContainerName.key() + "_m (Entries/100 MeV)",100,0.0,10.0);
18 
19  m_Cluster_ptEM = Book1D("Cluster_PtEM",m_sClusterContainerName.key() + "_PtEM (Entries/1 GeV)",300,-100.0,200.0);
20  m_Cluster_etaEM = Book1D("Cluster_EtaEM",m_sClusterContainerName.key() + "_EtaEM (Entries/0.1)",100,-5.0,5.0);
21  m_Cluster_phiEM = Book1D("Cluster_PhiEM",m_sClusterContainerName.key() + "_PhiEM (Entries/0.1)",64,-3.2,3.2);
22  m_Cluster_mEM = Book1D("Cluster_mEM",m_sClusterContainerName.key() + "_mEM (Entries/100 MeV)",100,0.0,10.0);
23 
24  m_Cluster_time = Book1D("Cluster_time",m_sClusterContainerName.key() + "_time (Entries)",30,-200.0,100.0);
25  m_Cluster_clusterSize = Book1D("Cluster_clusterSize",m_sClusterContainerName.key() + "_clusterSize (Entries)",20,0.0,20.0);
26 
27  m_Cluster_eta_lowpt = Book1D("Cluster_Eta_lowPt",m_sClusterContainerName.key() + "_Eta_lowPt (Entries/0.1)",100,-5.0,5.0);
28  m_Cluster_pt_interval = Book1D("Cluster_Pt_interval",m_sClusterContainerName.key() + "_Pt_interval (Entries/1 GeV)", 980, 20.0, 1000.0);
29  m_Cluster_pt_zoom = Book1D("Cluster_Pt_zoom",m_sClusterContainerName.key() + "_Pt_zomm (Entries/0.1 GeV)",3000,-100.0,200.0);
30 
31  m_Cluster_eSample_EM = Book1D("Cluster_eSample_EM",m_sClusterContainerName.key() +"_eSample_EM (Entries/1 GeV) ",300,-100.0,200.0);
32  m_Cluster_eSample_HAD = Book1D("Cluster_eSample_HAD",m_sClusterContainerName.key() +"_eSample_HAD (Entries/1 GeV) ",300,-100.0,200.0);
33 
34  }
35 
36  void ClusterPlots::fill(const xAOD::CaloCluster& Cluster, const xAOD::EventInfo& eventInfo){
37  m_Cluster_pt->Fill(Cluster.pt()/1000.0,eventInfo.beamSpotWeight());
38  m_Cluster_eta->Fill(Cluster.eta(),eventInfo.beamSpotWeight());
39  m_Cluster_phi->Fill(Cluster.phi(),eventInfo.beamSpotWeight());
40  m_Cluster_m->Fill(Cluster.m()/1000.0,eventInfo.beamSpotWeight());
41 
42  m_Cluster_ptEM->Fill((Cluster.rawE()/cosh(Cluster.rawEta()))/1000.0,eventInfo.beamSpotWeight());
43  m_Cluster_etaEM->Fill(Cluster.rawEta(),eventInfo.beamSpotWeight());
44  m_Cluster_phiEM->Fill(Cluster.rawPhi(),eventInfo.beamSpotWeight());
45  m_Cluster_mEM->Fill(Cluster.rawM()/1000.0,eventInfo.beamSpotWeight());
46 
47  m_Cluster_time->Fill(Cluster.time(),eventInfo.beamSpotWeight());
48  m_Cluster_clusterSize->Fill(Cluster.clusterSize(),eventInfo.beamSpotWeight());
49 
50  if (Cluster.pt()/1000.0 > -20 && Cluster.pt()/1000.0 < 20){
51  m_Cluster_eta_lowpt->Fill(Cluster.eta(),eventInfo.beamSpotWeight());
52  }
53  m_Cluster_pt_interval->Fill(Cluster.pt()/1000.0,eventInfo.beamSpotWeight());
54  m_Cluster_pt_zoom->Fill(Cluster.pt()/1000.0,eventInfo.beamSpotWeight());
55 
56  float eSample_EM;
58  m_Cluster_eSample_EM->Fill((double)eSample_EM/1000.0,eventInfo.beamSpotWeight());
59 
60 
61 
62  float eSample_HAD;
64  m_Cluster_eSample_HAD->Fill((double)eSample_HAD/1000.0,eventInfo.beamSpotWeight());
65 
66  }
67 
68 }
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
xAOD::CaloCluster_v1::rawE
flt_t rawE() const
xAOD::CaloCluster_v1::time
flt_t time() const
Access cluster time.
PlotBase::Book1D
TH1F * 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:88
xAOD::CaloCluster_v1::rawEta
flt_t rawEta() const
Get in signal state UNCALIBRATED.
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
PlotBase
Definition: PlotBase.h:33
PFO::ClusterPlots::m_Cluster_m
TH1 * m_Cluster_m
Definition: ClusterPlots.h:28
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
CaloCell_ID_FCS::TileBar1
@ TileBar1
Definition: FastCaloSim_CaloCell_ID.h:32
PFO::ClusterPlots::fill
void fill(const xAOD::CaloCluster &Cluster, const xAOD::EventInfo &eventInfo)
Definition: ClusterPlots.cxx:36
ClusterPlots.h
xAOD::CaloCluster_v1::m
virtual double m() const
The invariant mass of the particle.
Definition: CaloCluster_v1.cxx:261
CaloCell_ID_FCS::FCAL1
@ FCAL1
Definition: FastCaloSim_CaloCell_ID.h:41
PFO::ClusterPlots::m_Cluster_ptEM
TH1 * m_Cluster_ptEM
Definition: ClusterPlots.h:30
PFO::ClusterPlots::m_Cluster_phi
TH1 * m_Cluster_phi
Definition: ClusterPlots.h:27
CaloCell_ID_FCS::HEC2
@ HEC2
Definition: FastCaloSim_CaloCell_ID.h:29
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
SG::ReadHandleKey< xAOD::CaloClusterContainer >
PFO::ClusterPlots::m_Cluster_pt_zoom
TH1 * m_Cluster_pt_zoom
Definition: ClusterPlots.h:40
PFO::ClusterPlots::m_Cluster_eta
TH1 * m_Cluster_eta
Definition: ClusterPlots.h:26
xAOD::CaloCluster_v1::clusterSize
ClusterSize clusterSize() const
Get cluster size.
Definition: CaloCluster_v1.cxx:364
PFO::ClusterPlots::m_Cluster_pt_interval
TH1 * m_Cluster_pt_interval
Definition: ClusterPlots.h:39
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
PFO::ClusterPlots::m_Cluster_clusterSize
TH1 * m_Cluster_clusterSize
Definition: ClusterPlots.h:36
PFO::ClusterPlots::m_Cluster_mEM
TH1 * m_Cluster_mEM
Definition: ClusterPlots.h:33
CaloCell_ID_FCS::HEC1
@ HEC1
Definition: FastCaloSim_CaloCell_ID.h:28
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
PFO::ClusterPlots::m_Cluster_eta_lowpt
TH1 * m_Cluster_eta_lowpt
Definition: ClusterPlots.h:38
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
CaloCell_ID_FCS::TileBar0
@ TileBar0
Definition: FastCaloSim_CaloCell_ID.h:31
PFO::ClusterPlots::ClusterPlots
ClusterPlots(PlotBase *pParent, std::string sDir, SG::ReadHandleKey< xAOD::CaloClusterContainer > &sClusterContainerName)
Definition: ClusterPlots.cxx:10
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
PFO::ClusterPlots::initializePlots
void initializePlots()
Definition: ClusterPlots.cxx:12
TH1::Fill
int Fill(double)
Definition: rootspy.cxx:285
PFO
Definition: ClusterMomentPlots.h:13
PFO::ClusterPlots::m_Cluster_eSample_EM
TH1 * m_Cluster_eSample_EM
Definition: ClusterPlots.h:42
xAOD::CaloCluster_v1::rawM
flt_t rawM() const
Get mass in signal state UNCALIBRATED.
xAOD::CaloCluster_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle (negative for negative-energy clusters)
Definition: CaloCluster_v1.cxx:247
PFO::ClusterPlots::m_sClusterContainerName
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_sClusterContainerName
Definition: ClusterPlots.h:46
CaloCell_ID_FCS::EME3
@ EME3
Definition: FastCaloSim_CaloCell_ID.h:26
PFO::ClusterPlots::m_Cluster_eSample_HAD
TH1 * m_Cluster_eSample_HAD
Definition: ClusterPlots.h:43
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
CaloCell_ID_FCS::HEC0
@ HEC0
Definition: FastCaloSim_CaloCell_ID.h:27
xAOD::CaloCluster_v1::eSample
float eSample(const CaloSample sampling) const
Definition: CaloCluster_v1.cxx:521
xAOD::CaloCluster_v1::rawPhi
flt_t rawPhi() const
Get in signal state UNCALIBRATED.
PFO::ClusterPlots::m_Cluster_phiEM
TH1 * m_Cluster_phiEM
Definition: ClusterPlots.h:32
PFO::ClusterPlots::m_Cluster_pt
TH1 * m_Cluster_pt
Definition: ClusterPlots.h:25
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
CaloCell_ID_FCS::FCAL2
@ FCAL2
Definition: FastCaloSim_CaloCell_ID.h:42
PFO::ClusterPlots::m_Cluster_time
TH1 * m_Cluster_time
Definition: ClusterPlots.h:35
CaloCell_ID_FCS::HEC3
@ HEC3
Definition: FastCaloSim_CaloCell_ID.h:30
CaloCell_ID_FCS::FCAL0
@ FCAL0
Definition: FastCaloSim_CaloCell_ID.h:40
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
PFO::ClusterPlots::m_Cluster_etaEM
TH1 * m_Cluster_etaEM
Definition: ClusterPlots.h:31
CaloCell_ID_FCS::TileBar2
@ TileBar2
Definition: FastCaloSim_CaloCell_ID.h:33
xAOD::EventInfo_v1::beamSpotWeight
float beamSpotWeight() const
Weight for beam spot size reweighting.
Definition: EventInfo_v1.cxx:970
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56