ATLAS Offline Software
Public Member Functions | Public Attributes | Protected Attributes | List of all members
egammaMonitoring::ShowerShapesHistograms Class Reference

#include <ShowerShapesHistograms.h>

Collaboration diagram for egammaMonitoring::ShowerShapesHistograms:

Public Member Functions

 ShowerShapesHistograms (std::string name, std::string title, std::string folder, SmartIF< ITHistSvc > rootHistSvc)
 
StatusCode initializePlots ()
 
void fill (const xAOD::Egamma &egamma)
 

Public Attributes

std::map< std::string, TH1D * > histoMap
 
std::map< std::string, TH2D * > histo2DMap
 

Protected Attributes

std::string m_name
 
std::string m_title
 
std::string m_folder
 
SmartIF< ITHistSvc > m_rootHistSvc
 

Detailed Description

Definition at line 20 of file ShowerShapesHistograms.h.

Constructor & Destructor Documentation

◆ ShowerShapesHistograms()

egammaMonitoring::ShowerShapesHistograms::ShowerShapesHistograms ( std::string  name,
std::string  title,
std::string  folder,
SmartIF< ITHistSvc >  rootHistSvc 
)
inline

Definition at line 24 of file ShowerShapesHistograms.h.

27  :
28  m_name(std::move(std::move(name))),
29  m_title(std::move(std::move(title))),
30  m_folder(std::move(std::move(folder))),
31  m_rootHistSvc(std::move(rootHistSvc)) {}

Member Function Documentation

◆ fill()

void ShowerShapesHistograms::fill ( const xAOD::Egamma egamma)

Definition at line 59 of file ShowerShapesHistograms.cxx.

59  {
60 
62 
63  const xAOD::CaloCluster *topoClus(nullptr);
64  if (isFwd)
65  topoClus = egamma.caloCluster();
66  else
67  topoClus =
69 
70  double lateral(0.);
71  double emfrac(0.);
72  double second_r(0.);
73  bool hasBoth = true;
74  if (topoClus->retrieveMoment(xAOD::CaloCluster::ENG_FRAC_EM ,emfrac))
75  histoMap["EMFrac"]->Fill(emfrac);
76 
77  if (topoClus->retrieveMoment(xAOD::CaloCluster::LATERAL,lateral))
78  histoMap["lateral"]->Fill(lateral);
79  else
80  hasBoth = false;
81 
82  if (topoClus->retrieveMoment(xAOD::CaloCluster::SECOND_R,second_r))
83  histoMap["second_R"]->Fill(second_r);
84  else
85  hasBoth = false;
86 
87  if (hasBoth)
88  histo2DMap["lateral_second_R_2D"]->Fill(lateral,second_r);
89 
90  // maybe L2, L3 shapes (e.g. Reta, Rphi, weta2) could be computed for electron in innerwheel,
91  // but certainly not L1
92  if (!isFwd) {
93 
94  float eta2 = std::abs(egamma.caloCluster()->etaBE(2));
95  float rhad = -999;
96  float Reta = -999;
97  float Rphi = -999;
98  float shweta2 = -999;
99  float Eratio = -999;
100  float DeltaE = -999;
101  float frac_f1 = -999;
102  float shfside = -999;
103  float shwtots1 = -999;
104  float shws3 = -999;
105 
106  if (egamma.showerShapeValue(rhad, xAOD::EgammaParameters::Rhad)) {
107  histoMap["rhad"]->Fill(rhad);
108  float rhad1 = -999;
109  if (egamma.showerShapeValue(rhad1, xAOD::EgammaParameters::Rhad1)) {
110  float hadrleak = (eta2 >= 0.8 && eta2 < 1.37) ? rhad : rhad1;
111  histoMap["hadleak"]->Fill(hadrleak);
112  }
113  }
114  if (egamma.showerShapeValue(Reta, xAOD::EgammaParameters::Reta))
115  histoMap["reta"]->Fill(Reta);
116  if (egamma.showerShapeValue(Rphi, xAOD::EgammaParameters::Rphi))
117  histoMap["rphi"]->Fill(Rphi);
118  if (egamma.showerShapeValue(shweta2, xAOD::EgammaParameters::weta2))
119  histoMap["weta2"]->Fill(shweta2);
120  if (egamma.showerShapeValue(frac_f1, xAOD::EgammaParameters::f1))
121  histoMap["f1"]->Fill(frac_f1);
122  // Only fill S1 variables if there some energy in S1 (to avoid under/overflows
123  if (frac_f1 != 0) {
124  if (egamma.showerShapeValue(Eratio, xAOD::EgammaParameters::Eratio))
125  histoMap["eratio"]->Fill(Eratio);
126  if (egamma.showerShapeValue(DeltaE, xAOD::EgammaParameters::DeltaE))
127  histoMap["deltae"]->Fill(DeltaE);
128  if (egamma.showerShapeValue(shfside, xAOD::EgammaParameters::fracs1))
129  histoMap["fside"]->Fill(shfside);
130  if (egamma.showerShapeValue(shwtots1, xAOD::EgammaParameters::wtots1))
131  histoMap["wtots1"]->Fill(shwtots1);
132  if (egamma.showerShapeValue(shws3, xAOD::EgammaParameters::weta1))
133  histoMap["ws3"]->Fill(shws3);
134  }
135  }
136 }

◆ initializePlots()

StatusCode ShowerShapesHistograms::initializePlots ( )

Definition at line 17 of file ShowerShapesHistograms.cxx.

17  {
18 
19  const char* fN = m_name.c_str();
20 
21  histoMap["hadleak"] = new TH1D(Form("%s_hadleak",fN), ";E_{hadleak}; Events" , 100, -0.07, 0.13 );
22  histoMap["rhad"] = new TH1D(Form("%s_rhad",fN) , ";R_{had}; Events" , 100, -0.07, 0.13 );
23  histoMap["reta"] = new TH1D(Form("%s_reta",fN) , ";R_{#eta}; Events" , 355, 0. , 1.1005);
24  histoMap["rphi"] = new TH1D(Form("%s_rphi",fN) , ";R_{#phi}; Events" , 355, 0. , 1.1005);
25  histoMap["weta2"] = new TH1D(Form("%s_weta2",fN) , ";W_{#etas2}; Events" , 100, 0. , 0.03 );
26  histoMap["eratio"] = new TH1D(Form("%s_eratio",fN) , ";E_{ratio}; Events" , 101, 0. , 1.01 );
27  histoMap["deltae"] = new TH1D(Form("%s_deltae",fN) , ";#DeltaE [MeV]; Events" , 100, 0. , 500. );
28  histoMap["f1"] = new TH1D(Form("%s_f1",fN) , ";f_{1}; Events" , 100, 0. , 1.0 );
29  histoMap["fside"] = new TH1D(Form("%s_fside",fN) , ";f_{side}; Events" , 100, 0. , 2.0 );
30  histoMap["wtots1"] = new TH1D(Form("%s_wtots1",fN) , ";w_{s, tot}; Events" , 100, 0. , 10. );
31  histoMap["ws3"] = new TH1D(Form("%s_ws3",fN) , ";w_{s, 3}; Events" , 100, 0. , 1. );
32 
33  histoMap["lateral"] = new TH1D(Form("%s_lateral",fN), ";Lateral of seed; Events" , 50, 0. , 1. );
34  histoMap["second_R"] = new TH1D(Form("%s_second_R",fN), ";Second R; Events" , 150, 0. , 15000. );
35  histoMap["EMFrac"] = new TH1D(Form("%s_EMFrac",fN), ";EMFrac; Events" , 51, 0. , 1.02 );
36  histo2DMap["lateral_second_R_2D"] = new TH2D(Form("%s_lateral_second_R_2D",fN), ";Lateral of seed; Second R", 50, 0, 1, 150,0.,15000.);
37 
38  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"lateral", histoMap["lateral"]));
39  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"second_R", histoMap["second_R"]));
40  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"EMFrac", histoMap["EMFrac"]));
41  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"lateral_second_R_2D", histo2DMap["lateral_second_R_2D"]));
42 
43  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"rhad", histoMap["rhad"]));
44  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"hadleak", histoMap["hadleak"]));
45  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"reta", histoMap["reta"]));
46  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"rphi", histoMap["rphi"]));
47  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"weta2", histoMap["weta2"]));
48  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"eratio", histoMap["eratio"]));
49  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"deltae", histoMap["deltae"]));
50  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"f1", histoMap["f1"]));
51  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"fside", histoMap["fside"]));
52  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"wtots1", histoMap["wtots1"]));
53  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"ws3", histoMap["ws3"]));
54 
55  return StatusCode::SUCCESS;
56 
57 } // initializePlots

Member Data Documentation

◆ histo2DMap

std::map<std::string, TH2D* > egammaMonitoring::ShowerShapesHistograms::histo2DMap

Definition at line 34 of file ShowerShapesHistograms.h.

◆ histoMap

std::map<std::string, TH1D* > egammaMonitoring::ShowerShapesHistograms::histoMap

Definition at line 33 of file ShowerShapesHistograms.h.

◆ m_folder

std::string egammaMonitoring::ShowerShapesHistograms::m_folder
protected

Definition at line 42 of file ShowerShapesHistograms.h.

◆ m_name

std::string egammaMonitoring::ShowerShapesHistograms::m_name
protected

Definition at line 40 of file ShowerShapesHistograms.h.

◆ m_rootHistSvc

SmartIF<ITHistSvc> egammaMonitoring::ShowerShapesHistograms::m_rootHistSvc
protected

Definition at line 43 of file ShowerShapesHistograms.h.

◆ m_title

std::string egammaMonitoring::ShowerShapesHistograms::m_title
protected

Definition at line 41 of file ShowerShapesHistograms.h.


The documentation for this class was generated from the following files:
xAOD::CaloCluster_v1::SECOND_R
@ SECOND_R
Second Moment in .
Definition: CaloCluster_v1.h:123
egammaMonitoring::ShowerShapesHistograms::m_folder
std::string m_folder
Definition: ShowerShapesHistograms.h:42
xAOD::EgammaHelpers::getAssociatedTopoClusters
std::vector< const xAOD::CaloCluster * > getAssociatedTopoClusters(const xAOD::CaloCluster *cluster)
Return a vector of all the topo clusters associated with the egamma cluster.
Definition: EgammaxAODHelpers.cxx:65
ParticleGun_SamplingFraction.eta2
eta2
Definition: ParticleGun_SamplingFraction.py:96
xAOD::EgammaParameters::Reta
@ Reta
e237/e277
Definition: EgammaEnums.h:154
egammaMonitoring::ShowerShapesHistograms::m_title
std::string m_title
Definition: ShowerShapesHistograms.h:41
xAOD::EgammaParameters::Rphi
@ Rphi
e233/e237
Definition: EgammaEnums.h:156
xAOD::EgammaParameters::wtots1
@ wtots1
shower width is determined in a window detaxdphi = 0,0625 ×~0,2, corresponding typically to 20 strips...
Definition: EgammaEnums.h:140
egamma
Definition: egamma.h:58
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
xAOD::EgammaParameters::f1
@ f1
E1/E = fraction of energy reconstructed in the first sampling, where E1 is energy in all strips belon...
Definition: EgammaEnums.h:52
covarianceTool.title
title
Definition: covarianceTool.py:542
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
egammaMonitoring::ShowerShapesHistograms::histoMap
std::map< std::string, TH1D * > histoMap
Definition: ShowerShapesHistograms.h:33
egammaMonitoring::ShowerShapesHistograms::histo2DMap
std::map< std::string, TH2D * > histo2DMap
Definition: ShowerShapesHistograms.h:34
xAOD::EgammaHelpers::isFwdElectron
bool isFwdElectron(const xAOD::Egamma *eg)
is the object a Fwd electron
Definition: EgammaxAODHelpers.cxx:17
xAOD::EgammaParameters::Rhad1
@ Rhad1
ethad1/et
Definition: EgammaEnums.h:162
xAOD::CaloCluster_v1::ENG_FRAC_EM
@ ENG_FRAC_EM
Energy fraction in EM calorimeters.
Definition: CaloCluster_v1.h:139
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
egammaMonitoring::ShowerShapesHistograms::m_name
std::string m_name
Definition: ShowerShapesHistograms.h:40
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:56
xAOD::CaloCluster_v1::LATERAL
@ LATERAL
Normalized lateral moment.
Definition: CaloCluster_v1.h:137
xAOD::EgammaParameters::weta1
@ weta1
shower width using +/-3 strips around the one with the maximal energy deposit: w3 strips = sqrt{sum(E...
Definition: EgammaEnums.h:97
xAOD::EgammaParameters::Eratio
@ Eratio
(emaxs1-e2tsts1)/(emaxs1+e2tsts1)
Definition: EgammaEnums.h:158
xAOD::EgammaParameters::Rhad
@ Rhad
ethad/et
Definition: EgammaEnums.h:160
xAOD::EgammaParameters::DeltaE
@ DeltaE
e2tsts1-emins1
Definition: EgammaEnums.h:164
xAOD::EgammaParameters::fracs1
@ fracs1
shower shape in the shower core : [E(+/-3)-E(+/-1)]/E(+/-1), where E(+/-n) is the energy in ± n strip...
Definition: EgammaEnums.h:111
xAOD::EgammaParameters::weta2
@ weta2
the lateral width is calculated with a window of 3x5 cells using the energy weighted sum over all cel...
Definition: EgammaEnums.h:103
egammaMonitoring::ShowerShapesHistograms::m_rootHistSvc
SmartIF< ITHistSvc > m_rootHistSvc
Definition: ShowerShapesHistograms.h:43