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