ATLAS Offline Software
BVertexTrackIsoTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //============================================================================
6 // BVertexTrackIsoTool.cxx
7 //============================================================================
8 //
9 // Author : Wolfgang Walkowiak <Wolfgang.Walkowiak@cern.ch.>
10 // Changes:
11 //
12 // Add B vertex track isolation information for different configurations,
13 // different track selections and different PV-to-SV association methods.
14 //
15 // For an usage example see BPHY8.py .
16 //
17 // Job options provided by this class:
18 // - IsolationConeSizes -- List of isolation cone sizes
19 // - IsoTrkImpLogChi2Max -- List of maximum log(chi2) cuts for
20 // association of tracks to the primary
21 // vertex picked.
22 // - IsoDoTrkImpLogChi2Cut -- apply log(chi2) cuts
23 // 0 : don't apply log(chi2) cuts
24 // 1 : apply log(chi2) cuts
25 // 2 : apply log(chi2) cuts [former version]
26 // (The last two job options must
27 // contain the same number of elements
28 // as the IsolationConeSizes list.)
29 // - UseOptimizedAlgo -- Use the speed-optimized algorithm.
30 //
31 //============================================================================
32 //
35 #include "xAODBPhys/BPhysHelper.h"
38 
39 #include <format>
40 #include "TVector3.h"
41 #include <algorithm>
42 #include <sstream>
43 
44 namespace DerivationFramework {
45 
46  //-------------------------------------------------------------------------
47  //
48  // helper class
50  const std::string& Bname,
51  const std::string& Prefix,
52  double IsoValue,
53  int NTracks) :
54  BaseItem(Name, Bname, Prefix), isoValue(IsoValue), nTracks(NTracks) {
55  }
56 
58  }
59 
60  void BVertexTrackIsoTool::IsoItem::setup(const std::string& Name,
61  const std::string& Bname,
62  const std::string& Prefix) {
63  BaseItem::setup(Name, Bname, Prefix);
64  isoValue = -1.;
65  nTracks = 0;
66  }
67 
68  void BVertexTrackIsoTool::IsoItem::setup(const std::string& Name,
69  const std::string& Bname,
70  const std::string& Prefix,
71  double IsoValue,
72  int NTracks) {
73  BaseItem::setup(Name, Bname, Prefix);
74  isoValue = IsoValue;
75  nTracks = NTracks;
76  }
77 
79  isoValue = -2.;
80  nTracks = -1;
81  }
82 
84  copyVals((const IsoItem&)item);
85  }
86 
88  isoValue = item.isoValue;
89  nTracks = item.nTracks;
90  }
91 
93  return buildName();
94  }
95 
97  return buildName("Ntracks");
98  }
99 
100  //--------------------------------------------------------------------------
102  const std::string& n,
103  const IInterface* p)
105 
106  declareInterface<DerivationFramework::IAugmentationTool>(this);
107 
108  declareProperty("IsolationConeSizes" , m_isoConeSizes);
109  declareProperty("IsoTrkImpLogChi2Max" , m_isoTrkImpLogChi2Max);
110  declareProperty("IsoDoTrkImpLogChi2Cut" , m_isoDoTrkImpLogChi2Cut);
111  declareProperty("UseOptimizedAlgo" , m_useOptimizedAlgo = true);
112  }
113  //--------------------------------------------------------------------------
115 
116  ATH_MSG_DEBUG("BVertexTrackIsoTool::initializeHook() -- begin");
117 
118  // check like-sized arrays
119  if ( m_isoConeSizes.size() != m_isoTrkImpLogChi2Max.size() ||
120  m_isoConeSizes.size() != m_isoDoTrkImpLogChi2Cut.size() ) {
121  ATH_MSG_ERROR("Size mismatch of IsolationConeSizes ("
122  << m_isoConeSizes.size()
123  << "), IsoTrkImpChi2Max ("
124  << m_isoTrkImpLogChi2Max.size()
125  << ") and IsoDoTrkImpChi2Cut ("
126  << m_isoDoTrkImpLogChi2Cut.size() << ") lists!");
127  }
128 
129  // initialize results array
130  initResults();
131 
132  // info output
133  ATH_MSG_INFO("calculateIsolation: using "
134  << (m_useOptimizedAlgo ?
135  "optimized (faster)" : "regular (slower)")
136  << "track isolation calculation methd.");
137 
138  ATH_MSG_DEBUG("BVertexTrackIsoTool::initializeHook() -- end");
139 
140  return StatusCode::SUCCESS;
141  }
142  //--------------------------------------------------------------------------
144 
145  ATH_MSG_DEBUG("BVertexTrackIsoTool::finalizeHook()");
146 
147  // everything all right
148  return StatusCode::SUCCESS;
149  }
150  //--------------------------------------------------------------------------
151  StatusCode
153 
154  ATH_MSG_DEBUG("BVertexTrackIsoTool::addBranchesVCLoopHook() -- begin");
155 
156  ATH_MSG_DEBUG("BVertexTrackIsoTool::addBranchesVCSetupHook: "
157  << "Vertex container index " << ivc
158  << " for collection " << m_vertexContainerNames[ivc]
159  << " with prefix " << m_branchPrefixes[ivc]);
160 
162 
163  ATH_MSG_DEBUG("BVertexTrackIsoTool::addBranchesVCSetupHook() -- end");
164 
165  // nothing to do here
166  return StatusCode::SUCCESS;
167  }
168  //--------------------------------------------------------------------------
169  StatusCode
171 
172  ATH_MSG_DEBUG("BVertexTrackIsoTool::addBranchesSVLoopHook() -- begin");
173 
174  ATH_MSG_DEBUG("BVertexTrackIsoTool::addBranchesSVLoopHook(): "
175  "calculate isolation ...");
176  if ( m_useOptimizedAlgo ) {
177  CHECK(calculateValues(vtx));
178  } else {
180  }
181  ATH_MSG_DEBUG("BVertexTrackIsoTool::addBranchesSVLoopHook(): "
182  "save isolation ...");
183  // save the isolation values
184  CHECK(saveIsolation(vtx));
185 
186  ATH_MSG_DEBUG("BVertexTrackIsoTool::addBranchesSVLoopHook() -- end");
187 
188  // nothing to do here
189  return StatusCode::SUCCESS;
190  }
191  //--------------------------------------------------------------------------
192  // Calculate track isolation variables -- faster method with caching
193  //--------------------------------------------------------------------------
194  StatusCode
196  const unsigned int ipv,
197  const unsigned int its,
198  const unsigned int itt) const {
199 
200  ATH_MSG_DEBUG("calcValuesHook: ipv: " << ipv
201  << ", its: " << its << ", itt: " << itt);
202 
203  // candidate tracks and momentum
204  xAOD::BPhysHelper cand(vtx);
205  TVector3 candP = cand.totalP();
206  const xAOD::Vertex* candRefPV = cand.pv(m_pvAssocTypes[ipv]);
207 
208  TrackBag tracks = selectTracks(m_tracks, cand, ipv, its, itt);
209 
210  // loop over isolation cones (pt and deltaR)
211  unsigned int nCones = m_isoConeSizes.size();
212  for (unsigned int ic = 0; ic < nCones; ++ic) {
213 
214  IsoItem& iso = m_results[ic][its][ipv][itt];
215  const double& coneSize = m_isoConeSizes[ic];
216  const double& logChi2Max = m_isoTrkImpLogChi2Max[ic];
217  const int& doLogChi2 = m_isoDoTrkImpLogChi2Cut[ic];
218 
219  // presets
220  iso.resetVals();
221 
222  double nTracksInCone = 0;
223  double ptSumInCone = 0.;
224 
225  // make sure candRefPV exists
226  if ( candRefPV != NULL ) {
227 
228  for (TrackBag::const_iterator trkItr = tracks.begin();
229  trkItr != tracks.end(); ++trkItr) {
230  double deltaR = candP.DeltaR((*trkItr)->p4().Vect());
231  if ( deltaR < coneSize ) {
232  double logChi2 = (doLogChi2 > 0) ?
233  getTrackCandPVLogChi2(*trkItr, candRefPV) : -9999.;
234  // next line needed exactly as is for backward validation
235  if ( doLogChi2 == 2 ) logChi2 = abs(logChi2);
236  if ( doLogChi2 == 0 || logChi2 < logChi2Max ) {
237  nTracksInCone++;
238  ptSumInCone += (*trkItr)->pt();
239  } // logChi2
240  } // deltaR
241  }
242  // calculate result
243  if ( ptSumInCone + candP.Pt() > 0. ) {
244  iso.isoValue = candP.Pt() / ( ptSumInCone + candP.Pt() );
245  } else {
246  iso.isoValue = -5.;
247  }
248 
249  } else {
250  iso.isoValue = -10.;
251  } // if candRefPV != NULL
252 
253  iso.nTracks = nTracksInCone;
254  } // for ic
255 
256  return StatusCode::SUCCESS;
257  }
258  //--------------------------------------------------------------------------
259  // Fill track isolation values from cache if found
260  //--------------------------------------------------------------------------
262  const int ipv) const {
263 
264  ATH_MSG_DEBUG("fastFillHook: ipv: " << ipv);
265 
266  bool found(false);
267 
269  m_pvAssocResMap.find(buildPvAssocCacheName(vtx, ipv));
270  if ( itpv != m_pvAssocResMap.end() ) {
271  found = true;
272  unsigned int nCones = m_isoConeSizes.size();
273  unsigned int nTrackSels = m_trackSelectionTools.size();
274  unsigned int nTrackTypes = m_useTrackTypes.size();
275  for (unsigned int its = 0; its < nTrackSels; ++its) {
276  for (unsigned int ic = 0; ic < nCones; ++ic) {
277  for (unsigned int itt = 0; itt < nTrackTypes; ++itt) {
278  m_results[ic][its][ipv][itt]
279  .copyVals(m_results[ic][its][itpv->second][itt]);
280  } // for its
281  } // for ic
282  } // for itt
283  } // if found
284 
285  ATH_MSG_DEBUG("fastFillHook: cache index: "
286  << buildPvAssocCacheName(vtx, ipv)
287  << ", found ? " << found
288  << ", ipv_ref: "
289  << (found ? itpv->second : -1));
290 
291  return found;
292  }
293  //--------------------------------------------------------------------------
294  // Track isolation calculation loops -- slower method
295  //--------------------------------------------------------------------------
296  StatusCode
298 
299  ATH_MSG_DEBUG("BVertexTrackIsoTool::calculateIsolation -- begin");
300 
301  unsigned int nCones = m_isoConeSizes.size();
302  unsigned int nTrackSels = m_trackSelectionTools.size();
303  unsigned int nPvAssocs = m_pvAssocTypes.size();
304  unsigned int nTrackTypes = m_useTrackTypes.size();
305 
306  for (unsigned int its = 0; its < nTrackSels; ++its) {
307  for (unsigned int ipv = 0; ipv < nPvAssocs; ++ipv) {
308  for (unsigned int ic = 0; ic < nCones; ++ic) {
309  for (unsigned int itt = 0; itt < nTrackTypes; ++itt) {
310  CHECK(calcIsolation(m_results[ic][its][ipv][itt], vtx,
314  m_pvAssocTypes[ipv], m_useTrackTypes[itt]));
315  } // for itt
316  } // for ic
317  } // for ipv
318  } // for its
319 
320  return StatusCode::SUCCESS;
321  }
322  //--------------------------------------------------------------------------
323  // Calculate track isolation variables -- slower method
324  //--------------------------------------------------------------------------
327  const xAOD::Vertex* vtx,
328  const double coneSize,
329  const double logChi2Max,
330  const int doLogChi2,
331  const ToolHandle<TrkSelTool>& tSelTool,
332  const xAOD::BPhysHelper::pv_type pvAssocType,
333  const int trackTypes ) const {
334 
335  // preset
336  iso.nTracks = -1;
337  iso.isoValue = -2.;
338 
339  // candidate tracks and momentum
340  xAOD::BPhysHelper cand(vtx);
341  TrackBag candTracks = findAllTracksInDecay(cand);
342  TVector3 candP = cand.totalP();
343  const xAOD::Vertex* candRefPV = cand.pv(pvAssocType);
344  const xAOD::Vertex* candPV = cand.origPv(pvAssocType);
345 
346  // tracks to be considered
347  TrackBag tracks;
349  m_tracks->begin(); trkItr != m_tracks->end(); ++trkItr) {
350  const xAOD::TrackParticle* track = *trkItr;
351  // track selection check
352  if ( ! tSelTool->accept(*track, candRefPV) ) continue;
353  // track type check
354  if ( ! ((unsigned int)trackTypes == ttall() ||
355  (unsigned int)trackTypes == ttallMin() ||
356  (detTrackTypes(track, candPV, candRefPV)
357  & trackTypes) > 0x0) ) continue;
358  // track not in SV
359  if ( std::find(candTracks.begin(), candTracks.end(), track)
360  != candTracks.end() ) continue;
361  // tracks that survived so far
362  tracks.push_back(track);
363  }
364 
365  double nTracksInCone = 0;
366  double ptSumInCone = 0.;
367  for (TrackBag::const_iterator trkItr = tracks.begin();
368  trkItr != tracks.end(); ++trkItr) {
369  double deltaR = candP.DeltaR((*trkItr)->p4().Vect());
370  if ( deltaR < coneSize ) {
371  double logChi2 = (doLogChi2 > 0) ?
372  getTrackCandPVLogChi2(*trkItr, candRefPV) : -9999.;
373  // next line needed exactly as is for backward validation
374  if ( doLogChi2 == 2 ) logChi2 = abs(logChi2);
375  if ( doLogChi2 == 0 || logChi2 < logChi2Max ) {
376  nTracksInCone++;
377  ptSumInCone += (*trkItr)->pt();
378  }
379  } // deltaR
380  }
381  // calculate result
382  if ( ptSumInCone + candP.Pt() > 0. ) {
383  iso.isoValue = candP.Pt() / ( ptSumInCone + candP.Pt() );
384  } else {
385  iso.isoValue = -5;
386  }
387  iso.nTracks = nTracksInCone;
388 
389  return StatusCode::SUCCESS;
390  }
391  //--------------------------------------------------------------------------
392  StatusCode
394 
395  unsigned int nCones = m_isoConeSizes.size();
396  unsigned int nTrackSels = m_trackSelectionTools.size();
397  unsigned int nPvAssocs = m_pvAssocTypes.size();
398  unsigned int nTrackTypes = m_useTrackTypes.size();
399 
400  for (unsigned int its = 0; its < nTrackSels; ++its) {
401  for (unsigned int ipv = 0; ipv < nPvAssocs; ++ipv) {
402  for (unsigned int ic = 0; ic < nCones; ++ic) {
403  for (unsigned int itt = 0; itt < nTrackTypes; ++itt) {
404  IsoItem result = m_results[ic][its][ipv][itt];
406  d_iso_value(result.isoName());
408  d_iso_ntracks(result.nTracksName());
409  d_iso_value(*vtx) = result.isoValue;
410  d_iso_ntracks(*vtx) = result.nTracks;
411  ATH_MSG_DEBUG("BVertexTrackIsoTool::saveIsolation() -- isobn: "
412  << result.isoName() << ", ntbn: "
413  << result.nTracksName());
414  ATH_MSG_DEBUG("BVertexTrackIsoTool::saveIsolation() -- vertex: ("
415  << vtx->x() << ", "
416  << vtx->y() << ", "
417  << vtx->z() << "), iso: "
418  << result.isoValue << ", nTracks: "
419  << result.nTracks);
420  } // for itt
421  } // for ic
422  } // for ipv
423  } // for its
424 
425  return StatusCode::SUCCESS;
426  }
427  //--------------------------------------------------------------------------
429 
430  ATH_MSG_DEBUG("BVertexTrackIsoTool::setResultsPrefix -- begin");
431 
432  unsigned int nCones = m_isoConeSizes.size();
433  unsigned int nTrackSels = m_trackSelectionTools.size();
434  unsigned int nPvAssocs = m_pvAssocTypes.size();
435  unsigned int nTrackTypes = m_useTrackTypes.size();
436 
437  for (unsigned int its = 0; its < nTrackSels; ++its) {
438  for (unsigned int ipv = 0; ipv < nPvAssocs; ++ipv) {
439  for (unsigned int ic = 0; ic < nCones; ++ic) {
440  for (unsigned int itt = 0; itt < nTrackTypes; ++itt) {
441  m_results[ic][its][ipv][itt].setPrefix(prefix);
442  } // for itt
443  } // for ic
444  } // for ipv
445  } // for its
446 
447  ATH_MSG_DEBUG("BVertexTrackIsoTool::setResultsPrefix -- end");
448  }
449  //--------------------------------------------------------------------------
451 
452  unsigned int nCones = m_isoConeSizes.size();
453  unsigned int nTrackSels = m_trackSelectionTools.size();
454  unsigned int nPvAssocs = m_pvAssocTypes.size();
455  unsigned int nTrackTypes = m_useTrackTypes.size();
456 
457  ATH_MSG_DEBUG("BVertexTrackIsoTool::initResults -- begin");
458  ATH_MSG_DEBUG("BVertexTrackIsoTool::initResults : nCones = " << nCones);
459  ATH_MSG_DEBUG("BVertexTrackIsoTool::initResults : nTrackSels = "
460  << nTrackSels);
461  ATH_MSG_DEBUG("BVertexTrackIsoTool::initResults : nPvAssocs = "
462  << nPvAssocs);
463  ATH_MSG_DEBUG("BVertexTrackIsoTool::initResults : nTrackTypes = "
464  << nTrackTypes);
465  m_results.resize(boost::extents[nCones][nTrackSels][nPvAssocs][nTrackTypes]);
466  for (unsigned int its = 0; its < nTrackSels; ++its) {
467  ATH_MSG_DEBUG("BVertexTrackIsoTool::initResults -- its = " << its);
468  for (unsigned int ipv = 0; ipv < nPvAssocs; ++ipv) {
469  ATH_MSG_DEBUG("BVertexTrackIsoTool::initResults -- ipv = " << ipv);
470  for (unsigned int ic = 0; ic < nCones; ++ic) {
471  ATH_MSG_DEBUG("BVertexTrackIsoTool::initResults -- ic = " << ic);
472  for (unsigned int itt = 0; itt < nTrackTypes; ++itt) {
473  ATH_MSG_DEBUG("BVertexTrackIsoTool::initResults -- itt = " << itt);
474 
475  ATH_MSG_DEBUG("BVertexTrackIsoTool::initResults :"
477  ipv, itt));
478 
479  m_results[ic][its][ipv][itt].setup(buildBranchName(ic, its,
480  ipv, itt),
482  } // for itt
483  } // for ic
484  } // for ipv
485  } // for its
486 
487  ATH_MSG_DEBUG("BVertexTrackIsoTool::initResults -- end");
488  }
489  //--------------------------------------------------------------------------
490  std::string BVertexTrackIsoTool::buildBranchName(unsigned int ic,
491  unsigned int its,
492  unsigned int ipv,
493  unsigned int itt) const {
494  ATH_MSG_DEBUG("BVertexTrackIsoTool::buildBranchName -- begin");
495 
496  double coneSize = m_isoConeSizes[ic];
497  double logChi2Max = m_isoTrkImpLogChi2Max[ic];
498  int doLogChi2 = m_isoDoTrkImpLogChi2Cut[ic];
499 
500  // format it nicely
501  std::string f = std::format("{:02d}_LC{:02d}d{}_{:s}",
502  static_cast<int>(coneSize * 10.), static_cast<int>(logChi2Max * 10.),doLogChi2,
503  buildBranchBaseName(its, ipv, itt));
504 
505  ATH_MSG_DEBUG("BVertexTrackIsoTool::buildBranchName: " << f);
506 
507  return f;
508  }
509  //--------------------------------------------------------------------------
510 }
511 
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
DerivationFramework::BVertexTrackIsoTool::saveIsolation
virtual StatusCode saveIsolation(const xAOD::Vertex *vtx) const
Definition: BVertexTrackIsoTool.cxx:393
xAOD::Vertex_v1::x
float x() const
Returns the x position.
xAOD::BPhysHelper::totalP
TVector3 totalP()
: Returns total 3-momentum calculated from the refitted tracks
Definition: BPhysHelper.cxx:374
BVertexTrackIsoTool.h
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
get_generator_info.result
result
Definition: get_generator_info.py:21
xAOD::BPhysHelper
Definition: BPhysHelper.h:71
DerivationFramework::BPhysVertexTrackBase::m_pvAssocTypes
std::vector< xAOD::BPhysHelper::pv_type > m_pvAssocTypes
Definition: BPhysVertexTrackBase.h:280
vtune_athena.format
format
Definition: vtune_athena.py:14
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
EventPrimitivesHelpers.h
DerivationFramework::BPhysVertexTrackBase::m_pvAssocResMap
StringIntMap_t m_pvAssocResMap
Definition: BPhysVertexTrackBase.h:289
DerivationFramework::BVertexTrackIsoTool::m_isoConeSizes
std::vector< double > m_isoConeSizes
Definition: BVertexTrackIsoTool.h:110
DerivationFramework::BPhysVertexTrackBase::BaseItem::setup
virtual void setup(const std::string &Name, const std::string &Bname="iso", const std::string &Prefix="")
Definition: BPhysVertexTrackBase.cxx:185
DerivationFramework::BVertexTrackIsoTool::IsoItem::nTracksName
virtual std::string nTracksName() const
Definition: BVertexTrackIsoTool.cxx:96
DerivationFramework::BPhysVertexTrackBase::detTrackTypes
uint64_t detTrackTypes(const xAOD::TrackParticle *track, const xAOD::Vertex *candPV, const xAOD::Vertex *candRefPV) const
Definition: BPhysVertexTrackBase.cxx:1001
DerivationFramework::BVertexTrackIsoTool::addBranchesSVLoopHook
virtual StatusCode addBranchesSVLoopHook(const xAOD::Vertex *vtx) const
Definition: BVertexTrackIsoTool.cxx:170
DerivationFramework::BPhysVertexTrackBase::m_useTrackTypes
std::vector< uint64_t > m_useTrackTypes
Definition: BPhysVertexTrackBase.h:260
DerivationFramework::BVertexTrackIsoTool::calcIsolation
virtual StatusCode calcIsolation(IsoItem &iso, const xAOD::Vertex *vtx, const double coneSize, const double logChi2Max, const int doLogChi2, const ToolHandle< TrkSelTool > &tSelTool, const xAOD::BPhysHelper::pv_type pvAssocType, const int trackTypes) const
Definition: BVertexTrackIsoTool.cxx:326
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
DerivationFramework::BPhysVertexTrackBase::buildBranchBaseName
std::string buildBranchBaseName(unsigned int its, unsigned int ipv, unsigned int itt, const std::string &preSuffix="") const
Definition: BPhysVertexTrackBase.cxx:1311
DerivationFramework::BVertexTrackIsoTool::m_useOptimizedAlgo
bool m_useOptimizedAlgo
Definition: BVertexTrackIsoTool.h:113
DerivationFramework::BPhysVertexTrackBase::ttall
static uint64_t ttall()
Definition: BPhysVertexTrackBase.cxx:318
DerivationFramework::BVertexTrackIsoTool::IsoItem::nTracks
int nTracks
Definition: BVertexTrackIsoTool.h:64
DerivationFramework::BPhysVertexTrackBase::m_branchPrefixes
std::vector< std::string > m_branchPrefixes
Definition: BPhysVertexTrackBase.h:245
DerivationFramework::BVertexTrackIsoTool::m_isoTrkImpLogChi2Max
std::vector< double > m_isoTrkImpLogChi2Max
Definition: BVertexTrackIsoTool.h:111
DerivationFramework::BVertexTrackIsoTool::m_results
IsoItem4_t m_results
Definition: BVertexTrackIsoTool.h:117
DerivationFramework::BVertexTrackIsoTool::IsoItem::resetVals
virtual void resetVals()
Definition: BVertexTrackIsoTool.cxx:78
DerivationFramework::BVertexTrackIsoTool::m_isoDoTrkImpLogChi2Cut
std::vector< int > m_isoDoTrkImpLogChi2Cut
Definition: BVertexTrackIsoTool.h:112
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
xAOD::BPhysHelper::pv_type
pv_type
: Enum type of the PV
Definition: BPhysHelper.h:475
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
DerivationFramework::BPhysVertexTrackBase::m_tracks
const xAOD::TrackParticleContainer * m_tracks
Definition: BPhysVertexTrackBase.h:271
DerivationFramework::BVertexTrackIsoTool::BVertexTrackIsoTool
BVertexTrackIsoTool(const std::string &t, const std::string &n, const IInterface *p)
Definition: BVertexTrackIsoTool.cxx:101
beamspotman.n
n
Definition: beamspotman.py:731
DerivationFramework::BPhysVertexTrackBase::buildPvAssocCacheName
virtual std::string buildPvAssocCacheName(const xAOD::Vertex *vtx, const int ipv) const
Definition: BPhysVertexTrackBase.cxx:672
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
DerivationFramework::BPhysVertexTrackBase::m_branchBaseName
std::string m_branchBaseName
Definition: BPhysVertexTrackBase.h:246
DerivationFramework::BPhysVertexTrackBase::calculateValues
StatusCode calculateValues(const xAOD::Vertex *vtx) const
Definition: BPhysVertexTrackBase.cxx:638
DerivationFramework::BVertexTrackIsoTool::IsoItem::setup
virtual void setup(const std::string &Name, const std::string &Bname="iso", const std::string &Prefix="")
Definition: BVertexTrackIsoTool.cxx:60
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
DerivationFramework::BPhysVertexTrackBase::findAllTracksInDecay
TrackBag findAllTracksInDecay(xAOD::BPhysHelper &vtx) const
Definition: BPhysVertexTrackBase.cxx:1057
DerivationFramework::BVertexTrackIsoTool::IsoItem::isoName
virtual std::string isoName() const
Definition: BVertexTrackIsoTool.cxx:92
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
hist_file_dump.f
f
Definition: hist_file_dump.py:135
DerivationFramework::TrackBag
std::vector< const xAOD::TrackParticle * > TrackBag
Definition: BPhysAddMuonBasedInvMass.h:32
xAOD::Vertex_v1::z
float z() const
Returns the z position.
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
xAOD::BPhysHelper::origPv
const xAOD::Vertex * origPv(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
original PV
Definition: BPhysHelper.cxx:807
IInDetTrackSelectionTool.h
DerivationFramework::BVertexTrackIsoTool::IsoItem
Definition: BVertexTrackIsoTool.h:40
DerivationFramework::BVertexTrackIsoTool::fastFillHook
virtual bool fastFillHook(const xAOD::Vertex *vtx, const int ipv) const
Definition: BVertexTrackIsoTool.cxx:261
grepfile.ic
int ic
Definition: grepfile.py:33
DerivationFramework::BVertexTrackIsoTool::initResults
virtual void initResults()
Definition: BVertexTrackIsoTool.cxx:450
DerivationFramework::BVertexTrackIsoTool::IsoItem::isoValue
double isoValue
Definition: BVertexTrackIsoTool.h:63
DerivationFramework::BVertexTrackIsoTool::finalizeHook
virtual StatusCode finalizeHook()
Definition: BVertexTrackIsoTool.cxx:143
item
Definition: ItemListSvc.h:43
DerivationFramework::BVertexTrackIsoTool::IsoItem::copyVals
virtual void copyVals(const BaseItem &item)
Definition: BVertexTrackIsoTool.cxx:83
DerivationFramework::BPhysVertexTrackBase::m_trackSelectionTools
ToolHandleArray< TrkSelTool > m_trackSelectionTools
Definition: BPhysVertexTrackBase.h:250
DerivationFramework::BVertexTrackIsoTool::calculateIsolation
virtual StatusCode calculateIsolation(const xAOD::Vertex *vtx) const
Definition: BVertexTrackIsoTool.cxx:297
DerivationFramework::BVertexTrackIsoTool::IsoItem::IsoItem
IsoItem(const std::string &Name="_none_", const std::string &Bname="iso", const std::string &Prefix="", double IsoValue=-1., int NTracks=0)
Definition: BVertexTrackIsoTool.cxx:49
DerivationFramework::BVertexTrackIsoTool::addBranchesVCSetupHook
virtual StatusCode addBranchesVCSetupHook(size_t ivc) const
Definition: BVertexTrackIsoTool.cxx:152
EventInfo.h
DerivationFramework::BPhysVertexTrackBase::getTrackCandPVLogChi2
double getTrackCandPVLogChi2(const xAOD::TrackParticle *track, const xAOD::Vertex *vtx, bool doDCAin3D=false, int chi2DefToUse=0) const
Definition: BPhysVertexTrackBase.cxx:684
DerivationFramework::BPhysVertexTrackBase::selectTracks
TrackBag selectTracks(const xAOD::TrackParticleContainer *inpTracks, xAOD::BPhysHelper &cand, const unsigned int ipv, const unsigned int its, const unsigned int itt) const
Definition: BPhysVertexTrackBase.cxx:1225
BPhysHelper.h
: B-physics xAOD helpers.
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Name
JetDumper::Name Name
Definition: JetDumper.cxx:19
DerivationFramework::BPhysVertexTrackBase::ttallMin
static uint64_t ttallMin()
Definition: BPhysVertexTrackBase.cxx:313
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
DerivationFramework::BPhysVertexTrackBase::m_vertexContainerNames
std::vector< std::string > m_vertexContainerNames
Definition: BPhysVertexTrackBase.h:248
DerivationFramework::BVertexTrackIsoTool::calcValuesHook
virtual StatusCode calcValuesHook(const xAOD::Vertex *vtx, const unsigned int ipv, const unsigned int its, const unsigned int itt) const
Definition: BVertexTrackIsoTool.cxx:195
xAOD::Vertex_v1::y
float y() const
Returns the y position.
xAOD::BPhysHelper::pv
const xAOD::Vertex * pv(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Get the refitted collision vertex of type pv_type.
Definition: BPhysHelper.cxx:796
DerivationFramework::BPhysVertexTrackBase::BaseItem
Definition: BPhysVertexTrackBase.h:60
DerivationFramework::BVertexTrackIsoTool::setResultsPrefix
virtual void setResultsPrefix(std::string prefix) const
Definition: BVertexTrackIsoTool.cxx:428
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
DerivationFramework::BVertexTrackIsoTool::buildBranchName
virtual std::string buildBranchName(unsigned int ic, unsigned int its, unsigned int ipv, unsigned int itt) const
Definition: BVertexTrackIsoTool.cxx:490
DerivationFramework::BPhysVertexTrackBase
Definition: BPhysVertexTrackBase.h:57
xAOD::Iso::coneSize
float coneSize(IsolationConeSize type)
convert Isolation Size into cone size
Definition: IsolationHelpers.h:27
makeComparison.deltaR
float deltaR
Definition: makeComparison.py:36
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
DerivationFramework::BVertexTrackIsoTool::initializeHook
virtual StatusCode initializeHook()
Definition: BVertexTrackIsoTool.cxx:114
DerivationFramework::BVertexTrackIsoTool::IsoItem::~IsoItem
virtual ~IsoItem()
Definition: BVertexTrackIsoTool.cxx:57