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() 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{};
75 const HepPDT::ParticleDataTable *m_particleDataTable{};
76 std::string m_name;
77
78 // ReadHandleKeys
79 SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this, "EventInfoKey", "EventInfo"};
81
82 SG::ReadHandleKey<InDet::PixelClusterContainer> m_pixelClusterKey{this, "PixelClusterKey", "ITkPixelClusters"};
83 SG::ReadHandleKey<InDet::SCT_ClusterContainer> m_stripClusterKey{this, "StripClusterKey", "ITkStripClusters"};
84
85 SG::ReadHandleKey<InDetSimDataCollection> m_pixelSDOKey{this, "PixelSDOKey", "ITkPixelSDO_Map"};
86 SG::ReadHandleKey<InDetSimDataCollection> m_stripSDOKey{this, "StripSDOKey", "ITkStripSDO_Map"};
87
88 SG::ReadHandleKey<xAOD::SpacePointContainer> m_xaodPixelSpacePointContainerKey{this,"xAODInputPixelSpacePoints", "ITkPixelSpacePoints"};
89
90 SG::ReadHandleKey<xAOD::SpacePointContainer> m_xaodStripSpacePointContainerKey{this,"xAODInputSpacePointsContainerKey", "ITkStripSpacePoints"};
91
92 SG::ReadHandleKey<xAOD::SpacePointContainer> m_xaodStripSpacePointOverlapContainerKey{this,"xAODInputSpacePointsOverlapContainerKey", "ITkStripOverlapSpacePoints"};
93
94 SG::ReadHandleKey<TrackCollection> m_tracksKey{this, "TracksKey", "CombinedITkTracks"};
95 SG::ReadHandleKey<TrackTruthCollection> m_tracksTruthKey{this, "TracksTruthKey", "CombinedITkTracksTruthCollection"};
97 "CombinedITkTracksDetailedTruth"};
98
99 int m_offset{};
100
101 // Accepting truth only if passes these requirements
102 float m_max_eta = 4.0;
103 float m_min_pt = 1000.;
104 int m_max_barcode = 200e3;
105 float m_maxProdVertex = 260.;
106
107 // Information related to the TTree
108 //
109 std::string m_ntupleFileName;
110 std::string m_ntupleDirName;
111 std::string m_ntupleTreeName;
112 int m_maxCL{};
113 int m_maxPart{};
114 int m_maxSP{};
115 int m_maxTRK{};
116 int m_maxDTT{};
117 bool m_rootFile{};
118 TTree *m_nt{};
119
120 unsigned int m_run_number{};
121 unsigned long long m_event_number{};
122
123 int m_nSE{};
124 int *m_SEID{};
125
126 int m_nCL{};
127 int *m_CLindex{};
128 std::vector<std::string> *m_CLhardware{};
129 double *m_CLx{};
130 double *m_CLy{};
131 double *m_CLz{};
136 int *m_CLside{};
137 uint64_t *m_CLmoduleID{};
138 std::vector<std::vector<int>> *m_CLparticleLink_eventIndex{};
139 std::vector<std::vector<int>> *m_CLparticleLink_barcode{};
140 std::vector<std::vector<bool>> *m_CLbarcodesLinked{};
141 std::vector<std::vector<float>> *m_CLparticle_charge{};
142 std::vector<std::vector<int>> *m_CLphis{}, *m_CLetas{}, *m_CLtots{};
151 std::vector<std::vector<double>> *m_CLlocal_cov{};
152
156 float *m_Part_px{}, *m_Part_py{}, *m_Part_pz{};
157 float *m_Part_pt{};
158 float *m_Part_eta{};
159 float *m_Part_vx{}, *m_Part_vy{}, *m_Part_vz{};
166 std::vector<std::vector<int>> *m_Part_vParentID{}, *m_Part_vParentBarcode{};
167
168 int m_nSP{};
169 int *m_SPindex{};
170 double *m_SPx{}, *m_SPy{}, *m_SPz{};
172 int *m_SPisOverlap{}; // -1: pixel, 0: strip not overlap, 1: strip overlap eta, 2: strip overlap phi, 3: overlap eta & phi
173
174 double *m_SPradius{};
175 double *m_SPcovr{};
176 double *m_SPcovz{};
177 // Half length of top half strip
179 // Half length of bottom half strip
181
182 std::vector<std::vector<float>> *m_SPtopStripDirection{};
183 std::vector<std::vector<float>> *m_SPbottomStripDirection{};
184 std::vector<std::vector<float>> *m_SPstripCenterDistance{};
185 std::vector<std::vector<float>> *m_SPtopStripCenterPosition{};
186
187 int m_nTRK{};
190 std::vector<std::vector<int>> *m_TRKproperties{}, *m_TRKpattern{};
192 float *m_TRKchiSq{};
195 std::vector<std::vector<double>> *m_TRKperigee_position{}, *m_TRKperigee_momentum{};
198
199 int m_nDTT{};
203};
204} // namespace InDet
205
206#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 with parameters:
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
virtual StatusCode execute() override final
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:96
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:83
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:95
std::vector< std::vector< double > > * m_TRKperigee_momentum
SG::ReadHandleKey< TrackCollection > m_tracksKey
Definition DumpObjects.h:94
unsigned long long m_event_number
double * m_CLJan_loc_direction3
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition DumpObjects.h:79
std::vector< std::vector< float > > * m_SPtopStripDirection
double * m_CLJan_loc_direction2
std::string m_name
Definition DumpObjects.h:76
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
ServiceHandle< IPartPropSvc > m_particlePropSvc
Definition DumpObjects.h:74
virtual StatusCode finalize() override final
SG::ReadHandleKey< McEventCollection > m_mcEventCollectionKey
Definition DumpObjects.h:80
std::vector< std::vector< int > > * m_DTTtrajectory_barcode
SG::ReadHandleKey< xAOD::SpacePointContainer > m_xaodPixelSpacePointContainerKey
Definition DumpObjects.h:88
SG::ReadHandleKey< InDetSimDataCollection > m_stripSDOKey
Definition DumpObjects.h:86
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:90
const HepPDT::ParticleDataTable * m_particleDataTable
Definition DumpObjects.h:75
SG::ReadHandleKey< InDetSimDataCollection > m_pixelSDOKey
Definition DumpObjects.h:85
SG::ReadHandleKey< InDet::PixelClusterContainer > m_pixelClusterKey
Definition DumpObjects.h:82
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:92
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:67
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