ATLAS Offline Software
Loading...
Searching...
No Matches
StripSpacePointValidationPlots.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8namespace ActsTrk {
9
11 const std::string& sDir,
12 const std::string& type)
13 : PlotBase(pParent, sDir),
15 {
16 m_barrelEndcap = Book1D("barrelEndcap", m_type + "SpacePoint_barrelEndcap;Barrel-Endcap;Entries;", 5, -2, 3, false);
17
18 m_layerDisk_barrel = Book1D("layerDisk_barrel", m_type + "SpacePoint_layerDisk_barrel;Layer Disk;Entries;", 6, 0, 6, false);
19 m_layerDisk_endcap = Book1D("layerDisk_endcap", m_type + "SpacePoint_layerDisk_endcap;Layer Disk;Entries;", 6, 0, 6, false);
20
21 m_phiModule_barrel = Book1D("phiModule_barrel", m_type + "SpacePoint_phiModule_barrel;Phi Module;Entries", 75, 0, 75, false);
22 m_phiModule_endcap = Book1D("phiModule_endcap", m_type + "SpacePoint_phiModule_endcap;Phi Module;Entries", 75, 0, 75, false);
23
24 m_etaModule_barrel = Book1D("etaModule_barrel", m_type + "SpacePoint_etaModule_barrel;Eta Module;Entries;", 120, -60, 60, false);
25 m_etaModule_endcap = Book1D("etaModule_endcap", m_type + "SpacePoint_etaModule_endcap;Eta Module;Entries;", 120, -60, 60, false);
26
27 m_sideModule_barrel = Book1D("sideModule_barrel", m_type + "SpacePoint_sideModule_barrel;Side Module;Entries;", 2, 0, 2, false);
28 m_sideModule_endcap = Book1D("sideModule_endcap", m_type + "SpacePoint_sideModule_endcap;Side Module;Entries;", 2, 0, 2, false);
29
30 m_eta_barrel = Book1D("eta_barrel", m_type + "SpacePoint_eta_barrel;eta;Entries;", 30, -3, 3, false);
31 m_eta_endcap = Book1D("eta_endcap", m_type + "SpacePoint_eta_endcap;eta;Entries;", 30, -3, 3, false);
32
33 m_perp_barrel = Book1D("perp_barrel", m_type + "SpacePoint_perp_barrel;r [mm];Entries;", 100, 300, 1100, false);
34 m_perp_endcap = Book1D("perp_endcap", m_type + "SpacePoint_perp_endcap;r [mm];Entries;", 100, 300, 1100, false);
35
36 m_global_x_barrel = Book1D("global_x_barrel", m_type + "SpacePoint_global_x_barrel;Global x [mm];Entries;", 100, -1100, 1100, false);
37 m_global_x_endcap = Book1D("global_x_endcap", m_type + "SpacePoint_global_x_endcap;Global x [mm];Entries;", 100, -1100, 1100, false);
38
39 m_global_y_barrel = Book1D("global_y_barrel", m_type + "SpacePoint_global_y_barrel;Global y [mm];Entries;", 100, -1100, 1100, false);
40 m_global_y_endcap = Book1D("global_y_endcap", m_type + "SpacePoint_global_y_endcap;Global y [mm];Entries;", 100, -1100, 1100, false);
41
42 m_global_z_barrel = Book1D("global_z_barrel", m_type + "SpacePoint_global_z_barrel;Global z [mm];Entries;", 100, -3000, 3000, false);
43 m_global_z_endcap = Book1D("global_z_endcap", m_type + "SpacePoint_global_z_endcap;Global z [mm];Entries;", 100, -3000, 3000, false);
44
45 m_globalCovR_barrel = Book1D("globalCovR_barrel", m_type + "SpacePoint_globalCovR_barrel; Global Cov R;Entries;", 50, 0, 6, false);
46 m_globalCovR_endcap = Book1D("globalCovR_endcap", m_type + "SpacePoint_globalCovR_endcap; Global Cov R;Entries;", 50, 0, 6, false);
47
48 m_globalCovZ_barrel = Book1D("globalCovZ_barrel", m_type + "SpacePoint_globalCovZ_barrel; Global Cov Z;Entries;", 50, 0, 6, false);
49 m_globalCovZ_endcap = Book1D("globalCovZ_endcap", m_type + "SpacePoint_globalCovZ_endcap; Global Cov Z;Entries;", 50, 0, 6, false);
50
51 m_topHalfStripLength_barrel = Book1D("topHalfStripLength_barrel", m_type + "SpacePoint_topHalfStripLength_barrel;lenght;Entries;", 100, 0, 35, false);
52 m_topHalfStripLength_endcap = Book1D("topHalfStripLength_endcap", m_type + "SpacePoint_topHalfStripLength_endcap;lenght;Entries;", 100, 0, 35, false);
53
54 m_bottomHalfStripLength_barrel = Book1D("bottomHalfStripLength_barrel", m_type + "SpacePoint_bottomHalfStripLength_barrel;length;Entries;", 100, 0, 35, false);
55 m_bottomHalfStripLength_endcap = Book1D("bottomHalfStripLength_endcap", m_type + "SpacePoint_bottomHalfStripLength_endcap;length;Entries;", 100, 0, 35, false);
56
57 m_topStripDirection_barrel = Book1D("topStripDirection_barrel", m_type + "SpacePoint_topStripDirection_barrel;;Entries;", 100, -1, 1, false);
58 m_topStripDirection_endcap = Book1D("topStripDirection_endcap", m_type + "SpacePoint_topStripDirection_endcap;;Entries;", 100, -1, 1, false);
59
60 m_bottomStripDirection_barrel = Book1D("bottomStripDirection_barrel", m_type + "SpacePoint_bottomStripDirection_barrel;;Entries;", 100, -1, 1, false);
61 m_bottomStripDirection_endcap = Book1D("bottomStripDirection_endcap", m_type + "SpacePoint_bottomStripDirection_endcap;;Entries;", 100, -1, 1, false);
62
63 m_stripCenterDistance_barrel = Book1D("stripCenterDistance_barrel", m_type + "SpacePoint_stripCenterDistance_barrel;;Entries;", 100, -60, 60, false);
64 m_stripCenterDistance_endcap = Book1D("stripCenterDistance_endcap", m_type + "SpacePoint_stripCenterDistance_endcap;;Entries;", 100, -60, 60, false);
65
66 m_topStripCenter_barrel = Book1D("topStripCenter_barrel", m_type + "SpacePoint_topStripCenter_barrel;;Entries;", 400, -3000, 3000, false);
67 m_topStripCenter_endcap = Book1D("topStripCenter_endcap", m_type + "SpacePoint_topStripCenter_endcap;;Entries;", 400, -3000, 3000, false);
68
69 m_global_xy_barrel = Book2D("global_xy_barrel", m_type + "SpacePoint_global_xy_barrel;x [mm];y [mm];", 100, -1100, 1100, 100, -1100, 1100, false);
70 m_global_xy_endcap = Book2D("global_xy_endcap", m_type + "SpacePoint_global_xy_endcap;x [mm];y [mm];", 100, -1100, 1100, 100, -1100, 1100, false);
71
72 m_global_zr_barrel = Book2D("global_zr_barrel", m_type + "SpacePoint_global_zr_barrel;z [mm];r [mm];", 100, -3000, 3000, 100, 300, 1100, false);
73 m_global_zr_endcap = Book2D("global_zr_endcap", m_type + "SpacePoint_global_zr_endcap;z [mm];r [mm];", 100, -3000, 3000, 100, 300, 1100, false);
74 }
75
77 float beamSpotWeight,
78 const SCT_ID* stripID)
79 {
80 const std::vector<Identifier>& ids { stripID->wafer_id(spacePoint->elementIdList()[0]),
81 stripID->wafer_id(spacePoint->elementIdList()[1])};
82
83 const auto& globalPos = spacePoint->globalPosition();
84 Amg::Vector3D globalPosition(globalPos(0, 0), globalPos(1, 0), globalPos(2, 0));
85
86 const auto& topStripDirection = spacePoint->topStripDirection();
87 const auto& bottomStripDirection = spacePoint->bottomStripDirection();
88 const auto& stripCenterDistance = spacePoint->stripCenterDistance();
89 const auto& topStripCenter = spacePoint->topStripCenter();
90
91 for (const Identifier& id : ids) {
92 bool isBarrel = (stripID->barrel_ec(id) == 0);
93
94 m_barrelEndcap->Fill(stripID->barrel_ec(id), beamSpotWeight);
95
96 if (isBarrel) {
97 m_layerDisk_barrel->Fill(stripID->layer_disk(id), beamSpotWeight);
98 m_phiModule_barrel->Fill(stripID->phi_module(id), beamSpotWeight);
99 m_etaModule_barrel->Fill(stripID->eta_module(id), beamSpotWeight);
100 m_sideModule_barrel->Fill(stripID->side(id), beamSpotWeight);
101 } else {
102 m_layerDisk_endcap->Fill(stripID->layer_disk(id), beamSpotWeight);
103 m_phiModule_endcap->Fill(stripID->phi_module(id), beamSpotWeight);
104 m_etaModule_endcap->Fill(stripID->eta_module(id), beamSpotWeight);
105 m_sideModule_endcap->Fill(stripID->side(id), beamSpotWeight);
106 }
107 } // loops on ids
108
109 bool isBarrel = (stripID->barrel_ec(ids[0]) == 0);
110
111 if (isBarrel) {
112 m_eta_barrel->Fill(globalPosition.eta(), beamSpotWeight);
113 m_perp_barrel->Fill(globalPosition.perp() , beamSpotWeight);
114
115 m_global_x_barrel->Fill(globalPos(0, 0), beamSpotWeight);
116 m_global_y_barrel->Fill(globalPos(1, 0), beamSpotWeight);
117 m_global_z_barrel->Fill(globalPos(2, 0), beamSpotWeight);
118
119 m_globalCovR_barrel->Fill(spacePoint->varianceR(), beamSpotWeight);
120 m_globalCovZ_barrel->Fill(spacePoint->varianceZ(), beamSpotWeight);
121
122 m_global_xy_barrel->Fill(globalPos(0, 0), globalPos(1, 0), beamSpotWeight);
123 m_global_zr_barrel->Fill(globalPos(2, 0), globalPosition.perp(), beamSpotWeight);
124
125 m_topHalfStripLength_barrel->Fill(spacePoint->topHalfStripLength(), beamSpotWeight);
126 m_bottomHalfStripLength_barrel->Fill(spacePoint->bottomHalfStripLength(), beamSpotWeight);
127
128 for(int i(0); i<3; ++i) {
129 m_topStripDirection_barrel->Fill(topStripDirection(i,0), beamSpotWeight);
130 m_bottomStripDirection_barrel->Fill(bottomStripDirection(i,0), beamSpotWeight);
131 m_stripCenterDistance_barrel->Fill(stripCenterDistance(i,0), beamSpotWeight);
132 m_topStripCenter_barrel->Fill(topStripCenter(i,0), beamSpotWeight);
133 }
134
135 } else {
136 m_eta_endcap->Fill(globalPosition.eta(), beamSpotWeight);
137 m_perp_endcap->Fill(globalPosition.perp() , beamSpotWeight);
138
139 m_global_x_endcap->Fill(globalPos(0, 0), beamSpotWeight);
140 m_global_y_endcap->Fill(globalPos(1, 0), beamSpotWeight);
141 m_global_z_endcap->Fill(globalPos(2, 0), beamSpotWeight);
142
143 m_globalCovR_endcap->Fill(spacePoint->varianceR(), beamSpotWeight);
144 m_globalCovZ_endcap->Fill(spacePoint->varianceZ(), beamSpotWeight);
145
146 m_global_xy_endcap->Fill(globalPos(0, 0), globalPos(1, 0), beamSpotWeight);
147 m_global_zr_endcap->Fill(globalPos(2, 0), globalPosition.perp(), beamSpotWeight);
148
149 m_topHalfStripLength_endcap->Fill(spacePoint->topHalfStripLength(), beamSpotWeight);
150 m_bottomHalfStripLength_endcap->Fill(spacePoint->bottomHalfStripLength(), beamSpotWeight);
151
152 m_topHalfStripLength_endcap->Fill(spacePoint->topHalfStripLength(), beamSpotWeight);
153 m_bottomHalfStripLength_endcap->Fill(spacePoint->bottomHalfStripLength(), beamSpotWeight);
154
155 for(int i(0); i<3; ++i) {
156 m_topStripDirection_endcap->Fill(topStripDirection(i,0), beamSpotWeight);
157 m_bottomStripDirection_endcap->Fill(bottomStripDirection(i,0), beamSpotWeight);
158 m_stripCenterDistance_endcap->Fill(stripCenterDistance(i,0), beamSpotWeight);
159 m_topStripCenter_endcap->Fill(topStripCenter(i,0), beamSpotWeight);
160 }
161 } // barrel - endcap
162
163 }
164}
void fill(const xAOD::SpacePoint *spacePoint, float beamSpotWeight, const SCT_ID *)
StripSpacePointValidationPlots(PlotBase *pParent, const std::string &sDir, const std::string &type="Strip")
TH1D * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition PlotBase.cxx:94
PlotBase(PlotBase *parent, const std::string &sDir)
Definition PlotBase.cxx:29
TH2F * Book2D(const std::string &name, const std::string &labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, bool prependDir=true)
Book a TH2F histogram.
Definition PlotBase.cxx:123
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
int layer_disk(const Identifier &id) const
Definition SCT_ID.h:687
int side(const Identifier &id) const
Definition SCT_ID.h:705
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
Definition SCT_ID.h:459
int phi_module(const Identifier &id) const
Definition SCT_ID.h:693
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition SCT_ID.h:681
int eta_module(const Identifier &id) const
Definition SCT_ID.h:699
ConstVectorMap stripCenterDistance() const
float varianceZ() const
float bottomHalfStripLength() const
const std::vector< DetectorIDHashType > & elementIdList() const
Returns the IdentifierHash of the spacepoint (corresponds to the detector element IdentifierHash)
float varianceR() const
Returns the variances.
ConstVectorMap bottomStripDirection() const
ConstVectorMap topStripCenter() const
ConstVectorMap globalPosition() const
Returns the global position of the pixel cluster.
float topHalfStripLength() const
Return details.
ConstVectorMap topStripDirection() const
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Eigen::Matrix< double, 3, 1 > Vector3D