ATLAS Offline Software
EGElectronAmbiguityTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // EGElectronAmbiguityTool.cxx, (c) ATLAS Detector software
8 //
9 //
10 
12 
15 
17 #include "xAODTruth/TruthVertex.h"
18 
20 
21 #include "TMath.h"
22 
23 namespace {
24 void
25 helix(const xAOD::TrackParticle* trkP,
26  const xAOD::Vertex* pvtx,
27  std::vector<double>& he)
28 {
29  constexpr double PTTOCURVATURE = -0.301;
30 
31  he[0] = 1. / tan(trkP->theta());
32  he[1] = PTTOCURVATURE * trkP->charge() / trkP->pt();
33 
34  if (trkP->phi0() > 0.)
35  he[4] = trkP->phi0();
36  else
37  he[4] = TMath::TwoPi() + trkP->phi0();
38 
39  double c1 = cos(trkP->phi0());
40  double s1 = sin(trkP->phi0());
41  he[3] = trkP->d0() + c1 * pvtx->y() - s1 * pvtx->x();
42 
43  c1 *= he[0];
44  s1 *= he[0];
45  he[2] = trkP->z0() - c1 * pvtx->x() - s1 * pvtx->y() + pvtx->z();
46 }
47 }//end anonymous
48 
49 
50 namespace DerivationFramework {
51 
53  const std::string& n,
54  const IInterface* p)
55  : base_class(t, n, p)
56 {
57 
58  declareProperty("isMC", m_isMC);
59 
60  declareProperty(
61  "pTCut", m_elepTCut = 9e3, "minimum pT for an electron to be studied");
62  declareProperty("idCut",
63  m_idCut = "DFCommonElectronsLHLoose",
64  "minimal quality for an electron to be studied");
65 
66  declareProperty(
67  "nSiCut", m_nSiCut = 7, "minimum number of Si hits in the other track");
68  declareProperty(
69  "dzsinTCut", m_dzCut = 0.5, "max dz sinTheta between ele and other tracks");
70  declareProperty("SeparationCut", m_sepCut = 1., "first separation cut");
71  declareProperty("DCTCut", m_dctCut = 0.02, "second separation cut");
72 
73  declareProperty("radiusCut",
74  m_rvECCut = 20,
75  "minimum radius to be classified as external conversion");
76  declareProperty(
77  "meeAtVtxCut",
78  m_meeAtVtxECCut = 100,
79  "maximal mass at vertex to be classified as external conversion");
80  declareProperty("meeCut",
81  m_meeICCut = 100,
82  "maximal mass at primary vertex to be classified as gamma*");
83 }
84 
87 {
88 
90  ATH_CHECK(m_VtxContainerName.initialize());
93 
94  const std::string baseName = m_containerName.key();
95  m_drv = baseName + ".DFCommonSimpleConvRadius";
96  m_dphiv = baseName + ".DFCommonSimpleConvPhi";
97  m_dmee = baseName + ".DFCommonSimpleMee";
98  m_dmeeVtx = baseName + ".DFCommonSimpleMeeAtVtx";
99  m_dsep = baseName + ".DFCommonSimpleSeparation";
100  m_dambi = baseName + ".DFCommonAddAmbiguity";
101  m_dtrv = baseName + ".DFCommonProdTrueRadius";
102  m_dtpv = baseName + ".DFCommonProdTruePhi";
103  m_dtzv = baseName + ".DFCommonProdTrueZ";
104 
114 
115  return StatusCode::SUCCESS;
116 }
117 
119  (const EGElectronAmbiguityTool& tool, const EventContext& ctx)
120  : drv (tool.m_drv, ctx),
121  dphiv (tool.m_dphiv, ctx),
122  dmee (tool.m_dmee, ctx),
123  dmeeVtx (tool.m_dmeeVtx, ctx),
124  dsep (tool.m_dsep, ctx),
125  dambi (tool.m_dambi, ctx),
126  dtrv (tool.m_dtrv, ctx),
127  dtpv (tool.m_dtpv, ctx),
128  dtzv (tool.m_dtzv, ctx)
129 {
130 }
131 
134 {
135  const EventContext& ctx = Gaudi::Hive::currentContext();
136 
137  DecorHandles dh (*this, ctx);
138 
139  static const SG::AuxElement::ConstAccessor<char> aidCut(m_idCut);
140 
141  // retrieve primary vertex
142  const xAOD::Vertex* pvtx(nullptr);
144  if (inputVtx.ptr()){
145  const xAOD::VertexContainer* vtxC = inputVtx.ptr();
146  for (const auto* vertex : *vtxC) {
147  if (vertex->vertexType() == xAOD::VxType::VertexType::PriVtx) {
148  pvtx = vertex;
149  break;
150  }
151  }
152  }
153 
154  // retrieve electron container
156  ctx };
157  const xAOD::ElectronContainer* eleC = inputElectrons.ptr();
158 
159  if (!eleC) {
161  "Couldn't retrieve Electron container with key: " << m_containerName);
162  return StatusCode::FAILURE;
163  }
164  if (!pvtx) {
165  ATH_MSG_DEBUG("No primary vertex found. Setting default values.");
166  for (const xAOD::Electron* iele : *eleC) {
167  dh.drv(*iele) = -1;
168  dh.dphiv(*iele) = -1;
169  dh.dmee(*iele) = -1;
170  dh.dmeeVtx(*iele) = -1;
171  dh.dsep(*iele) = -1;
172  dh.dambi(*iele) = -1;
173  dh.dtrv(*iele) = -1;
174  dh.dtpv(*iele) = -1;
175  dh.dtzv(*iele) = -1;
176  }
177  return StatusCode::SUCCESS;
178  }
179  ATH_MSG_DEBUG("Pvx z = " << pvtx->z() << ", number of electrons "
180  << eleC->size());
181 
182  // Make a container of selected tracks : with Si hits, close to electron track
184  m_tpContainerName, ctx
185  };
186  const xAOD::TrackParticleContainer* idtpC = inputTrackParticles.ptr();
187 
188  std::set<const xAOD::TrackParticle*> alreadyStored;
189  std::set<const xAOD::TrackParticle*> eleIDtpStored, eleGSFtpStored;
190  auto closeByTracks =
191  std::make_unique<ConstDataVector<xAOD::TrackParticleContainer>>(
193 
194  for (const auto* ele : *eleC) {
195 
196  dh.dambi(*ele) = -1;
197 
198  // Electron preselection
199  if (ele->pt() < m_elepTCut ||
200  m_idCut.empty() || !aidCut.isAvailable(*ele) || !aidCut(*ele))
201  continue;
202 
203  // Just for debug
204  const xAOD::TrackParticle* eleGSFtp = ele->trackParticle();
205  eleGSFtpStored.insert(eleGSFtp);
206 
207  const xAOD::TrackParticle* eleIDtp =
209  eleIDtpStored.insert(eleIDtp);
210 
211  // The loop on track
212  for (const auto* tp : *idtpC) {
213 
214  // Keep the electron track (I build a container to run vertexing on it...)
215  if (tp == eleIDtp) {
216  closeByTracks->push_back(tp);
217  alreadyStored.insert(tp);
218  continue;
219  }
220 
221  // potential candidate to store if not already there
222  if (alreadyStored.find(tp) != alreadyStored.end())
223  continue;
224 
226  // if (tp->charge() * ele->charge() > 0)
227  // continue;
228 
229  // Close-by
230  double dR = eleIDtp->p4().DeltaR(tp->p4());
231  double dz = std::abs(eleIDtp->z0() - tp->z0()) * sin(eleIDtp->theta());
232  if (dR >= 0.3 || dz >= m_dzCut)
233  continue;
234 
235  // With minimum number of Si hits
237  continue;
238 
239  alreadyStored.insert(tp);
240 
241  closeByTracks->push_back(tp);
242  }
243  }
244 
245  if (closeByTracks->empty())
246  return StatusCode::SUCCESS;
247 
248  if (msgLvl(MSG::DEBUG)) {
250  ctx };
251  const xAOD::TrackParticleContainer* tpC = tpCReadHandle.ptr();
252 
253  ATH_MSG_DEBUG("Number of input tracks "
254  << idtpC->size() << " , number of selected close-by tracks "
255  << closeByTracks->size() << " , number of GSF tracks "
256  << tpC->size());
257  for (const auto* trk : eleIDtpStored)
258  ATH_MSG_DEBUG("ele ID trk "
259  << trk << " pt = " << trk->pt() * 1e-3
260  << " eta = " << trk->eta() << " phi = " << trk->phi()
261  << " nSi = " << xAOD::EgammaHelpers::numberOfSiHits(trk));
262  for (const auto* trk : eleGSFtpStored)
263  ATH_MSG_DEBUG("ele GSF trk "
264  << trk << " pt = " << trk->pt() * 1e-3
265  << " eta = " << trk->eta() << " phi = " << trk->phi()
266  << " nSi = " << xAOD::EgammaHelpers::numberOfSiHits(trk));
267  for (const xAOD::TrackParticle* trk : *closeByTracks)
268  ATH_MSG_DEBUG("closeby trk "
269  << trk << " pt = " << trk->pt() * 1e-3
270  << " eta = " << trk->eta() << " phi = " << trk->phi()
271  << " nSi = " << xAOD::EgammaHelpers::numberOfSiHits(trk));
272  }
273 
274  for (const auto* ele : *eleC) {
275 
276  // Electron preselection
277  if (ele->pt() < m_elepTCut ||
278  m_idCut.empty() || !aidCut.isAvailable(*ele) || !aidCut(*ele))
279  continue;
280 
281  // Henri's circles
282  if (decorateSimple(dh, closeByTracks, ele, pvtx).isFailure()) {
283  ATH_MSG_ERROR("Cannot decorate the electron with the simple info");
284  return StatusCode::FAILURE;
285  }
286 
287  } // loop on electrons to decorate
288 
289  return StatusCode::SUCCESS;
290 }
291 }
292 
295  DecorHandles& dh,
296  std::unique_ptr<ConstDataVector<xAOD::TrackParticleContainer>>& tpC,
297  const xAOD::Electron* ele,
298  const xAOD::Vertex* pvtx) const
299 {
300  // This is the GSF electron track
301  const xAOD::TrackParticle* eleGSFtrkP = ele->trackParticle();
302 
303  // And the ID one
304  const xAOD::TrackParticle* eleIDtrkP =
306 
307  // For the time being, use the ID one, to be consistent when we only find a
308  // good ID to make a conversion and no GSF
309  bool useGSF = false; // hardcoded because it seems we will not use true. Kept
310  // for the time being, as not 100% sure
311  const xAOD::TrackParticle* eletrkP = useGSF ? eleGSFtrkP : eleIDtrkP;
312 
313  ATH_MSG_DEBUG("Electron pt = " << ele->pt() * 1e-3 << " eta = " << ele->eta()
314  << " phi = " << ele->phi() << " GSF trk ptr = "
315  << eleGSFtrkP << " ID trk ptr " << eleIDtrkP);
316 
317  if (m_isMC) {
318  const xAOD::TruthParticle* truthEl =
320  double tpvr = -1, tpvp = 9e9, tpvz = 9e9;
321  if (truthEl && MC::isElectron(truthEl) &&
322  truthEl->prodVtx() != nullptr) {
323  tpvr = truthEl->prodVtx()->perp();
324  tpvp = truthEl->prodVtx()->phi();
325  tpvz = truthEl->prodVtx()->z();
326  }
327  dh.dtrv(*ele) = tpvr;
328  dh.dtpv(*ele) = tpvp;
329  dh.dtzv(*ele) = tpvz;
330  }
331 
332  // Find the closest track particle with opposite charge and a minimum nb of Si
333  // hits
334  const xAOD::TrackParticle* otrkP(nullptr);
335  double detaMin = 9e9;
336  for (const xAOD::TrackParticle* tp : *tpC) {
337  // Keep only opposite charge
338  if (tp->charge() * eletrkP->charge() > 0)
339  continue;
340 
341  // Close-by
342  double dR = eletrkP->p4().DeltaR(tp->p4());
343  double dz = std::abs(eletrkP->z0() - tp->z0()) * sin(eletrkP->theta());
344  if (dR >= 0.3 || dz >= m_dzCut)
345  continue;
346 
347  double deta = std::abs(eletrkP->eta() - tp->eta());
348  if (deta < detaMin) {
349  otrkP = tp;
350  detaMin = deta;
351  }
352  }
353 
354  double rv = -9e9;
355  double pv = -9e9;
356  double mee = -1.;
357  double meeAtVtx = -1.;
358  double sep = -9e9;
359  bool goodConv = false;
360 
361  if (otrkP) {
362 
363  // To be consistent with the other, use the ID track.
364  TLorentzVector ep4;
365  ep4.SetPtEtaPhiM(eletrkP->pt(), eletrkP->eta(), eletrkP->phi(), ParticleConstants::electronMassInMeV);
366 
367  // Maybe could see if a GSF tp exists for this ID tp and use it if yes ?
368  TLorentzVector op4;
369  op4.SetPtEtaPhiM(otrkP->pt(), otrkP->eta(), otrkP->phi(), ParticleConstants::electronMassInMeV);
370 
371  // Simple masses
372  mee = (ep4 + op4).M();
373  op4.SetPhi(eletrkP->phi());
374  meeAtVtx = (ep4 + op4).M();
375 
376  // And the conversion point
377  std::vector<double> helix1, helix2;
378  helix1.resize(5);
379  helix2.resize(5);
380  helix(eletrkP, pvtx, helix1);
381  helix(otrkP, pvtx, helix2);
382 
383  double beta(0.);
384  if (helix1[4] < helix2[4])
385  beta = TMath::PiOver2() - helix1[4];
386  else
387  beta = TMath::PiOver2() - helix2[4];
388 
389  double phi1(helix1[4] + beta);
390  if (phi1 > TMath::TwoPi())
391  phi1 -= TMath::TwoPi();
392  if (phi1 < 0.)
393  phi1 += TMath::TwoPi();
394 
395  double phi2(helix2[4] + beta);
396  if (phi2 > TMath::TwoPi())
397  phi2 -= TMath::TwoPi();
398  if (phi2 < 0.)
399  phi2 += TMath::TwoPi();
400 
402  double r1 = 1 / (2. * std::abs(helix1[1]));
403 
404  double charge1(1.);
405  if (helix1[1] < 0.)
406  charge1 = -1.;
407  double rcenter1(helix1[3] / charge1 + r1);
408  double phicenter1(phi1 + TMath::PiOver2() * charge1);
409 
410  double x1 = rcenter1 * cos(phicenter1);
411  double y1 = rcenter1 * sin(phicenter1);
412 
414  double r2 = 1 / (2. * std::abs(helix2[1]));
415 
416  double charge2(1.);
417  if (helix2[1] < 0.)
418  charge2 = -1.;
419  double rcenter2(helix2[3] / charge2 + r2);
420  double phicenter2(phi2 + TMath::PiOver2() * charge2);
421 
422  double x2 = rcenter2 * cos(phicenter2);
423  double y2 = rcenter2 * sin(phicenter2);
425 
426  double dx(x1 - x2);
427  if (dx < 1e-9 && dx > 0.)
428  dx = 1e-9;
429  if (dx > -1e-9 && dx < 0.)
430  dx = -1e-9;
431  double slope((y1 - y2) / dx);
432  double b(y1 - slope * x1);
433  double alpha(atan(slope));
434  double d(sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)));
435  // only keeping opposite sign option
436  double separation = d - r1 - r2;
437  double cpx1, cpx2;
438  if (x1 > x2) {
439  cpx1 = x1 - r1 * cos(alpha);
440  cpx2 = x2 + r2 * cos(alpha);
441  } else {
442  cpx1 = x1 + r1 * cos(alpha);
443  cpx2 = x2 - r2 * cos(alpha);
444  }
445 
446  double temp1 = (cpx1 + cpx2) / 2;
447  double temp2 = slope * temp1 + b;
448  double convX = cos(beta) * temp1 + sin(beta) * temp2;
449  double convY = -sin(beta) * temp1 + cos(beta) * temp2;
450 
451  double dct(helix1[0] - helix2[0]);
452 
454  if (std::abs(separation) < m_sepCut && std::abs(dct) < m_dctCut) {
455  goodConv = true;
456  sep = separation;
457  pv = std::atan2(convY, convX);
458  rv = sqrt(convX * convX + convY * convY);
459  if (convX * cos(eletrkP->phi()) + convY * sin(eletrkP->phi()) < 0)
460  rv *= -1.;
461  }
462  } else {
463  dh.dambi(*ele) = -1;
464  }
465  dh.drv(*ele) = rv;
466  dh.dphiv(*ele) = pv;
467  dh.dmee(*ele) = mee;
468  dh.dmeeVtx(*ele) = meeAtVtx;
469  dh.dsep(*ele) = sep;
470  if (goodConv && rv > m_rvECCut && meeAtVtx < m_meeAtVtxECCut)
471  dh.dambi(*ele) = 2;
472  else if (otrkP) {
473  if (mee < m_meeICCut)
474  dh.dambi(*ele) = 1;
475  else
476  dh.dambi(*ele) = 0;
477  }
478  return StatusCode::SUCCESS;
479 }
480 
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:74
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:91
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:79
DerivationFramework::EGElectronAmbiguityTool::initialize
virtual StatusCode initialize() override final
Definition: EGElectronAmbiguityTool.cxx:86
DerivationFramework::EGElectronAmbiguityTool::addBranches
virtual StatusCode addBranches() const override final
Definition: EGElectronAmbiguityTool.cxx:133
DerivationFramework::EGElectronAmbiguityTool::m_dambi
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dambi
Definition: EGElectronAmbiguityTool.h:88
DerivationFramework::EGElectronAmbiguityTool::m_isMC
bool m_isMC
Definition: EGElectronAmbiguityTool.h:119
DerivationFramework::EGElectronAmbiguityTool::m_tpContainerName
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_tpContainerName
Definition: EGElectronAmbiguityTool.h:57
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:151
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:78
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:217
DerivationFramework::EGElectronAmbiguityTool::m_drv
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_drv
Definition: EGElectronAmbiguityTool.h:73
extractSporadic.c1
c1
Definition: extractSporadic.py:133
DerivationFramework::EGElectronAmbiguityTool::m_dctCut
double m_dctCut
Definition: EGElectronAmbiguityTool.h:127
xAOD::TrackParticle_v1::z0
float z0() const
Returns the parameter.
ElectronxAODHelpers.h
DerivationFramework::EGElectronAmbiguityTool::m_rvECCut
double m_rvECCut
Definition: EGElectronAmbiguityTool.h:132
ParticleTest.tp
tp
Definition: ParticleTest.py:25
DerivationFramework::EGElectronAmbiguityTool::m_tpCName
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_tpCName
Definition: EGElectronAmbiguityTool.h:64
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:55
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
PyPoolBrowser.dh
dh
Definition: PyPoolBrowser.py:102
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
DerivationFramework::EGElectronAmbiguityTool::m_sepCut
double m_sepCut
Definition: EGElectronAmbiguityTool.h:127
xAODTruthHelpers.h
DerivationFramework::EGElectronAmbiguityTool::m_elepTCut
double m_elepTCut
Definition: EGElectronAmbiguityTool.h:122
xAOD::TrackParticle_v1::d0
float d0() const
Returns the parameter.
makeTRTBarrelCans.y1
tuple y1
Definition: makeTRTBarrelCans.py:15
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:130
DerivationFramework::EGElectronAmbiguityTool::m_dsep
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dsep
Definition: EGElectronAmbiguityTool.h:85
DerivationFramework::EGElectronAmbiguityTool::m_VtxContainerName
SG::ReadHandleKey< xAOD::VertexContainer > m_VtxContainerName
Definition: EGElectronAmbiguityTool.h:51
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
DerivationFramework::EGElectronAmbiguityTool::m_nSiCut
unsigned int m_nSiCut
Definition: EGElectronAmbiguityTool.h:126
DerivationFramework::EGElectronAmbiguityTool::m_dzCut
double m_dzCut
Definition: EGElectronAmbiguityTool.h:127
beamspotman.n
n
Definition: beamspotman.py:729
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
DerivationFramework::EGElectronAmbiguityTool::m_idCut
std::string m_idCut
Definition: EGElectronAmbiguityTool.h:123
xAOD::Egamma_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
Definition: Egamma_v1.cxx:75
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:794
DerivationFramework::EGElectronAmbiguityTool::DecorHandles
Definition: EGElectronAmbiguityTool.h:99
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:82
DerivationFramework::EGElectronAmbiguityTool::m_dphiv
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dphiv
Definition: EGElectronAmbiguityTool.h:76
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:159
DerivationFramework::EGElectronAmbiguityTool::EGElectronAmbiguityTool
EGElectronAmbiguityTool(const std::string &t, const std::string &n, const IInterface *p)
Definition: EGElectronAmbiguityTool.cxx:52
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:94
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:119
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:34
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:65
DerivationFramework::EGElectronAmbiguityTool::m_containerName
SG::ReadHandleKey< xAOD::ElectronContainer > m_containerName
Definition: EGElectronAmbiguityTool.h:45
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:70
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:294
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
DerivationFramework::EGElectronAmbiguityTool::m_dtzv
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dtzv
Definition: EGElectronAmbiguityTool.h:97
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.
DerivationFramework::EGElectronAmbiguityTool::m_meeAtVtxECCut
double m_meeAtVtxECCut
Definition: EGElectronAmbiguityTool.h:132
DerivationFramework::EGElectronAmbiguityTool::m_meeICCut
double m_meeICCut
Definition: EGElectronAmbiguityTool.h:132
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