31 :
51
52 std::vector<float> *
layers = getLayersBins();
53 std::vector<float> clustersizeEta =
model.getClusterSizeYBins();
54 clustersizeEta.insert(clustersizeEta.begin(),0.5);
55 clustersizeEta.push_back(100);
56 std::vector<float> clustersizePhi =
model.getClusterSizeXBins();
57 clustersizePhi.insert(clustersizePhi.begin(),0.5);
58 clustersizePhi.push_back(100);
59
60 std::vector<float> phibins_Layer;
61 for(
int i = -60;
i <= 60;
i+=2) phibins_Layer.push_back(i);
62 std::vector<float> etabins_Layer;
63 for(
float i = -2.5;
i <= 2.5;
i+=0.125) etabins_Layer.push_back(i);
64 std::vector<float> ptbins_Layer;
65 int ntot = 9;
68 ptbins_Layer.reserve(ntot+1);
69for(
int i = 0;
i < ntot+1;
i++){
70 ptbins_Layer.push_back( start *
pow( end/start,
double(i)/
double(ntot) ) );
71 }
72
73
74
75 std::vector<std::string> binsnames(3);
76 std::vector<std::vector <float> > binsvectors(3);
77
81
85
86 m_eta =
new PixelResidualHistograms(std::string(
"ResEta"),
87 std::string("Local y residuals - Analog position"),
88 500,100,binsvectors,binsnames);
89
90 m_etaDig =
new PixelResidualHistograms(std::string(
"ResEtaDig"),
91 std::string("Local y residuals - Center position"),
92 500,100,binsvectors,binsnames);
93
94 m_etaPull =
new PixelResidualHistograms(std::string(
"PullEta"),
95 std::string("Local y pulls - Analog position"),
96 10.,100,binsvectors,binsnames);
97
98 m_etaErr =
new PixelResidualHistograms(std::string(
"ErrEta"),
99 std::string("Local y errors - Cluster uncertainty"),
100 1000,250,binsvectors,binsnames);
101
102 m_phi_eta =
new PixelResidualHistograms(std::string(
"ResPhiEta"),
103 std::string("Local x residuals - Analog position"),
104 150, 100, binsvectors,binsnames);
105
106 m_phiDig_eta =
new PixelResidualHistograms(std::string(
"ResPhiDigEta"),
107 std::string("Local x residuals - Center position"),
108 150, 100, binsvectors,binsnames);
109
110 m_phiPull_eta =
new PixelResidualHistograms(std::string(
"PullPhiEta"),
111 std::string("Local x pulls - Analog position"),
112 10.,100,binsvectors,binsnames);
113
114 m_phiErr_eta =
new PixelResidualHistograms(std::string(
"ErrPhiEta"),
115 std::string("Local x errors - Cluster uncertainty"),
116 100,100,binsvectors,binsnames);
117
118 m_charge_eta =
new PixelResidualHistograms(std::string(
"ChargeEta"),
119 std::string("Charge"),
120 600000,600,binsvectors,binsnames);
121
123
126
127 m_phi =
new PixelResidualHistograms(std::string(
"ResPhi"),
128 std::string("Local x residuals - Analog position"),
129 150, 100, binsvectors,binsnames);
130
131 m_phiDig =
new PixelResidualHistograms(std::string(
"ResPhiDig"),
132 std::string("Local x residuals - Center position"),
133 150, 100, binsvectors,binsnames);
134
135 m_phiPull =
new PixelResidualHistograms(std::string(
"PullPhi"),
136 std::string("Local x pulls - Analog position"),
137 10.,100,binsvectors,binsnames);
138
139 m_phiErr =
new PixelResidualHistograms(std::string(
"ErrPhi"),
140 std::string("Local x errors - Cluster uncertainty"),
141 100,100,binsvectors,binsnames);
142
143 m_eta_phi =
new PixelResidualHistograms(std::string(
"ResEtaPhi"),
144 std::string("Local y residuals - Analog position"),
145 500,100,binsvectors,binsnames);
146
147 m_etaDig_phi =
new PixelResidualHistograms(std::string(
"ResEtaDigPhi"),
148 std::string("Local y residuals - Center position"),
149 500,100,binsvectors,binsnames);
150
151 m_etaPull_phi =
new PixelResidualHistograms(std::string(
"PullEtaPhi"),
152 std::string("Local y pulls - Analog position"),
153 10.,100,binsvectors,binsnames);
154
155 m_etaErr_phi =
new PixelResidualHistograms(std::string(
"ErrEtaPhi"),
156 std::string("Local y errors - Cluster uncertainty"),
157 1000,250,binsvectors,binsnames);
158
159 m_charge_phi =
new PixelResidualHistograms(std::string(
"ChargePhi"),
160 std::string("Charge"),
161 600000,600,binsvectors,binsnames);
162
163 std::vector<std::string> binsnames_Layer(2);
164 std::vector<std::vector <float> > binsvectors_Layer(2);
165
166 binsnames_Layer[0] = "p_{T} [GeV]";
167 binsnames_Layer[1] = "#eta_{i}";
168
169 binsvectors_Layer[0] = std::move(ptbins_Layer);
170 binsvectors_Layer[1] = etabins_Layer;
171
173
174 std::cout <<
"layers " <<
NLAYERS <<
" " <<
i << std::endl;
175
176 std::ostringstream
name;
177 std::ostringstream
title;
178 name <<
"ResEta_Layer" <<
i;
179 title <<
"Local y resolution - Layer " <<
i ;
181 new PixelResidualHistograms(
name.str(),
182 (
title.str() +
" - Analog position").c_str(),
183 500, 100, binsvectors_Layer, binsnames_Layer)
184 );
186 new PixelResidualHistograms( (
name.str() +
"Dig").c_str(),
187 (
title.str() +
" - Center position").c_str(),
188 500, 100, binsvectors_Layer, binsnames_Layer)
189 );
191 new PixelResidualHistograms( (
name.str() +
"Pull").c_str(),
192 (
title.str() +
" - Pulls").c_str(),
193 10., 100, binsvectors_Layer, binsnames_Layer)
194 );
195 }
196
197
198 binsnames_Layer[1] = "#phi_{i} [#circ]";
199 binsvectors_Layer[1] = phibins_Layer;
200
202 std::ostringstream
name;
203 std::ostringstream
title;
204 name <<
"ResPhi_Layer" <<
i;
205 title <<
"Local x resolution - Layer " <<
i ;
207 new PixelResidualHistograms(
name.str(),
208 (
title.str() +
" - Analog position").c_str(),
209 150, 100, binsvectors_Layer, binsnames_Layer)
210 );
212 new PixelResidualHistograms( (
name.str() +
"Dig").c_str(),
213 (
title.str() +
" - Center position").c_str(),
214 150, 100, binsvectors_Layer, binsnames_Layer)
215 );
217 new PixelResidualHistograms( (
name.str() +
"Pull").c_str(),
218 (
title.str() +
" - Pulls").c_str(),
219 10., 100, binsvectors_Layer, binsnames_Layer)
220 );
221 }
222
223 std::vector<std::string> binsnames_Clustersize(1);
224 std::vector<std::vector <float> > binsvectors_Clustersize(1);
225
226 binsnames_Clustersize[0] = "#eta_{i}";
227 binsvectors_Clustersize[0] = etabins_Layer;
228
230 std::ostringstream
name;
231 std::ostringstream
title;
232 name <<
"ResEta_Clustersize" <<
i+1;
233 title <<
"Local y resolution - Clustersize " <<
i+1;
235 new PixelResidualHistograms(
name.str(),
236 (
title.str() +
" - Analog position").c_str(),
237 400, 100, binsvectors_Clustersize, binsnames_Clustersize)
238 );
240 new PixelResidualHistograms( (
name.str() +
"Dig").c_str(),
241 (
title.str() +
" - Center position").c_str(),
242 400, 100, binsvectors_Clustersize, binsnames_Clustersize)
243 );
245 new PixelResidualHistograms( (
name.str() +
"Err").c_str(),
246 (
title.str() +
" - Cluster uncertainty").c_str(),
247 1000, 250, binsvectors_Clustersize, binsnames_Clustersize)
248 );
250 new PixelResidualHistograms( (
name.str() +
"Pull").c_str(),
251 (
title.str() +
" - Pull").c_str(),
252 10., 100., binsvectors_Clustersize, binsnames_Clustersize)
253 );
254 std::ostringstream namecs;
255 std::ostringstream titlecs;
256 namecs <<
"Eta_Clustersize" <<
i+1;
257 titlecs <<
"#eta_{i} distribution - Clustersize " <<
i+1 ;
259 new TH1F(namecs.str().c_str(), titlecs.str().c_str(),
260 etabins_Layer.size(), etabins_Layer[0],
261 etabins_Layer[etabins_Layer.size()-1])
262 );
263 }
264
265
266 binsnames_Clustersize[0] = "#phi_{i} [#circ]";
267 binsvectors_Clustersize[0] = std::move(phibins_Layer);
268
270 std::ostringstream
name;
271 std::ostringstream
title;
272 name <<
"ResPhi_Clustersize" <<
i+1;
273 title <<
"Local x resolution - Clustersize " <<
i+1;
275 new PixelResidualHistograms(
name.str(),
276 (
title.str() +
" - Analog position").c_str(),
277 150, 100, binsvectors_Clustersize, binsnames_Clustersize)
278 );
280 new PixelResidualHistograms( (
name.str() +
"Dig").c_str(),
281 (
title.str() +
" - Center position").c_str(),
282 150, 100, binsvectors_Clustersize, binsnames_Clustersize)
283 );
285 new PixelResidualHistograms( (
name.str() +
"Err").c_str(),
286 (
title.str() +
" - Cluster uncertainty").c_str(),
287 100, 100, binsvectors_Clustersize, binsnames_Clustersize)
288 );
290 new PixelResidualHistograms( (
name.str() +
"Pull").c_str(),
291 (
title.str() +
" - Pull").c_str(),
292 10., 100., binsvectors_Clustersize, binsnames_Clustersize)
293 );
294 std::ostringstream namecs;
295 std::ostringstream titlecs;
296 namecs <<
"Phi_Clustersize" <<
i+1;
297 titlecs <<
"#phi_{i} distribution - Clustersize " <<
i+1 ;
299 new TH1F(namecs.str().c_str(), titlecs.str().c_str(),
300 400, -100,100)
301 );
302 }
303
305 "#phi_{i} #eta_{i} correlation", 100, -100,100, 100, -2.5, 2.5);
306
309
311 "#Deltarow #Deltacolumn correlation", 10, 0,10, 10, 0, 10);
312
315
316
317 double ptbins_Layerpointer[101];
318 int ntot2 = 100;
319 double start2 = 0.1;
320 double end2 = 10E3;
321 for(
int i = 0;
i < ntot2+1;
i++){
322 ptbins_Layerpointer[
i] = start2 *
pow( end2/start2,
double(i)/
double(ntot2) );
323 }
325 "Local y residuals vs p_{T}",
326 100, ptbins_Layerpointer, 100, -1000, 1000);
328 100, ptbins_Layerpointer, 100, -400, 400);
329
330
332
333}
static const int NCLUSSIZES
constexpr int pow(int base, int exp) noexcept
std::vector< PixelResidualHistograms * > m_phiDig_Clustersize
PixelResidualHistograms * m_phi_eta
PixelResidualHistograms * m_etaPull_phi
PixelResidualHistograms * m_charge_eta
std::vector< PixelResidualHistograms * > m_phiPull_Clustersize
PixelResidualHistograms * m_eta
PixelResidualHistograms * m_etaErr_phi
std::vector< PixelResidualHistograms * > m_etaDig_Clustersize
PixelResidualHistograms * m_phiDig
std::vector< PixelResidualHistograms * > m_etaPull_Layer
PixelResidualHistograms * m_phiErr
std::vector< PixelResidualHistograms * > m_phiPull_Layer
std::vector< PixelResidualHistograms * > m_etaErr_Clustersize
PixelResidualHistograms * m_eta_phi
std::vector< PixelResidualHistograms * > m_phiErr_Clustersize
std::vector< PixelResidualHistograms * > m_phi_Clustersize
PixelResidualHistograms * m_etaErr
PixelResidualHistograms * m_phiDig_eta
std::vector< PixelResidualHistograms * > m_phi_Layer
TH2F * m_CSeta_CSphi_correlation
std::vector< TH1F * > m_phiClustersize
std::vector< TH1F * > m_etaClustersize
PixelResidualHistograms * m_etaDig_phi
PixelResidualHistograms * m_phiErr_eta
std::vector< PixelResidualHistograms * > m_phiDig_Layer
PixelResidualHistograms * m_phiPull_eta
PixelResidualHistograms * m_phiPull
PixelResidualHistograms * m_charge_phi
TH2F * m_eta_phi_correlation
std::vector< PixelResidualHistograms * > m_etaDig_Layer
std::vector< PixelResidualHistograms * > m_etaPull_Clustersize
std::vector< PixelResidualHistograms * > m_eta_Clustersize
std::vector< PixelResidualHistograms * > m_eta_Layer
PixelResidualHistograms * m_phi
PixelResidualHistograms * m_etaPull
PixelResidualHistograms * m_etaDig
layers(flags, cells_name, *args, **kw)
Here we define wrapper functions to set up all of the standard corrections.
TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)