ATLAS Offline Software
InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/TrackVertexAssociationTool.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 // Includes from this package
7 
8 // FrameWork includes
10 
11 // EDM includes
14 #include "xAODTracking/Vertex.h"
18 
19 // ROOT includes
20 #include "TString.h"
21 
22 // STL includes
23 #include <cmath>
24 #include <map>
25 #include <set>
26 #include <stdexcept>
27 #include <utility>
28 
29 // Hidden namespace for functors
30 namespace {
31 
32  // Let's access the public helper typedefs/class in the TTVA tool
36 
37  // ------------------------------------------------------------------------------------------------------------ //
38  // Return the AMVF fit weight for track assuming a given vertex as well as the largest weight seen by the track //
39  // ------------------------------------------------------------------------------------------------------------ //
40 
41  using FitWeight = std::pair<float, float>; // (fit weight for a given vertex, max fit weight)
42 
43  FitWeight fitWeight(const xAOD::TrackParticle* trk, const xAOD::Vertex* vtx, const AMVFVerticesAcc& vtxDeco, const AMVFWeightsAcc& wgtDeco) {
44 
45  // Get our AMVF vertices/weights decorations
46  const std::vector<ElementLink<xAOD::VertexContainer>>& AMVFVertices = vtxDeco(*trk);
47  const std::vector<float>& AMVFWeights = wgtDeco(*trk);
48 
49  // Determine if the vertex matches any of the vertices the track is used in the fit of
50  int leading = -1;
51  for (std::size_t i = 0; i < AMVFVertices.size(); i++) {
52  if (!AMVFVertices.at(i).isValid()) continue; // Skip non-valid vertex links
53  if (leading < 0) leading = i; // Set the leading (i.e., highest weight) vertex equal to the first valid vertex
54  if (vtx == *(AMVFVertices.at(i))) return ::FitWeight(AMVFWeights.at(i), AMVFWeights.at(leading)); // Safe to return leading element, wouldn't get here w/o >leading elements
55  }
56 
57  // Default return - vertex doesn't correspond to ANY vertices the track is used in the fit of
58  return ::FitWeight(-1., (leading < 0) ? -1. : AMVFWeights.at(leading));
59  }
60 
61  inline float absD0Sig(const xAOD::TrackParticle* trk, const xAOD::EventInfo* evt) {
62  return std::abs(xAOD::TrackingHelpers::d0significance(trk, evt->beamPosSigmaX(), evt->beamPosSigmaY(), evt->beamPosSigmaXY()));
63  }
64 
65  inline float absD0(const xAOD::TrackParticle* trk) {
66  return std::abs(trk->d0());
67  }
68 
69  inline float absDzSinTheta(const xAOD::TrackParticle* trk, const xAOD::Vertex* vtx) {
70  return std::abs((trk->z0() + trk->vz() - vtx->z()) * std::sin(trk->theta()));
71  }
72 
73  // -------------------------------------- //
74  // Define all of the working points below //
75  // -------------------------------------- //
76 
77  class Old_Loose
78  : public WorkingPoint
79  {
80  public:
81  virtual bool apply(const xAOD::TrackParticle* trk, const xAOD::Vertex* vtx, const xAOD::EventInfo*,
82  const AMVFVerticesAcc& vtxDeco, const AMVFWeightsAcc& wgtDeco) const
83  {
84  FitWeight weight = fitWeight(trk, vtx, vtxDeco, wgtDeco);
85  return ((weight.second > 0.) ? (weight.first > 0.) : (absDzSinTheta(trk, vtx) < 3.0));
86  };
87  };
88 
89  class Old_Nominal
90  : public WorkingPoint
91  {
92  public:
93  virtual bool apply(const xAOD::TrackParticle* trk, const xAOD::Vertex* vtx, const xAOD::EventInfo*,
94  const AMVFVerticesAcc&, const AMVFWeightsAcc&) const
95  {
96  return (absD0(trk) < 2.0 && absDzSinTheta(trk, vtx) < 3.0);
97  };
98  };
99 
100  class Old_Tight
101  : public WorkingPoint
102  {
103  public:
104  virtual bool apply(const xAOD::TrackParticle* trk, const xAOD::Vertex* vtx, const xAOD::EventInfo*,
105  const AMVFVerticesAcc&, const AMVFWeightsAcc&) const
106  {
107  return (absD0(trk) < 0.5 && absDzSinTheta(trk, vtx) < 0.5);
108  };
109  };
110 
111  class Old_Electron
112  : public WorkingPoint
113  {
114  public:
115  virtual bool apply(const xAOD::TrackParticle* trk, const xAOD::Vertex* vtx, const xAOD::EventInfo* evt,
116  const AMVFVerticesAcc&, const AMVFWeightsAcc&) const
117  {
118  return (absD0Sig(trk, evt) < 5.0 && absDzSinTheta(trk, vtx) < 0.5);
119  };
120  };
121 
122  class Old_Muon
123  : public WorkingPoint
124  {
125  public:
126  virtual bool apply(const xAOD::TrackParticle* trk, const xAOD::Vertex* vtx, const xAOD::EventInfo* evt,
127  const AMVFVerticesAcc&, const AMVFWeightsAcc&) const
128  {
129  return (absD0Sig(trk, evt) < 3.0 && absDzSinTheta(trk, vtx) < 0.5);
130  };
131  };
132 
133  class Prompt_D0Sig
134  : public WorkingPoint
135  {
136  public:
137  virtual bool apply(const xAOD::TrackParticle* trk, const xAOD::Vertex* vtx, const xAOD::EventInfo*,
138  const AMVFVerticesAcc& vtxDeco, const AMVFWeightsAcc& wgtDeco) const
139  {
140  return (fitWeight(trk, vtx, vtxDeco, wgtDeco).first > 0.03);
141  }
142  };
143 
144  #define NONPROMPT_D0SIG(CLASSNAME, RADIAL_CUT) \
145  class CLASSNAME \
146  : public WorkingPoint \
147  { \
148  public: \
149  virtual bool apply(const xAOD::TrackParticle* trk, const xAOD::Vertex* vtx, const xAOD::EventInfo* evt, \
150  const AMVFVerticesAcc& vtxDeco, const AMVFWeightsAcc& wgtDeco) const \
151  { \
152  return (absD0(trk) < RADIAL_CUT && ((absD0Sig(trk, evt) < 3.0) ? (fitWeight(trk, vtx, vtxDeco, wgtDeco).first > 0.03) : (absDzSinTheta(trk, vtx) < RADIAL_CUT))); \
153  } \
154  }; \
155 
156  NONPROMPT_D0SIG(Nonprompt_Hard_D0Sig, 1.0)
157  NONPROMPT_D0SIG(Nonprompt_Medium_D0Sig, 2.0)
158  NONPROMPT_D0SIG(Nonprompt_All_D0Sig, 5.0)
159 
160  class Prompt_MaxWeight
161  : public WorkingPoint
162  {
163  public:
164  virtual bool apply(const xAOD::TrackParticle* trk, const xAOD::Vertex* vtx, const xAOD::EventInfo*,
165  const AMVFVerticesAcc& vtxDeco, const AMVFWeightsAcc& wgtDeco) const
166  {
167  FitWeight weight = fitWeight(trk, vtx, vtxDeco, wgtDeco);
168  return (weight.first > 0.03 && weight.first >= weight.second);
169  }
170  };
171 
172  #define NONPROMPT_MAXWEIGHT(CLASSNAME, RADIAL_CUT) \
173  class CLASSNAME \
174  : public WorkingPoint \
175  { \
176  public: \
177  virtual bool apply(const xAOD::TrackParticle* trk, const xAOD::Vertex* vtx, const xAOD::EventInfo*, \
178  const AMVFVerticesAcc& vtxDeco, const AMVFWeightsAcc& wgtDeco) const \
179  { \
180  FitWeight weight = fitWeight(trk, vtx, vtxDeco, wgtDeco); \
181  return ((weight.second > 0.) ? (weight.first >= weight.second) : (absD0(trk) < RADIAL_CUT && absDzSinTheta(trk, vtx) < RADIAL_CUT)); \
182  } \
183  }; \
184 
185  NONPROMPT_MAXWEIGHT(Nonprompt_Hard_MaxWeight, 1.0)
186  NONPROMPT_MAXWEIGHT(Nonprompt_Medium_MaxWeight, 2.0)
187  NONPROMPT_MAXWEIGHT(Nonprompt_All_MaxWeight, 5.0)
188 
189  // Backwards compatability for Custom WP
190  class Custom
191  : public WorkingPoint
192  {
193  public:
194  Custom(const float d0_cut, const bool use_d0sig, const float d0sig_cut, const float dzSinTheta_cut, const bool doUsedInFit) {
195  m_d0_cut = d0_cut;
196  m_use_d0sig = use_d0sig;
197  m_d0sig_cut = d0sig_cut;
198  m_dzSinTheta_cut = dzSinTheta_cut;
199  m_doUsedInFit = doUsedInFit;
200  }
201  virtual bool apply(const xAOD::TrackParticle* trk, const xAOD::Vertex* vtx, const xAOD::EventInfo* evt,
202  const AMVFVerticesAcc& vtxDeco, const AMVFWeightsAcc& wgtDeco) const
203  {
204  // If vertex fit information is flagged to be used
205  if (m_doUsedInFit) {
206  FitWeight weight = fitWeight(trk, vtx, vtxDeco, wgtDeco);
207  if (weight.first > 0.) {
208  return true;
209  }
210  else if (weight.second > 0.) {
211  return false;
212  }
213  }
214  // Now use cuts to determine a match
215  // Only arrive here if:
216  // 1. vertex fit info was flagged to be used but track wasn't used in any vertex fit
217  // 2. vertex fit info wasn't flagged to be used
218  if (m_use_d0sig) {
219  // d0 significance cut
220  if (m_d0sig_cut >= 0 && absD0Sig(trk, evt) > m_d0sig_cut) return false;
221  }
222  else {
223  // d0 cut
224  if (m_d0_cut >= 0 && absD0(trk) > m_d0_cut) return false;
225  }
226  return m_dzSinTheta_cut < 0 || absDzSinTheta(trk, vtx) <= m_dzSinTheta_cut;
227  }
228  private:
229  float m_d0_cut;
230  bool m_use_d0sig;
231  float m_d0sig_cut;
232  float m_dzSinTheta_cut;
233  bool m_doUsedInFit;
234  };
235 
236 } // end: namespace
237 
238 namespace CP {
239 
241  AsgTool(name) {}
242 
243 
244 #define IF_WORKING_POINT(WORKING_POINT, DO_USED_IN_FIT, REQUIRE_PRI_VTX) \
245 if (m_wp == #WORKING_POINT) { \
246  m_applicator = std::unique_ptr<CP::TrackVertexAssociationTool::WorkingPoint>(new ::WORKING_POINT()); \
247  m_doUsedInFit = DO_USED_IN_FIT; \
248  m_requirePriVtx = REQUIRE_PRI_VTX; \
249 } \
250 
252 {
253  static const std::set<std::string> run_2_wps = {"Loose", "Nominal", "Tight", "Electron", "Muon", "Old_Loose", "Old_Nominal", "Old_Tight", "Old_Electron", "Old_Muon"};
254  std::string wp{m_wp};
255  if (run_2_wps.count(wp)) {
256  std::string prefix = "Old_";
257  if (wp.compare(0, prefix.size(), prefix) == 0) {
258  ATH_MSG_WARNING("WorkingPoint '" << m_wp << "' corresponds to a Run 2 working point and is not recommended.");
259  }
260  else {
261  ATH_MSG_WARNING("WorkingPoint '" << m_wp << "' corresponds to a Run 2 working point and is not recommended - remapping to 'Old_" << m_wp << "' (same definition, however).");
262  wp.insert(0, "Old_");
263  }
264  m_wp = wp;
265  }
266 
267  IF_WORKING_POINT(Old_Loose, true, true)
268  else IF_WORKING_POINT(Old_Nominal, false, false)
269  else IF_WORKING_POINT(Old_Tight, false, false)
270  else IF_WORKING_POINT(Old_Electron, false, false)
271  else IF_WORKING_POINT(Old_Muon, false, false)
272  else IF_WORKING_POINT(Prompt_D0Sig, true, false)
273  else IF_WORKING_POINT(Nonprompt_Hard_D0Sig, true, false)
274  else IF_WORKING_POINT(Nonprompt_Medium_D0Sig, true, false)
275  else IF_WORKING_POINT(Nonprompt_All_D0Sig, true, false)
276  else IF_WORKING_POINT(Prompt_MaxWeight, true, false)
277  else IF_WORKING_POINT(Nonprompt_Hard_MaxWeight, true, false)
278  else IF_WORKING_POINT(Nonprompt_Medium_MaxWeight, true, false)
279  else IF_WORKING_POINT(Nonprompt_All_MaxWeight, true, false)
280  // Backwards compatability for Custom WP
281  else if (m_wp == "Custom") {
282  m_applicator = std::unique_ptr<CP::TrackVertexAssociationTool::WorkingPoint>(
284  }
285  else {
286  ATH_MSG_ERROR("Invalid TVA working point '" << m_wp << "' - for a custom configuration, please provide 'Custom' for the 'WorkingPoint' property.");
287  return StatusCode::FAILURE;
288  }
289 
290  if (m_wp == "Custom") {
291  ATH_MSG_INFO("TVA working point 'Custom' provided - tool properties are initialized to default values unless explicitly set by the user.");
292  }
293  else {
294  ATH_MSG_INFO("TVA working point '" << m_wp << "' provided - tool properties have been configured accordingly.");
295  }
296 
297  if (m_use_d0sig) {
298  ATH_MSG_DEBUG("(For Custom WP:) cut on d0 significance: " << m_d0sig_cut << "\t(d0sig_cut).");
299  }
300  else {
301  ATH_MSG_DEBUG("(For Custom WP:) cut on d0: " << m_d0_cut << "\t(d0_cut).");
302  }
303  ATH_MSG_DEBUG("(For Custom WP:) cut on Δz * sin θ: " << m_dzSinTheta_cut << "\t(dzSinTheta_cut).");
304  ATH_MSG_DEBUG("(For Custom WP:) allow UsedInFit MatchStatus: " << m_doUsedInFit << "\t(doUsedInFit).");
305  ATH_MSG_DEBUG("Require VxType::PriVtx for unique match: " << m_requirePriVtx << "\t(requirePriVtx).");
306 
307  // Initialize our EventInfo container and decoration reads
310  {
311  const std::string decorName = m_hardScatterDeco;
312  m_hardScatterDecoKey = m_eventInfo.key() + "." + decorName;
313  ATH_CHECK(m_hardScatterDecoKey.initialize(!decorName.empty()));
314  }
315  m_vtxDecoAcc = std::make_unique<AMVFVerticesAcc>(m_vtxDecoName);
317  ATH_CHECK(m_vtxDecoKey.initialize());
318  m_wgtDecoAcc = std::make_unique<AMVFWeightsAcc>(m_wgtDecoName);
320  ATH_CHECK(m_wgtDecoKey.initialize());
321 
322  return StatusCode::SUCCESS;
323 }
324 
326 {
327  ATH_MSG_DEBUG("In TrackVertexAssociationTool::isCompatible function.");
328  return isMatch(trk, vx);
329 }
330 
332  const EventContext& ctx = Gaudi::Hive::currentContext();
334  if (!evt.isValid()) {
335  throw std::runtime_error("ERROR in CP::TrackVertexAssociationTool::isCompatible : could not retrieve xAOD::EventInfo!");
336  }
338  const ElementLink<xAOD::VertexContainer>& vtxLink = hardScatterDeco(*evt);
339  if (!vtxLink.isValid()) {
340  throw std::runtime_error("ERROR in CP::TrackVertexAssociationTool::isCompatible : hardscatter vertex link is not valid!");
341  }
342  return isMatch(trk, **vtxLink, evt.get());
343 }
344 
345 xAOD::TrackVertexAssociationMap TrackVertexAssociationTool::getMatchMap(std::vector<const xAOD::TrackParticle*>& trk_list, std::vector<const xAOD::Vertex*>& vx_list) const
346 {
347  return getMatchMapInternal(trk_list, vx_list);
348 }
349 
351 {
352  return getMatchMapInternal(trkCont, vxCont);
353 }
354 
355 const xAOD::Vertex* TrackVertexAssociationTool::getUniqueMatchVertex(const xAOD::TrackParticle& trk, std::vector<const xAOD::Vertex*>& vx_list) const
356 {
357  return getUniqueMatchVertexInternal(trk, vx_list);
358 }
359 
361 {
363  const xAOD::Vertex* vx_tmp = getUniqueMatchVertexInternal(trk, vxCont);
364  if (vx_tmp) {
365  vx_link_tmp.toContainedElement(vxCont, vx_tmp);
366  }
367  return vx_link_tmp;
368 }
369 
370 xAOD::TrackVertexAssociationMap TrackVertexAssociationTool::getUniqueMatchMap(std::vector<const xAOD::TrackParticle*>& trk_list, std::vector<const xAOD::Vertex*>& vx_list) const
371 {
372  return getUniqueMatchMapInternal(trk_list, vx_list);
373 }
374 
376 {
377  return getUniqueMatchMapInternal(trkCont, vxCont);
378 }
379 
381 // Private methods //
383 
384 bool TrackVertexAssociationTool::isMatch(const xAOD::TrackParticle& trk, const xAOD::Vertex& vx, const xAOD::EventInfo* evtInfo) const {
385 
386  const EventContext& ctx = Gaudi::Hive::currentContext();
387 
388  // Return false for fake vertices
389  if (vx.vertexType() == xAOD::VxType::NoVtx) {
390  return false;
391  }
392 
393  // Read our EventInfo
394  const xAOD::EventInfo* evt = nullptr;
395  if (!evtInfo) {
397  if (!evttmp.isValid()) {
398  throw std::runtime_error("ERROR in CP::TrackVertexAssociationTool::isMatch : could not retrieve xAOD::EventInfo!");
399  }
400  evt = evttmp.get();
401  }
402  else {
403  evt = evtInfo;
404  }
405 
406  // Apply the working point
407  return m_applicator->apply(&trk, &vx, evt, *m_vtxDecoAcc, *m_wgtDecoAcc);
408 
409 }
410 
411 template <typename U, typename V>
413 {
415 
416  for (const auto& vertex : vx_list) {
418  trktovxlist.clear();
419  trktovxlist.reserve(trk_list.size());
420  for (const auto& track : trk_list) {
421  if (isCompatible(*track, *vertex)) {
422  trktovxlist.push_back(track);
423  }
424  }
425  trktovxmap[vertex] = trktovxlist;
426  }
427 
428  return trktovxmap;
429 }
430 
431 template <typename T>
433 {
434  FitWeight weight;
435  float dzSinTheta{0.};
436  float min_dz = ((m_dzSinTheta_cut >= 0) ? m_dzSinTheta_cut.value() : +999.0);
437  const xAOD::Vertex* bestMatchVertex = nullptr;
438 
439  for (const auto& vertex : vx_list) {
440  weight = ::fitWeight(&trk, vertex, *m_vtxDecoAcc, *m_wgtDecoAcc);
441  if (m_doUsedInFit && weight.first > 0.0 && weight.first >= weight.second) {
442  bestMatchVertex = vertex;
443  break;
444  }
445  else {
446  if (m_requirePriVtx && vertex->vertexType() != xAOD::VxType::PriVtx) continue;
447  if (isCompatible(trk, *vertex)) {
448  dzSinTheta = ::absDzSinTheta(&trk, vertex);
449  if (dzSinTheta < min_dz) {
450  min_dz = dzSinTheta;
451  bestMatchVertex = vertex;
452  if(m_doPVPriority) break; //This will stop the iteration on the vertices. This works since the PV should always be the first entry in the vertex collection
453  }
454  }
455  }
456  }
457 
458  // Check if get the matched vertex
459  if (!bestMatchVertex) {
460  ATH_MSG_DEBUG("Could not find any matched vertex for this track!");
461  }
462 
463  return bestMatchVertex;
464 }
465 
466 template <typename T, typename U>
468 {
470 
471  // Initialize our map
472  for (const auto& vertex : vx_list) {
474  trktovxlist.clear();
475  trktovxlist.reserve(trk_list.size());
476  trktovxmap[vertex] = trktovxlist;
477  }
478 
479  for (const auto& track : trk_list) {
480  const xAOD::Vertex* vx_match = getUniqueMatchVertexInternal(*track, vx_list);
481  if (vx_match) trktovxmap[vx_match].push_back(track); // Found matched vertex
482  }
483 
484  return trktovxmap;
485 }
486 
487 } // namespace CP
CP::TrackVertexAssociationTool::getUniqueMatchMapInternal
xAOD::TrackVertexAssociationMap getUniqueMatchMapInternal(T &trk_list, U &vx_list) const
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/TrackVertexAssociationTool.cxx:467
CP::TrackVertexAssociationTool::m_requirePriVtx
Gaudi::Property< bool > m_requirePriVtx
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:132
CP::TrackVertexAssociationTool::m_use_d0sig
Gaudi::Property< bool > m_use_d0sig
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:116
CP::TrackVertexAssociationTool::TrackVertexAssociationTool
TrackVertexAssociationTool(const std::string &name)
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/TrackVertexAssociationTool.cxx:240
CP::TrackVertexAssociationTool::m_trkKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trkKey
The name of the xAOD::TrackParticleContainer to access the AMVF vertices+weights for (not actually re...
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:139
CP::TrackVertexAssociationTool::isCompatible
virtual bool isCompatible(const xAOD::TrackParticle &trk, const xAOD::Vertex &vx) const override
This function just return the decision of whether the track is matched to the Vertex Not sure whether...
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/TrackVertexAssociationTool.cxx:325
TrackParticlexAODHelpers.h
CP::TrackVertexAssociationTool::m_hardScatterDeco
Gaudi::Property< std::string > m_hardScatterDeco
The decoration name of the ElementLink to the hardscatter vertex (found on xAOD::EventInfo)
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:136
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
CP::TrackVertexAssociationTool::getUniqueMatchVertex
virtual const xAOD::Vertex * getUniqueMatchVertex(const xAOD::TrackParticle &trk, std::vector< const xAOD::Vertex * > &vx_list) const override
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/TrackVertexAssociationTool.cxx:355
xAOD::TrackParticle_v1::vz
float vz() const
The z origin for the parameters.
CP::TrackVertexAssociationTool::getUniqueMatchVertexInternal
const xAOD::Vertex * getUniqueMatchVertexInternal(const xAOD::TrackParticle &trk, T &vx_list) const
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/TrackVertexAssociationTool.cxx:432
xAOD::TrackingHelpers::d0significance
double d0significance(const xAOD::TrackParticle *tp, double d0_uncert_beam_spot_2)
Definition: TrackParticlexAODHelpers.cxx:42
TrackVertexAssociationTool.h
CP::TrackVertexAssociationTool::m_vtxDecoAcc
std::unique_ptr< AMVFVerticesAcc > m_vtxDecoAcc
AMVF vertices decoration accessor.
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:156
CP::TrackVertexAssociationTool::getMatchMap
virtual xAOD::TrackVertexAssociationMap getMatchMap(std::vector< const xAOD::TrackParticle * > &trk_list, std::vector< const xAOD::Vertex * > &vx_list) const override
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/TrackVertexAssociationTool.cxx:345
CP::TrackVertexAssociationTool::getUniqueMatchVertexLink
virtual ElementLink< xAOD::VertexContainer > getUniqueMatchVertexLink(const xAOD::TrackParticle &trk, const xAOD::VertexContainer &vxCont) const override
This functions will return the best matched vertex.
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/TrackVertexAssociationTool.cxx:360
CP::TrackVertexAssociationTool::m_vtxDecoName
Gaudi::Property< std::string > m_vtxDecoName
AMVF vertices decoration key.
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:152
xAOD::TrackParticle_v1::z0
float z0() const
Returns the parameter.
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
xAOD::TrackVertexAssociationMap
std::map< const xAOD::Vertex *, xAOD::TrackVertexAssociationList > TrackVertexAssociationMap
Definition: TrackVertexAssociationMap.h:19
NONPROMPT_MAXWEIGHT
#define NONPROMPT_MAXWEIGHT(CLASSNAME, RADIAL_CUT)
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/TrackVertexAssociationTool.cxx:172
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
xAOD::Vertex_v1::vertexType
VxType::VertexType vertexType() const
The type of the vertex.
xAOD::VxType::NoVtx
@ NoVtx
Dummy vertex. TrackParticle was not used in vertex fit.
Definition: TrackingPrimitives.h:570
CP::TrackVertexAssociationTool::getMatchMapInternal
xAOD::TrackVertexAssociationMap getMatchMapInternal(T &trk_list, U &vx_list) const
xAOD::TrackParticle_v1::d0
float d0() const
Returns the parameter.
IF_WORKING_POINT
#define IF_WORKING_POINT(WORKING_POINT, DO_USED_IN_FIT, REQUIRE_PRI_VTX)
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/TrackVertexAssociationTool.cxx:244
NONPROMPT_D0SIG
#define NONPROMPT_D0SIG(CLASSNAME, RADIAL_CUT)
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/TrackVertexAssociationTool.cxx:144
CP::TrackVertexAssociationTool::m_vtxDecoKey
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_vtxDecoKey
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:154
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
CP::TrackVertexAssociationTool::m_wp
Gaudi::Property< std::string > m_wp
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:110
CP::TrackVertexAssociationTool::m_wgtDecoAcc
std::unique_ptr< AMVFWeightsAcc > m_wgtDecoAcc
AMVF weights decoration accessor.
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:163
CP::TrackVertexAssociationTool::getUniqueMatchMap
virtual xAOD::TrackVertexAssociationMap getUniqueMatchMap(std::vector< const xAOD::TrackParticle * > &trk_list, std::vector< const xAOD::Vertex * > &vx_list) const override
This functions related to the previous functions, will return a 2D vector to store the best matched t...
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/TrackVertexAssociationTool.cxx:370
CP::TrackVertexAssociationTool::AMVFVerticesAcc
SG::AuxElement::ConstAccessor< std::vector< ElementLink< xAOD::VertexContainer > > > AMVFVerticesAcc
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:64
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
CP::TrackVertexAssociationTool::m_doUsedInFit
Gaudi::Property< bool > m_doUsedInFit
Flag to cut on d0sig instead of d0.
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:126
lumiFormat.i
int i
Definition: lumiFormat.py:92
CP::TrackVertexAssociationTool::m_hardScatterDecoKey
SG::ReadDecorHandleKey< xAOD::EventInfo > m_hardScatterDecoKey
Hardscatter vertex link key.
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:166
CP::TrackVertexAssociationTool::m_eventInfo
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo
EventInfo key.
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:149
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::ReadHandle::get
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CP::TrackVertexAssociationTool::m_d0_cut
Gaudi::Property< float > m_d0_cut
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:113
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:571
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
CP::TrackVertexAssociationTool::m_d0sig_cut
Gaudi::Property< float > m_d0sig_cut
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:119
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CP::TrackVertexAssociationTool::AMVFWeightsAcc
SG::AuxElement::ConstAccessor< std::vector< float > > AMVFWeightsAcc
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:65
xAOD::Vertex_v1::z
float z() const
Returns the z position.
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
PlotSFuncertainty.wp
wp
Definition: PlotSFuncertainty.py:112
DataVector< xAOD::TrackParticle_v1 >
Vertex.h
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
CP::TrackVertexAssociationTool::m_dzSinTheta_cut
Gaudi::Property< float > m_dzSinTheta_cut
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:122
CP::TrackVertexAssociationTool::m_applicator
std::unique_ptr< WorkingPoint > m_applicator
Stored WorkingPoint class.
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:170
xAOD::TrackVertexAssociationList
std::vector< const xAOD::TrackParticle * > TrackVertexAssociationList
Definition: TrackVertexAssociationMap.h:18
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ReadHandle.h
Handle class for reading from StoreGate.
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
TrackParticle.h
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
VertexContainer.h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DeMoScan.first
bool first
Definition: DeMoScan.py:534
CP::TrackVertexAssociationTool::m_doPVPriority
Gaudi::Property< bool > m_doPVPriority
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:129
CP::TrackVertexAssociationTool::m_wgtDecoName
Gaudi::Property< std::string > m_wgtDecoName
AMVF weights decoration key.
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:159
CP::TrackVertexAssociationTool::isMatch
bool isMatch(const xAOD::TrackParticle &trk, const xAOD::Vertex &vx, const xAOD::EventInfo *evtInfo=nullptr) const
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/TrackVertexAssociationTool.cxx:384
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
CP::TrackVertexAssociationTool::WorkingPoint
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:67
xAOD::TrackParticle_v1::theta
float theta() const
Returns the parameter, which has range 0 to .
TrackingPrimitives.h
python.dqu_subprocess.apply
def apply(func, args)
Definition: dqu_subprocess.py:11
TrackParticleContainer.h
CP::TrackVertexAssociationTool::m_wgtDecoKey
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_wgtDecoKey
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:161
CP::TrackVertexAssociationTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/Root/TrackVertexAssociationTool.cxx:251