ATLAS Offline Software
Loading...
Searching...
No Matches
DumpObjects.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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
27
28
29class PixelID;
30class SCT_ID;
31class TTree;
32
33namespace InDetDD {
36} // namespace InDetDD
37
38namespace InDet {
39
40int compute_overlap_SP_flag(const int& eta_module_cl1,const int& phi_module_cl1,
41 const int& eta_module_cl2,const int& phi_module_cl2);
42
43class DumpObjects : public AthAlgorithm {
44public:
45 DumpObjects(const std::string &name, ISvcLocator *pSvcLocator);
47
48 virtual StatusCode initialize() override final;
49 virtual StatusCode execute(const EventContext& ctx) override final;
50 virtual StatusCode finalize() override final;
51
53 bool isPassed(HepMC::ConstGenParticlePtr particle, float &px, float &py, float &pz, float &pt,
54 float &eta, float &vx, float &vy, float &vz, float &radius, float &status, float &charge,
55 std::vector<int> &vParentID, std::vector<int> &vParentBarcode, int &vProdNin, int &vProdNout,
56 int &vProdStatus, int &vProdBarcode);
58 const SCT_ID *m_SCT_ID{};
61 int m_event{};
63 std::string m_name;
64
65 // ReadHandleKeys
66 SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this, "EventInfoKey", "EventInfo"};
68
69 SG::ReadHandleKey<InDet::PixelClusterContainer> m_pixelClusterKey{this, "PixelClusterKey", "ITkPixelClusters"};
70 SG::ReadHandleKey<InDet::SCT_ClusterContainer> m_stripClusterKey{this, "StripClusterKey", "ITkStripClusters"};
71
72 SG::ReadHandleKey<InDetSimDataCollection> m_pixelSDOKey{this, "PixelSDOKey", "ITkPixelSDO_Map"};
73 SG::ReadHandleKey<InDetSimDataCollection> m_stripSDOKey{this, "StripSDOKey", "ITkStripSDO_Map"};
74
75 SG::ReadHandleKey<xAOD::SpacePointContainer> m_xaodPixelSpacePointContainerKey{this,"xAODInputPixelSpacePoints", "ITkPixelSpacePoints"};
76
77 SG::ReadHandleKey<xAOD::SpacePointContainer> m_xaodStripSpacePointContainerKey{this,"xAODInputSpacePointsContainerKey", "ITkStripSpacePoints"};
78
79 SG::ReadHandleKey<xAOD::SpacePointContainer> m_xaodStripSpacePointOverlapContainerKey{this,"xAODInputSpacePointsOverlapContainerKey", "ITkStripOverlapSpacePoints"};
80
81 SG::ReadHandleKey<TrackCollection> m_tracksKey{this, "TracksKey", "CombinedITkTracks"};
82 SG::ReadHandleKey<TrackTruthCollection> m_tracksTruthKey{this, "TracksTruthKey", "CombinedITkTracksTruthCollection"};
84 "CombinedITkTracksDetailedTruth"};
85
86 int m_offset{};
87
88 // Accepting truth only if passes these requirements
89 float m_max_eta = 4.0;
90 float m_min_pt = 1000.;
91 int m_max_barcode = 200e3;
92 float m_maxProdVertex = 260.;
93
94 // Information related to the TTree
95 //
96 std::string m_ntupleFileName;
97 std::string m_ntupleDirName;
98 std::string m_ntupleTreeName;
99 int m_maxCL{};
100 int m_maxPart{};
101 int m_maxSP{};
102 int m_maxTRK{};
103 int m_maxDTT{};
104 bool m_rootFile{};
105 TTree *m_nt{};
106
107 unsigned int m_run_number{};
108 unsigned long long m_event_number{};
109
110 int m_nSE{};
111 int *m_SEID{};
112
113 int m_nCL{};
114 int *m_CLindex{};
115 std::vector<std::string> *m_CLhardware{};
116 double *m_CLx{};
117 double *m_CLy{};
118 double *m_CLz{};
123 int *m_CLside{};
124 uint64_t *m_CLmoduleID{};
125 std::vector<std::vector<int>> *m_CLparticleLink_eventIndex{};
126 std::vector<std::vector<int>> *m_CLparticleLink_barcode{};
127 std::vector<std::vector<bool>> *m_CLbarcodesLinked{};
128 std::vector<std::vector<float>> *m_CLparticle_charge{};
129 std::vector<std::vector<int>> *m_CLphis{}, *m_CLetas{}, *m_CLtots{};
138 std::vector<std::vector<double>> *m_CLlocal_cov{};
139
143 float *m_Part_px{}, *m_Part_py{}, *m_Part_pz{};
144 float *m_Part_pt{};
145 float *m_Part_eta{};
146 float *m_Part_vx{}, *m_Part_vy{}, *m_Part_vz{};
153 std::vector<std::vector<int>> *m_Part_vParentID{}, *m_Part_vParentBarcode{};
154
155 int m_nSP{};
156 int *m_SPindex{};
157 double *m_SPx{}, *m_SPy{}, *m_SPz{};
159 int *m_SPisOverlap{}; // -1: pixel, 0: strip not overlap, 1: strip overlap eta, 2: strip overlap phi, 3: overlap eta & phi
160
161 double *m_SPradius{};
162 double *m_SPcovr{};
163 double *m_SPcovz{};
164 // Half length of top half strip
166 // Half length of bottom half strip
168
169 std::vector<std::vector<float>> *m_SPtopStripDirection{};
170 std::vector<std::vector<float>> *m_SPbottomStripDirection{};
171 std::vector<std::vector<float>> *m_SPstripCenterDistance{};
172 std::vector<std::vector<float>> *m_SPtopStripCenterPosition{};
173
174 int m_nTRK{};
177 std::vector<std::vector<int>> *m_TRKproperties{}, *m_TRKpattern{};
179 float *m_TRKchiSq{};
182 std::vector<std::vector<double>> *m_TRKperigee_position{}, *m_TRKperigee_momentum{};
185
186 int m_nDTT{};
190};
191} // namespace InDet
192
193#endif // INDETGNNTRACKING_DUMPOBJECTS_H
Scalar eta() const
pseudorapidity method
double charge(const T &p)
Definition AtlasPID.h:997
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
Definition DumpObjects.h:99
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:83
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:70
int m_maxSP
jobOption: maximum number of space points
const SCT_ID * m_SCT_ID
Definition DumpObjects.h:58
SG::ReadHandleKey< TrackTruthCollection > m_tracksTruthKey
Definition DumpObjects.h:82
std::vector< std::vector< double > > * m_TRKperigee_momentum
SG::ReadHandleKey< TrackCollection > m_tracksKey
Definition DumpObjects.h:81
unsigned long long m_event_number
double * m_CLJan_loc_direction3
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition DumpObjects.h:66
std::vector< std::vector< float > > * m_SPtopStripDirection
double * m_CLJan_loc_direction2
std::string m_name
Definition DumpObjects.h:63
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:60
std::vector< std::vector< double > > * m_TRKperigee_position
std::vector< std::vector< int > > * m_Part_vParentID
const PixelID * m_pixelID
Definition DumpObjects.h:57
std::string m_ntupleDirName
jobOption: Ntuple directory name
Definition DumpObjects.h:97
std::string m_ntupleFileName
jobOption: Ntuple file name
Definition DumpObjects.h:96
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:67
std::vector< std::vector< int > > * m_DTTtrajectory_barcode
SG::ReadHandleKey< xAOD::SpacePointContainer > m_xaodPixelSpacePointContainerKey
Definition DumpObjects.h:75
SG::ReadHandleKey< InDetSimDataCollection > m_stripSDOKey
Definition DumpObjects.h:73
const InDetDD::PixelDetectorManager * m_pixelManager
Definition DumpObjects.h:59
DumpObjects(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize() override final
std::string m_ntupleTreeName
jobOption: Ntuple tree name
Definition DumpObjects.h:98
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:77
SG::ReadHandleKey< InDetSimDataCollection > m_pixelSDOKey
Definition DumpObjects.h:72
SG::ReadHandleKey< InDet::PixelClusterContainer > m_pixelClusterKey
Definition DumpObjects.h:69
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:79
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