ATLAS Offline Software
MergedElectronDetailsDecorator.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
11 
12 #include "FourMomUtils/P4Helpers.h"
16 
17 #include "GaudiKernel/EventContext.h"
18 
19 #include <vector>
20 
21 namespace DerivationFramework {
22 
24 
25  ATH_MSG_INFO("Initialize " );
26 
27  if (m_emExtrapolationTool.retrieve().isFailure()) {
28  ATH_MSG_FATAL("Failed to retrieve tool: " << m_emExtrapolationTool);
29  return StatusCode::FAILURE;
30  }
31  ATH_MSG_INFO("Retrieved tool: " << m_emExtrapolationTool);
32 
33  if (m_VertexFitter.retrieve().isFailure()) {
34  ATH_MSG_FATAL("Failed to retrieve tool: " << m_VertexFitter);
35  return StatusCode::FAILURE;
36  }
37  ATH_MSG_INFO("Retrieved tool: " << m_VertexFitter);
38 
39  if (m_V0Tools.retrieve().isFailure()) {
40  ATH_MSG_FATAL("Failed to retrieve tool: " << m_V0Tools);
41  return StatusCode::FAILURE;
42  }
43  ATH_MSG_INFO("Retrieved tool: " << m_V0Tools);
44 
46 
49  return StatusCode::SUCCESS;
50  }
51 
52 
54 
55 
56  // Retrieve the xAOD event info
58 
60 
61  bool isMC = false;
63  isMC = true;
64 
65 
66  for( const auto *const el : *electrons ){
70  }
71 
72  return StatusCode::SUCCESS;
73 
74  } // addBranches
75 
77  const xAOD::TrackParticle* tp,
78  const xAOD::CaloCluster* cluster) const{
79 
80  trkMatchTrk.clear();
82 
83  if( !truthPart || !truthPart->hasProdVtx() )
84  return;
85 
86  const auto *prodVtx = truthPart->prodVtx();
87 
88  Amg::Vector3D pos( prodVtx->x(), prodVtx->y(), prodVtx->z() );
89  Amg::Vector3D mom( truthPart->px(), truthPart->py(), truthPart->pz() );
90 
91  Trk::CurvilinearParameters truthTP( pos, mom, truthPart->charge() );
92 
93  const EventContext& ctx = Gaudi::Hive::currentContext();
94  float etaAtCalo, phiAtCalo;
95  if( m_emExtrapolationTool->getEtaPhiAtCalo ( ctx,
96  &truthTP,
97  &etaAtCalo,
98  &phiAtCalo) ){
99  trkMatchTrk.push_back( cluster->etaBE(2) - etaAtCalo );
100  trkMatchTrk.push_back( P4Helpers::deltaPhi(cluster->phiBE(2), phiAtCalo) );
101  }
102 
103  return;
104 
105  }
106 
108  const xAOD::TrackParticle* tp,
109  const xAOD::CaloCluster* cluster) const {
110 
111  SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{ m_caloMgrKey };
112  const CaloDetDescrManager* caloDDMgr = *caloMgrHandle;
113 
114  //Reset values
115  for(unsigned int i(0); i<trkMatchTrk.size(); ++i ){
116  trkMatchTrk[i] = -999;
117  }
118 
119  std::array<double,4> eta = { -999.0, -999.0, -999.0, -999.0 };
120  std::array<double,4> phi = { -999.0, -999.0, -999.0, -999.0 };
121  std::array<double,4> deltaEta = { -999.0, -999.0, -999.0, -999.0 };
122  std::array<double,4> deltaPhi = { -999.0, -999.0, -999.0, -999.0 };
123 
124  const EventContext& ctx = Gaudi::Hive::currentContext();
125  std::pair<std::vector<CaloSampling::CaloSample>,
126  std::vector<std::unique_ptr<Trk::Surface>>>
127  layersAndSurfaces =
128  m_emExtrapolationTool->getClusterLayerSurfaces(*cluster, *caloDDMgr);
129 
130  if (m_emExtrapolationTool
131  ->getMatchAtCalo(ctx,
132  *cluster,
133  *tp,
134  layersAndSurfaces.first,
135  layersAndSurfaces.second,
136  eta,
137  phi,
138  deltaEta,
139  deltaPhi,
141  .isSuccess()) // Perigee
142  {
143  trkMatchTrk[0] = deltaEta[1];
144  trkMatchTrk[1] = deltaEta[2];
145  trkMatchTrk[2] = deltaPhi[1];
146  trkMatchTrk[3] = deltaPhi[2];
147  }
148 
149  if (m_emExtrapolationTool
150  ->getMatchAtCalo(ctx,
151  *cluster,
152  *tp,
153  layersAndSurfaces.first,
154  layersAndSurfaces.second,
155  eta,
156  phi,
157  deltaEta,
158  deltaPhi,
160  .isSuccess()) // Last Measurement
161  {
162  trkMatchTrk[4] = deltaEta[1];
163  trkMatchTrk[5] = deltaEta[2];
164  trkMatchTrk[6] = deltaPhi[1];
165  trkMatchTrk[7] = deltaPhi[2];
166  }
167 
168  if(m_emExtrapolationTool->getMatchAtCalo ( ctx,
169  *cluster,
170  *tp,
171  layersAndSurfaces.first,
172  layersAndSurfaces.second,
173  eta,
174  phi,
175  deltaEta,
176  deltaPhi,
177  IEMExtrapolationTools::fromPerigeeRescaled).isSuccess()) //Last Measurement
178  {
179  trkMatchTrk[8] = deltaPhi[2];
180  }
181  }
182 
183 
185  {
186  uint8_t dummy(-1);
187  int nPix = tp->summaryValue( dummy, xAOD::numberOfPixelHits )? dummy : 0;
188  int nPix_DS = tp->summaryValue( dummy, xAOD::numberOfPixelDeadSensors )? dummy : 0;
189  int nSCT = tp->summaryValue( dummy, xAOD::numberOfSCTHits )? dummy : 0;
190  int nSCT_DS = tp->summaryValue( dummy, xAOD::numberOfSCTDeadSensors )? dummy : 0;
191  return nPix + nPix_DS + nSCT + nSCT_DS;
192  }
193 
194 
196  {
197  std::vector<float> trkMatchTrkP_dEta1(el->nTrackParticles(),-999);
198  std::vector<float> trkMatchTrkP_dEta2(el->nTrackParticles(),-999);
199  std::vector<float> trkMatchTrkP_dPhi1(el->nTrackParticles(),-999);
200  std::vector<float> trkMatchTrkP_dPhi2(el->nTrackParticles(),-999);
201  std::vector<float> trkMatchTrkLM_dEta1(el->nTrackParticles(),-999);
202  std::vector<float> trkMatchTrkLM_dEta2(el->nTrackParticles(),-999);
203  std::vector<float> trkMatchTrkLM_dPhi1(el->nTrackParticles(),-999);
204  std::vector<float> trkMatchTrkLM_dPhi2(el->nTrackParticles(),-999);
205  std::vector<float> trkMatchTrkR_dPhi2(el->nTrackParticles(),-999);
206 
207  std::vector<float> trueMatch_dEta2(el->nTrackParticles(),-999);
208  std::vector<float> trueMatch_dPhi2(el->nTrackParticles(),-999);
209 
210  const auto *caloCluster = el->caloCluster();
211  if( caloCluster && caloCluster->pt() > m_minET ){
212  std::vector<float> trkMatch(9,-999);
213  for( unsigned int i(0); i < el->nTrackParticles(); ++i ){
214  const auto *trackParticle = el->trackParticle( i );
215  if(trackParticle){
216  fillMatchDetails( trkMatch, trackParticle, caloCluster);
217  trkMatchTrkP_dEta1[i] = trkMatch[0];
218  trkMatchTrkP_dEta2[i] = trkMatch[1];
219  trkMatchTrkP_dPhi1[i] = trkMatch[2];
220  trkMatchTrkP_dPhi2[i] = trkMatch[3];
221  trkMatchTrkLM_dEta1[i] = trkMatch[4];
222  trkMatchTrkLM_dEta2[i] = trkMatch[5];
223  trkMatchTrkLM_dPhi1[i] = trkMatch[6];
224  trkMatchTrkLM_dPhi2[i] = trkMatch[7];
225  trkMatchTrkR_dPhi2[i] = trkMatch[8];
226 
227  if(isMC){
228  fillTruthDetails( trkMatch, trackParticle, caloCluster );
229  if( trkMatch.size() == 2 ){
230  trueMatch_dEta2[i] = trkMatch[0];
231  trueMatch_dPhi2[i] = trkMatch[1];
232  }
233  }
234  }
235  }
236  }
237 
238  static const SG::Decorator<std::vector<float> > TrackMatchingP_dEta1Dec("TrackMatchingP_dEta1");
239  static const SG::Decorator<std::vector<float> > TrackMatchingP_dEta2Dec("TrackMatchingP_dEta2");
240  static const SG::Decorator<std::vector<float> > TrackMatchingP_dPhi1Dec("TrackMatchingP_dPhi1");
241  static const SG::Decorator<std::vector<float> > TrackMatchingP_dPhi2Dec("TrackMatchingP_dPhi2");
242  static const SG::Decorator<std::vector<float> > TrackMatchingLM_dEta1Dec("TrackMatchingLM_dEta1");
243  static const SG::Decorator<std::vector<float> > TrackMatchingLM_dEta2Dec("TrackMatchingLM_dEta2");
244  static const SG::Decorator<std::vector<float> > TrackMatchingLM_dPhi1Dec("TrackMatchingLM_dPhi1");
245  static const SG::Decorator<std::vector<float> > TrackMatchingLM_dPhi2Dec("TrackMatchingLM_dPhi2");
246  static const SG::Decorator<std::vector<float> > TrackMatchingR_dPhi2Dec("TrackMatchingR_dPhi2");
247  static const SG::Decorator<std::vector<float> > TrackMatchingTrue_dEta2Dec("TrackMatchingTrue_dEta2");
248  static const SG::Decorator<std::vector<float> > TrackMatchingTrue_dPhi2Dec("TrackMatchingTrue_dPhi2");
249  TrackMatchingP_dEta1Dec(*el) = trkMatchTrkP_dEta1;
250  TrackMatchingP_dEta2Dec(*el) = trkMatchTrkP_dEta2;
251  TrackMatchingP_dPhi1Dec(*el) = trkMatchTrkP_dPhi1;
252  TrackMatchingP_dPhi2Dec(*el) = trkMatchTrkP_dPhi2;
253  TrackMatchingLM_dEta1Dec(*el) = trkMatchTrkLM_dEta1;
254  TrackMatchingLM_dEta2Dec(*el) = trkMatchTrkLM_dEta2;
255  TrackMatchingLM_dPhi1Dec(*el) = trkMatchTrkLM_dPhi1;
256  TrackMatchingLM_dPhi2Dec(*el) = trkMatchTrkLM_dPhi2;
257  TrackMatchingR_dPhi2Dec(*el) = trkMatchTrkR_dPhi2;
258  TrackMatchingTrue_dEta2Dec(*el) = trueMatch_dEta2;
259  TrackMatchingTrue_dPhi2Dec(*el) = trueMatch_dPhi2;
260  }
261 
263  {
264  const auto *caloCluster = el->caloCluster();
265 
266  std::vector<float> subCluster_E;
267  std::vector<float> subCluster_dEta;
268  std::vector<float> subCluster_dPhi;
269 
270  static const SG::Accessor<std::vector<ElementLink<xAOD::CaloClusterContainer> > > clusterLinksAcc("constituentClusterLinks");
271  if(caloCluster && clusterLinksAcc.isAvailable(*caloCluster) ){
272  std::vector<ElementLink<xAOD::CaloClusterContainer> > clusterLinks = clusterLinksAcc(*caloCluster);
273  for( const auto& link : clusterLinks){
274  if( link.isValid() ){
275  subCluster_E.push_back( (*link)->e() );
276  subCluster_dEta.push_back( caloCluster->eta() - (*link)->eta() );
277  float dphi = P4Helpers::deltaPhi( caloCluster->phi(), (*link)->phi() );
278  subCluster_dPhi.push_back(dphi);
279  }
280  }
281  }
282  static const SG::Decorator<std::vector<float> > SubCluster_EDec("SubCluster_E");
283  static const SG::Decorator<std::vector<float> > SubCluster_dEtaDec("SubCluster_dEta");
284  static const SG::Decorator<std::vector<float> > SubCluster_dPhiDec("SubCluster_dPhi");
285  SubCluster_EDec(*el) = subCluster_E;
286  SubCluster_dEtaDec(*el) = subCluster_dEta;
287  SubCluster_dPhiDec(*el) = subCluster_dPhi;
288  }
289 
290 
292  {
293  const EventContext& ctx = Gaudi::Hive::currentContext();
294  const auto *caloCluster = el->caloCluster();
295 
296  float vtxR = -999;
297  float vtxZ = -999;
298  float vtxM = -999;
299  float vtxP = -999;
300  int vtxTrkParticleIndex1 = -999;
301  int vtxTrkParticleIndex2 = -999;
302  float vtxTrkParticle1_dEta2 = -999;
303  float vtxTrkParticle1_dPhi2 = -999;
304  float vtxTrkParticle2_dEta2 = -999;
305  float vtxTrkParticle2_dPhi2 = -999;
306  float vtxRerr = -999;
307  float vtxZerr = -999;
308  float vtxMerr = -999;
309  float vtxPerr = -999;
310  float vtxChi2 = -999;
311  int vtxNdof = -999;
312  float vtxdEta = -999;
313  float vtxdPhi = -999;
314  float vtxE = -999;
315  float vtxPhi = -999;
316  float vtxEta = -999;
317 
318  if( caloCluster && caloCluster->pt() > m_minET ){
319  const xAOD::TrackParticle* trk1 = nullptr;
320  const xAOD::TrackParticle* trk2 = nullptr;
321  int trkIndex1 = -999;
322  int trkIndex2 = -999;
323  for( unsigned int i(0); i < el->nTrackParticles(); ++i ){
324  const auto *trackParticle = el->trackParticle( i );
325  if( nSiHits(trackParticle) >= 7 && ElectronSelectorHelpers::passBLayerRequirement(*trackParticle) ) {
326  if ( trk1 == nullptr ){
327  trk1 = trackParticle;
328  trkIndex1 = i;
329  } else if( trk2 == nullptr ){
330  if( trk1->charge() == trackParticle->charge() )
331  continue;
332  trk2 = trackParticle;
333  trkIndex2 = i;
334  break;
335  }
336  }
337  }
338  if( trk2 != nullptr){
339  // fit vertex
340 
341  // Take the initial guess as the first tracks global position
343  Amg::Vector3D startingPoint = perigeeParameters.position();
344 
345  std::vector<const xAOD::TrackParticle*> trksToFit;
346  trksToFit.push_back( trk1 );
347  trksToFit.push_back( trk2 );
348  vtxTrkParticleIndex1 = trkIndex1;
349  vtxTrkParticleIndex2 = trkIndex2;
350 
351  std::unique_ptr<xAOD::Vertex> myVertex( m_VertexFitter->fit( trksToFit, startingPoint ) );
352 
353  if(myVertex){
354 
355  vtxR = m_V0Tools->rxy( myVertex.get() );
356  vtxRerr = m_V0Tools->rxyError( myVertex.get() );
357  vtxZ = myVertex->z();
358  vtxZerr = myVertex->covariancePosition()(2,2) > 0 ? sqrt( myVertex->covariancePosition()(2,2) ): myVertex->covariancePosition()(2,2);
359 
360  std::vector<double> masses = { 0.511e-3, 0.511e-3 };
361  vtxM = m_V0Tools->invariantMass( myVertex.get(), masses);
362  vtxMerr = m_V0Tools->invariantMassError( myVertex.get(), masses);
363 
364  vtxP = m_V0Tools->pT( myVertex.get() );
365  vtxPerr = m_V0Tools->pTError( myVertex.get() );
366 
367  vtxChi2 = myVertex->chiSquared();
368  vtxNdof = myVertex->numberDoF();
369 
370  m_emExtrapolationTool->getEtaPhiAtCalo( ctx, myVertex.get(), &vtxdEta, &vtxdPhi);
371 
372  vtxdPhi = P4Helpers::deltaPhi( vtxdPhi, caloCluster->phiBE(2) );
373  vtxdEta -= caloCluster->etaBE(2);
374 
375  xAOD::TrackParticle::FourMom_t vertex4P = m_V0Tools->V04Momentum(myVertex.get(), ParticleConstants::electronMassInMeV);
376  vtxE = vertex4P.E();
377  vtxPhi = vertex4P.Phi();
378  vtxEta = vertex4P.Eta();
379  double momentumScaleFactor = caloCluster->e() / vtxE;
380 
381  const auto& perigeeParameters = trk1->perigeeParameters();
382  Amg::Vector3D pos = perigeeParameters.position();
383  Amg::Vector3D mom = perigeeParameters.momentum();
384  mom *= momentumScaleFactor;
385  Trk::CurvilinearParameters scaledTrk( pos, mom, trk1->charge() );
386 
387  float etaAtCalo, phiAtCalo;
388  if( m_emExtrapolationTool->getEtaPhiAtCalo (ctx,
389  &scaledTrk,
390  &etaAtCalo,
391  &phiAtCalo) ){
392  vtxTrkParticle1_dEta2 = caloCluster->etaBE(2) - etaAtCalo;
393  vtxTrkParticle1_dPhi2 = P4Helpers::deltaPhi(caloCluster->phiBE(2), phiAtCalo) ;
394  }
395 
396  const auto& perigeeParameters2 = trk2->perigeeParameters();
397  pos = perigeeParameters2.position();
398  mom = perigeeParameters2.momentum();
399  mom *= momentumScaleFactor;
400  scaledTrk = Trk::CurvilinearParameters( pos, mom, trk2->charge() );
401 
402  if( m_emExtrapolationTool->getEtaPhiAtCalo (ctx,
403  &scaledTrk,
404  &etaAtCalo,
405  &phiAtCalo) ){
406  vtxTrkParticle2_dEta2 = caloCluster->etaBE(2) - etaAtCalo;
407  vtxTrkParticle2_dPhi2 = P4Helpers::deltaPhi(caloCluster->phiBE(2), phiAtCalo) ;
408  }
409 
410  } else {
411  vtxChi2 = 0;
412  vtxNdof = 0;
413  }
414  }
415  }
416 
417  static const SG::Decorator<float> vtxRDec("vtxR");
418  static const SG::Decorator<float> vtxRerrDec("vtxRerr");
419  static const SG::Decorator<float> vtxZDec("vtxZ");
420  static const SG::Decorator<float> vtxZerrDec("vtxZerr");
421  static const SG::Decorator<float> vtxMDec("vtxM");
422  static const SG::Decorator<float> vtxMerrDec("vtxMerr");
423  static const SG::Decorator<float> vtxPtDec("vtxPt");
424  static const SG::Decorator<float> vtxPterrDec("vtxPterr");
425  static const SG::Decorator<float> vtxEDec("vtxE");
426  static const SG::Decorator<float> vtxEtaDec("vtxEta");
427  static const SG::Decorator<float> vtxPhiDec("vtxPhi");
428  static const SG::Decorator<int> vtxTrkParticleIndex1Dec("vtxTrkParticleIndex1");
429  static const SG::Decorator<int> vtxTrkParticleIndex2Dec("vtxTrkParticleIndex2");
430  static const SG::Decorator<float> vtxTrkParticle1_dPhi2Dec("vtxTrkParticle1_dPhi2");
431  static const SG::Decorator<float> vtxTrkParticle1_dEta2Dec("vtxTrkParticle1_dEta2");
432  static const SG::Decorator<float> vtxTrkParticle2_dPhi2Dec("vtxTrkParticle2_dPhi2");
433  static const SG::Decorator<float> vtxTrkParticle2_dEta2Dec("vtxTrkParticle2_dEta2");
434  static const SG::Decorator<float> vtxChi2Dec("vtxChi2");
435  static const SG::Decorator<int> vtxNdofDec("vtxNdof");
436  static const SG::Decorator<float> vtxdEtaDec("vtxdEta");
437  static const SG::Decorator<float> vtxdPhiDec("vtxdPhi");
438 
439  vtxRDec(*el) = vtxR;
440  vtxRerrDec(*el) = vtxRerr;
441  vtxZDec(*el) = vtxZ;
442  vtxZerrDec(*el) = vtxZerr;
443  vtxMDec(*el) = vtxM;
444  vtxMerrDec(*el) = vtxMerr;
445  vtxPtDec(*el) = vtxP;
446  vtxPterrDec(*el)= vtxPerr;
447  vtxEDec(*el) = vtxE;
448  vtxEtaDec(*el) = vtxEta;
449  vtxPhiDec(*el) = vtxPhi;
450  vtxTrkParticleIndex1Dec(*el) = vtxTrkParticleIndex1;
451  vtxTrkParticleIndex2Dec(*el) = vtxTrkParticleIndex2;
452  vtxTrkParticle1_dPhi2Dec(*el) = vtxTrkParticle1_dPhi2;
453  vtxTrkParticle1_dEta2Dec(*el) = vtxTrkParticle1_dEta2;
454  vtxTrkParticle2_dPhi2Dec(*el) = vtxTrkParticle2_dPhi2;
455  vtxTrkParticle2_dEta2Dec(*el) = vtxTrkParticle2_dEta2;
456  vtxChi2Dec(*el) = vtxChi2;
457  vtxNdofDec(*el) = vtxNdof;
458  vtxdEtaDec(*el) = vtxdEta;
459  vtxdPhiDec(*el) = vtxdPhi;
460  }
461 
462 
463 
464 
465 } // namespace
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
perigeeParameters
Definition: ExtrapolatorComparisonTest.h:44
DerivationFramework::MergedElectronDetailsDecorator::m_V0Tools
PublicToolHandle< Trk::V0Tools > m_V0Tools
Definition: MergedElectronDetailsDecorator.h:52
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
SG::ReadCondHandle
Definition: ReadCondHandle.h:40
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:553
xAOD::TruthParticle_v1::pz
float pz() const
The z component of the particle's momentum.
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
xAOD::TrackParticle_v1::charge
float charge() const
Returns the charge.
Definition: TrackParticle_v1.cxx:143
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
MergedElectronDetailsDecorator.h
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:161
Trk::CurvilinearParameters
CurvilinearParametersT< TrackParametersDim, Charged, PlaneSurface > CurvilinearParameters
Definition: Tracking/TrkEvent/TrkParameters/TrkParameters/TrackParameters.h:29
TruthVertexContainer.h
TruthParticleContainer.h
xAOD::TrackParticle_v1::FourMom_t
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
Definition: TrackParticle_v1.h:73
DerivationFramework::MergedElectronDetailsDecorator::m_VertexFitter
PublicToolHandle< Trk::IVertexFitter > m_VertexFitter
Definition: MergedElectronDetailsDecorator.h:51
DerivationFramework::MergedElectronDetailsDecorator::m_electronKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronKey
Definition: MergedElectronDetailsDecorator.h:60
xAOD::TruthParticle_v1::px
float px() const
The x component of the particle's momentum.
ParticleTest.tp
tp
Definition: ParticleTest.py:25
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:260
xAOD::CaloCluster_v1::phiBE
float phiBE(const unsigned layer) const
Get the phi in one layer of the EM Calo.
Definition: CaloCluster_v1.cxx:634
xAOD::TruthParticle_v1::py
float py() const
The y component of the particle's momentum.
IEMExtrapolationTools::fromPerigee
@ fromPerigee
from the perigee of TrackParticle
Definition: IEMExtrapolationTools.h:37
xAOD::EventInfo_v1::IS_SIMULATION
@ IS_SIMULATION
true: simulation, false: data
Definition: EventInfo_v1.h:151
xAODTruthHelpers.h
ElectronSelectorHelpers::passBLayerRequirement
bool passBLayerRequirement(const xAOD::TrackParticle &tp)
return true if effective number of BL hits + outliers is at least one
Definition: ElectronSelectorHelpers.cxx:59
DerivationFramework::MergedElectronDetailsDecorator::initialize
virtual StatusCode initialize() override final
Definition: MergedElectronDetailsDecorator.cxx:23
xAOD::CaloCluster_v1::etaBE
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
Definition: CaloCluster_v1.cxx:628
ElectronSelectorHelpers.h
xAOD::TrackParticle_v1::perigeeParameters
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
Definition: TrackParticle_v1.cxx:415
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:62
P4Helpers::deltaPhi
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition: P4Helpers.h:34
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
P4Helpers::deltaEta
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition: P4Helpers.h:66
lumiFormat.i
int i
Definition: lumiFormat.py:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
xAOD::TruthParticle_v1::hasProdVtx
bool hasProdVtx() const
Check for a production vertex on this particle.
Definition: TruthParticle_v1.cxx:69
CalibDbCompareRT.dummy
dummy
Definition: CalibDbCompareRT.py:59
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
DerivationFramework::MergedElectronDetailsDecorator::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: MergedElectronDetailsDecorator.h:56
python.getProblemFolderFromLogs.el
dictionary el
Definition: getProblemFolderFromLogs.py:48
IEMExtrapolationTools::fromPerigeeRescaled
@ fromPerigeeRescaled
from the perigee of TrackParticle recaled by Ecluster
Definition: IEMExtrapolationTools.h:39
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
Trk::CurvilinearParametersT
Definition: CurvilinearParametersT.h:48
DerivationFramework::MergedElectronDetailsDecorator::fillTruthDetails
void fillTruthDetails(std::vector< float > &trkMatchTrk, const xAOD::TrackParticle *tp, const xAOD::CaloCluster *cluster) const
Definition: MergedElectronDetailsDecorator.cxx:76
DerivationFramework::MergedElectronDetailsDecorator::addBranches
virtual StatusCode addBranches(const EventContext &ctx) const override final
Definition: MergedElectronDetailsDecorator.cxx:53
DerivationFramework::MergedElectronDetailsDecorator::nSiHits
static int nSiHits(const xAOD::TrackParticle *tp)
Definition: MergedElectronDetailsDecorator.cxx:184
P4Helpers.h
xAOD::TruthParticle_v1::prodVtx
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
Definition: TruthParticle_v1.cxx:75
DerivationFramework::MergedElectronDetailsDecorator::fillTrackDetails
void fillTrackDetails(const xAOD::Electron *el, bool isMC) const
Definition: MergedElectronDetailsDecorator.cxx:195
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
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
DerivationFramework::MergedElectronDetailsDecorator::m_emExtrapolationTool
PublicToolHandle< IEMExtrapolationTools > m_emExtrapolationTool
Definition: MergedElectronDetailsDecorator.h:50
DerivationFramework::MergedElectronDetailsDecorator::fillVertexDetails
void fillVertexDetails(const xAOD::Electron *el) const
Definition: MergedElectronDetailsDecorator.cxx:291
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
xAOD::Electron_v1
Definition: Electron_v1.h:34
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
xAOD::Vertex_v1::numberDoF
float numberDoF() const
Returns the number of degrees of freedom of the vertex fit as float.
xAOD::Vertex_v1::chiSquared
float chiSquared() const
Returns the of the vertex fit as float.
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:469
xAOD::numberOfSCTDeadSensors
@ numberOfSCTDeadSensors
number of dead SCT sensors crossed [unit8_t].
Definition: TrackingPrimitives.h:274
CaloClusterContainer.h
DerivationFramework::MergedElectronDetailsDecorator::fillClusterDetails
static void fillClusterDetails(const xAOD::Electron *el)
Definition: MergedElectronDetailsDecorator.cxx:262
EventInfoRead.isMC
isMC
Definition: EventInfoRead.py:11
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:269
SG::ConstAccessor< T, AuxAllocator_t< T > >::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
xAOD::numberOfPixelDeadSensors
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].
Definition: TrackingPrimitives.h:267
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:44
DerivationFramework::MergedElectronDetailsDecorator::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: MergedElectronDetailsDecorator.h:64
Decorator.h
Helper class to provide type-safe access to aux data.
TrackParticleContainer.h
InDetDD::electrons
@ electrons
Definition: InDetDD_Defs.h:17
xAOD::TruthParticle_v1::charge
double charge() const
Physical charge.
IEMExtrapolationTools::fromLastMeasurement
@ fromLastMeasurement
from the last measurement of TrackParticle
Definition: IEMExtrapolationTools.h:35
IDTPM::nSiHits
float nSiHits(const U &p)
Definition: TrackParametersHelper.h:427
xAOD::EventInfo_v1::eventType
bool eventType(EventType type) const
Check for one particular bitmask value.
SUSY_SimplifiedModel_PreInclude.masses
dictionary masses
Definition: SUSY_SimplifiedModel_PreInclude.py:7
DerivationFramework::MergedElectronDetailsDecorator::fillMatchDetails
void fillMatchDetails(std::vector< float > &trkMatchTrk, const xAOD::TrackParticle *tp, const xAOD::CaloCluster *cluster) const
Definition: MergedElectronDetailsDecorator.cxx:107
ParticleConstants::PDG2011::electronMassInMeV
constexpr double electronMassInMeV
the mass of the electron (in MeV)
Definition: ParticleConstants.h:26