ATLAS Offline Software
EGElectronAmbiguityTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
9 
11 #include "xAODTruth/TruthVertex.h"
12 
14 
15 #include "TMath.h"
16 
17 namespace {
18 void
19 helix(const xAOD::TrackParticle* trkP,
20  const xAOD::Vertex* pvtx,
21  std::vector<double>& he)
22 {
23  constexpr double PTTOCURVATURE = -0.301;
24 
25  he[0] = 1. / tan(trkP->theta());
26  he[1] = PTTOCURVATURE * trkP->charge() / trkP->pt();
27 
28  if (trkP->phi0() > 0.)
29  he[4] = trkP->phi0();
30  else
31  he[4] = TMath::TwoPi() + trkP->phi0();
32 
33  double c1 = cos(trkP->phi0());
34  double s1 = sin(trkP->phi0());
35  he[3] = trkP->d0() + c1 * pvtx->y() - s1 * pvtx->x();
36 
37  c1 *= he[0];
38  s1 *= he[0];
39  he[2] = trkP->z0() - c1 * pvtx->x() - s1 * pvtx->y() + pvtx->z();
40 }
41 }//end anonymous
42 
43 
44 namespace DerivationFramework {
45 
48 {
49 
51  ATH_CHECK(m_VtxContainerName.initialize());
54 
64 
65  return StatusCode::SUCCESS;
66 }
67 
69  (const EGElectronAmbiguityTool& tool, const EventContext& ctx)
70  : drv (tool.m_drv, ctx),
71  dphiv (tool.m_dphiv, ctx),
72  dmee (tool.m_dmee, ctx),
73  dmeeVtx (tool.m_dmeeVtx, ctx),
74  dsep (tool.m_dsep, ctx),
75  dambi (tool.m_dambi, ctx),
76  dtrv (tool.m_dtrv, ctx),
77  dtpv (tool.m_dtpv, ctx),
78  dtzv (tool.m_dtzv, ctx)
79 {
80 }
81 
83 EGElectronAmbiguityTool::addBranches(const EventContext& ctx) const
84 {
85 
86  DecorHandles dh (*this, ctx);
87 
88  static const SG::AuxElement::ConstAccessor<char> aidCut(m_idCut);
89 
90  // retrieve primary vertex
91  const xAOD::Vertex* pvtx(nullptr);
93  if (inputVtx.ptr()){
94  const xAOD::VertexContainer* vtxC = inputVtx.ptr();
95  for (const auto* vertex : *vtxC) {
96  if (vertex->vertexType() == xAOD::VxType::VertexType::PriVtx) {
97  pvtx = vertex;
98  break;
99  }
100  }
101  }
102 
103  // retrieve electron container
105  ctx };
106  const xAOD::ElectronContainer* eleC = inputElectrons.ptr();
107 
108  if (!eleC) {
110  "Couldn't retrieve Electron container with key: " << m_containerName);
111  return StatusCode::FAILURE;
112  }
113  if (!pvtx) {
114  ATH_MSG_DEBUG("No primary vertex found. Setting default values.");
115  for (const xAOD::Electron* iele : *eleC) {
116  dh.drv(*iele) = -1;
117  dh.dphiv(*iele) = -1;
118  dh.dmee(*iele) = -1;
119  dh.dmeeVtx(*iele) = -1;
120  dh.dsep(*iele) = -1;
121  dh.dambi(*iele) = -1;
122  dh.dtrv(*iele) = -1;
123  dh.dtpv(*iele) = -1;
124  dh.dtzv(*iele) = -1;
125  }
126  return StatusCode::SUCCESS;
127  }
128  ATH_MSG_DEBUG("Pvx z = " << pvtx->z() << ", number of electrons "
129  << eleC->size());
130 
131  // Make a container of selected tracks : with Si hits, close to electron track
133  m_tpContainerName, ctx
134  };
135  const xAOD::TrackParticleContainer* idtpC = inputTrackParticles.ptr();
136 
137  std::set<const xAOD::TrackParticle*> alreadyStored;
138  std::set<const xAOD::TrackParticle*> eleIDtpStored, eleGSFtpStored;
139  auto closeByTracks =
140  std::make_unique<ConstDataVector<xAOD::TrackParticleContainer>>(
142 
143  for (const auto* ele : *eleC) {
144 
145  dh.dambi(*ele) = -1;
146 
147  // Electron preselection
148  if (ele->pt() < m_elepTCut ||
149  m_idCut.empty() || !aidCut.isAvailable(*ele) || !aidCut(*ele))
150  continue;
151 
152  // Just for debug
153  const xAOD::TrackParticle* eleGSFtp = ele->trackParticle();
154  eleGSFtpStored.insert(eleGSFtp);
155 
156  const xAOD::TrackParticle* eleIDtp =
158  eleIDtpStored.insert(eleIDtp);
159 
160  // The loop on track
161  for (const auto* tp : *idtpC) {
162 
163  // Keep the electron track (I build a container to run vertexing on it...)
164  if (tp == eleIDtp) {
165  closeByTracks->push_back(tp);
166  alreadyStored.insert(tp);
167  continue;
168  }
169 
170  // potential candidate to store if not already there
171  if (alreadyStored.find(tp) != alreadyStored.end())
172  continue;
173 
175  // if (tp->charge() * ele->charge() > 0)
176  // continue;
177 
178  // Close-by
179  double dR = eleIDtp->p4().DeltaR(tp->p4());
180  double dz = std::abs(eleIDtp->z0() - tp->z0()) * sin(eleIDtp->theta());
181  if (dR >= 0.3 || dz >= m_dzCut)
182  continue;
183 
184  // With minimum number of Si hits
186  continue;
187 
188  alreadyStored.insert(tp);
189 
190  closeByTracks->push_back(tp);
191  }
192  }
193 
194  if (closeByTracks->empty())
195  return StatusCode::SUCCESS;
196 
197  if (msgLvl(MSG::DEBUG)) {
199  ctx };
200  const xAOD::TrackParticleContainer* tpC = tpCReadHandle.ptr();
201 
202  ATH_MSG_DEBUG("Number of input tracks "
203  << idtpC->size() << " , number of selected close-by tracks "
204  << closeByTracks->size() << " , number of GSF tracks "
205  << tpC->size());
206  for (const auto* trk : eleIDtpStored)
207  ATH_MSG_DEBUG("ele ID trk "
208  << trk << " pt = " << trk->pt() * 1e-3
209  << " eta = " << trk->eta() << " phi = " << trk->phi()
210  << " nSi = " << xAOD::EgammaHelpers::numberOfSiHits(trk));
211  for (const auto* trk : eleGSFtpStored)
212  ATH_MSG_DEBUG("ele GSF trk "
213  << trk << " pt = " << trk->pt() * 1e-3
214  << " eta = " << trk->eta() << " phi = " << trk->phi()
215  << " nSi = " << xAOD::EgammaHelpers::numberOfSiHits(trk));
216  for (const xAOD::TrackParticle* trk : *closeByTracks)
217  ATH_MSG_DEBUG("closeby trk "
218  << trk << " pt = " << trk->pt() * 1e-3
219  << " eta = " << trk->eta() << " phi = " << trk->phi()
220  << " nSi = " << xAOD::EgammaHelpers::numberOfSiHits(trk));
221  }
222 
223  for (const auto* ele : *eleC) {
224 
225  // Electron preselection
226  if (ele->pt() < m_elepTCut ||
227  m_idCut.empty() || !aidCut.isAvailable(*ele) || !aidCut(*ele))
228  continue;
229 
230  // Henri's circles
231  if (decorateSimple(dh, closeByTracks, ele, pvtx).isFailure()) {
232  ATH_MSG_ERROR("Cannot decorate the electron with the simple info");
233  return StatusCode::FAILURE;
234  }
235 
236  } // loop on electrons to decorate
237 
238  return StatusCode::SUCCESS;
239 }
240 }
241 
244  DecorHandles& dh,
245  std::unique_ptr<ConstDataVector<xAOD::TrackParticleContainer>>& tpC,
246  const xAOD::Electron* ele,
247  const xAOD::Vertex* pvtx) const
248 {
249  // This is the GSF electron track
250  const xAOD::TrackParticle* eleGSFtrkP = ele->trackParticle();
251 
252  // And the ID one
253  const xAOD::TrackParticle* eleIDtrkP =
255 
256  // For the time being, use the ID one, to be consistent when we only find a
257  // good ID to make a conversion and no GSF
258  bool useGSF = false; // hardcoded because it seems we will not use true. Kept
259  // for the time being, as not 100% sure
260  const xAOD::TrackParticle* eletrkP = useGSF ? eleGSFtrkP : eleIDtrkP;
261 
262  ATH_MSG_DEBUG("Electron pt = " << ele->pt() * 1e-3 << " eta = " << ele->eta()
263  << " phi = " << ele->phi() << " GSF trk ptr = "
264  << eleGSFtrkP << " ID trk ptr " << eleIDtrkP);
265 
266  if (m_isMC) {
267  const xAOD::TruthParticle* truthEl =
269  double tpvr = -1, tpvp = 9e9, tpvz = 9e9;
270  if (truthEl && MC::isElectron(truthEl) &&
271  truthEl->prodVtx() != nullptr) {
272  tpvr = truthEl->prodVtx()->perp();
273  tpvp = truthEl->prodVtx()->phi();
274  tpvz = truthEl->prodVtx()->z();
275  }
276  dh.dtrv(*ele) = tpvr;
277  dh.dtpv(*ele) = tpvp;
278  dh.dtzv(*ele) = tpvz;
279  }
280 
281  // Find the closest track particle with opposite charge and a minimum nb of Si
282  // hits
283  const xAOD::TrackParticle* otrkP(nullptr);
284  double detaMin = 9e9;
285  for (const xAOD::TrackParticle* tp : *tpC) {
286  // Keep only opposite charge
287  if (tp->charge() * eletrkP->charge() > 0)
288  continue;
289 
290  // Close-by
291  double dR = eletrkP->p4().DeltaR(tp->p4());
292  double dz = std::abs(eletrkP->z0() - tp->z0()) * sin(eletrkP->theta());
293  if (dR >= 0.3 || dz >= m_dzCut)
294  continue;
295 
296  double deta = std::abs(eletrkP->eta() - tp->eta());
297  if (deta < detaMin) {
298  otrkP = tp;
299  detaMin = deta;
300  }
301  }
302 
303  double rv = -9e9;
304  double pv = -9e9;
305  double mee = -1.;
306  double meeAtVtx = -1.;
307  double sep = -9e9;
308  bool goodConv = false;
309 
310  if (otrkP) {
311 
312  // To be consistent with the other, use the ID track.
313  TLorentzVector ep4;
314  ep4.SetPtEtaPhiM(eletrkP->pt(), eletrkP->eta(), eletrkP->phi(), ParticleConstants::electronMassInMeV);
315 
316  // Maybe could see if a GSF tp exists for this ID tp and use it if yes ?
317  TLorentzVector op4;
318  op4.SetPtEtaPhiM(otrkP->pt(), otrkP->eta(), otrkP->phi(), ParticleConstants::electronMassInMeV);
319 
320  // Simple masses
321  mee = (ep4 + op4).M();
322  op4.SetPhi(eletrkP->phi());
323  meeAtVtx = (ep4 + op4).M();
324 
325  // And the conversion point
326  std::vector<double> helix1, helix2;
327  helix1.resize(5);
328  helix2.resize(5);
329  helix(eletrkP, pvtx, helix1);
330  helix(otrkP, pvtx, helix2);
331 
332  double beta(0.);
333  if (helix1[4] < helix2[4])
334  beta = TMath::PiOver2() - helix1[4];
335  else
336  beta = TMath::PiOver2() - helix2[4];
337 
338  double phi1(helix1[4] + beta);
339  if (phi1 > TMath::TwoPi())
340  phi1 -= TMath::TwoPi();
341  if (phi1 < 0.)
342  phi1 += TMath::TwoPi();
343 
344  double phi2(helix2[4] + beta);
345  if (phi2 > TMath::TwoPi())
346  phi2 -= TMath::TwoPi();
347  if (phi2 < 0.)
348  phi2 += TMath::TwoPi();
349 
351  double r1 = 1 / (2. * std::abs(helix1[1]));
352 
353  double charge1(1.);
354  if (helix1[1] < 0.)
355  charge1 = -1.;
356  double rcenter1(helix1[3] / charge1 + r1);
357  double phicenter1(phi1 + TMath::PiOver2() * charge1);
358 
359  double x1 = rcenter1 * cos(phicenter1);
360  double y1 = rcenter1 * sin(phicenter1);
361 
363  double r2 = 1 / (2. * std::abs(helix2[1]));
364 
365  double charge2(1.);
366  if (helix2[1] < 0.)
367  charge2 = -1.;
368  double rcenter2(helix2[3] / charge2 + r2);
369  double phicenter2(phi2 + TMath::PiOver2() * charge2);
370 
371  double x2 = rcenter2 * cos(phicenter2);
372  double y2 = rcenter2 * sin(phicenter2);
374 
375  double dx(x1 - x2);
376  if (dx < 1e-9 && dx > 0.)
377  dx = 1e-9;
378  if (dx > -1e-9 && dx < 0.)
379  dx = -1e-9;
380  double slope((y1 - y2) / dx);
381  double b(y1 - slope * x1);
382  double alpha(atan(slope));
383  double d(sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)));
384  // only keeping opposite sign option
385  double separation = d - r1 - r2;
386  double cpx1, cpx2;
387  if (x1 > x2) {
388  cpx1 = x1 - r1 * cos(alpha);
389  cpx2 = x2 + r2 * cos(alpha);
390  } else {
391  cpx1 = x1 + r1 * cos(alpha);
392  cpx2 = x2 - r2 * cos(alpha);
393  }
394 
395  double temp1 = (cpx1 + cpx2) / 2;
396  double temp2 = slope * temp1 + b;
397  double convX = cos(beta) * temp1 + sin(beta) * temp2;
398  double convY = -sin(beta) * temp1 + cos(beta) * temp2;
399 
400  double dct(helix1[0] - helix2[0]);
401 
403  if (std::abs(separation) < m_sepCut && std::abs(dct) < m_dctCut) {
404  goodConv = true;
405  sep = separation;
406  pv = std::atan2(convY, convX);
407  rv = sqrt(convX * convX + convY * convY);
408  if (convX * cos(eletrkP->phi()) + convY * sin(eletrkP->phi()) < 0)
409  rv *= -1.;
410  }
411  } else {
412  dh.dambi(*ele) = -1;
413  }
414  dh.drv(*ele) = rv;
415  dh.dphiv(*ele) = pv;
416  dh.dmee(*ele) = mee;
417  dh.dmeeVtx(*ele) = meeAtVtx;
418  dh.dsep(*ele) = sep;
419  if (goodConv && rv > m_rvECCut && meeAtVtx < m_meeAtVtxECCut)
420  dh.dambi(*ele) = 2;
421  else if (otrkP) {
422  if (mee < m_meeICCut)
423  dh.dambi(*ele) = 1;
424  else
425  dh.dambi(*ele) = 0;
426  }
427  return StatusCode::SUCCESS;
428 }
429 
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:75
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
xAOD::Vertex_v1::x
float x() const
Returns the x position.
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:215
ReadCellNoiseFromCoolCompare.s1
s1
Definition: ReadCellNoiseFromCoolCompare.py:378
add-xsec-uncert-quadrature-N.alpha
alpha
Definition: add-xsec-uncert-quadrature-N.py:110
DerivationFramework::EGElectronAmbiguityTool::m_dtrv
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dtrv
Definition: EGElectronAmbiguityTool.h:86
xAOD::TruthVertex_v1::phi
float phi() const
Vertex azimuthal angle.
Definition: TruthVertex_v1.cxx:177
DerivationFramework::EGElectronAmbiguityTool::m_dmee
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dmee
Definition: EGElectronAmbiguityTool.h:74
DerivationFramework::EGElectronAmbiguityTool::initialize
virtual StatusCode initialize() override final
Definition: EGElectronAmbiguityTool.cxx:47
DerivationFramework::EGElectronAmbiguityTool::m_dambi
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dambi
Definition: EGElectronAmbiguityTool.h:83
DerivationFramework::EGElectronAmbiguityTool::m_tpContainerName
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_tpContainerName
Definition: EGElectronAmbiguityTool.h:52
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
xAOD::TrackParticle_v1::charge
float charge() const
Returns the charge.
Definition: TrackParticle_v1.cxx:143
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
hist_file_dump.d
d
Definition: hist_file_dump.py:142
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:79
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:217
DerivationFramework::EGElectronAmbiguityTool::m_drv
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_drv
Definition: EGElectronAmbiguityTool.h:68
extractSporadic.c1
c1
Definition: extractSporadic.py:133
DerivationFramework::EGElectronAmbiguityTool::m_nSiCut
Gaudi::Property< unsigned int > m_nSiCut
Definition: EGElectronAmbiguityTool.h:123
DerivationFramework::EGElectronAmbiguityTool::m_elepTCut
Gaudi::Property< double > m_elepTCut
Definition: EGElectronAmbiguityTool.h:117
xAOD::TrackParticle_v1::z0
float z0() const
Returns the parameter.
ElectronxAODHelpers.h
ParticleTest.tp
tp
Definition: ParticleTest.py:25
DerivationFramework::EGElectronAmbiguityTool::m_tpCName
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_tpCName
Definition: EGElectronAmbiguityTool.h:59
xAOD::Electron_v1::trackParticle
const xAOD::TrackParticle * trackParticle(size_t index=0) const
Pointer to the xAOD::TrackParticle/s that match the electron candidate.
Definition: Electron_v1.cxx:60
DerivationFramework::EGElectronAmbiguityTool::addBranches
virtual StatusCode addBranches(const EventContext &ctx) const override final
Definition: EGElectronAmbiguityTool.cxx:83
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
PyPoolBrowser.dh
dh
Definition: PyPoolBrowser.py:102
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
xAODTruthHelpers.h
xAOD::TrackParticle_v1::d0
float d0() const
Returns the parameter.
makeTRTBarrelCans.y1
tuple y1
Definition: makeTRTBarrelCans.py:15
DerivationFramework::EGElectronAmbiguityTool::m_idCut
Gaudi::Property< std::string > m_idCut
Definition: EGElectronAmbiguityTool.h:119
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
xAOD::TrackParticle_v1::p4
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
Definition: TrackParticle_v1.cxx:122
DerivationFramework::EGElectronAmbiguityTool::m_dsep
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dsep
Definition: EGElectronAmbiguityTool.h:80
DerivationFramework::EGElectronAmbiguityTool::m_VtxContainerName
SG::ReadHandleKey< xAOD::VertexContainer > m_VtxContainerName
Definition: EGElectronAmbiguityTool.h:46
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
DerivationFramework::EGElectronAmbiguityTool::m_dzCut
Gaudi::Property< double > m_dzCut
Definition: EGElectronAmbiguityTool.h:129
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::EgammaHelpers::isElectron
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
Definition: EgammaxAODHelpers.cxx:12
makeTRTBarrelCans.y2
tuple y2
Definition: makeTRTBarrelCans.py:18
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
xAOD::TruthVertex_v1::perp
float perp() const
Vertex transverse distance from the beam line.
Definition: TruthVertex_v1.cxx:164
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:572
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::Egamma_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
Definition: Egamma_v1.cxx:76
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
xAOD::Vertex_v1::z
float z() const
Returns the z position.
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DataVector
Derived DataVector<T>.
Definition: DataVector.h:795
DerivationFramework::EGElectronAmbiguityTool::DecorHandles
Definition: EGElectronAmbiguityTool.h:94
TruthVertex.h
xAOD::TruthParticle_v1::prodVtx
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
Definition: TruthParticle_v1.cxx:75
DerivationFramework::EGElectronAmbiguityTool::m_dmeeVtx
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dmeeVtx
Definition: EGElectronAmbiguityTool.h:77
DerivationFramework::EGElectronAmbiguityTool::m_dphiv
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dphiv
Definition: EGElectronAmbiguityTool.h:71
grepfile.sep
sep
Definition: grepfile.py:38
xAOD::TrackParticle_v1::phi0
float phi0() const
Returns the parameter, which has range to .
Definition: TrackParticle_v1.cxx:150
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:76
xAOD::TruthHelpers::getTruthParticle
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any)
Definition: xAODTruthHelpers.cxx:25
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:452
xAOD::EgammaHelpers::numberOfSiHits
std::size_t numberOfSiHits(const xAOD::TrackParticle *tp)
return the number of Si hits in the track particle
Definition: ElectronxAODHelpers.cxx:66
xAOD::Electron_v1
Definition: Electron_v1.h:34
dq_make_web_display.rv
def rv
Definition: dq_make_web_display.py:218
TRT_PAI_physicsConstants::he
const double he
same in ev
Definition: TRT_PAI_physicsConstants.h:24
DerivationFramework::EGElectronAmbiguityTool::m_dtpv
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dtpv
Definition: EGElectronAmbiguityTool.h:89
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
SG::WriteDecorHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
DerivationFramework::EGElectronAmbiguityTool::DecorHandles::DecorHandles
DecorHandles(const EGElectronAmbiguityTool &tool, const EventContext &ctx)
Definition: EGElectronAmbiguityTool.cxx:69
ConstDataVector
DataVector adapter that acts like it holds const pointers.
Definition: ConstDataVector.h:76
xAOD::TruthVertex_v1::z
float z() const
Vertex longitudinal distance along the beam line form the origin.
DerivationFramework::EGElectronAmbiguityTool
Definition: EGElectronAmbiguityTool.h:30
DEBUG
#define DEBUG
Definition: page_access.h:11
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
xAOD::Vertex_v1::y
float y() const
Returns the y position.
python.changerun.pv
pv
Definition: changerun.py:79
xAOD::Egamma_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: Egamma_v1.cxx:66
DerivationFramework::EGElectronAmbiguityTool::m_containerName
SG::ReadHandleKey< xAOD::ElectronContainer > m_containerName
Definition: EGElectronAmbiguityTool.h:40
xAOD::EgammaHelpers::getOriginalTrackParticle
const xAOD::TrackParticle * getOriginalTrackParticle(const xAOD::Electron *el)
Helper function for getting the "Original" Track Particle (i.e before GSF) via the electron.
Definition: ElectronxAODHelpers.cxx:11
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
xAOD::Egamma_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: Egamma_v1.cxx:71
DerivationFramework::EGElectronAmbiguityTool::decorateSimple
StatusCode decorateSimple(DecorHandles &dh, std::unique_ptr< ConstDataVector< xAOD::TrackParticleContainer >> &tpC, const xAOD::Electron *ele, const xAOD::Vertex *pvtx) const
Definition: EGElectronAmbiguityTool.cxx:243
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:44
DerivationFramework::EGElectronAmbiguityTool::m_dtzv
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dtzv
Definition: EGElectronAmbiguityTool.h:92
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
MuonParameters::beta
@ beta
Definition: MuonParamDefs.h:144
TruthParticle.h
xAOD::TrackParticle_v1::theta
float theta() const
Returns the parameter, which has range 0 to .
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
HepMCHelpers.h
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
EGElectronAmbiguityTool.h
ParticleConstants::PDG2011::electronMassInMeV
constexpr double electronMassInMeV
the mass of the electron (in MeV)
Definition: ParticleConstants.h:26