ATLAS Offline Software
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
DerivationFramework::BPhysVertexTrackBase Class Reference

#include <BPhysVertexTrackBase.h>

Inheritance diagram for DerivationFramework::BPhysVertexTrackBase:
Collaboration diagram for DerivationFramework::BPhysVertexTrackBase:

Classes

class  BaseItem
 
class  TrackTypeCounter
 

Public Types

enum  track_type {
  ASSOCPV, PVTYPE0, PVTYPE1, PVTYPE2,
  PVTYPE3, NONE, NULLVP, CAPVRFN3U0,
  CAPVNRN3U0, CAPVRF3DU0, CAPVNR3DU0, CAPVRFN3U1,
  CAPVNRN3U1, CAPVRF3DU1, CAPVNR3DU1, CAPVRFN3U2,
  CAPVNRN3U2, CAPVRF3DU2, CAPVNR3DU2, CAPVRFNNU3,
  CAPVNRNNU3, CAPVRFNNU4, CAPVNRNNU4, CAPVRFNNU5,
  CAPVNRNNU5, CAPVRFNNU6, CAPVNRNNU6, CAPVRFNNU7,
  CAPVNRNNU7, CAPVRFNNU8, CAPVNRNNU8, CAPVRFNNU9,
  CAPVNRNNU9
}
 

Public Member Functions

 BPhysVertexTrackBase (const std::string &t, const std::string &n, const IInterface *p)
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
virtual StatusCode addBranches () const override
 Pass the thinning service
More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const std::string tts (track_type type)
 
static uint64_t ttb (track_type type)
 
static uint64_t ttall ()
 
static uint64_t ttallMin ()
 
static uint64_t rttor (const std::vector< uint64_t > &vtypes)
 
static std::string wrapLines (const std::string &lines, const std::string &prefix)
 
static std::string trackToString (const xAOD::TrackParticle *track)
 
static const InterfaceID & interfaceID ()
 AlgTool interface methods. More...
 

Static Public Attributes

static const int n_track_types = 33
 
static const std::string track_type_str []
 
static const uint64_t track_type_bit []
 

Protected Types

typedef std::map< std::string, int > StringIntMap_t
 

Protected Member Functions

virtual StatusCode initializeHook ()
 
virtual StatusCode finalizeHook ()
 
virtual StatusCode addBranchesHook () const
 
virtual StatusCode addBranchesVCSetupHook (size_t ivc) const
 
virtual StatusCode addBranchesSVLoopHook (const xAOD::Vertex *vtx) const
 
virtual StatusCode calcValuesHook (const xAOD::Vertex *vtx, const unsigned int ipv, const unsigned int its, const unsigned int itt) const
 
virtual bool fastFillHook (const xAOD::Vertex *vtx, const int ipv) const
 
StatusCode calculateValues (const xAOD::Vertex *vtx) const
 
virtual std::string buildPvAssocCacheName (const xAOD::Vertex *vtx, const int ipv) const
 
virtual void initPvAssocTypeVec ()
 
TrackBag findAllTracksInDecay (xAOD::BPhysHelper &vtx) const
 
void findAllTracksInDecay (xAOD::BPhysHelper &vtx, TrackBag &tracks) const
 
MuonBag findAllMuonsInDecay (xAOD::BPhysHelper &vtx) const
 
void findAllMuonsInDecay (xAOD::BPhysHelper &vtx, MuonBag &muons) const
 
TrackBag findAllMuonIdTracksInDecay (xAOD::BPhysHelper &vtx, MuonBag &muons) const
 
std::vector< TVector3 > findMuonRefTrackMomenta (xAOD::BPhysHelper &vtx, MuonBag &muons) const
 
TrackBag selectTracks (const xAOD::TrackParticleContainer *inpTracks, xAOD::BPhysHelper &cand, const unsigned int ipv, const unsigned int its, const unsigned int itt) const
 
TrackBag selectTracks (const xAOD::TrackParticleContainer *inpTracks, const TrackBag &exclTracks, xAOD::BPhysHelper &cand, const unsigned int ipv, const unsigned int its, const unsigned int itt) const
 
uint64_t detTrackTypes (const xAOD::TrackParticle *track, const xAOD::Vertex *candPV, const xAOD::Vertex *candRefPV) const
 
double getTrackCandPVLogChi2 (const xAOD::TrackParticle *track, const xAOD::Vertex *vtx, bool doDCAin3D=false, int chi2DefToUse=0) const
 
std::vector< double > getTrackLogChi2DCA (const xAOD::TrackParticle *track, const xAOD::Vertex *vtx, bool doDCAin3D=false, int chi2DefToUse=0) const
 
std::string buildBranchBaseName (unsigned int its, unsigned int ipv, unsigned int itt, const std::string &preSuffix="") const
 
std::pair< const xAOD::Vertex *, double > findMinChi2PV (const xAOD::TrackParticle *track, const xAOD::Vertex *candPV, const xAOD::Vertex *candRefPV, const std::vector< uint64_t > &pvtypes, const int minNTracksInPV, const bool useRefittedPvs, const bool doDCAin3D, const int chi2DefToUse) const
 
const xAOD::VertexfindAssocPV (const xAOD::TrackParticle *track, const xAOD::Vertex *candPV, const xAOD::Vertex *candRefPV, const std::vector< uint64_t > &pvtypes, const int minNTracksInPV, const bool useRefittedPvs) const
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Protected Attributes

std::vector< std::string > m_branchPrefixes
 
std::string m_branchBaseName
 
std::string m_branchSuffix
 
std::vector< std::string > m_vertexContainerNames
 
std::string m_trackParticleContainerName
 
ToolHandleArray< TrkSelToolm_trackSelectionTools
 
ToolHandle< Reco::ITrackToVertexm_trackToVertexTool
 
ToolHandle< CP::ITrackVertexAssociationToolm_tvaTool
 
std::string m_pvContainerName
 
std::vector< std::string > m_refPVContainerNames
 
int m_doVertexType
 
std::vector< uint64_t > m_useTrackTypes
 
bool m_incPrecVerticesInDecay
 
int m_minNTracksInPV
 
std::vector< uint64_t > m_pvTypesToConsider
 
int m_debugTrackTypes
 
std::vector< uint64_t > m_debugTracksInEvents
 
bool m_tvaToolHasWpLoose
 
const xAOD::TrackParticleContainerm_tracks
 
const xAOD::TrackParticleAuxContainerm_tracksAux
 
const xAOD::VertexContainerm_pvtxContainer
 
const xAOD::VertexContainerm_svtxContainer
 
const xAOD::VertexAuxContainerm_svtxAuxContainer
 
const xAOD::VertexContainerm_refPVContainer
 
const xAOD::VertexAuxContainerm_refPVAuxContainer
 
std::vector< xAOD::BPhysHelper::pv_typem_pvAssocTypes
 
unsigned int m_nEvtsSeen
 
const xAOD::EventInfom_eventInfo
 
StringIntMap_t m_pvAssocResMap
 
uint64_t m_trackTypesUsed
 
std::unique_ptr< TrackTypeCounterm_mttc
 
unsigned int m_runNumber
 
uint64_t m_evtNumber
 
bool m_debugTracksInThisEvent
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Static Private Attributes

static uint64_t s_track_type_all_cached = 0x0
 

Detailed Description

Definition at line 56 of file BPhysVertexTrackBase.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ StringIntMap_t

typedef std::map<std::string, int> DerivationFramework::BPhysVertexTrackBase::StringIntMap_t
protected

Definition at line 288 of file BPhysVertexTrackBase.h.

Member Enumeration Documentation

◆ track_type

Enumerator
ASSOCPV 
PVTYPE0 
PVTYPE1 
PVTYPE2 
PVTYPE3 
NONE 
NULLVP 
CAPVRFN3U0 
CAPVNRN3U0 
CAPVRF3DU0 
CAPVNR3DU0 
CAPVRFN3U1 
CAPVNRN3U1 
CAPVRF3DU1 
CAPVNR3DU1 
CAPVRFN3U2 
CAPVNRN3U2 
CAPVRF3DU2 
CAPVNR3DU2 
CAPVRFNNU3 
CAPVNRNNU3 
CAPVRFNNU4 
CAPVNRNNU4 
CAPVRFNNU5 
CAPVNRNNU5 
CAPVRFNNU6 
CAPVNRNNU6 
CAPVRFNNU7 
CAPVNRNNU7 
CAPVRFNNU8 
CAPVNRNNU8 
CAPVRFNNU9 
CAPVNRNNU9 

Definition at line 114 of file BPhysVertexTrackBase.h.

Constructor & Destructor Documentation

◆ BPhysVertexTrackBase()

DerivationFramework::BPhysVertexTrackBase::BPhysVertexTrackBase ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 367 of file BPhysVertexTrackBase.cxx.

370  : AthAlgTool(t,n,p), m_trackToVertexTool("Reco::TrackToVertex"),
371  m_tvaTool("CP::TrackVertexAssociationTool"),
372  m_tvaToolHasWpLoose(false),
373  m_tracks(NULL), m_tracksAux(NULL), m_nEvtsSeen(0), m_eventInfo(nullptr),
375  m_debugTracksInThisEvent(false) {
376 
377  declareInterface<DerivationFramework::IAugmentationTool>(this);
378 
379  // Declare branch prefix
380  declareProperty("BranchPrefixes", m_branchPrefixes);
381  declareProperty("BranchBaseName", m_branchBaseName = "iso");
382  declareProperty("BranchSuffix" , m_branchSuffix = "" );
383 
384  // Necessary containers
385  declareProperty("VertexContainerNames" , m_vertexContainerNames);
386  declareProperty("TrackParticleContainerName",
388  declareProperty("TrackToVertexTool" , m_trackToVertexTool);
389  declareProperty("TrackSelectionTools" , m_trackSelectionTools);
390  declareProperty("TVATool" , m_tvaTool);
391  declareProperty("PVContainerName", m_pvContainerName = "PrimaryVertices");
392  declareProperty("RefPVContainerNames" , m_refPVContainerNames);
393  declareProperty("DoVertexType" , m_doVertexType = 8);
394  declareProperty("UseTrackTypes" , m_useTrackTypes = {7});
395  declareProperty("IncPrecVerticesInDecay", m_incPrecVerticesInDecay = true);
396  declareProperty("MinNTracksInPV" , m_minNTracksInPV = 0);
397  declareProperty("PVTypesToConsider" , m_pvTypesToConsider = {1,3});
398  declareProperty("DebugTrackTypes" , m_debugTrackTypes=0);
399  declareProperty("DebugTracksInEvents" , m_debugTracksInEvents = {});
400  }

Member Function Documentation

◆ addBranches()

StatusCode DerivationFramework::BPhysVertexTrackBase::addBranches ( ) const
overridevirtual

Pass the thinning service

Implements DerivationFramework::IAugmentationTool.

Definition at line 477 of file BPhysVertexTrackBase.cxx.

477  {
478 
479  ATH_MSG_DEBUG("BPhysVertexTrackBase::addBranches() -- begin");
480 
481  // counter
482  m_nEvtsSeen++;
483 
484  // run and event numbers
488 
489  // debug tracks in current event?
491  m_debugTracksInEvents.end(),
492  m_evtNumber)
493  != m_debugTracksInEvents.end());
494 
495  // retrieve primary vertices container
496  m_pvtxContainer = NULL;
498  ATH_MSG_DEBUG("Found PV collection with key " << m_pvContainerName);
499 
500 
501  // retrieve ID track container
502  m_tracks = NULL;
503  m_tracksAux = NULL;
505  if (evtStore()->contains<xAOD::
509  } else {
510  ATH_MSG_DEBUG("No aux track collection with key "
511  << m_trackParticleContainerName+"Aux.");
512  }
513  ATH_MSG_DEBUG("Found track collection with key "
515 
516  // Loop over all vertex containers
517  for (size_t i=0; i<m_vertexContainerNames.size(); ++i) {
518  // vertex container and its auxilliary store
519  const xAOD::VertexContainer* svtxContainer = NULL;
520  const xAOD::VertexAuxContainer* svtxAuxContainer = NULL;
521  // refitted primary vertex container and its auxilliary store
522  const xAOD::VertexContainer* refPVContainer = NULL;
523  const xAOD::VertexAuxContainer* refPVAuxContainer = NULL;
524 
525  // retrieve from StoreGate
526  CHECK(evtStore()->retrieve(svtxContainer, m_vertexContainerNames[i]));
527  CHECK(evtStore()->retrieve(svtxAuxContainer,
528  m_vertexContainerNames[i]+"Aux."));
529  ATH_MSG_DEBUG("Found SV collection with key "
531  CHECK(evtStore()->retrieve(refPVContainer ,
533  CHECK(evtStore()->retrieve(refPVAuxContainer,
534  m_refPVContainerNames[i]+"Aux."));
535  ATH_MSG_DEBUG("Found refitted PV collection with key "
537 
538  // vertex container depending setup in derived class
540 
541  // loop over secondary vertices
543  svtxContainer->begin(); vtxItr!=svtxContainer->end();
544  ++vtxItr) {
545 
546  CHECK(addBranchesSVLoopHook(*vtxItr));
547 
548  } // end of loop over vertices
549  } // end of loop over vertex container names
550 
551  ATH_MSG_DEBUG("BPhysVertexTrackBase::addBranches() -- end");
552 
553  // nothing to do here
554  return addBranchesHook();
555  }

◆ addBranchesHook()

StatusCode DerivationFramework::BPhysVertexTrackBase::addBranchesHook ( ) const
protectedvirtual

Definition at line 574 of file BPhysVertexTrackBase.cxx.

574  {
575 
576  return StatusCode::SUCCESS;
577  }

◆ addBranchesSVLoopHook()

StatusCode DerivationFramework::BPhysVertexTrackBase::addBranchesSVLoopHook ( const xAOD::Vertex vtx) const
protectedvirtual

Reimplemented in DerivationFramework::BMuonTrackIsoTool, DerivationFramework::BVertexClosestTrackTool, and DerivationFramework::BVertexTrackIsoTool.

Definition at line 595 of file BPhysVertexTrackBase.cxx.

595  {
596 
597  // just to avoid a compiler warning
598  ATH_MSG_DEBUG("addBranchesSVLoopHook: Vertex " << vtx);
599 
600  return StatusCode::SUCCESS;
601  }

◆ addBranchesVCSetupHook()

StatusCode DerivationFramework::BPhysVertexTrackBase::addBranchesVCSetupHook ( size_t  ivc) const
protectedvirtual

Reimplemented in DerivationFramework::BMuonTrackIsoTool, DerivationFramework::BVertexClosestTrackTool, and DerivationFramework::BVertexTrackIsoTool.

Definition at line 582 of file BPhysVertexTrackBase.cxx.

582  {
583 
584  // just to avoid a compiler warning
585  ATH_MSG_DEBUG("addBranchesVCSetupHook: Vertex container index " << ivc
586  << " for collection " << m_vertexContainerNames[ivc]
587  << " with prefix " << m_branchPrefixes[ivc]);
588 
589  return StatusCode::SUCCESS;
590  }

◆ buildBranchBaseName()

std::string DerivationFramework::BPhysVertexTrackBase::buildBranchBaseName ( unsigned int  its,
unsigned int  ipv,
unsigned int  itt,
const std::string &  preSuffix = "" 
) const
protected

Definition at line 1311 of file BPhysVertexTrackBase.cxx.

1315  {
1316 
1317  ATH_MSG_DEBUG("BPhysVertexTrackBase::buildBranchBaseName -- begin");
1318 
1319  std::string tsName = m_trackSelectionTools[its].name();
1320  std::string pvAssoc = xAOD::BPhysHelper::pv_type_str[m_pvAssocTypes[ipv]];
1321 
1322  // need to get part of tsname after last underscore
1323  std::size_t ipos = tsName.find_last_of("_");
1324  if ( ipos != std::string::npos ) tsName = tsName.substr(ipos+1);
1325 
1326  // format it nicely
1327  std::string f = std::format("T{:010d}_{}_{}{}{}",
1328  m_useTrackTypes[itt], tsName, pvAssoc,
1329  (preSuffix.length() > 0 ? "_" + preSuffix : ""),
1330  (m_branchSuffix.length() > 0 ? "_" + m_branchSuffix : ""));
1331 
1332  ATH_MSG_DEBUG("BPhysVertexBaseTrackBase::buildBranchBaseName: " << f);
1333  return f;
1334  }

◆ buildPvAssocCacheName()

std::string DerivationFramework::BPhysVertexTrackBase::buildPvAssocCacheName ( const xAOD::Vertex vtx,
const int  ipv 
) const
protectedvirtual

Definition at line 672 of file BPhysVertexTrackBase.cxx.

673  {
674  xAOD::BPhysHelper cand(vtx);
675  std::string f = std::format("SV_{:p}_RPV_{:p}", static_cast<const void*>(cand.vtx()), static_cast<const void*>(cand.pv(m_pvAssocTypes[ipv])));
676 
677  return f;
678  }

◆ calculateValues()

StatusCode DerivationFramework::BPhysVertexTrackBase::calculateValues ( const xAOD::Vertex vtx) const
protected

Definition at line 638 of file BPhysVertexTrackBase.cxx.

638  {
639 
640  ATH_MSG_DEBUG("BPhysVertexTrackBase::calculateValues -- begin");
641 
642  unsigned int nPvAssocs = m_pvAssocTypes.size();
643  unsigned int nTrackSels = m_trackSelectionTools.size();
644  unsigned int nTrackTypes = m_useTrackTypes.size();
645 
646  m_pvAssocResMap.clear();
647 
648  const xAOD::BPhysHelper cand(vtx);
649  for (unsigned int ipv = 0; ipv < nPvAssocs; ++ipv) {
650  if ( ipv == 0 || ! fastFillHook(vtx, ipv) ) {
651  for (unsigned int its = 0; its < nTrackSels; ++its) {
652  for (unsigned int itt = 0; itt < nTrackTypes; ++itt) {
653  ATH_MSG_DEBUG("Calling calcValuesHook with ipv: " << ipv
654  << ", its: " << its << ", itt: " << itt);
655  CHECK(calcValuesHook(vtx, ipv, its, itt));
656  } // for itt
657  } // for its
658  // cache result index -- only needed once per ipv value
659  m_pvAssocResMap[buildPvAssocCacheName(vtx, ipv)] = ipv;
660  ATH_MSG_DEBUG("calculateValues: cache index: "
661  << buildPvAssocCacheName(vtx, ipv)
662  << " -- cached ipv: " << ipv);
663  } // if !fastFillHook()
664  } // for ipv
665 
666  return StatusCode::SUCCESS;
667  }

◆ calcValuesHook()

StatusCode DerivationFramework::BPhysVertexTrackBase::calcValuesHook ( const xAOD::Vertex vtx,
const unsigned int  ipv,
const unsigned int  its,
const unsigned int  itt 
) const
protectedvirtual

Reimplemented in DerivationFramework::BMuonTrackIsoTool, DerivationFramework::BVertexClosestTrackTool, and DerivationFramework::BVertexTrackIsoTool.

Definition at line 607 of file BPhysVertexTrackBase.cxx.

610  {
611 
612  // just to avoid a compiler warning
613  ATH_MSG_DEBUG("calcIsolationOpti: vtx: " << vtx << ", ipv: " << ipv
614  << ", its: " << its << ", itt: " << itt);
615 
616  return StatusCode::SUCCESS;
617  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ detTrackTypes()

uint64_t DerivationFramework::BPhysVertexTrackBase::detTrackTypes ( const xAOD::TrackParticle track,
const xAOD::Vertex candPV,
const xAOD::Vertex candRefPV 
) const
protected

Definition at line 1001 of file BPhysVertexTrackBase.cxx.

1003  {
1004  int bits = 0x0;
1005 
1006  // PVTYPE0 - PVTYPE3, NONE
1007  ATH_MSG_ERROR("BPhysVertexTrackBase::detTrackTypes must be adjusted due to changes in TrackParticle");
1008 
1009  // ASOCPV
1010  if ( candPV != NULL ) {
1011  bool found(false);
1012  for (size_t i=0; i<candPV->nTrackParticles(); ++i) {
1013  if ( track == candPV->trackParticle(i) ) {
1014  found = true;
1015  break;
1016  }
1017  }
1018  if ( found ) bits |= track_type_bit[ASSOCPV];
1019  //
1020  // CLOSEAPV
1021  for (unsigned int i=7; i<n_track_types; ++i) {
1022  if ( (track_type_bit[i] & m_trackTypesUsed) > 0x0 ) {
1023  bool useRefittedPvs = ( i%2 == 1 );
1024  bool doDCAin3D = ( (i-7)%4 > 1 );
1025  int chi2DefToUse = (i-7)/4;
1026  // adjustment above bit 20
1027  if ( i > 20 ) {
1028  doDCAin3D = true;
1029  chi2DefToUse = (i-13)/2;
1030  }
1031  const xAOD::Vertex* minChi2PV(nullptr);
1032  if ( chi2DefToUse == 5 ) {
1033  minChi2PV =
1034  findAssocPV(track, candPV, candRefPV, m_pvTypesToConsider,
1035  m_minNTracksInPV, useRefittedPvs);
1036  } else {
1037  minChi2PV =
1038  findMinChi2PV(track, candPV, candRefPV, m_pvTypesToConsider,
1039  m_minNTracksInPV, useRefittedPvs,
1040  doDCAin3D, chi2DefToUse).first;
1041  } // if chi2DefToUse
1042  if ( candPV == minChi2PV
1043  || (candRefPV != nullptr && candRefPV == minChi2PV) ) {
1044  bits |= track_type_bit[i];
1045  }
1046  } // if m_trackTypesUsed
1047  } // for i
1048 
1049  } // if candPV != NULL
1050 
1051  return bits;
1052  }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ fastFillHook()

bool DerivationFramework::BPhysVertexTrackBase::fastFillHook ( const xAOD::Vertex vtx,
const int  ipv 
) const
protectedvirtual

Reimplemented in DerivationFramework::BMuonTrackIsoTool, DerivationFramework::BVertexClosestTrackTool, and DerivationFramework::BVertexTrackIsoTool.

Definition at line 622 of file BPhysVertexTrackBase.cxx.

623  {
624 
625  // just to avoid a compiler warning
626  ATH_MSG_DEBUG("fastIsoFill: vtx: " << vtx << ", ipv: " << ipv);
627 
628  return false;
629  }

◆ finalize()

StatusCode DerivationFramework::BPhysVertexTrackBase::finalize ( )
overridevirtual

Definition at line 464 of file BPhysVertexTrackBase.cxx.

464  {
465 
466  ATH_MSG_DEBUG("BPhysVertexTrackBase::finalize()");
467 
468  // dump track type counters to log
469  if ( m_debugTrackTypes > 0 ) {
470  ATH_MSG_INFO("Track type counters:\n" << m_mttc->countsToString());
471  }
472 
473  // everything all right
474  return finalizeHook();
475  }

◆ finalizeHook()

StatusCode DerivationFramework::BPhysVertexTrackBase::finalizeHook ( )
protectedvirtual

Reimplemented in DerivationFramework::BMuonTrackIsoTool, DerivationFramework::BVertexClosestTrackTool, and DerivationFramework::BVertexTrackIsoTool.

Definition at line 567 of file BPhysVertexTrackBase.cxx.

567  {
568 
569  return StatusCode::SUCCESS;
570  }

◆ findAllMuonIdTracksInDecay()

TrackBag DerivationFramework::BPhysVertexTrackBase::findAllMuonIdTracksInDecay ( xAOD::BPhysHelper vtx,
MuonBag muons 
) const
protected

Definition at line 1131 of file BPhysVertexTrackBase.cxx.

1132  {
1133 
1134  TrackBag tracks;
1135  muons = findAllMuonsInDecay(vtx);
1136 
1137  for (MuonBag::const_iterator muItr = muons.begin(); muItr != muons.end();
1138  ++muItr) {
1139  const xAOD::TrackParticle* track =
1140  (*muItr)->trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
1141  tracks.push_back(track);
1142  } // for
1143 
1144  return tracks;
1145  }

◆ findAllMuonsInDecay() [1/2]

MuonBag DerivationFramework::BPhysVertexTrackBase::findAllMuonsInDecay ( xAOD::BPhysHelper vtx) const
protected

Definition at line 1093 of file BPhysVertexTrackBase.cxx.

1094  {
1095 
1096  MuonBag muons;
1097  findAllMuonsInDecay(vtx, muons);
1098 
1099  return muons;
1100  }

◆ findAllMuonsInDecay() [2/2]

void DerivationFramework::BPhysVertexTrackBase::findAllMuonsInDecay ( xAOD::BPhysHelper vtx,
MuonBag muons 
) const
protected

Definition at line 1107 of file BPhysVertexTrackBase.cxx.

1109  {
1110 
1111  for (int i=0; i < vtx.nMuons(); ++i) {
1112  if ( std::find(muons.begin(),muons.end(),vtx.muon(i)) == muons.end() ) {
1113  muons.push_back(vtx.muon(i));
1114  } // if
1115  } // for
1116  // loop over preceeding vertices
1117  if ( m_incPrecVerticesInDecay ) {
1118  for (int ivtx = 0; ivtx < vtx.nPrecedingVertices(); ++ivtx) {
1119  xAOD::BPhysHelper precVtx(vtx.precedingVertex(ivtx));
1120  findAllMuonsInDecay(precVtx, muons);
1121  } // for
1122  } // if
1123  }

◆ findAllTracksInDecay() [1/2]

TrackBag DerivationFramework::BPhysVertexTrackBase::findAllTracksInDecay ( xAOD::BPhysHelper vtx) const
protected

Definition at line 1057 of file BPhysVertexTrackBase.cxx.

1058  {
1059 
1060  TrackBag tracks;
1061  findAllTracksInDecay(vtx, tracks);
1062 
1063  return tracks;
1064  }

◆ findAllTracksInDecay() [2/2]

void DerivationFramework::BPhysVertexTrackBase::findAllTracksInDecay ( xAOD::BPhysHelper vtx,
TrackBag tracks 
) const
protected

Definition at line 1071 of file BPhysVertexTrackBase.cxx.

1073  {
1074 
1075  for (unsigned int i=0; i < vtx.vtx()->nTrackParticles(); ++i) {
1076  const xAOD::TrackParticle* track = vtx.vtx()->trackParticle(i);
1077  if ( std::find(tracks.begin(),tracks.end(),track) == tracks.end() ) {
1078  tracks.push_back(track);
1079  } // if
1080  } // for
1081  // loop over preceeding vertices
1082  if ( m_incPrecVerticesInDecay ) {
1083  for (int ivtx = 0; ivtx < vtx.nPrecedingVertices(); ++ivtx) {
1084  xAOD::BPhysHelper precVtx(vtx.precedingVertex(ivtx));
1085  findAllTracksInDecay(precVtx, tracks);
1086  } // if
1087  } // for
1088  }

◆ findAssocPV()

const xAOD::Vertex * DerivationFramework::BPhysVertexTrackBase::findAssocPV ( const xAOD::TrackParticle track,
const xAOD::Vertex candPV,
const xAOD::Vertex candRefPV,
const std::vector< uint64_t > &  pvtypes,
const int  minNTracksInPV,
const bool  useRefittedPvs 
) const
protected

Definition at line 1411 of file BPhysVertexTrackBase.cxx.

1416  {
1417 
1418  // select PVs to be considered/replace candPV by candRefPV if requested
1419  std::vector<const xAOD::Vertex*> vpvtx;
1420  for (auto pvtx: *m_pvtxContainer) {
1421  if ( pvtx != nullptr ) {
1422  if ( std::find(pvtypes.begin(),pvtypes.end(),pvtx->vertexType())
1423  != pvtypes.end() ) {
1424  const xAOD::Vertex* cvtx = pvtx;
1425  // replace by refitted PV if associated PV matches orignal PV
1426  if ( useRefittedPvs && pvtx == candPV ) {
1427  if ( candRefPV != nullptr ) {
1428  cvtx = candRefPV;
1429  } else {
1430  ATH_MSG_WARNING("BPhysVertexTrackBase::findAssocPV:"
1431  << " candRefPV == NULL!");
1432  continue;
1433  }
1434  } // if pvtx == candPV
1435  if ( (int)cvtx->nTrackParticles() >= minNTracksInPV ) {
1436  vpvtx.push_back(cvtx);
1437  } // if minNTracksInPV
1438  } // if pvTypes in pvtypes vector
1439  } // if pvtx != nullptr
1440  } // for pvtx
1441 
1442  const xAOD::Vertex* assocPV(NULL);
1443  if ( useRefittedPvs && m_tvaToolHasWpLoose ) {
1444  // check whether track is in refitted PV - if so accept
1445  // Need to do this here as the TrackVertexAssociationTool
1446  // with WP 'Loose' only checks the track->vertex() pointer
1447  // which always points to the original PV.
1448  for (const auto &tp : candRefPV->trackParticleLinks()) {
1449  if ( *tp == track ) {
1450  // track is part of refitted PV -- accept it
1451  assocPV = candRefPV;
1452  break;
1453  }
1454  } // for tp
1455  // if not matching use the TrackVertexAssociationTool (other PVs etc)
1456  if ( assocPV == nullptr ) {
1457  assocPV = m_tvaTool->getUniqueMatchVertex(*track, vpvtx);
1458  }
1459  } else {
1460  assocPV = m_tvaTool->getUniqueMatchVertex(*track, vpvtx);
1461  } // if useRefittedPvs && m_tvaToolHasWpLoose
1462  if ( assocPV == nullptr ) {
1463  ATH_MSG_WARNING("BPhysVertexTrackBase::findAssocPV:"
1464  << " assocPV == NULL for track!"
1465  << " len(vpvtx) = " << vpvtx.size()
1466  << " useRefittedPvs = " << useRefittedPvs
1467  << " minNTracksInPV = " << minNTracksInPV);
1468  }
1469 
1470  return assocPV;
1471  }

◆ findMinChi2PV()

std::pair< const xAOD::Vertex *, double > DerivationFramework::BPhysVertexTrackBase::findMinChi2PV ( const xAOD::TrackParticle track,
const xAOD::Vertex candPV,
const xAOD::Vertex candRefPV,
const std::vector< uint64_t > &  pvtypes,
const int  minNTracksInPV,
const bool  useRefittedPvs,
const bool  doDCAin3D,
const int  chi2DefToUse 
) const
protected

Definition at line 1359 of file BPhysVertexTrackBase.cxx.

1366  {
1367 
1368  double minChi2 = std::numeric_limits<double>::max();
1369  const xAOD::Vertex* minChi2PV(nullptr);
1370 
1371  for (auto pvtx: *m_pvtxContainer) {
1372  if ( pvtx != nullptr ) {
1373  if ( std::find(pvtypes.begin(),pvtypes.end(),pvtx->vertexType())
1374  != pvtypes.end() ) {
1375  const xAOD::Vertex* cvtx = pvtx;
1376  // replace by refitted PV if associated PV matches orignal PV
1377  if ( useRefittedPvs && pvtx == candPV ) {
1378  if ( candRefPV != nullptr ) {
1379  cvtx = candRefPV;
1380  } else {
1381  ATH_MSG_WARNING(" BPhysVertexTrackBase::findMinChi2PV:"
1382  << " candRefPV == NULL!");
1383  continue;
1384  }
1385  } // if pvtx == candPV
1386  if ( (int)cvtx->nTrackParticles() >= minNTracksInPV ) {
1387  double chi2 = getTrackLogChi2DCA(track, cvtx, doDCAin3D,
1388  chi2DefToUse)[4];
1389  if ( chi2 < minChi2 ) {
1390  minChi2 = chi2;
1391  minChi2PV = cvtx;
1392  } // if chi2 < minChi2
1393  } // if minNTracksInPV
1394  } // if pvTypes in pvtypes vector
1395  } // if pvtx != nullptr
1396  } // for pvtx
1397 
1398  return std::make_pair(minChi2PV, minChi2);
1399  }

◆ findMuonRefTrackMomenta()

std::vector< TVector3 > DerivationFramework::BPhysVertexTrackBase::findMuonRefTrackMomenta ( xAOD::BPhysHelper vtx,
MuonBag muons 
) const
protected

Definition at line 1152 of file BPhysVertexTrackBase.cxx.

1153  {
1154 
1155  std::vector<TVector3> refMuTracks;
1156 
1157  // quick solution if nRefTrks == nMuons:
1158  if ( vtx.nRefTrks() == vtx.nMuons() && !m_incPrecVerticesInDecay ) {
1159  muons = vtx.muons();
1160  for ( auto refMuTrack : vtx.refTrks() ) {
1161  refMuTracks.push_back(refMuTrack);
1162  }
1163  } else {
1164  TrackBag muonIdTracks = findAllMuonIdTracksInDecay(vtx, muons);
1165  if ( vtx.nRefTrks() == (int)vtx.vtx()->nTrackParticles() ) {
1166  for (int i=0; i<vtx.nRefTrks(); ++i) {
1167  const xAOD::TrackParticle* otp =
1168  (const xAOD::TrackParticle*)vtx.refTrkOrigin(i);
1169  if ( otp != NULL ) {
1170  if ( std::find(muonIdTracks.begin(), muonIdTracks.end(), otp)
1171  != muonIdTracks.end() ) {
1172  refMuTracks.push_back(vtx.refTrk(i));
1173  }
1174  } else {
1175  ATH_MSG_WARNING("BPhysVertexTrackBase::findMuonRefTrackMomenta():"
1176  " refTrkOrigin == NULL for refTrk # "
1177  << i << " !");
1178  }
1179  } // for
1180  } else {
1181  ATH_MSG_WARNING("BPhysVertexTrackBase::findMuonRefTrackMomenta():"
1182  " size mismatch #refTrks = " << vtx.nRefTrks()
1183  << "#trackParticles = " << vtx.vtx()->nTrackParticles()
1184  << " !");
1185  } // if nRefTracks == nTrackParticles
1186  // loop over preceeding vertices -- only if not all refMuTrks found yet
1187  if ( m_incPrecVerticesInDecay && muons.size() > refMuTracks.size() ) {
1188  for (int ivtx = 0; ivtx < vtx.nPrecedingVertices(); ++ivtx) {
1189  xAOD::BPhysHelper precVtx(vtx.precedingVertex(ivtx));
1190  std::vector<TVector3> precRefMuTracks =
1191  findMuonRefTrackMomenta(precVtx, muons);
1192  // append only if not yet contained in
1193  for ( auto precRefMuTrack : precRefMuTracks ) {
1194  if ( std::find(refMuTracks.begin(), refMuTracks.end(),
1195  precRefMuTrack) == refMuTracks.end() ) {
1196  refMuTracks.push_back(precRefMuTrack);
1197  } // if
1198  } // for
1199  } // for ivtx
1200  } // if
1201  } // if (shortcut)
1202 
1203  // debug output
1204  if ( msgLvl( MSG::DEBUG ) ) {
1205  ATH_MSG_DEBUG("BPhysVertexTrackBase::findMuonRefTrackMomenta():"
1206  << " #muons: " << muons.size()
1207  << " #refMuTrks: " << refMuTracks.size());
1208  TString str = Form(">> refMuTracks(%d):\n", (int)refMuTracks.size());
1209  for (unsigned int i=0; i < refMuTracks.size(); ++i) {
1210  str += Form("(%10.4f,%10.4f,%10.4f) ",
1211  refMuTracks[i].x(), refMuTracks[i].y(),
1212  refMuTracks[i].z());
1213  }
1214  ATH_MSG_DEBUG(str.Data());
1215  }
1216 
1217  return refMuTracks;
1218  }

◆ getTrackCandPVLogChi2()

double DerivationFramework::BPhysVertexTrackBase::getTrackCandPVLogChi2 ( const xAOD::TrackParticle track,
const xAOD::Vertex vtx,
bool  doDCAin3D = false,
int  chi2DefToUse = 0 
) const
protected

Definition at line 684 of file BPhysVertexTrackBase.cxx.

689  {
690 
691  return getTrackLogChi2DCA(track, vtx, doDCAin3D, chi2DefToUse)[4];
692  }

◆ getTrackLogChi2DCA()

std::vector< double > DerivationFramework::BPhysVertexTrackBase::getTrackLogChi2DCA ( const xAOD::TrackParticle track,
const xAOD::Vertex vtx,
bool  doDCAin3D = false,
int  chi2DefToUse = 0 
) const
protected

Definition at line 722 of file BPhysVertexTrackBase.cxx.

725  {
726  // presets
727  std::vector<double> res = {-999., -99., -999., -99., -100., -100., -1.,
728  -99., -99., -999.};
729 
730  const Amg::Vector3D pos = vtx->position();
731  const AmgSymMatrix(3) poscov = vtx->covariancePosition();
732  auto ctx = Gaudi::Hive::currentContext();
733  if ( track != NULL ) {
734  if ( chi2DefToUse < 2 || (chi2DefToUse > 5 && chi2DefToUse < 8) ) {
735  // use track perigee method
736  std::unique_ptr<const Trk::Perigee>
737  trkPerigee(m_trackToVertexTool->perigeeAtVertex(ctx, *track, pos));
738  if ( trkPerigee != NULL ) {
739  res[0] = trkPerigee->parameters()[Trk::d0];
740  res[2] = trkPerigee->parameters()[Trk::z0];
741  const AmgSymMatrix(5)* locError = trkPerigee->covariance();
742  if ( locError != NULL ) {
743  // uncertainties from track
744  res[1] = Amg::error(*locError, Trk::d0);
745  res[3] = Amg::error(*locError, Trk::z0);
746  if ( chi2DefToUse == 1 ) {
747  // add uncertainties from vertex
748  Amg::Vector3D perppt(trkPerigee->momentum().y()/trkPerigee->pT(),
749  -trkPerigee->momentum().x()/trkPerigee->pT(),
750  0.);
751  double vtxD0Err2 = perppt.transpose()*poscov*perppt;
752  res[1] = sqrt( pow(res[1], 2.) + vtxD0Err2 );
753  res[3] = sqrt( pow(res[3], 2.) + poscov(2,2) );
754  }
755  if ( chi2DefToUse < 2 ) {
756  if ( fabs(res[1]) > 0. && fabs(res[3]) > 0. ) {
757  res[4] = log( pow(res[0]/res[1], 2.)
758  + pow(res[2]/res[3], 2.) );
759  res[6] = 2.; // ok
760  } else {
761  ATH_MSG_WARNING("BPhysVertexTrackBase::getTrackLogChi2DCA():"
762  << " d0 = " << res[0] << ", d0Err = "
763  << res[1] << ", z0 = " << res[2]
764  << ", z0Err = " << res[3]);
765  }
766  }
767  // chi2DefToUse 6 or 7
768  if ( chi2DefToUse > 5 && chi2DefToUse < 8 ) {
769  double phi0 = trkPerigee->parameters()[Trk::phi0];
770  double doca = sqrt(pow(res[0],2.) + pow(res[2], 2.));
771  res[9] = phi0;
772  if ( doca > 0. ) {
773  if ( chi2DefToUse == 6 ) {
774  AmgMatrix(5,3) dmat = AmgMatrix(5,3)::Zero();
775  dmat(0,0) = -sin(phi0);
776  dmat(0,1) = cos(phi0);
777  dmat(1,2) = 1.;
778  dmat(2,0) = -res[0]*cos(phi0);
779  dmat(2,1) = -res[0]*sin(phi0);
780  AmgSymMatrix(3) mCovTrk3D = dmat.transpose()*(*locError)*dmat;
781  Amg::Vector3D dvec(-res[0]*sin(phi0), res[0]*cos(phi0),
782  res[2]); // (x,y,z)
783  Amg::Vector3D duvec = dvec.unit();
784  // log(chi2) = log( docavec^T * V^-1 * docavec )
785  res[4] = log( dvec.transpose() * (poscov+mCovTrk3D).inverse()
786  * dvec );
787  res[7] = duvec.transpose()*poscov*duvec;
788  res[8] = duvec.transpose()*mCovTrk3D*duvec;
789  res[6] = 3.; // ok
790  }
791  if ( chi2DefToUse == 7 ) {
792  AmgMatrix(3,2) dmat = AmgMatrix(3,2)::Zero();
793  dmat(0,0) = -sin(phi0);
794  dmat(1,0) = cos(phi0);
795  dmat(2,0) = 0.;
796  dmat(0,1) = 0.;
797  dmat(1,1) = 0.;
798  dmat(2,1) = 1.;
799  AmgSymMatrix(2) mCovVtx2D = dmat.transpose()*poscov*dmat;
800  AmgSymMatrix(2) mCovTrk2D = AmgSymMatrix(2)::Zero();
801  mCovTrk2D(0,0) = (*locError)(Trk::d0,Trk::d0);
802  mCovTrk2D(0,1) = (*locError)(Trk::d0,Trk::z0);
803  mCovTrk2D(1,0) = (*locError)(Trk::d0,Trk::z0);
804  mCovTrk2D(1,1) = (*locError)(Trk::z0,Trk::z0);
805  Amg::Vector2D dvec(res[0], res[2]); // (d0, z0)
806  Amg::Vector2D duvec = dvec.unit();
807  // log(chi2) = log( (d0, z0) * V^-1 * (d0, z0)^T )
808  res[4] = log( dvec.transpose()*(mCovVtx2D+mCovTrk2D).inverse()
809  * dvec );
810  res[7] = duvec.transpose()*mCovVtx2D*duvec;
811  res[8] = duvec.transpose()*mCovTrk2D*duvec;
812  res[6] = 4.; // ok
813  }
814  } else {
815  ATH_MSG_WARNING("BPhysVertexTrackBase::getTrackLogChi2DCA():"
816  << " doca == 0 !");
817  }
818  } // if chi2DefToUse > 5 && chi2DefToUse < 8
819  res[5] = doDCAin3D ?
820  sqrt( pow(res[0], 2.) + pow(res[2], 2.) ) : res[0];
821  res[6] += 1.; // ok
822  } else {
823  ATH_MSG_WARNING("BPhysVertexTrackBase::getTrackLogChi2DCA():"
824  " locError pointer is NULL!");
825  }
826  } else {
827  ATH_MSG_WARNING("BPhysVertexTrackBase::getTrackLogChi2DCA():"
828  " trkPerigee pointer is NULL!");
829  } // if trkPerigee
830 
831  } else if ( chi2DefToUse == 2
832  || (chi2DefToUse > 7 && chi2DefToUse < 10 )) {
833  // simple extrapolation method
834  // (directly taken from NtupleMaker for comparisons)
835 
836  // SV position and covariance matrix
837  TVector3 SV_def(vtx->x(), vtx->y(), vtx->z());
838  const AmgSymMatrix(3)& SV_cov = poscov;
839 
840  // chi2 track to SV
841  double px = ( track->p4() ).Px();
842  double py = ( track->p4() ).Py();
843  double pt = ( track->p4() ).Pt();
844  double d0 = track->d0();
845  double d0Err2 = track->definingParametersCovMatrixVec()[0];
846  double z0 = track->z0();
847  double z0Err2 = track->definingParametersCovMatrixVec()[2];
848  double theta = track->theta();
849  double d0z0Cov = track->definingParametersCovMatrixVec()[1];
850  double phi = track->phi();
851 
852  TVector3 trk_origin( track->vx(), track->vy(), track->vz() );
853  TVector3 SV = SV_def - trk_origin;
854 
855  // calc. error in direction perpendicular to pT (still x-y plane)
856  double upx = py/pt;
857  double upy = -px/pt;
858  double d0toSV = d0 + (SV[0]*upx + SV[1]*upy);
859  double d0toSVErr2 = upx*SV_cov(0, 0)*upx + 2*upx*SV_cov(1, 0)*upy
860  + upy*SV_cov(1, 1)*upy + d0Err2;
861 
862  upx = px/pt;
863  upy = py/pt;
864  double cot_theta = cos(theta)/sin(theta);
865  double z0corr = (SV[0]*upx + SV[1]*upy)*cot_theta;
866  double z0toSV = z0 + z0corr - SV[2];
867  double z0toSVErr2 = SV_cov(2, 2) + z0Err2;
868 
869  double docaSV = sqrt( pow(d0toSV, 2) + pow(z0toSV, 2) );
870 
871  double chi2testSV(999.);
872  if ( chi2DefToUse == 2 ) {
873  if (d0toSVErr2 !=0 && z0toSVErr2 != 0)
874  chi2testSV = log(pow( d0toSV, 2)/d0toSVErr2
875  + pow( z0toSV, 2)/z0toSVErr2);
876  // set results
877  res = {d0toSV, sqrt(d0toSVErr2), z0toSV, sqrt(z0toSVErr2),
878  chi2testSV, (doDCAin3D ? docaSV : d0toSV), 4,
879  -99., -99., -999.};
880  }
881  if ( chi2DefToUse > 7 && chi2DefToUse < 10 ) {
882  if ( docaSV > 0. ) {
883  if ( chi2DefToUse == 8 ) {
884  AmgMatrix(5,3) dmat = AmgMatrix(5,3)::Zero();
885  dmat(0,0) = -sin(phi);
886  dmat(0,1) = cos(phi);
887  dmat(1,2) = 1.;
888  dmat(2,0) = -d0toSV*cos(phi);
889  dmat(2,1) = -d0toSV*sin(phi);
890  const AmgSymMatrix(5) mCovTrk5D =
891  track->definingParametersCovMatrix();
892  AmgSymMatrix(3) mCovTrk3D = dmat.transpose()*mCovTrk5D*dmat;
893  Amg::Vector3D dvec(-d0toSV*sin(phi), d0toSV*cos(phi),
894  z0toSV); // (x,y,z)
895  Amg::Vector3D duvec = dvec.unit();
896  // log(chi2) = log( docavec^T * V^-1 * docavec )
897  double chi2testSV = log( dvec.transpose()
898  * (poscov+mCovTrk3D).inverse()
899  * dvec );
900  double vtx3DErr2 = duvec.transpose()*poscov*duvec;
901  double trk3DErr2 = duvec.transpose()*mCovTrk3D*duvec;
902  // set results
903  res = {d0toSV, sqrt(d0Err2), z0toSV, sqrt(z0Err2),
904  chi2testSV, (doDCAin3D ? docaSV : d0toSV), 5,
905  vtx3DErr2, trk3DErr2, phi};
906  }
907  if ( chi2DefToUse == 9 ) {
908  AmgMatrix(3,2) dmat = AmgMatrix(3,2)::Zero();
909  dmat(0,0) = -sin(phi);
910  dmat(1,0) = cos(phi);
911  dmat(2,0) = 0.;
912  dmat(0,1) = 0.;
913  dmat(1,1) = 0.;
914  dmat(2,1) = 1.;
915  AmgSymMatrix(2) mCovVtx2D = dmat.transpose()*SV_cov*dmat;
916  AmgSymMatrix(2) mCovTrk2D = AmgSymMatrix(2)::Zero();
917  mCovTrk2D(0,0) = d0Err2;
918  mCovTrk2D(0,1) = d0z0Cov;
919  mCovTrk2D(1,0) = d0z0Cov;
920  mCovTrk2D(1,1) = z0Err2;
921  Amg::Vector2D dvec(d0toSV, z0toSV);
922  Amg::Vector2D duvec = dvec.unit();
923  // log(chi2) = log( (d0, z0) * V^-1 * (d0, z0)^T )
924  chi2testSV = log( dvec.transpose()*(mCovVtx2D+mCovTrk2D).inverse()
925  * dvec );
926  double vtx2DErr2 = duvec.transpose()*mCovVtx2D*duvec;
927  double trk2DErr2 = duvec.transpose()*mCovTrk2D*duvec;
928 
929  if ( vtx2DErr2 < 0. || trk2DErr2 < 0. ) {
930  ATH_MSG_WARNING("BPhysVertexTrackBase::"
931  "getTrackLogChi2DCA(): "
932  << "vtx2DErr2 = " << vtx2DErr2
933  << " trk2DErr2 = " << trk2DErr2
934  << " chi2testSV = " << chi2testSV);
935  ATH_MSG_WARNING("dvec = " << dvec);
936  ATH_MSG_WARNING("mCovVtx2D = " << mCovVtx2D);
937  ATH_MSG_WARNING("mCovTrk2D = " << mCovTrk2D);
938  ATH_MSG_WARNING("dmat = " << dmat);
939  ATH_MSG_WARNING("SV_cov = " << SV_cov);
940  ATH_MSG_WARNING("det(mCovVtx2D) = " << mCovVtx2D.determinant());
941  ATH_MSG_WARNING("det(mCovTrk2D) = " << mCovTrk2D.determinant());
942  ATH_MSG_WARNING("det(SV_cov) = " << SV_cov.determinant());
943  ATH_MSG_WARNING("d0toSV = " << d0toSV
944  << " z0toSV = " << z0toSV
945  << " phi = " << phi
946  << " docaSV = " << docaSV);
947  }
948 
949  // set results
950  res = {d0toSV, sqrt(d0Err2), z0toSV, sqrt(z0Err2),
951  chi2testSV, (doDCAin3D ? docaSV : d0toSV), 6,
952  vtx2DErr2, trk2DErr2, phi};
953  }
954  } else {
955  ATH_MSG_WARNING("BPhysVertexTrackBase::getTrackLogChi2DCA():"
956  << " docaSV == 0 !");
957  }
958  } // if chi2DefToUse > 7 && chi2DefToUse < 10
959 
960  } else if ( chi2DefToUse > 2 && chi2DefToUse < 5 ) {
961  // CalcLogChi2toPV method using xAOD::TrackingHelpers
962  // (simply taken from NtupleMaker for comparisons)
963  // N.B. z0significance method of the helper doesn't include pv_z0
964  // uncertainty
965  double d0sign(0.);
966  if (chi2DefToUse == 4) {
967  d0sign =
972  );
973  } else {
975  }
976  // trk z0 is expressed relative to the beamspot position along z-axis
977  // (trk->vz())
978  // DCA always in 3D
979  double z0toPV = track->z0() + track->vz() - vtx->z();
980  double z0Err2 = track->definingParametersCovMatrixVec()[2];
981  if (chi2DefToUse == 4) z0Err2+= vtx->covariancePosition()(2,2);
982  double z0sign = z0toPV / sqrt( z0Err2 );
983  double chi2 = log( pow(d0sign, 2.) + pow(z0sign, 2.) );
984  // set results
985  res = {-999., -99., z0toPV, sqrt(z0Err2), chi2, -100., 4, -99., -99.,
986  -999.};
987 
988  } // if chi2DefToUse
989  } else {
990  ATH_MSG_WARNING("BPhysVertexTrackBase::getTrackLogChi2DCA():"
991  " track pointer is NULL!");
992  res[6] = -2.;
993  } // if track != NULL
994  return res;
995  }

◆ initialize()

StatusCode DerivationFramework::BPhysVertexTrackBase::initialize ( )
overridevirtual

Definition at line 402 of file BPhysVertexTrackBase.cxx.

402  {
403 
404  ATH_MSG_DEBUG("BPhysVertexTrackBase::initialize() -- begin");
405 
406  if ( m_vertexContainerNames.size() == 0 ) {
407  ATH_MSG_ERROR("No vertex container names provided!");
408  }
409  if ( m_refPVContainerNames.size() == 0 ) {
410  ATH_MSG_ERROR("No refitted PV container names provided!");
411  }
412  if ( m_trackParticleContainerName == "" ) {
413  ATH_MSG_ERROR("No track particle container name provided!");
414  }
415  if ( m_pvContainerName == "" ) {
416  ATH_MSG_ERROR("No PV container name provided!");
417  }
418  if ( m_vertexContainerNames.size() != m_refPVContainerNames.size() ) {
419  ATH_MSG_ERROR("Size mismatch of VertexContainerNames ("
420  << m_vertexContainerNames.size()
421  << ") and RefPVContainerNames ("
422  << m_refPVContainerNames.size() << ") lists!");
423  }
424 
425  if ( m_vertexContainerNames.size() != m_branchPrefixes.size() ) {
426  ATH_MSG_ERROR("Size mismatch of VertexContainerNames ("
427  << m_vertexContainerNames.size()
428  << ") and BranchPrefixes ("
429  << m_branchPrefixes.size() << ") lists!");
430  }
431 
432  // TrackToVertexTool
433  ATH_CHECK(m_trackToVertexTool.retrieve());
434 
435  // TrackSelectionTools
436  for (auto selTool : m_trackSelectionTools ) {
437  ATH_CHECK(selTool.retrieve());
438  }
439 
440  // TrackVertexAssociationTool
441  ATH_CHECK(m_tvaTool.retrieve());
442  // take note of working point
443  // const std::string tvaWp("Loose");
444  const std::string tvaWp =
445  dynamic_cast<CP::TrackVertexAssociationTool*>(m_tvaTool.get())->getProperty("WorkingPoint").toString();
446  m_tvaToolHasWpLoose = (tvaWp == "Loose");
447 
448  // initialize PV-to-SV association type vector
450 
451  // initialize track type request pattern
453 
454  // initialize track type counters
455  if ( m_debugTrackTypes > 0 ) {
456  m_mttc = std::make_unique<TrackTypeCounter>(*this, name());
457  }
458 
459  ATH_MSG_DEBUG("BPhysVertexTrackBase::initialize() -- end");
460 
461  return initializeHook();
462  }

◆ initializeHook()

StatusCode DerivationFramework::BPhysVertexTrackBase::initializeHook ( )
protectedvirtual

Reimplemented in DerivationFramework::BMuonTrackIsoTool, DerivationFramework::BVertexClosestTrackTool, and DerivationFramework::BVertexTrackIsoTool.

Definition at line 560 of file BPhysVertexTrackBase.cxx.

560  {
561 
562  return StatusCode::SUCCESS;
563  }

◆ initPvAssocTypeVec()

void DerivationFramework::BPhysVertexTrackBase::initPvAssocTypeVec ( )
protectedvirtual

Definition at line 1340 of file BPhysVertexTrackBase.cxx.

1340  {
1341 
1342  m_pvAssocTypes.clear();
1343  for (unsigned int i=0; i<xAOD::BPhysHelper::n_pv_types; ++i) {
1344  if ( (m_doVertexType & (1 << i)) > 0 )
1346  }
1347  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& DerivationFramework::IAugmentationTool::interfaceID ( )
inlinestaticinherited

AlgTool interface methods.

Definition at line 31 of file IAugmentationTool.h.

31 { return IID_IAugmentationTool; }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ rttor()

uint64_t DerivationFramework::BPhysVertexTrackBase::rttor ( const std::vector< uint64_t > &  vtypes)
static

Definition at line 327 of file BPhysVertexTrackBase.cxx.

327  {
328  // or of requested track types
329  uint64_t ttor(0);
330  for (size_t i=0; i<vtypes.size(); ++i) {
331  ttor |= vtypes[i];
332  }
333  return ttor;
334  }

◆ selectTracks() [1/2]

TrackBag DerivationFramework::BPhysVertexTrackBase::selectTracks ( const xAOD::TrackParticleContainer inpTracks,
const TrackBag exclTracks,
xAOD::BPhysHelper cand,
const unsigned int  ipv,
const unsigned int  its,
const unsigned int  itt 
) const
protected

Definition at line 1241 of file BPhysVertexTrackBase.cxx.

1248  {
1249 
1250  const xAOD::Vertex* candRefPV = cand.pv(m_pvAssocTypes[ipv]);
1251  const xAOD::Vertex* candPV = cand.origPv(m_pvAssocTypes[ipv]);
1252 
1253  ATH_MSG_DEBUG("selectTracks: Found " << exclTracks.size()
1254  << " " << exclTracks
1255  << " for decay candidate " << cand.vtx()
1256  << "; candPV: " << candPV << " candRefPV: " << candRefPV);
1257 
1258  std::string bname(buildBranchBaseName(its, ipv, itt));
1259 
1260  // tracks to be considered
1261  TrackBag tracks;
1263  inpTracks->begin(); trkItr != inpTracks->end(); ++trkItr) {
1264  const xAOD::TrackParticle* track = *trkItr;
1265  uint64_t trackTypesForTrack(0x0);
1266  // debug track types (before any cuts)
1267  if ( m_debugTrackTypes > 0 ) {
1268  trackTypesForTrack = detTrackTypes(track, candPV, candRefPV);
1269  m_mttc->addToCounter(trackTypesForTrack, itt, bname, "all");
1270  }
1271  // track selection check
1272  if ( ! m_trackSelectionTools[its]->accept(*track, candRefPV) ) continue;
1273  // debug track types (after track selection cuts)
1274  if ( m_debugTrackTypes > 0 ) {
1275  m_mttc->addToCounter(trackTypesForTrack, itt, bname, "ats");
1276  }
1277 
1278  // calcluation of track type bits not necessary if all bits requested
1279  if ( ! ((unsigned int)m_useTrackTypes[itt] == ttall() ||
1280  (unsigned int)m_useTrackTypes[itt] == ttallMin()) ) {
1281  // track type check -- determination if not in debugging mode
1282  // delayed for execution speed reasons
1283  if ( trackTypesForTrack == 0x0 ) {
1284  trackTypesForTrack = detTrackTypes(track, candPV, candRefPV);
1285  }
1286  if ( (trackTypesForTrack & m_useTrackTypes[itt]) == 0x0 ) {
1287  continue;
1288  }
1289  }
1290  // debug track types (after track type cuts)
1291  if ( m_debugTrackTypes > 0 ) {
1292  m_mttc->addToCounter(trackTypesForTrack, itt, bname, "att");
1293  }
1294  // track not in list of tracks to exclude
1295  if ( std::find(exclTracks.begin(), exclTracks.end(), track)
1296  != exclTracks.end() ) continue;
1297  // debug track types (after all cuts)
1298  if ( m_debugTrackTypes > 0 ) {
1299  m_mttc->addToCounter(trackTypesForTrack, itt, bname, "fin");
1300  }
1301  // tracks that survived so far
1302  tracks.push_back(track);
1303  } // for
1304 
1305  return tracks;
1306  }

◆ selectTracks() [2/2]

TrackBag DerivationFramework::BPhysVertexTrackBase::selectTracks ( const xAOD::TrackParticleContainer inpTracks,
xAOD::BPhysHelper cand,
const unsigned int  ipv,
const unsigned int  its,
const unsigned int  itt 
) const
protected

Definition at line 1225 of file BPhysVertexTrackBase.cxx.

1231  {
1232 
1233  return selectTracks(inpTracks, findAllTracksInDecay(cand), cand,
1234  ipv, its, itt);
1235  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ trackToString()

std::string DerivationFramework::BPhysVertexTrackBase::trackToString ( const xAOD::TrackParticle track)
static

Definition at line 338 of file BPhysVertexTrackBase.cxx.

338  {
339  std::string str;
340  if (track != nullptr) {
341  std::string str = std::format("p({:10.4f},{:10.4f},{:10.4f})\n"
342  "d:({:10.5f},{:10.5f},{:10.5f},{:10.5f},{:10.6f})",
343  (track->p4()).Px(), (track->p4()).Py(), (track->p4()).Pz(),
344  track->d0(), track->z0(), track->phi0(), track->theta(),
345  track->qOverP());
346  } // if track
347  return str;
348  }

◆ ttall()

uint64_t DerivationFramework::BPhysVertexTrackBase::ttall ( )
static

Definition at line 318 of file BPhysVertexTrackBase.cxx.

318  {
319  if ( s_track_type_all_cached == 0x0 ) {
320  for (unsigned int i=0; i<n_track_types; ++i) {
322  }
323  }
325  }

◆ ttallMin()

uint64_t DerivationFramework::BPhysVertexTrackBase::ttallMin ( )
static

Definition at line 313 of file BPhysVertexTrackBase.cxx.

313  {
314  // only bits 0 - 6
315  return 127;
316  }

◆ ttb()

uint64_t DerivationFramework::BPhysVertexTrackBase::ttb ( BPhysVertexTrackBase::track_type  type)
static

Definition at line 309 of file BPhysVertexTrackBase.cxx.

309  {
310  return track_type_bit[type];
311  }

◆ tts()

const std::string DerivationFramework::BPhysVertexTrackBase::tts ( BPhysVertexTrackBase::track_type  type)
static

Definition at line 305 of file BPhysVertexTrackBase.cxx.

305  {
306  return track_type_str[type];
307  }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

◆ wrapLines()

std::string DerivationFramework::BPhysVertexTrackBase::wrapLines ( const std::string &  lines,
const std::string &  prefix 
)
static

Definition at line 353 of file BPhysVertexTrackBase.cxx.

354  {
355 
356  std::string ostr;
357  std::istringstream stream(lines);
358  std::string line;
359  while ( std::getline(stream, line) ) {
360  if ( !ostr.empty() ) ostr += "\n";
361  ostr += prefix + line;
362  }
363  return ostr;
364  }

Member Data Documentation

◆ m_branchBaseName

std::string DerivationFramework::BPhysVertexTrackBase::m_branchBaseName
protected

Definition at line 246 of file BPhysVertexTrackBase.h.

◆ m_branchPrefixes

std::vector<std::string> DerivationFramework::BPhysVertexTrackBase::m_branchPrefixes
protected

Definition at line 245 of file BPhysVertexTrackBase.h.

◆ m_branchSuffix

std::string DerivationFramework::BPhysVertexTrackBase::m_branchSuffix
protected

Definition at line 247 of file BPhysVertexTrackBase.h.

◆ m_debugTracksInEvents

std::vector<uint64_t> DerivationFramework::BPhysVertexTrackBase::m_debugTracksInEvents
protected

Definition at line 265 of file BPhysVertexTrackBase.h.

◆ m_debugTracksInThisEvent

bool DerivationFramework::BPhysVertexTrackBase::m_debugTracksInThisEvent
mutableprotected

Definition at line 302 of file BPhysVertexTrackBase.h.

◆ m_debugTrackTypes

int DerivationFramework::BPhysVertexTrackBase::m_debugTrackTypes
protected

Definition at line 264 of file BPhysVertexTrackBase.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doVertexType

int DerivationFramework::BPhysVertexTrackBase::m_doVertexType
protected

Definition at line 259 of file BPhysVertexTrackBase.h.

◆ m_eventInfo

const xAOD::EventInfo* DerivationFramework::BPhysVertexTrackBase::m_eventInfo
mutableprotected

Definition at line 285 of file BPhysVertexTrackBase.h.

◆ m_evtNumber

uint64_t DerivationFramework::BPhysVertexTrackBase::m_evtNumber
mutableprotected

Definition at line 299 of file BPhysVertexTrackBase.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_incPrecVerticesInDecay

bool DerivationFramework::BPhysVertexTrackBase::m_incPrecVerticesInDecay
protected

Definition at line 261 of file BPhysVertexTrackBase.h.

◆ m_minNTracksInPV

int DerivationFramework::BPhysVertexTrackBase::m_minNTracksInPV
protected

Definition at line 262 of file BPhysVertexTrackBase.h.

◆ m_mttc

std::unique_ptr<TrackTypeCounter> DerivationFramework::BPhysVertexTrackBase::m_mttc
protected

Definition at line 295 of file BPhysVertexTrackBase.h.

◆ m_nEvtsSeen

unsigned int DerivationFramework::BPhysVertexTrackBase::m_nEvtsSeen
mutableprotected

Definition at line 282 of file BPhysVertexTrackBase.h.

◆ m_pvAssocResMap

StringIntMap_t DerivationFramework::BPhysVertexTrackBase::m_pvAssocResMap
mutableprotected

Definition at line 289 of file BPhysVertexTrackBase.h.

◆ m_pvAssocTypes

std::vector<xAOD::BPhysHelper::pv_type> DerivationFramework::BPhysVertexTrackBase::m_pvAssocTypes
protected

Definition at line 280 of file BPhysVertexTrackBase.h.

◆ m_pvContainerName

std::string DerivationFramework::BPhysVertexTrackBase::m_pvContainerName
protected

Definition at line 256 of file BPhysVertexTrackBase.h.

◆ m_pvtxContainer

const xAOD::VertexContainer* DerivationFramework::BPhysVertexTrackBase::m_pvtxContainer
mutableprotected

Definition at line 273 of file BPhysVertexTrackBase.h.

◆ m_pvTypesToConsider

std::vector<uint64_t> DerivationFramework::BPhysVertexTrackBase::m_pvTypesToConsider
protected

Definition at line 263 of file BPhysVertexTrackBase.h.

◆ m_refPVAuxContainer

const xAOD::VertexAuxContainer* DerivationFramework::BPhysVertexTrackBase::m_refPVAuxContainer
mutableprotected

Definition at line 277 of file BPhysVertexTrackBase.h.

◆ m_refPVContainer

const xAOD::VertexContainer* DerivationFramework::BPhysVertexTrackBase::m_refPVContainer
mutableprotected

Definition at line 276 of file BPhysVertexTrackBase.h.

◆ m_refPVContainerNames

std::vector<std::string> DerivationFramework::BPhysVertexTrackBase::m_refPVContainerNames
protected

Definition at line 257 of file BPhysVertexTrackBase.h.

◆ m_runNumber

unsigned int DerivationFramework::BPhysVertexTrackBase::m_runNumber
mutableprotected

Definition at line 298 of file BPhysVertexTrackBase.h.

◆ m_svtxAuxContainer

const xAOD::VertexAuxContainer* DerivationFramework::BPhysVertexTrackBase::m_svtxAuxContainer
mutableprotected

Definition at line 275 of file BPhysVertexTrackBase.h.

◆ m_svtxContainer

const xAOD::VertexContainer* DerivationFramework::BPhysVertexTrackBase::m_svtxContainer
mutableprotected

Definition at line 274 of file BPhysVertexTrackBase.h.

◆ m_trackParticleContainerName

std::string DerivationFramework::BPhysVertexTrackBase::m_trackParticleContainerName
protected

Definition at line 249 of file BPhysVertexTrackBase.h.

◆ m_tracks

const xAOD::TrackParticleContainer* DerivationFramework::BPhysVertexTrackBase::m_tracks
mutableprotected

Definition at line 271 of file BPhysVertexTrackBase.h.

◆ m_tracksAux

const xAOD::TrackParticleAuxContainer* DerivationFramework::BPhysVertexTrackBase::m_tracksAux
mutableprotected

Definition at line 272 of file BPhysVertexTrackBase.h.

◆ m_trackSelectionTools

ToolHandleArray<TrkSelTool> DerivationFramework::BPhysVertexTrackBase::m_trackSelectionTools
protected

Definition at line 250 of file BPhysVertexTrackBase.h.

◆ m_trackToVertexTool

ToolHandle<Reco::ITrackToVertex> DerivationFramework::BPhysVertexTrackBase::m_trackToVertexTool
protected

Definition at line 252 of file BPhysVertexTrackBase.h.

◆ m_trackTypesUsed

uint64_t DerivationFramework::BPhysVertexTrackBase::m_trackTypesUsed
protected

Definition at line 292 of file BPhysVertexTrackBase.h.

◆ m_tvaTool

ToolHandle<CP::ITrackVertexAssociationTool> DerivationFramework::BPhysVertexTrackBase::m_tvaTool
protected

Definition at line 254 of file BPhysVertexTrackBase.h.

◆ m_tvaToolHasWpLoose

bool DerivationFramework::BPhysVertexTrackBase::m_tvaToolHasWpLoose
protected

Definition at line 268 of file BPhysVertexTrackBase.h.

◆ m_useTrackTypes

std::vector<uint64_t> DerivationFramework::BPhysVertexTrackBase::m_useTrackTypes
protected

Definition at line 260 of file BPhysVertexTrackBase.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexContainerNames

std::vector<std::string> DerivationFramework::BPhysVertexTrackBase::m_vertexContainerNames
protected

Definition at line 248 of file BPhysVertexTrackBase.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ n_track_types

const int DerivationFramework::BPhysVertexTrackBase::n_track_types = 33
static

Definition at line 123 of file BPhysVertexTrackBase.h.

◆ s_track_type_all_cached

uint64_t DerivationFramework::BPhysVertexTrackBase::s_track_type_all_cached = 0x0
staticprivate

Definition at line 127 of file BPhysVertexTrackBase.h.

◆ track_type_bit

const uint64_t DerivationFramework::BPhysVertexTrackBase::track_type_bit
static
Initial value:
=
{0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40,
0x80, 0x100, 0x200, 0x400,
0x800, 0x1000, 0x2000, 0x4000,
0x8000, 0x10000, 0x20000, 0x40000,
0x80000, 0x100000, 0x200000, 0x400000,
0x800000, 0x1000000, 0x2000000, 0x4000000,
0x8000000, 0x10000000, 0x20000000, 0x40000000,
0x80000000, 0x100000000}

Definition at line 125 of file BPhysVertexTrackBase.h.

◆ track_type_str

const std::string DerivationFramework::BPhysVertexTrackBase::track_type_str
static
Initial value:
=
{"ASSOCPV", "PVTYPE0", "PVTYPE1", "PVTYPE2", "PVTYPE3", "NONE", "NULLVP",
"CAPVRFN3U0", "CAPVNRN3U0", "CAPVRF3DU0", "CAPVNR3DU0",
"CAPVRFN3U1", "CAPVNRN3U1", "CAPVRF3DU1", "CAPVNR3DU1",
"CAPVRFN3U2", "CAPVNRN3U2", "CAPVRF3DU2", "CAPVNR3DU2",
"CAPVRFNNU3", "CAPVNRNNU3", "CAPVRFNNU4", "CAPVNRNNU4",
"CAPVRFNNU5", "CAPVNRNNU5", "CAPVRFNNU6", "CAPVNRNNU6",
"CAPVRFNNU7", "CAPVNRNNU7", "CAPVRFNNU8", "CAPVNRNNU8",
"CAPVRFNNU9", "CAPVNRNNU9"}

Definition at line 124 of file BPhysVertexTrackBase.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
DerivationFramework::BPhysVertexTrackBase::CAPVRFNNU6
@ CAPVRFNNU6
Definition: BPhysVertexTrackBase.h:120
xAOD::Vertex_v1::x
float x() const
Returns the x position.
DerivationFramework::BPhysVertexTrackBase::CAPVNRNNU9
@ CAPVNRNNU9
Definition: BPhysVertexTrackBase.h:122
DerivationFramework::BPhysVertexTrackBase::CAPVRFNNU7
@ CAPVRFNNU7
Definition: BPhysVertexTrackBase.h:121
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
checkFileSG.line
line
Definition: checkFileSG.py:75
DerivationFramework::BPhysVertexTrackBase::track_type_str
static const std::string track_type_str[]
Definition: BPhysVertexTrackBase.h:124
xAOD::BPhysHelper::nMuons
int nMuons()
: Methods providing access to the linked muons
Definition: BPhysHelper.cxx:441
DerivationFramework::BPhysVertexTrackBase::addBranchesHook
virtual StatusCode addBranchesHook() const
Definition: BPhysVertexTrackBase.cxx:574
xAOD::Vertex_v1::nTrackParticles
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
Definition: Vertex_v1.cxx:270
xAOD::BPhysHelper
Definition: BPhysHelper.h:71
test_pyathena.px
px
Definition: test_pyathena.py:18
xAOD::VertexAuxContainer_v1
Temporary container used until we have I/O for AuxStoreInternal.
Definition: VertexAuxContainer_v1.h:32
max
#define max(a, b)
Definition: cfImp.cxx:41
xAOD::BPhysHelper::pv_type_str
static const std::string pv_type_str[]
Definition: BPhysHelper.h:605
DerivationFramework::BPhysVertexTrackBase::m_pvtxContainer
const xAOD::VertexContainer * m_pvtxContainer
Definition: BPhysVertexTrackBase.h:273
DerivationFramework::BPhysVertexTrackBase::CAPVRFNNU4
@ CAPVRFNNU4
Definition: BPhysVertexTrackBase.h:119
DerivationFramework::BPhysVertexTrackBase::m_pvAssocTypes
std::vector< xAOD::BPhysHelper::pv_type > m_pvAssocTypes
Definition: BPhysVertexTrackBase.h:280
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
xAOD::BPhysHelper::nRefTrks
int nRefTrks()
Returns number of stored refitted track momenta.
Definition: BPhysHelper.cxx:115
vtune_athena.format
format
Definition: vtune_athena.py:14
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
DerivationFramework::BPhysVertexTrackBase::m_pvContainerName
std::string m_pvContainerName
Definition: BPhysVertexTrackBase.h:256
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
DerivationFramework::BPhysVertexTrackBase::NULLVP
@ NULLVP
Definition: BPhysVertexTrackBase.h:115
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CP::TrackVertexAssociationTool
General track-vertex association tool.
Definition: InnerDetector/InDetRecTools/TrackVertexAssociationTool/TrackVertexAssociationTool/TrackVertexAssociationTool.h:53
xAOD::Vertex_v1::trackParticleLinks
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
InDetAccessor::phi0
@ phi0
Definition: InDetAccessor.h:33
CutsMETMaker::accept
StatusCode accept(const xAOD::Muon *mu)
Definition: CutsMETMaker.cxx:18
DerivationFramework::BPhysVertexTrackBase::m_pvAssocResMap
StringIntMap_t m_pvAssocResMap
Definition: BPhysVertexTrackBase.h:289
DerivationFramework::BPhysVertexTrackBase::CAPVRFN3U2
@ CAPVRFN3U2
Definition: BPhysVertexTrackBase.h:118
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:75
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
DerivationFramework::BPhysVertexTrackBase::findAllMuonsInDecay
MuonBag findAllMuonsInDecay(xAOD::BPhysHelper &vtx) const
Definition: BPhysVertexTrackBase.cxx:1093
xAOD::TrackParticleAuxContainer
TrackParticleAuxContainer_v5 TrackParticleAuxContainer
Definition of the current TrackParticle auxiliary container.
Definition: TrackParticleAuxContainer.h:19
xAOD::TrackingHelpers::d0significance
double d0significance(const xAOD::TrackParticle *tp, double d0_uncert_beam_spot_2)
Definition: TrackParticlexAODHelpers.cxx:42
DerivationFramework::BPhysVertexTrackBase::m_nEvtsSeen
unsigned int m_nEvtsSeen
Definition: BPhysVertexTrackBase.h:282
test_pyathena.pt
pt
Definition: test_pyathena.py:11
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
ParticleTest.tp
tp
Definition: ParticleTest.py:25
xAOD::BPhysHelper::muon
const xAOD::Muon * muon(const size_t index)
Returns pointer to the i-th linked muon.
Definition: BPhysHelper.cxx:452
DerivationFramework::BPhysVertexTrackBase::finalizeHook
virtual StatusCode finalizeHook()
Definition: BPhysVertexTrackBase.cxx:567
DerivationFramework::BPhysVertexTrackBase::m_runNumber
unsigned int m_runNumber
Definition: BPhysVertexTrackBase.h:298
DerivationFramework::BPhysVertexTrackBase::detTrackTypes
uint64_t detTrackTypes(const xAOD::TrackParticle *track, const xAOD::Vertex *candPV, const xAOD::Vertex *candRefPV) const
Definition: BPhysVertexTrackBase.cxx:1001
Trk::z0
@ z0
Definition: ParamDefs.h:64
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
xAOD::EventInfo_v1::beamPosSigmaX
float beamPosSigmaX() const
The width of the beam spot in the X direction.
DerivationFramework::BPhysVertexTrackBase::m_evtNumber
uint64_t m_evtNumber
Definition: BPhysVertexTrackBase.h:299
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
DerivationFramework::BPhysVertexTrackBase::CAPVRF3DU1
@ CAPVRF3DU1
Definition: BPhysVertexTrackBase.h:117
DerivationFramework::BPhysVertexTrackBase::m_useTrackTypes
std::vector< uint64_t > m_useTrackTypes
Definition: BPhysVertexTrackBase.h:260
xAOD::Vertex_v1::position
const Amg::Vector3D & position() const
Returns the 3-pos.
DerivationFramework::BPhysVertexTrackBase::PVTYPE1
@ PVTYPE1
Definition: BPhysVertexTrackBase.h:114
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
DerivationFramework::BPhysVertexTrackBase::findMinChi2PV
std::pair< const xAOD::Vertex *, double > findMinChi2PV(const xAOD::TrackParticle *track, const xAOD::Vertex *candPV, const xAOD::Vertex *candRefPV, const std::vector< uint64_t > &pvtypes, const int minNTracksInPV, const bool useRefittedPvs, const bool doDCAin3D, const int chi2DefToUse) const
Definition: BPhysVertexTrackBase.cxx:1359
x
#define x
DerivationFramework::BPhysVertexTrackBase::m_trackTypesUsed
uint64_t m_trackTypesUsed
Definition: BPhysVertexTrackBase.h:292
DerivationFramework::BPhysVertexTrackBase::ASSOCPV
@ ASSOCPV
Definition: BPhysVertexTrackBase.h:114
DerivationFramework::MuonBag
std::vector< const xAOD::Muon * > MuonBag
Definition: BPhysAddMuonBasedInvMass.h:33
DerivationFramework::BPhysVertexTrackBase::CAPVNRNNU7
@ CAPVNRNNU7
Definition: BPhysVertexTrackBase.h:121
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
AmgMatrix
#define AmgMatrix(rows, cols)
Definition: EventPrimitives.h:49
DerivationFramework::BPhysVertexTrackBase::CAPVRFNNU9
@ CAPVRFNNU9
Definition: BPhysVertexTrackBase.h:122
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
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::BPhysVertexTrackBase::CAPVNR3DU0
@ CAPVNR3DU0
Definition: BPhysVertexTrackBase.h:116
DerivationFramework::BPhysVertexTrackBase::ttall
static uint64_t ttall()
Definition: BPhysVertexTrackBase.cxx:318
DerivationFramework::AmgSymMatrix
AmgSymMatrix(3) BPhysAddMuonBasedInvMass
Definition: BPhysAddMuonBasedInvMass.cxx:601
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
DerivationFramework::BPhysVertexTrackBase::m_branchPrefixes
std::vector< std::string > m_branchPrefixes
Definition: BPhysVertexTrackBase.h:245
DerivationFramework::BPhysVertexTrackBase::calcValuesHook
virtual StatusCode calcValuesHook(const xAOD::Vertex *vtx, const unsigned int ipv, const unsigned int its, const unsigned int itt) const
Definition: BPhysVertexTrackBase.cxx:607
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
DerivationFramework::BPhysVertexTrackBase::CAPVNRN3U2
@ CAPVNRN3U2
Definition: BPhysVertexTrackBase.h:118
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
DerivationFramework::BPhysVertexTrackBase::CAPVNRNNU4
@ CAPVNRNNU4
Definition: BPhysVertexTrackBase.h:119
AthCommonDataStore
Definition: AthCommonDataStore.h:52
DerivationFramework::BPhysVertexTrackBase::PVTYPE2
@ PVTYPE2
Definition: BPhysVertexTrackBase.h:114
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
CaloCondBlobAlgs_fillNoiseFromASCII.lines
lines
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:104
DerivationFramework::BPhysVertexTrackBase::m_mttc
std::unique_ptr< TrackTypeCounter > m_mttc
Definition: BPhysVertexTrackBase.h:295
DerivationFramework::BPhysVertexTrackBase::m_pvTypesToConsider
std::vector< uint64_t > m_pvTypesToConsider
Definition: BPhysVertexTrackBase.h:263
DerivationFramework::BPhysVertexTrackBase::addBranchesVCSetupHook
virtual StatusCode addBranchesVCSetupHook(size_t ivc) const
Definition: BPhysVertexTrackBase.cxx:582
DerivationFramework::BPhysVertexTrackBase::m_tracks
const xAOD::TrackParticleContainer * m_tracks
Definition: BPhysVertexTrackBase.h:271
DerivationFramework::BPhysVertexTrackBase::m_branchSuffix
std::string m_branchSuffix
Definition: BPhysVertexTrackBase.h:247
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
beamspotman.n
n
Definition: beamspotman.py:731
DerivationFramework::BPhysVertexTrackBase::CAPVNRN3U0
@ CAPVNRN3U0
Definition: BPhysVertexTrackBase.h:116
DerivationFramework::BPhysVertexTrackBase::m_tvaTool
ToolHandle< CP::ITrackVertexAssociationTool > m_tvaTool
Definition: BPhysVertexTrackBase.h:254
DerivationFramework::BPhysVertexTrackBase::buildPvAssocCacheName
virtual std::string buildPvAssocCacheName(const xAOD::Vertex *vtx, const int ipv) const
Definition: BPhysVertexTrackBase.cxx:672
xAOD::BPhysHelper::precedingVertex
const xAOD::Vertex * precedingVertex(const size_t index)
Returns pointer to a preceding vertex.
Definition: BPhysHelper.cxx:613
MuonR4::inverse
CalibratedSpacePoint::Covariance_t inverse(const CalibratedSpacePoint::Covariance_t &mat)
Inverts the parsed matrix.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/UtilFunctions.cxx:65
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
DerivationFramework::BPhysVertexTrackBase::m_branchBaseName
std::string m_branchBaseName
Definition: BPhysVertexTrackBase.h:246
contains
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition: hcg.cxx:111
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
TestMuonSF::getProperty
T getProperty(const asg::IAsgTool *interface_tool, const std::string &prop_name)
Definition: MuonSFTestHelper.cxx:17
DerivationFramework::BPhysVertexTrackBase::m_tracksAux
const xAOD::TrackParticleAuxContainer * m_tracksAux
Definition: BPhysVertexTrackBase.h:272
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
DerivationFramework::BPhysVertexTrackBase::CAPVRFN3U0
@ CAPVRFN3U0
Definition: BPhysVertexTrackBase.h:116
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
DerivationFramework::BPhysVertexTrackBase::findAllTracksInDecay
TrackBag findAllTracksInDecay(xAOD::BPhysHelper &vtx) const
Definition: BPhysVertexTrackBase.cxx:1057
DerivationFramework::BPhysVertexTrackBase::CAPVNR3DU2
@ CAPVNR3DU2
Definition: BPhysVertexTrackBase.h:118
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
DerivationFramework::BPhysVertexTrackBase::findMuonRefTrackMomenta
std::vector< TVector3 > findMuonRefTrackMomenta(xAOD::BPhysHelper &vtx, MuonBag &muons) const
Definition: BPhysVertexTrackBase.cxx:1152
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
xAOD::Vertex_v1::trackParticle
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
Definition: Vertex_v1.cxx:249
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
DerivationFramework::TrackBag
std::vector< const xAOD::TrackParticle * > TrackBag
Definition: BPhysAddMuonBasedInvMass.h:32
xAOD::Vertex_v1::z
float z() const
Returns the z position.
xAOD::BPhysHelper::origPv
const xAOD::Vertex * origPv(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
original PV
Definition: BPhysHelper.cxx:807
DerivationFramework::BPhysVertexTrackBase::CAPVRFN3U1
@ CAPVRFN3U1
Definition: BPhysVertexTrackBase.h:117
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
DerivationFramework::BPhysVertexTrackBase::fastFillHook
virtual bool fastFillHook(const xAOD::Vertex *vtx, const int ipv) const
Definition: BPhysVertexTrackBase.cxx:622
DerivationFramework::BPhysVertexTrackBase::addBranchesSVLoopHook
virtual StatusCode addBranchesSVLoopHook(const xAOD::Vertex *vtx) const
Definition: BPhysVertexTrackBase.cxx:595
xAOD::BPhysHelper::refTrkOrigin
const xAOD::IParticle * refTrkOrigin(const size_t index) const
: Returns the original track (charged or neutral) corresponding to the i-th refitted track
Definition: BPhysHelper.cxx:171
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
xAOD::EventInfo_v1::beamPosSigmaY
float beamPosSigmaY() const
The width of the beam spot in the Y direction.
DerivationFramework::BPhysVertexTrackBase::CAPVNRNNU3
@ CAPVNRNNU3
Definition: BPhysVertexTrackBase.h:119
DerivationFramework::BPhysVertexTrackBase::CAPVRFNNU5
@ CAPVRFNNU5
Definition: BPhysVertexTrackBase.h:120
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg::py
@ py
Definition: GeoPrimitives.h:39
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
DerivationFramework::BPhysVertexTrackBase::CAPVRFNNU3
@ CAPVRFNNU3
Definition: BPhysVertexTrackBase.h:119
Trk::d0
@ d0
Definition: ParamDefs.h:63
DerivationFramework::BPhysVertexTrackBase::getTrackLogChi2DCA
std::vector< double > getTrackLogChi2DCA(const xAOD::TrackParticle *track, const xAOD::Vertex *vtx, bool doDCAin3D=false, int chi2DefToUse=0) const
Definition: BPhysVertexTrackBase.cxx:722
xAOD::BPhysHelper::vtx
const xAOD::Vertex * vtx() const
Getter method for the cached xAOD::Vertex.
Definition: BPhysHelper.h:108
DerivationFramework::BPhysVertexTrackBase::m_debugTracksInEvents
std::vector< uint64_t > m_debugTracksInEvents
Definition: BPhysVertexTrackBase.h:265
Amg::error
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Definition: EventPrimitivesHelpers.h:40
DerivationFramework::BPhysVertexTrackBase::m_trackParticleContainerName
std::string m_trackParticleContainerName
Definition: BPhysVertexTrackBase.h:249
DerivationFramework::BPhysVertexTrackBase::CAPVNRNNU8
@ CAPVNRNNU8
Definition: BPhysVertexTrackBase.h:121
DerivationFramework::BPhysVertexTrackBase::track_type_bit
static const uint64_t track_type_bit[]
Definition: BPhysVertexTrackBase.h:125
DerivationFramework::BPhysVertexTrackBase::m_tvaToolHasWpLoose
bool m_tvaToolHasWpLoose
Definition: BPhysVertexTrackBase.h:268
DerivationFramework::BPhysVertexTrackBase::m_trackSelectionTools
ToolHandleArray< TrkSelTool > m_trackSelectionTools
Definition: BPhysVertexTrackBase.h:250
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
DerivationFramework::BPhysVertexTrackBase::CAPVRF3DU0
@ CAPVRF3DU0
Definition: BPhysVertexTrackBase.h:116
DerivationFramework::BPhysVertexTrackBase::m_refPVContainerNames
std::vector< std::string > m_refPVContainerNames
Definition: BPhysVertexTrackBase.h:257
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
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
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
DerivationFramework::BPhysVertexTrackBase::NONE
@ NONE
Definition: BPhysVertexTrackBase.h:114
DerivationFramework::BPhysVertexTrackBase::m_incPrecVerticesInDecay
bool m_incPrecVerticesInDecay
Definition: BPhysVertexTrackBase.h:261
DerivationFramework::BPhysVertexTrackBase::findAllMuonIdTracksInDecay
TrackBag findAllMuonIdTracksInDecay(xAOD::BPhysHelper &vtx, MuonBag &muons) const
Definition: BPhysVertexTrackBase.cxx:1131
DerivationFramework::BPhysVertexTrackBase::findAssocPV
const xAOD::Vertex * findAssocPV(const xAOD::TrackParticle *track, const xAOD::Vertex *candPV, const xAOD::Vertex *candRefPV, const std::vector< uint64_t > &pvtypes, const int minNTracksInPV, const bool useRefittedPvs) const
Definition: BPhysVertexTrackBase.cxx:1411
Prompt::Def::Pt
@ Pt
Definition: VarHolder.h:76
xAOD::EventInfo_v1::beamPosSigmaXY
float beamPosSigmaXY() const
The beam spot shape's X-Y correlation.
a
TList * a
Definition: liststreamerinfos.cxx:10
DerivationFramework::BPhysVertexTrackBase::ttallMin
static uint64_t ttallMin()
Definition: BPhysVertexTrackBase.cxx:313
y
#define y
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
xAOD::BPhysHelper::refTrk
TVector3 refTrk(const size_t index)
Returns i-th refitted track 3-momentum.
Definition: BPhysHelper.cxx:126
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
DerivationFramework::BPhysVertexTrackBase::CAPVNRNNU5
@ CAPVNRNNU5
Definition: BPhysVertexTrackBase.h:120
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DerivationFramework::BPhysVertexTrackBase::PVTYPE0
@ PVTYPE0
Definition: BPhysVertexTrackBase.h:114
DerivationFramework::BPhysVertexTrackBase::m_vertexContainerNames
std::vector< std::string > m_vertexContainerNames
Definition: BPhysVertexTrackBase.h:248
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
unit
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
Definition: AmgMatrixBasePlugin.h:21
DEBUG
#define DEBUG
Definition: page_access.h:11
xAOD::BPhysHelper::nPrecedingVertices
int nPrecedingVertices()
: Links to preceding vertices
Definition: BPhysHelper.cxx:601
DerivationFramework::BPhysVertexTrackBase::m_debugTrackTypes
int m_debugTrackTypes
Definition: BPhysVertexTrackBase.h:264
xAOD::Vertex_v1::y
float y() const
Returns the y position.
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
DerivationFramework::BPhysVertexTrackBase::m_doVertexType
int m_doVertexType
Definition: BPhysVertexTrackBase.h:259
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
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
xAOD::BPhysHelper::refTrks
const std::vector< TVector3 > & refTrks()
Returns refitted track momenta.
Definition: BPhysHelper.cxx:142
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
DerivationFramework::BPhysVertexTrackBase::m_debugTracksInThisEvent
bool m_debugTracksInThisEvent
Definition: BPhysVertexTrackBase.h:302
DerivationFramework::BPhysVertexTrackBase::initPvAssocTypeVec
virtual void initPvAssocTypeVec()
Definition: BPhysVertexTrackBase.cxx:1340
Gaudi
=============================================================================
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:273
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
xAOD::BPhysHelper::n_pv_types
static const unsigned int n_pv_types
Definition: BPhysHelper.h:613
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
DerivationFramework::BPhysVertexTrackBase::CAPVNRNNU6
@ CAPVNRNNU6
Definition: BPhysVertexTrackBase.h:120
xAOD::BPhysHelper::muons
const std::vector< const xAOD::Muon * > & muons()
Returns linked muons.
Definition: BPhysHelper.cxx:468
DerivationFramework::BPhysVertexTrackBase::s_track_type_all_cached
static uint64_t s_track_type_all_cached
Definition: BPhysVertexTrackBase.h:127
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
DerivationFramework::BPhysVertexTrackBase::initializeHook
virtual StatusCode initializeHook()
Definition: BPhysVertexTrackBase.cxx:560
DerivationFramework::BPhysVertexTrackBase::CAPVNR3DU1
@ CAPVNR3DU1
Definition: BPhysVertexTrackBase.h:117
DerivationFramework::BPhysVertexTrackBase::m_minNTracksInPV
int m_minNTracksInPV
Definition: BPhysVertexTrackBase.h:262
DerivationFramework::BPhysVertexTrackBase::PVTYPE3
@ PVTYPE3
Definition: BPhysVertexTrackBase.h:114
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
DerivationFramework::BPhysVertexTrackBase::n_track_types
static const int n_track_types
Definition: BPhysVertexTrackBase.h:123
DerivationFramework::BPhysVertexTrackBase::rttor
static uint64_t rttor(const std::vector< uint64_t > &vtypes)
Definition: BPhysVertexTrackBase.cxx:327
DerivationFramework::BPhysVertexTrackBase::CAPVNRN3U1
@ CAPVNRN3U1
Definition: BPhysVertexTrackBase.h:117
DerivationFramework::BPhysVertexTrackBase::m_eventInfo
const xAOD::EventInfo * m_eventInfo
Definition: BPhysVertexTrackBase.h:285
Trk::phi0
@ phi0
Definition: ParamDefs.h:65
DerivationFramework::BPhysVertexTrackBase::CAPVRFNNU8
@ CAPVRFNNU8
Definition: BPhysVertexTrackBase.h:121
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
DerivationFramework::BPhysVertexTrackBase::CAPVRF3DU2
@ CAPVRF3DU2
Definition: BPhysVertexTrackBase.h:118
DerivationFramework::BPhysVertexTrackBase::m_trackToVertexTool
ToolHandle< Reco::ITrackToVertex > m_trackToVertexTool
Definition: BPhysVertexTrackBase.h:252