8#include "GaudiKernel/ITHistSvc.h"
25 const char* fN =
m_name.c_str();
27 histoMap[
"convRadius_all"] =
new TH1D(Form(
"%s_convRadius_all",fN),
";Conversion Radius [mm]; Conversion Radius Events", 200, 0, 2000);
28 histoMap[
"convRadius"] =
new TH1D(Form(
"%s_convRadius",fN),
";Conversion Radius [mm]; Conversion Radius Events", 14,
m_cR_bins);
29 histoMap[
"convRadius_15GeV"] =
new TH1D(Form(
"%s_convRadius_15GeV",fN),
";Conversion Radius [mm]; Conversion Radius Events", 14,
m_cR_bins);
30 histoMap[
"convRadiusTrueVsReco"] =
new TH1D(Form(
"%s_convRadiusTrueVsReco",fN),
";R^{reco}_{conv. vtx} - R^{true}_{conv. vtx} [mm]; Events", 100, -200, 200);
32 histoMap[
"pileup"] =
new TH1D(Form(
"%s_pileup",fN),
";mu; mu Events", 35, 0., 70.);
33 histoMap[
"pileup_15GeV"] =
new TH1D(Form(
"%s_pileup_15GeV",fN),
";mu; mu Events", 35, 0., 70.);
34 histoMap[
"onebin"] =
new TH1D(Form(
"%s_onebin",fN),
"; ; Events", 1, 0., 1.);
35 histoMap[
"onebin_15GeV"] =
new TH1D(Form(
"%s_onebin_15GeV",fN),
"; ; Events", 1, 0., 1.);
37 histoMap[
"resolution_e"] =
new TH1D(Form(
"%s_resolution_e",fN),
"; E_{reco} / E_{true} - 1; Events", 40, -0.2, 0.2);
38 histoMap[
"resolution_eta"] =
new TH1D(Form(
"%s_resolution_eta",fN),
"; #eta_{reco} - #eta_{true}; Events", 20, -0.05, 0.05);
39 histoMap[
"resolution_phi"] =
new TH1D(Form(
"%s_resolution_phi",fN),
"; #phi_{reco} - #phi_{true}; Events", 20, -0.05, 0.05);
41 histo2DMap[
"resolution_e_vs_pT"] =
new TH2D(Form(
"%s_resolution_e_vs_pT",fN),
";p_{T} [GeV];E_{reco} / E_{true} - 1", 40, 0, 200, 160, -0.2, 0.2);
42 histo2DMap[
"resolution_e_vs_eta"] =
new TH2D(Form(
"%s_resolution_e_vs_eta",fN),
";|#eta|;E_{reco} / E_{true} - 1", 25, 0, 2.5, 160, -0.2, 0.2);
61 return StatusCode::SUCCESS;
84 histoMap[
"convRadius_all"]->Fill(trueR);
89 if(phrec.
pt()/1000. > 15) {
90 histoMap[
"convRadius_15GeV"]->Fill(trueR);
101 float res_e = photon->e()/truth->
e() - 1.;
102 float res_eta = photon->eta() - truth->
eta();
103 float res_phi = photon->phi() - truth->
phi();
108 if (recoR < 1000 && trueR > 0)
109 histoMap[
"convRadiusTrueVsReco"]->Fill(recoR - trueR);
111 histoMap[
"resolution_e"]->Fill(res_e);
112 histoMap[
"resolution_eta"]->Fill(res_eta);
113 histoMap[
"resolution_phi"]->Fill(res_phi);
115 histo2DMap[
"resolution_e_vs_pT"]->Fill(phrec.
pt()/1000., res_e);
116 histo2DMap[
"resolution_e_vs_eta"]->Fill(std::abs(phrec.
eta()), res_e);
#define ATH_CHECK
Evaluate an expression and check for errors.
SmartIF< ITHistSvc > m_rootHistSvc
std::map< std::string, TH1D * > histoMap
StatusCode initializePlots()
void fill(const xAOD::IParticle &egamma)
void fill(const xAOD::IParticle &)
StatusCode initializePlots()
std::map< std::string, TH2D * > histo2DMap
Class providing the definition of the 4-vector interface.
virtual double eta() const =0
The pseudorapidity ( ) of the particle.
virtual double pt() const =0
The transverse momentum ( ) of the particle.
int pdgId() const
PDG ID code.
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
bool hasDecayVtx() const
Check for a decay vertex on this particle.
virtual double e() const override final
The total energy of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
float perp() const
Vertex transverse distance from the beam line.
const xAOD::Photon * getRecoPhoton(const xAOD::TruthParticle *particle)
return the reco photon associated to the given TruthParticle (if any)
float conversionRadius(const xAOD::Vertex *vx)
return the conversion radius or 9999.
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any)
TruthParticle_v1 TruthParticle
Typedef to implementation.
Photon_v1 Photon
Definition of the current "egamma version".