ATLAS Offline Software
GaussianDensityTestAlg.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // GaussianDensityTestAlg.h
8 // Header file for class GaussianDensityTestAlg
9 // Author: D.Casper<dcasper@uci.edu>
11 #ifndef TRKVERTEXSEEDFINDERUTILS_GAUSSIANDENSITYTESTALG_H
12 #define TRKVERTEXSEEDFINDERUTILS_GAUSSIANDENSITYTESTALG_H 1
13 
14 // STL includes
15 #include <string>
16 #include <vector>
17 #include <map>
18 
19 // FrameWork includes
21 #include "GaudiKernel/ToolHandle.h"
22 #include "GaudiKernel/ServiceHandle.h"
23 #include "GaudiKernel/ITHistSvc.h"
24 
30 
34 
35 //Amg
38 #include "TH1F.h"
39 #include "TTree.h"
40 
41 namespace Trk
42 {
43  class Track;
44  class ITrackLink;
45 
47  : public ::AthAlgorithm
48 {
49 
51  // Public methods:
53  public:
54 
55  // Copy constructor:
56 
58  GaussianDensityTestAlg( const std::string& name, ISvcLocator* pSvcLocator );
59 
62 
63  // Assignment operator:
64 
65  // Athena algorithm's Hooks
66  virtual StatusCode initialize();
67  virtual StatusCode execute();
68  virtual StatusCode finalize();
69 
70  private:
72  // Const methods:
74  double ipSignificance(const Trk::TrackParameters* params, const Amg::Vector3D * vertex) const;
75 
76  StatusCode findTruth(double mode,
77  const std::vector<Trk::ITrackLink*>& trackVector,
78  std::vector<Amg::Vector3D>& truth,
79  TH1* h_truthDensity,
80  TH1* h_modeCheck) const;
81 
83  // Non-const methods:
86 
87  void selectTracks(const xAOD::TrackParticleContainer* trackParticles, std::vector<Trk::ITrackLink*> & trackVector);
88 
89  static void analyzeTracks(const std::vector<Trk::ITrackLink*> & trackVector, std::vector<const Trk::TrackParameters*>& perigeeList);
90 
92  // Private data:
94  private:
95  // Properties
96  Gaudi::Property<double> m_significanceTruthCut { this,
97  "SignificanceTruthCut",
98  3.0,
99  "Reco track must pass within this many sigma of pp vertex to be good" };
100 
101  Gaudi::Property<int> m_truthVertexTracks { this,
102  "MinTruthVertexTracks",
103  2,
104  "Minimum associated reconstructed tracks for vertex to be considered visible" };
105 
108 
109  // Tools
110  ToolHandle< InDet::IInDetTrackSelectionTool > m_trackFilter { this, "TrackSelector",
111  "InDet::InDetTrackSelectionTool/InDetDetailedTrackSelectionTool",
112  "Track selection tool" } ;
113 
114  ToolHandle< Trk::IVertexTrackDensityEstimator > m_estimator { this, "Estimator", "Trk::GaussianTrackDensity",
115  "Track density function" };
116 
117  ToolHandle< Trk::ITrackToVertexIPEstimator > m_ipEstimator { this, "IPEstimator", "Trk::TrackToVertexIPEstimator",
118  "Impact point estimator" };
119 
120  // Non-property private data
121 
122  SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
124 
126  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_trackParticlesKey { this, "TrackParticles", "InDetTrackParticles",
127  "Input track particle collection" };
128 
130  "Key for truth event collection" };
131 
132  SG::ReadHandleKey<xAOD::TruthPileupEventContainer> m_pileupEventsKey { this, "TruthPileupEvents", "TruthPileupEvents",
133  "Key for truth pileup event collection" };
134 
136 
137  TH1* m_h_density{};
141 
142 }; // class
143 } // namespace
144 
145 #endif //> !TRKVERTEXSEEDFINDERUTILS_IMAGINGSEEDTUNINGALG_H
TrackParticleBaseCollection.h
Trk::GaussianDensityTestAlg::m_h_modeCheck
TH1 * m_h_modeCheck
Definition: GaussianDensityTestAlg.h:140
Trk::GaussianDensityTestAlg::finalize
virtual StatusCode finalize()
Definition: GaussianDensityTestAlg.cxx:76
Trk::GaussianDensityTestAlg::selectTracks
void selectTracks(const xAOD::TrackParticleContainer *trackParticles, std::vector< Trk::ITrackLink * > &trackVector)
Definition: GaussianDensityTestAlg.cxx:133
TrackParameters.h
Trk::GaussianDensityTestAlg
Definition: GaussianDensityTestAlg.h:48
Trk::GaussianDensityTestAlg::m_h_truthVertices
TH1 * m_h_truthVertices
Definition: GaussianDensityTestAlg.h:139
Trk::GaussianDensityTestAlg::m_trackFilter
ToolHandle< InDet::IInDetTrackSelectionTool > m_trackFilter
Definition: GaussianDensityTestAlg.h:110
Trk::GaussianDensityTestAlg::m_useBeamConstraint
bool m_useBeamConstraint
Definition: GaussianDensityTestAlg.h:106
SG::ReadHandleKey< xAOD::TrackParticleContainer >
Trk::GaussianDensityTestAlg::m_estimator
ToolHandle< Trk::IVertexTrackDensityEstimator > m_estimator
Definition: GaussianDensityTestAlg.h:114
TruthPileupEventContainer.h
Trk::GaussianDensityTestAlg::execute
virtual StatusCode execute()
Definition: GaussianDensityTestAlg.cxx:82
Trk::GaussianDensityTestAlg::analyzeTracks
static void analyzeTracks(const std::vector< Trk::ITrackLink * > &trackVector, std::vector< const Trk::TrackParameters * > &perigeeList)
Definition: GaussianDensityTestAlg.cxx:124
AthAlgorithm.h
Trk::GaussianDensityTestAlg::m_iTHistSvc
ServiceHandle< ITHistSvc > m_iTHistSvc
Definition: GaussianDensityTestAlg.h:123
GeoPrimitives.h
Trk::GaussianDensityTestAlg::m_trackParticlesKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticlesKey
Data handle keys.
Definition: GaussianDensityTestAlg.h:126
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::GaussianDensityTestAlg::GaussianDensityTestAlg
GaussianDensityTestAlg()
Preparation.mode
mode
Definition: Preparation.py:94
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::GaussianDensityTestAlg::m_truthEventsKey
SG::ReadHandleKey< xAOD::TruthEventContainer > m_truthEventsKey
Definition: GaussianDensityTestAlg.h:129
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
IInDetTrackSelectionTool.h
AthAlgorithm
Definition: AthAlgorithm.h:47
Trk::GaussianDensityTestAlg::m_significanceTruthCut
Gaudi::Property< double > m_significanceTruthCut
Definition: GaussianDensityTestAlg.h:96
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
IVertexTrackDensityEstimator.h
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::GaussianDensityTestAlg::m_truthVertexTracks
Gaudi::Property< int > m_truthVertexTracks
Definition: GaussianDensityTestAlg.h:101
SG::ReadCondHandleKey< InDet::BeamSpotData >
Trk::GaussianDensityTestAlg::findTruth
StatusCode findTruth(double mode, const std::vector< Trk::ITrackLink * > &trackVector, std::vector< Amg::Vector3D > &truth, TH1 *h_truthDensity, TH1 *h_modeCheck) const
Definition: GaussianDensityTestAlg.cxx:175
Trk::GaussianDensityTestAlg::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: GaussianDensityTestAlg.h:122
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
Trk::GaussianDensityTestAlg::m_pileupEventsKey
SG::ReadHandleKey< xAOD::TruthPileupEventContainer > m_pileupEventsKey
Definition: GaussianDensityTestAlg.h:132
Trk::GaussianDensityTestAlg::m_h_truthDensity
TH1 * m_h_truthDensity
Definition: GaussianDensityTestAlg.h:138
Trk::GaussianDensityTestAlg::~GaussianDensityTestAlg
virtual ~GaussianDensityTestAlg()
Destructor:
Trk::GaussianDensityTestAlg::m_ipEstimator
ToolHandle< Trk::ITrackToVertexIPEstimator > m_ipEstimator
Definition: GaussianDensityTestAlg.h:117
ITrackToVertexIPEstimator.h
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
Trk::GaussianDensityTestAlg::m_h_density
TH1 * m_h_density
Histograms and trees.
Definition: GaussianDensityTestAlg.h:137
BeamSpotData.h
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
TruthEventContainer.h
Trk::GaussianDensityTestAlg::m_firstEvent
bool m_firstEvent
Definition: GaussianDensityTestAlg.h:107
TrackParticleContainer.h
Trk::GaussianDensityTestAlg::initialize
virtual StatusCode initialize()
Definition: GaussianDensityTestAlg.cxx:50
ServiceHandle< ITHistSvc >
Trk::GaussianDensityTestAlg::ipSignificance
double ipSignificance(const Trk::TrackParameters *params, const Amg::Vector3D *vertex) const
Definition: GaussianDensityTestAlg.cxx:321