69 {
70
72
74
75 float trueR = -999;
76 if (truth) {
79 }
80 }
81
82 histoMap[
"convRadius_all"]->Fill(trueR);
86
87 if(phrec.
pt()/1000. > 15) {
88 histoMap[
"convRadius_15GeV"]->Fill(trueR);
91 }
92
93
95 if (truth && truthParticle) {
97
98 if (photon) {
99 float res_e =
photon->e()/truth->
e() - 1.;
100 float res_eta =
photon->eta() - truth->
eta();
101 float res_phi =
photon->phi() - truth->
phi();
103
104
105
106 if (recoR < 1000 && trueR > 0)
107 histoMap[
"convRadiusTrueVsReco"]->Fill(recoR - trueR);
108
109 histoMap[
"resolution_e"]->Fill(res_e);
110 histoMap[
"resolution_eta"]->Fill(res_eta);
111 histoMap[
"resolution_phi"]->Fill(res_phi);
112
113 histo2DMap[
"resolution_e_vs_pT"]->Fill(phrec.
pt()/1000., res_e);
114 histo2DMap[
"resolution_e_vs_eta"]->Fill(std::abs(phrec.
eta()), res_e);
115
116 }
117 }
118
119
120}
std::map< std::string, TH1D * > histoMap
void fill(const xAOD::IParticle &egamma)
std::map< std::string, TH2D * > histo2DMap
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".