ATLAS Offline Software
Loading...
Searching...
No Matches
DumpObjects.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 INDETGNNTRACKING_DUMPOBJECTS_H
6#define INDETGNNTRACKING_DUMPOBJECTS_H
7
9#include "GaudiKernel/ServiceHandle.h"
10
20
21// xAOD
24
25
33
34#include "GaudiKernel/IPartPropSvc.h"
35
36class PixelID;
37class SCT_ID;
38class TTree;
39
40namespace InDetDD {
43} // namespace InDetDD
44
45namespace HepPDT {
46class ParticleDataTable;
47}
48
49namespace InDet {
50
51int compute_overlap_SP_flag(const int& eta_module_cl1,const int& phi_module_cl1,
52 const int& eta_module_cl2,const int& phi_module_cl2);
53
54class DumpObjects : public AthAlgorithm {
55public:
56 DumpObjects(const std::string &name, ISvcLocator *pSvcLocator);
58
59 virtual StatusCode initialize() override final;
60 virtual StatusCode execute(const EventContext& ctx) override final;
61 virtual StatusCode finalize() override final;
62
64 bool isPassed(HepMC::ConstGenParticlePtr particle, float &px, float &py, float &pz, float &pt,
65 float &eta, float &vx, float &vy, float &vz, float &radius, float &status, float &charge,
66 std::vector<int> &vParentID, std::vector<int> &vParentBarcode, int &vProdNin, int &vProdNout,
67 int &vProdStatus, int &vProdBarcode);
69 const SCT_ID *m_SCT_ID{};
72 int m_event{};
74 std::string m_name;
75
76 // ReadHandleKeys
77 SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this, "EventInfoKey", "EventInfo"};
79
80 SG::ReadHandleKey<InDet::PixelClusterContainer> m_pixelClusterKey{this, "PixelClusterKey", "ITkPixelClusters"};
81 SG::ReadHandleKey<InDet::SCT_ClusterContainer> m_stripClusterKey{this, "StripClusterKey", "ITkStripClusters"};
82
83 SG::ReadHandleKey<InDetSimDataCollection> m_pixelSDOKey{this, "PixelSDOKey", "ITkPixelSDO_Map"};
84 SG::ReadHandleKey<InDetSimDataCollection> m_stripSDOKey{this, "StripSDOKey", "ITkStripSDO_Map"};
85
86 SG::ReadHandleKey<xAOD::SpacePointContainer> m_xaodPixelSpacePointContainerKey{this,"xAODInputPixelSpacePoints", "ITkPixelSpacePoints"};
87
88 SG::ReadHandleKey<xAOD::SpacePointContainer> m_xaodStripSpacePointContainerKey{this,"xAODInputSpacePointsContainerKey", "ITkStripSpacePoints"};
89
90 SG::ReadHandleKey<xAOD::SpacePointContainer> m_xaodStripSpacePointOverlapContainerKey{this,"xAODInputSpacePointsOverlapContainerKey", "ITkStripOverlapSpacePoints"};
91
92 SG::ReadHandleKey<TrackCollection> m_tracksKey{this, "TracksKey", "CombinedITkTracks"};
93 SG::ReadHandleKey<TrackTruthCollection> m_tracksTruthKey{this, "TracksTruthKey", "CombinedITkTracksTruthCollection"};
95 "CombinedITkTracksDetailedTruth"};
96
97 int m_offset{};
98
99 // Accepting truth only if passes these requirements
100 float m_max_eta = 4.0;
101 float m_min_pt = 1000.;
102 int m_max_barcode = 200e3;
103 float m_maxProdVertex = 260.;
104
105 // Information related to the TTree
106 //
107 std::string m_ntupleFileName;
108 std::string m_ntupleDirName;
109 std::string m_ntupleTreeName;
110 int m_maxCL{};
111 int m_maxPart{};
112 int m_maxSP{};
113 int m_maxTRK{};
114 int m_maxDTT{};
115 bool m_rootFile{};
116 TTree *m_nt{};
117
118 unsigned int m_run_number{};
119 unsigned long long m_event_number{};
120
121 int m_nSE{};
122 int *m_SEID{};
123
124 int m_nCL{};
125 int *m_CLindex{};
126 std::vector<std::string> *m_CLhardware{};
127 double *m_CLx{};
128 double *m_CLy{};
129 double *m_CLz{};
134 int *m_CLside{};
135 uint64_t *m_CLmoduleID{};
136 std::vector<std::vector<int>> *m_CLparticleLink_eventIndex{};
137 std::vector<std::vector<int>> *m_CLparticleLink_barcode{};
138 std::vector<std::vector<bool>> *m_CLbarcodesLinked{};
139 std::vector<std::vector<float>> *m_CLparticle_charge{};
140 std::vector<std::vector<int>> *m_CLphis{}, *m_CLetas{}, *m_CLtots{};
149 std::vector<std::vector<double>> *m_CLlocal_cov{};
150
154 float *m_Part_px{}, *m_Part_py{}, *m_Part_pz{};
155 float *m_Part_pt{};
156 float *m_Part_eta{};
157 float *m_Part_vx{}, *m_Part_vy{}, *m_Part_vz{};
164 std::vector<std::vector<int>> *m_Part_vParentID{}, *m_Part_vParentBarcode{};
165
166 int m_nSP{};
167 int *m_SPindex{};
168 double *m_SPx{}, *m_SPy{}, *m_SPz{};
170 int *m_SPisOverlap{}; // -1: pixel, 0: strip not overlap, 1: strip overlap eta, 2: strip overlap phi, 3: overlap eta & phi
171
172 double *m_SPradius{};
173 double *m_SPcovr{};
174 double *m_SPcovz{};
175 // Half length of top half strip
177 // Half length of bottom half strip
179
180 std::vector<std::vector<float>> *m_SPtopStripDirection{};
181 std::vector<std::vector<float>> *m_SPbottomStripDirection{};
182 std::vector<std::vector<float>> *m_SPstripCenterDistance{};
183 std::vector<std::vector<float>> *m_SPtopStripCenterPosition{};
184
185 int m_nTRK{};
188 std::vector<std::vector<int>> *m_TRKproperties{}, *m_TRKpattern{};
190 float *m_TRKchiSq{};
193 std::vector<std::vector<double>> *m_TRKperigee_position{}, *m_TRKperigee_momentum{};
196
197 int m_nDTT{};
201};
202} // namespace InDet
203
204#endif // INDETGNNTRACKING_DUMPOBJECTS_H
Scalar eta() const
pseudorapidity method
double charge(const T &p)
Definition AtlasPID.h:997
This is an Identifier helper class for the Pixel subdetector.
This is an Identifier helper class for the SCT subdetector.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated pixel ...
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated SCT in...
double * m_CLloc_direction3
std::vector< std::vector< int > > * m_CLtots
std::vector< std::vector< int > > * m_DTTtrajectory_eventindex
int m_maxCL
jobOption: maximum number of clusters
std::vector< std::vector< bool > > * m_CLbarcodesLinked
std::vector< std::vector< int > > * m_TRKpattern
std::vector< std::vector< int > > * m_DTTstTruth_subDetType
SG::ReadHandleKey< DetailedTrackTruthCollection > m_detailedTracksTruthKey
Definition DumpObjects.h:94
bool isPassed(HepMC::ConstGenParticlePtr particle, float &px, float &py, float &pz, float &pt, float &eta, float &vx, float &vy, float &vz, float &radius, float &status, float &charge, std::vector< int > &vParentID, std::vector< int > &vParentBarcode, int &vProdNin, int &vProdNout, int &vProdStatus, int &vProdBarcode)
std::vector< std::vector< int > > * m_CLparticleLink_barcode
std::vector< std::vector< int > > * m_TRKoutliersOnTrack_pixcl_sctcl_index
unsigned int m_run_number
double * m_CLloc_direction2
SG::ReadHandleKey< InDet::SCT_ClusterContainer > m_stripClusterKey
Definition DumpObjects.h:81
int m_maxSP
jobOption: maximum number of space points
const SCT_ID * m_SCT_ID
Definition DumpObjects.h:69
SG::ReadHandleKey< TrackTruthCollection > m_tracksTruthKey
Definition DumpObjects.h:93
std::vector< std::vector< double > > * m_TRKperigee_momentum
SG::ReadHandleKey< TrackCollection > m_tracksKey
Definition DumpObjects.h:92
unsigned long long m_event_number
double * m_CLJan_loc_direction3
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition DumpObjects.h:77
std::vector< std::vector< float > > * m_SPtopStripDirection
double * m_CLJan_loc_direction2
std::string m_name
Definition DumpObjects.h:74
virtual StatusCode execute(const EventContext &ctx) override final
Execute method.
uint64_t * m_CLmoduleID
int * m_TRKparticle_hypothesis
std::vector< std::vector< float > > * m_SPstripCenterDistance
const InDetDD::SCT_DetectorManager * m_SCT_Manager
Definition DumpObjects.h:71
std::vector< std::vector< double > > * m_TRKperigee_position
std::vector< std::vector< int > > * m_Part_vParentID
const PixelID * m_pixelID
Definition DumpObjects.h:68
std::string m_ntupleDirName
jobOption: Ntuple directory name
std::string m_ntupleFileName
jobOption: Ntuple file name
double * m_CLloc_direction1
std::vector< std::vector< int > > * m_DTTstTrack_subDetType
bool m_rootFile
jobOption: save data in root format
double * m_CLJan_loc_direction1
std::vector< std::vector< int > > * m_CLphis
virtual StatusCode finalize() override final
SG::ReadHandleKey< McEventCollection > m_mcEventCollectionKey
Definition DumpObjects.h:78
std::vector< std::vector< int > > * m_DTTtrajectory_barcode
SG::ReadHandleKey< xAOD::SpacePointContainer > m_xaodPixelSpacePointContainerKey
Definition DumpObjects.h:86
SG::ReadHandleKey< InDetSimDataCollection > m_stripSDOKey
Definition DumpObjects.h:84
const InDetDD::PixelDetectorManager * m_pixelManager
Definition DumpObjects.h:70
DumpObjects(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize() override final
std::string m_ntupleTreeName
jobOption: Ntuple tree name
std::vector< std::vector< int > > * m_TRKmeasurementsOnTrack_pixcl_sctcl_index
std::vector< std::vector< int > > * m_DTTstCommon_subDetType
std::vector< std::vector< int > > * m_TRKproperties
std::vector< std::string > * m_CLhardware
std::vector< std::vector< int > > * m_CLparticleLink_eventIndex
SG::ReadHandleKey< xAOD::SpacePointContainer > m_xaodStripSpacePointContainerKey
Definition DumpObjects.h:88
SG::ReadHandleKey< InDetSimDataCollection > m_pixelSDOKey
Definition DumpObjects.h:83
SG::ReadHandleKey< InDet::PixelClusterContainer > m_pixelClusterKey
Definition DumpObjects.h:80
int m_maxPart
jobOption: maximum number of particles
std::vector< std::vector< int > > * m_CLetas
std::vector< std::vector< float > > * m_CLparticle_charge
std::vector< std::vector< float > > * m_SPtopStripCenterPosition
std::vector< std::vector< double > > * m_CLlocal_cov
SG::ReadHandleKey< xAOD::SpacePointContainer > m_xaodStripSpacePointOverlapContainerKey
Definition DumpObjects.h:90
std::vector< std::vector< int > > * m_Part_vParentBarcode
std::vector< std::vector< float > > * m_SPbottomStripDirection
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:69
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
Property holding a SG store/key/clid from which a ReadHandle is made.
Message Stream Member.
Primary Vertex Finder.
int compute_overlap_SP_flag(const int &eta_module_cl1, const int &phi_module_cl1, const int &eta_module_cl2, const int &phi_module_cl2)
STL namespace.
#define private
Definition testRead.cxx:27