ATLAS Offline Software
Loading...
Searching...
No Matches
ConstrainedTrackProvider.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRKALIGNGENTOOLS_CONSTRAINEDTRACKPROVIDER_H
6#define TRKALIGNGENTOOLS_CONSTRAINEDTRACKPROVIDER_H
7
9#include "GaudiKernel/ToolHandle.h"
12
17
18
19class TFile;
20class TH2F;
31namespace Trk {
33
34 public:
35 ConstrainedTrackProvider(const std::string & type, const std::string & name, const IInterface * parent);
36
37 virtual StatusCode initialize();
38 virtual StatusCode finalize();
39
40 virtual StatusCode trackCollection(const TrackCollection*& tracks);
41
42 virtual void printSummary();
43
44 private :
45
46 void getCorrectedValues_P(const Trk::Perigee* mp, double& correctedQoverP,double& correctedQoverPError);
47 void getCorrectedValues_d0(const Trk::Perigee* mp, double& corrected_d0,double& corrected_d0Error);
48 void getCorrectedValues_z0(const Trk::Perigee* mp, double& corrected_z0,double& corrected_z0Error);
49 bool passTrackSelection(const Trk::Track *track);
50
51 ToolHandle<IGlobalTrackFitter> m_trackFitter{this, "TrackFitter",
52 "Trk::GlobalChi2Fitter/InDetTrackFitter", "normal track fitter"};
53
54 Gaudi::Property<Trk::RunOutlierRemoval> m_runOutlierRemoval{
55 this, "RunOutlierRemoval", true, "run outlier removal in the GX2 fitter"};
56 BooleanProperty m_scalepmaptogev{this, "ScalePMapToGeV", false};
57 BooleanProperty m_doTrackSelection{this, "doTrackSelection", true};
58 BooleanProperty m_useConstrainedTrkOnly{this, "UseConstrainedTrkOnly", false};
59 BooleanProperty m_useConstraintError{this, "UseConstraintError", true};
60
63
65 this, "ReduceConstraintUncertainty", 1.,
66 "Reduce the uncertainty on the track parmater constraint by this amount"};
67 DoubleProperty m_reduceConstraintUncert_z0{this, "ReduceConstraintUncert_z0", 1.,
68 "Reduce the uncertainty on z0 track parameter constraint by this amount"};
69 DoubleProperty m_deltaScaling{this, "DeltaScaling", 1.};
70
71 IntegerProperty m_minPIXHits{this, "MinPIXHits", 0};
72 IntegerProperty m_minSCTHits{this, "MinSCTHits", 0};
73 IntegerProperty m_minTRTHits{this, "MinTRTHits", 0};
74 DoubleProperty m_maxd0{this, "Maxd0", 500.};
75 DoubleProperty m_maxz0{this, "Maxz0", 500.};
76 DoubleProperty m_minPt{this, "MinPt", 15.};
77 DoubleProperty m_maxPt{this, "MaxPt", 100.};
78
80 this, "InputTracksCollection", "Tracks"};
82 this, "OutputTracksCollection", "AlignmentConstrainedTracks"};
83
84 BooleanProperty m_CorrectMomentum{this, "CorrectMomentum", true};
85 StringProperty m_constraintFileName_P{
86 this, "MomentumConstraintFileName", "Constraint.root"};
87 TFile* m_constraintInputFile_P = nullptr;
88 StringProperty m_constraintHistName_P{
89 this, "MomentumConstraintHistName", "EtaPhiMap"};
90 TH2F* m_etaphiMap_P = nullptr;
91 // Corrections expected to be in GeV-1
92
94 this, "d0ConstraintFileName", "Constraint.root"};
95 TFile* m_constraintInputFile_d0 = nullptr;
96 StringProperty m_constraintHistName_d0{this, "d0ConstraintHistName", "EtaPhiMap"};
97 TH2F* m_etaphiMap_d0 = nullptr;
98 // Corrections expected to be in mm
99
100 BooleanProperty m_CorrectZ0{this, "CorrectZ0", false};
102 this, "z0ConstraintFileName", "Constraint.root"};
103 TFile* m_constraintInputFile_z0 = nullptr;
104 StringProperty m_constraintHistName_z0{this, "z0ConstraintHistName", "EtaPhiMap"};
105 TH2F* m_etaphiMap_z0 = nullptr;
106 // Corrections expected to be in mm
107
108 BooleanProperty m_CorrectD0{this, "CorrectD0", false};
109 BooleanProperty m_CorrectMeanD0{this, "CorrectMeanD0", false};
110
111 BooleanProperty m_SelectByCharge{this, "SelectByCharge", false};
112 BooleanProperty m_SelectPositive{this, "SelectPositive", true};
113
114
115 }; // end class
116
117} // end namespace
118
119#endif // TRKALIGNGENTOOLS_CONSTRAINEDTRACKPROVIDER_H
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
DataVector< Trk::Track > TrackCollection
This typedef represents a collection of Trk::Track objects.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
void getCorrectedValues_d0(const Trk::Perigee *mp, double &corrected_d0, double &corrected_d0Error)
void getCorrectedValues_P(const Trk::Perigee *mp, double &correctedQoverP, double &correctedQoverPError)
void getCorrectedValues_z0(const Trk::Perigee *mp, double &corrected_z0, double &corrected_z0Error)
bool passTrackSelection(const Trk::Track *track)
virtual void printSummary()
Print statistical summary to logfile.
Gaudi::Property< Trk::RunOutlierRemoval > m_runOutlierRemoval
SG::ReadHandleKey< TrackCollection > m_inputKey
SG::WriteHandleKey< TrackCollection > m_outputKey
ToolHandle< IGlobalTrackFitter > m_trackFitter
ConstrainedTrackProvider(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode trackCollection(const TrackCollection *&tracks)
Ensure that the ATLAS eigen extensions are properly loaded.
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
#define private