ATLAS Offline Software
IDAlignMonGenericTracksAlg.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 IDAlignMonGenericTracksAlg_H
6 #define IDAlignMonGenericTracksAlg_H
7 
8 // **********************************************************************
9 // IDAlignMonGenericTracksAlg.h
10 // AUTHORS: Beate Heinemann, Tobias Golling
11 // Adapted to AthenaMT 2021 by Per Johansson
12 // **********************************************************************
13 
15 
16 #include "GaudiKernel/StatusCode.h"
17 #include "GaudiKernel/EventContext.h"
18 
23 
26 #include "xAODTracking/Vertex.h"
30 
31 //------------TrackMon------------
34 #include "TrkTrack/Track.h"
36 
39 
40 #include <map>
41 #include <string>
42 #include <vector>
43 
44 class AtlasDetectorID;
45 class PixelID;
46 class SCT_ID;
47 class TRT_ID;
48 
49 namespace Trk {
50  class Track;
51  class VxTrackAtVertex;
52 }
53 
55 
57 
58 public:
59 
60  IDAlignMonGenericTracksAlg( const std::string & name, ISvcLocator* pSvcLocator );
62  virtual StatusCode initialize() override;
63  virtual StatusCode fillHistograms( const EventContext& ctx ) const override;
64 
65 protected:
66 
67  bool m_hasBeamCondSvc = false;
68 
69 private:
70 
71  bool fillVertexInformation(std::map<const xAOD::TrackParticle*, const xAOD::Vertex*>& trackVertexMapTP, const EventContext& ctx ) const;
72  static const Trk::Track* getTrkTrack(const Trk::VxTrackAtVertex*);
73  const xAOD::Vertex* findAssociatedVertexTP(const std::map<const xAOD::TrackParticle*, const xAOD::Vertex*>& trackVertexMapTP, const xAOD::TrackParticle *) const;
74 
76  const PixelID* m_pixelID{};
77  const SCT_ID* m_sctID{};
78  const TRT_ID* m_trtID{};
79 
80  // Building Tool Maps for the Hit Maps
81  static const int m_nSiBlayers{4};
82  static const int m_nSCTEClayers{9};
91 
93  float m_d0Range{};
94  float m_d0BsRange{};
95  float m_pTRange{0.0F};
96  float m_z0Range{};
97  float m_etaRange{};
99  float m_barrelEta{};
100  bool m_doIP{};
101  bool m_doHitQuality{false};
103 
104  SG::ReadHandleKey<xAOD::VertexContainer> m_VxPrimContainerName{this,"vxPrimContainerName","PrimaryVertices","Primary Vertices for Alignment Monitoring"};
105  SG::ReadHandleKey<TrackCollection> m_tracksKey {this, "TrackName2", "ExtendedTracks", "track data key"};
106  SG::ReadHandleKey<TrackCollection> m_tracksName {this, "TrackName", "ExtendedTracks", "track data key"};
107  SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
108 
109  ToolHandle<InDet::IInDetTrackSelectionTool> m_trackSelection; // baseline
110  ToolHandle<IInDetAlignHitQualSelTool> m_hitQualityTool;
111  ToolHandle< Trk::ITrackToVertexIPEstimator > m_trackToVertexIPEstimator
112  {this,"TrackToVertexIPEstimator","Trk::TrackToVertexIPEstimator",""};
113 
114  std::string m_Pixel_Manager;
115  std::string m_SCT_Manager;
116  std::string m_TRT_Manager;
117 
118 };
119 
120 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
IDAlignMonGenericTracksAlg::m_hitQualityTool
ToolHandle< IInDetAlignHitQualSelTool > m_hitQualityTool
Definition: IDAlignMonGenericTracksAlg.h:110
IDAlignMonGenericTracksAlg::m_nSCTEClayers
static const int m_nSCTEClayers
Definition: IDAlignMonGenericTracksAlg.h:82
ITrackSummaryTool.h
IDAlignMonGenericTracksAlg::findAssociatedVertexTP
const xAOD::Vertex * findAssociatedVertexTP(const std::map< const xAOD::TrackParticle *, const xAOD::Vertex * > &trackVertexMapTP, const xAOD::TrackParticle *) const
Definition: IDAlignMonGenericTracksAlg.cxx:592
Trk::VxTrackAtVertex
The VxTrackAtVertex is a common class for all present TrkVertexFitters The VxTrackAtVertex is designe...
Definition: VxTrackAtVertex.h:77
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
IDAlignMonGenericTracksAlg::m_doIP
bool m_doIP
Definition: IDAlignMonGenericTracksAlg.h:100
IDAlignMonGenericTracksAlg::m_pixelID
const PixelID * m_pixelID
Definition: IDAlignMonGenericTracksAlg.h:76
IDAlignMonGenericTracksAlg::m_trackSelection
ToolHandle< InDet::IInDetTrackSelectionTool > m_trackSelection
Definition: IDAlignMonGenericTracksAlg.h:109
EventPrimitivesHelpers.h
IDAlignMonGenericTracksAlg::m_SCT_Manager
std::string m_SCT_Manager
Definition: IDAlignMonGenericTracksAlg.h:115
IDAlignMonGenericTracksAlg::m_hasBeamCondSvc
bool m_hasBeamCondSvc
Definition: IDAlignMonGenericTracksAlg.h:67
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
IDAlignMonGenericTracksAlg::m_sctID
const SCT_ID * m_sctID
Definition: IDAlignMonGenericTracksAlg.h:77
IDAlignMonGenericTracksAlg::m_VxPrimContainerName
SG::ReadHandleKey< xAOD::VertexContainer > m_VxPrimContainerName
Definition: IDAlignMonGenericTracksAlg.h:104
IDAlignMonGenericTracksAlg::m_trackToVertexIPEstimator
ToolHandle< Trk::ITrackToVertexIPEstimator > m_trackToVertexIPEstimator
Definition: IDAlignMonGenericTracksAlg.h:112
Track.h
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
IDAlignMonGenericTracksAlg::m_measurements_vs_Eta_Phi_sct_eca_s0
std::vector< int > m_measurements_vs_Eta_Phi_sct_eca_s0
Definition: IDAlignMonGenericTracksAlg.h:87
IInDetAlignHitQualSelTool
Definition: IInDetAlignHitQualSelTool.h:26
IDAlignMonGenericTracksAlg::~IDAlignMonGenericTracksAlg
virtual ~IDAlignMonGenericTracksAlg()
Definition: IDAlignMonGenericTracksAlg.cxx:71
IDAlignMonGenericTracksAlg::fillVertexInformation
bool fillVertexInformation(std::map< const xAOD::TrackParticle *, const xAOD::Vertex * > &trackVertexMapTP, const EventContext &ctx) const
Definition: IDAlignMonGenericTracksAlg.cxx:632
IDAlignMonGenericTracksAlg::m_z0Range
float m_z0Range
Definition: IDAlignMonGenericTracksAlg.h:96
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthMonitorAlgorithm.h
IDAlignMonGenericTracksAlg::m_d0Range
float m_d0Range
Definition: IDAlignMonGenericTracksAlg.h:93
TrackCollection.h
IDAlignMonGenericTracksAlg::m_trtID
const TRT_ID * m_trtID
Definition: IDAlignMonGenericTracksAlg.h:78
IDAlignMonGenericTracksAlg::m_Pixel_Manager
std::string m_Pixel_Manager
Definition: IDAlignMonGenericTracksAlg.h:114
TrackSummary.h
IDAlignMonGenericTracksAlg::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition: IDAlignMonGenericTracksAlg.cxx:141
Vertex.h
IInDetTrackSelectionTool.h
IDAlignMonGenericTracksAlg::getTrkTrack
static const Trk::Track * getTrkTrack(const Trk::VxTrackAtVertex *)
Definition: IDAlignMonGenericTracksAlg.cxx:606
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
IDAlignMonGenericTracksAlg::m_tracksName
SG::ReadHandleKey< TrackCollection > m_tracksName
Definition: IDAlignMonGenericTracksAlg.h:106
IDAlignMonGenericTracksAlg::m_extendedPlots
bool m_extendedPlots
Definition: IDAlignMonGenericTracksAlg.h:92
IDAlignMonGenericTracksAlg::m_measurements_vs_Eta_Phi_sct_ecc_s0
std::vector< int > m_measurements_vs_Eta_Phi_sct_ecc_s0
Definition: IDAlignMonGenericTracksAlg.h:89
IDAlignMonGenericTracksAlg::m_measurements_vs_Eta_Phi_pix_ec
std::vector< int > m_measurements_vs_Eta_Phi_pix_ec
Definition: IDAlignMonGenericTracksAlg.h:84
EventPrimitives.h
ITrackHoleSearchTool.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
IDAlignMonGenericTracksAlg::m_measurements_vs_Eta_Phi_pix_b
std::vector< int > m_measurements_vs_Eta_Phi_pix_b
Definition: IDAlignMonGenericTracksAlg.h:83
IDAlignMonGenericTracksAlg::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: IDAlignMonGenericTracksAlg.h:107
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
IDAlignMonGenericTracksAlg
Definition: IDAlignMonGenericTracksAlg.h:56
IDAlignMonGenericTracksAlg::m_NTracksRange
int m_NTracksRange
Definition: IDAlignMonGenericTracksAlg.h:98
SG::ReadCondHandleKey< InDet::BeamSpotData >
IDAlignMonGenericTracksAlg::m_d0BsRange
float m_d0BsRange
Definition: IDAlignMonGenericTracksAlg.h:94
IDAlignMonGenericTracksAlg::m_etaRange
float m_etaRange
Definition: IDAlignMonGenericTracksAlg.h:97
TrackParticle.h
TRT_ID
Definition: TRT_ID.h:84
VertexContainer.h
IDAlignMonGenericTracksAlg::m_idHelper
const AtlasDetectorID * m_idHelper
Definition: IDAlignMonGenericTracksAlg.h:75
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
SCT_ID
Definition: SCT_ID.h:68
IDAlignMonGenericTracksAlg::m_doHitQuality
bool m_doHitQuality
Definition: IDAlignMonGenericTracksAlg.h:101
IDAlignMonGenericTracksAlg::m_tracksKey
SG::ReadHandleKey< TrackCollection > m_tracksKey
Definition: IDAlignMonGenericTracksAlg.h:105
ITrackToVertexIPEstimator.h
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
IDAlignMonGenericTracksAlg::m_TRT_Manager
std::string m_TRT_Manager
Definition: IDAlignMonGenericTracksAlg.h:116
IDAlignMonGenericTracksAlg::m_nSiBlayers
static const int m_nSiBlayers
Definition: IDAlignMonGenericTracksAlg.h:81
BeamSpotData.h
IDAlignMonGenericTracksAlg::m_barrelEta
float m_barrelEta
Definition: IDAlignMonGenericTracksAlg.h:99
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
IDAlignMonGenericTracksAlg::IDAlignMonGenericTracksAlg
IDAlignMonGenericTracksAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: IDAlignMonGenericTracksAlg.cxx:39
IDAlignMonGenericTracksAlg::initialize
virtual StatusCode initialize() override
initialize
Definition: IDAlignMonGenericTracksAlg.cxx:74
IDAlignMonGenericTracksAlg::m_applyTrkSel
bool m_applyTrkSel
Definition: IDAlignMonGenericTracksAlg.h:102
PixelID
Definition: PixelID.h:67
IDAlignMonGenericTracksAlg::m_measurements_vs_Eta_Phi_sct_ecc_s1
std::vector< int > m_measurements_vs_Eta_Phi_sct_ecc_s1
Definition: IDAlignMonGenericTracksAlg.h:90
IDAlignMonGenericTracksAlg::m_measurements_vs_Eta_Phi_sct_b_s0
std::vector< int > m_measurements_vs_Eta_Phi_sct_b_s0
Definition: IDAlignMonGenericTracksAlg.h:85
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
TrackParticleContainer.h
IDAlignMonGenericTracksAlg::m_measurements_vs_Eta_Phi_sct_b_s1
std::vector< int > m_measurements_vs_Eta_Phi_sct_b_s1
Definition: IDAlignMonGenericTracksAlg.h:86
IDAlignMonGenericTracksAlg::m_measurements_vs_Eta_Phi_sct_eca_s1
std::vector< int > m_measurements_vs_Eta_Phi_sct_eca_s1
Definition: IDAlignMonGenericTracksAlg.h:88
IDAlignMonGenericTracksAlg::m_pTRange
float m_pTRange
Definition: IDAlignMonGenericTracksAlg.h:95