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 371 of file BPhysVertexTrackBase.cxx.

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

Member Function Documentation

◆ addBranches()

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

Pass the thinning service

Implements DerivationFramework::IAugmentationTool.

Definition at line 481 of file BPhysVertexTrackBase.cxx.

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

◆ addBranchesHook()

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

Definition at line 578 of file BPhysVertexTrackBase.cxx.

578  {
579 
580  return StatusCode::SUCCESS;
581  }

◆ addBranchesSVLoopHook()

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

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

Definition at line 599 of file BPhysVertexTrackBase.cxx.

599  {
600 
601  // just to avoid a compiler warning
602  ATH_MSG_DEBUG("addBranchesSVLoopHook: Vertex " << vtx);
603 
604  return StatusCode::SUCCESS;
605  }

◆ addBranchesVCSetupHook()

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

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

Definition at line 586 of file BPhysVertexTrackBase.cxx.

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

◆ buildBranchBaseName()

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

Definition at line 1316 of file BPhysVertexTrackBase.cxx.

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

◆ buildPvAssocCacheName()

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

Definition at line 676 of file BPhysVertexTrackBase.cxx.

677  {
678  xAOD::BPhysHelper cand(vtx);
679  boost::format f("SV_%p_RPV_%p");
680  f % cand.vtx() % cand.pv(m_pvAssocTypes[ipv]);
681 
682  return f.str();
683  }

◆ calculateValues()

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

Definition at line 642 of file BPhysVertexTrackBase.cxx.

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

◆ 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 611 of file BPhysVertexTrackBase.cxx.

614  {
615 
616  // just to avoid a compiler warning
617  ATH_MSG_DEBUG("calcIsolationOpti: vtx: " << vtx << ", ipv: " << ipv
618  << ", its: " << its << ", itt: " << itt);
619 
620  return StatusCode::SUCCESS;
621  }

◆ 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 1006 of file BPhysVertexTrackBase.cxx.

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

◆ 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 626 of file BPhysVertexTrackBase.cxx.

627  {
628 
629  // just to avoid a compiler warning
630  ATH_MSG_DEBUG("fastIsoFill: vtx: " << vtx << ", ipv: " << ipv);
631 
632  return false;
633  }

◆ finalize()

StatusCode DerivationFramework::BPhysVertexTrackBase::finalize ( )
overridevirtual

Definition at line 468 of file BPhysVertexTrackBase.cxx.

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

◆ finalizeHook()

StatusCode DerivationFramework::BPhysVertexTrackBase::finalizeHook ( )
protectedvirtual

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

Definition at line 571 of file BPhysVertexTrackBase.cxx.

571  {
572 
573  return StatusCode::SUCCESS;
574  }

◆ findAllMuonIdTracksInDecay()

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

Definition at line 1136 of file BPhysVertexTrackBase.cxx.

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

◆ findAllMuonsInDecay() [1/2]

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

Definition at line 1098 of file BPhysVertexTrackBase.cxx.

1099  {
1100 
1101  MuonBag muons;
1102  findAllMuonsInDecay(vtx, muons);
1103 
1104  return muons;
1105  }

◆ findAllMuonsInDecay() [2/2]

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

Definition at line 1112 of file BPhysVertexTrackBase.cxx.

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

◆ findAllTracksInDecay() [1/2]

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

Definition at line 1062 of file BPhysVertexTrackBase.cxx.

1063  {
1064 
1065  TrackBag tracks;
1066  findAllTracksInDecay(vtx, tracks);
1067 
1068  return tracks;
1069  }

◆ findAllTracksInDecay() [2/2]

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

Definition at line 1076 of file BPhysVertexTrackBase.cxx.

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

◆ 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 1417 of file BPhysVertexTrackBase.cxx.

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

◆ 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 1365 of file BPhysVertexTrackBase.cxx.

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

◆ findMuonRefTrackMomenta()

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

Definition at line 1157 of file BPhysVertexTrackBase.cxx.

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

◆ getTrackCandPVLogChi2()

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

Definition at line 689 of file BPhysVertexTrackBase.cxx.

694  {
695 
696  return getTrackLogChi2DCA(track, vtx, doDCAin3D, chi2DefToUse)[4];
697  }

◆ 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 727 of file BPhysVertexTrackBase.cxx.

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

◆ initialize()

StatusCode DerivationFramework::BPhysVertexTrackBase::initialize ( )
overridevirtual

Definition at line 406 of file BPhysVertexTrackBase.cxx.

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

◆ initializeHook()

StatusCode DerivationFramework::BPhysVertexTrackBase::initializeHook ( )
protectedvirtual

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

Definition at line 564 of file BPhysVertexTrackBase.cxx.

564  {
565 
566  return StatusCode::SUCCESS;
567  }

◆ initPvAssocTypeVec()

void DerivationFramework::BPhysVertexTrackBase::initPvAssocTypeVec ( )
protectedvirtual

Definition at line 1346 of file BPhysVertexTrackBase.cxx.

1346  {
1347 
1348  m_pvAssocTypes.clear();
1349  for (unsigned int i=0; i<xAOD::BPhysHelper::n_pv_types; ++i) {
1350  if ( (m_doVertexType & (1 << i)) > 0 )
1352  }
1353  }

◆ 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 330 of file BPhysVertexTrackBase.cxx.

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

◆ 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 1246 of file BPhysVertexTrackBase.cxx.

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

◆ 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 1230 of file BPhysVertexTrackBase.cxx.

1236  {
1237 
1238  return selectTracks(inpTracks, findAllTracksInDecay(cand), cand,
1239  ipv, its, itt);
1240  }

◆ 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 341 of file BPhysVertexTrackBase.cxx.

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

◆ ttall()

uint64_t DerivationFramework::BPhysVertexTrackBase::ttall ( )
static

Definition at line 321 of file BPhysVertexTrackBase.cxx.

321  {
322  if ( s_track_type_all_cached == 0x0 ) {
323  for (unsigned int i=0; i<n_track_types; ++i) {
325  }
326  }
328  }

◆ ttallMin()

uint64_t DerivationFramework::BPhysVertexTrackBase::ttallMin ( )
static

Definition at line 316 of file BPhysVertexTrackBase.cxx.

316  {
317  // only bits 0 - 6
318  return 127;
319  }

◆ ttb()

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

Definition at line 312 of file BPhysVertexTrackBase.cxx.

312  {
313  return track_type_bit[type];
314  }

◆ tts()

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

Definition at line 308 of file BPhysVertexTrackBase.cxx.

308  {
309  return track_type_str[type];
310  }

◆ 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 357 of file BPhysVertexTrackBase.cxx.

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

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
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
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:578
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
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
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:64
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:71
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
DerivationFramework::BPhysVertexTrackBase::findAllMuonsInDecay
MuonBag findAllMuonsInDecay(xAOD::BPhysHelper &vtx) const
Definition: BPhysVertexTrackBase.cxx:1098
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:571
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:1006
Trk::z0
@ z0
Definition: ParamDefs.h:70
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:562
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:1365
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:51
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:1316
DerivationFramework::BPhysVertexTrackBase::CAPVNR3DU0
@ CAPVNR3DU0
Definition: BPhysVertexTrackBase.h:116
DerivationFramework::BPhysVertexTrackBase::ttall
static uint64_t ttall()
Definition: BPhysVertexTrackBase.cxx:321
DerivationFramework::AmgSymMatrix
AmgSymMatrix(3) BPhysAddMuonBasedInvMass
Definition: BPhysAddMuonBasedInvMass.cxx:601
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
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:611
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
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:586
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:92
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:676
xAOD::BPhysHelper::precedingVertex
const xAOD::Vertex * precedingVertex(const size_t index)
Returns pointer to a preceding vertex.
Definition: BPhysHelper.cxx:613
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:1062
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:1157
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
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:626
DerivationFramework::BPhysVertexTrackBase::addBranchesSVLoopHook
virtual StatusCode addBranchesSVLoopHook(const xAOD::Vertex *vtx) const
Definition: BPhysVertexTrackBase.cxx:599
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
Py
Definition: PyDataStore.h:24
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
DerivationFramework::BPhysVertexTrackBase::CAPVRFNNU3
@ CAPVRFNNU3
Definition: BPhysVertexTrackBase.h:119
Trk::d0
@ d0
Definition: ParamDefs.h:69
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:727
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:1230
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:1136
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:1417
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:316
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:20
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:569
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:616
DerivationFramework::BPhysVertexTrackBase::m_debugTracksInThisEvent
bool m_debugTracksInThisEvent
Definition: BPhysVertexTrackBase.h:302
DerivationFramework::BPhysVertexTrackBase::initPvAssocTypeVec
virtual void initPvAssocTypeVec()
Definition: BPhysVertexTrackBase.cxx:1346
Gaudi
=============================================================================
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:273
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
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:564
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:330
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:71
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