ATLAS Offline Software
TrackPairsSelector.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INDETCONVERSIONFINDERTOOLS_TRACKPAIRSSELECTOR_H
6 #define INDETCONVERSIONFINDERTOOLS_TRACKPAIRSSELECTOR_H
7 
9 #include "GaudiKernel/ToolHandle.h"
11 #include "Particle/TrackParticle.h"
14 
15 namespace Trk {
16 class Track;
17 }
18 
19 namespace InDet {
27 {
28 
29 public:
30  struct Cache
31  {
33  float m_distance = 9999.;
35  float m_deltaCotTheta = 9999.;
37  float m_deltaInit = 9999.;
38  };
39 
40  TrackPairsSelector(const std::string& type,
41  const std::string& name,
42  const IInterface* parent);
43 
45 
46  static const InterfaceID& interfaceID();
47 
48  virtual StatusCode initialize() override;
49  virtual StatusCode finalize() override;
50 
53  bool selectTrackParticlePair(const xAOD::TrackParticle* trkPpos,
54  const xAOD::TrackParticle* trkPneg,
55  Cache& cache) const;
56 
57  bool selectTrackPair(const Trk::Track* trkpos,
58  const Trk::Track* trkneg) const;
59 
62  static std::map<std::string, float> getLastValues(const Cache& cache) ;
63 
64 private:
66  ToolHandle<InDet::ConversionFinderUtils> m_helpertool{
67  this,
68  "ConversionFinderHelperTool",
69  "InDet::ConversionFinderUtils",
70  "Conversion helper tool"
71  };
73  ToolHandle<Trk::ITrkDistanceFinder> m_distanceTool{
74  this,
75  "DistanceTool",
76  "Trk::SeedNewtonTrkDistanceFinder",
77  "Distance of minimum approach tool"
78  };
82  double m_maxR;
85  double m_MinTrkAngle;
87  std::vector<double> m_maxDist;
89  std::vector<double> m_etaCut;
91  std::vector<double> m_initCut;
92 };
93 }
94 #endif // INDETCONVERSIONFINDERTOOLS_TRACKPAIRSSELECTOR_H
95 
InDet::TrackPairsSelector::selectTrackParticlePair
bool selectTrackParticlePair(const xAOD::TrackParticle *trkPpos, const xAOD::TrackParticle *trkPneg, Cache &cache) const
Track pair selectors.Return true if the argument track fulfills the selection.
Definition: TrackPairsSelector.cxx:103
TrackParticle.h
ITrkDistanceFinder.h
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
InDet::TrackPairsSelector::Cache::m_deltaInit
float m_deltaInit
Distance difference between initial hits of tracks.
Definition: TrackPairsSelector.h:37
InDet::TrackPairsSelector::m_initCut
std::vector< double > m_initCut
Maximum distance difference between initial hits of tracks in pair.
Definition: TrackPairsSelector.h:91
InDet::TrackPairsSelector
Definition: TrackPairsSelector.h:27
InDet::TrackPairsSelector::selectTrackPair
bool selectTrackPair(const Trk::Track *trkpos, const Trk::Track *trkneg) const
Definition: TrackPairsSelector.cxx:233
InDet
DUMMY Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
ConversionFinderUtils.h
InDet::TrackPairsSelector::Cache::m_distance
float m_distance
Distance of closest approach between the tracks.
Definition: TrackPairsSelector.h:33
InDet::TrackPairsSelector::Cache::m_deltaCotTheta
float m_deltaCotTheta
Delta cot theta between the tracks.
Definition: TrackPairsSelector.h:35
InDet::TrackPairsSelector::getLastValues
static std::map< std::string, float > getLastValues(const Cache &cache)
Return a map with the values calculated for the last pair to decorate the vertex once it is created.
Definition: TrackPairsSelector.cxx:313
InDet::TrackPairsSelector::m_MinTrkAngle
double m_MinTrkAngle
Minimum allowed angle between decay tracks.
Definition: TrackPairsSelector.h:85
InDet::TrackPairsSelector::m_maxDist
std::vector< double > m_maxDist
Maximum allowed distance of minimum approach.
Definition: TrackPairsSelector.h:87
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
InDet::TrackPairsSelector::m_etaCut
std::vector< double > m_etaCut
Maximum eta difference between tracks in pair.
Definition: TrackPairsSelector.h:89
InDet::TrackPairsSelector::initialize
virtual StatusCode initialize() override
Definition: TrackPairsSelector.cxx:76
InDet::TrackPairsSelector::m_maxR
double m_maxR
Properties for track selection: all cuts are ANDed.
Definition: TrackPairsSelector.h:82
InDet::TrackPairsSelector::TrackPairsSelector
TrackPairsSelector(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TrackPairsSelector.cxx:40
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
InDet::TrackPairsSelector::finalize
virtual StatusCode finalize() override
Definition: TrackPairsSelector.cxx:97
InDet::TrackPairsSelector::m_helpertool
ToolHandle< InDet::ConversionFinderUtils > m_helpertool
Conversion helper tool.
Definition: TrackPairsSelector.h:66
InDet::TrackPairsSelector::Cache
Definition: TrackPairsSelector.h:31
InDet::TrackPairsSelector::interfaceID
static const InterfaceID & interfaceID()
Definition: TrackPairsSelector.cxx:71
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TrackParticleFwd.h
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
InDet::TrackPairsSelector::~TrackPairsSelector
virtual ~TrackPairsSelector()
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
AthAlgTool
Definition: AthAlgTool.h:26
InDet::TrackPairsSelector::m_distanceTool
ToolHandle< Trk::ITrkDistanceFinder > m_distanceTool
Distance of minimum approach tool
Definition: TrackPairsSelector.h:73