ATLAS Offline Software
TrackPairsSelector.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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 
44  virtual ~TrackPairsSelector() = default;
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  };
81  DoubleProperty m_maxR
82  {this, "MaxFirstHitRadius", 500.,
83  "Maximum initial hit radius in order to apply the impact point cut"};
84  DoubleProperty m_MinTrkAngle
85  {this, "MinTrackAngle", 0.,
86  "Minimum allowed angle between decay tracks. Used only in V0 reconstruction."};
87  DoubleArrayProperty m_maxDist
88  {this, "MaxDistBetweenTracks", {8., 80., 45.},
89  "Maximum allowed distance of minimum approach"};
90  DoubleArrayProperty m_etaCut
91  {this, "MaxEta", {0.8, 1.2, 1.2},
92  "Maximum eta difference between tracks in pair"};
93  DoubleArrayProperty m_initCut
94  {this, "MaxInitDistance", {10000., 10000., 10000.},
95  "Maximum distance difference between initial hits of tracks in pair"};
96 };
97 }
98 #endif // INDETCONVERSIONFINDERTOOLS_TRACKPAIRSSELECTOR_H
99 
InDet::TrackPairsSelector::m_initCut
DoubleArrayProperty m_initCut
Definition: TrackPairsSelector.h:94
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:81
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
Definition: TrackPairsSelector.h:27
InDet::TrackPairsSelector::selectTrackPair
bool selectTrackPair(const Trk::Track *trkpos, const Trk::Track *trkneg) const
Definition: TrackPairsSelector.cxx:211
InDet
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::m_maxR
DoubleProperty m_maxR
Properties for track selection: all cuts are ANDed.
Definition: TrackPairsSelector.h:82
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:291
InDet::TrackPairsSelector::m_etaCut
DoubleArrayProperty m_etaCut
Definition: TrackPairsSelector.h:91
InDet::TrackPairsSelector::m_MinTrkAngle
DoubleProperty m_MinTrkAngle
Definition: TrackPairsSelector.h:85
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::initialize
virtual StatusCode initialize() override
Definition: TrackPairsSelector.cxx:54
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:228
InDet::TrackPairsSelector::~TrackPairsSelector
virtual ~TrackPairsSelector()=default
InDet::TrackPairsSelector::finalize
virtual StatusCode finalize() override
Definition: TrackPairsSelector.cxx:75
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:49
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TrackParticleFwd.h
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
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
InDet::TrackPairsSelector::m_maxDist
DoubleArrayProperty m_maxDist
Definition: TrackPairsSelector.h:88