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);
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;
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) ) );
75 std::vector<std::string> binsnames(3);
76 std::vector<std::vector <float> > binsvectors(3);
87 std::string(
"Local y residuals - Analog position"),
88 500,100,binsvectors,binsnames);
91 std::string(
"Local y residuals - Center position"),
92 500,100,binsvectors,binsnames);
95 std::string(
"Local y pulls - Analog position"),
96 10.,100,binsvectors,binsnames);
99 std::string(
"Local y errors - Cluster uncertainty"),
100 1000,250,binsvectors,binsnames);
103 std::string(
"Local x residuals - Analog position"),
104 150, 100, binsvectors,binsnames);
107 std::string(
"Local x residuals - Center position"),
108 150, 100, binsvectors,binsnames);
111 std::string(
"Local x pulls - Analog position"),
112 10.,100,binsvectors,binsnames);
115 std::string(
"Local x errors - Cluster uncertainty"),
116 100,100,binsvectors,binsnames);
119 std::string(
"Charge"),
120 600000,600,binsvectors,binsnames);
128 std::string(
"Local x residuals - Analog position"),
129 150, 100, binsvectors,binsnames);
132 std::string(
"Local x residuals - Center position"),
133 150, 100, binsvectors,binsnames);
136 std::string(
"Local x pulls - Analog position"),
137 10.,100,binsvectors,binsnames);
140 std::string(
"Local x errors - Cluster uncertainty"),
141 100,100,binsvectors,binsnames);
144 std::string(
"Local y residuals - Analog position"),
145 500,100,binsvectors,binsnames);
148 std::string(
"Local y residuals - Center position"),
149 500,100,binsvectors,binsnames);
152 std::string(
"Local y pulls - Analog position"),
153 10.,100,binsvectors,binsnames);
156 std::string(
"Local y errors - Cluster uncertainty"),
157 1000,250,binsvectors,binsnames);
160 std::string(
"Charge"),
161 600000,600,binsvectors,binsnames);
163 std::vector<std::string> binsnames_Layer(2);
164 std::vector<std::vector <float> > binsvectors_Layer(2);
166 binsnames_Layer[0] =
"p_{T} [GeV]";
167 binsnames_Layer[1] =
"#eta_{i}";
169 binsvectors_Layer[0] = std::move(ptbins_Layer);
170 binsvectors_Layer[1] = etabins_Layer;
172 for(
int i = 0 ; i <
NLAYERS; i++){
174 std::cout <<
"layers " <<
NLAYERS <<
" " << i << std::endl;
176 std::ostringstream name;
177 std::ostringstream title;
178 name <<
"ResEta_Layer" << i;
179 title <<
"Local y resolution - Layer " << i ;
182 ( title.str() +
" - Analog position").c_str(),
183 500, 100, binsvectors_Layer, binsnames_Layer)
187 ( title.str() +
" - Center position").c_str(),
188 500, 100, binsvectors_Layer, binsnames_Layer)
192 ( title.str() +
" - Pulls").c_str(),
193 10., 100, binsvectors_Layer, binsnames_Layer)
198 binsnames_Layer[1] =
"#phi_{i} [#circ]";
199 binsvectors_Layer[1] = phibins_Layer;
201 for(
int i = 0 ; i <
NLAYERS; i++){
202 std::ostringstream name;
203 std::ostringstream title;
204 name <<
"ResPhi_Layer" << i;
205 title <<
"Local x resolution - Layer " << i ;
208 ( title.str() +
" - Analog position").c_str(),
209 150, 100, binsvectors_Layer, binsnames_Layer)
213 ( title.str() +
" - Center position").c_str(),
214 150, 100, binsvectors_Layer, binsnames_Layer)
218 ( title.str() +
" - Pulls").c_str(),
219 10., 100, binsvectors_Layer, binsnames_Layer)
223 std::vector<std::string> binsnames_Clustersize(1);
224 std::vector<std::vector <float> > binsvectors_Clustersize(1);
226 binsnames_Clustersize[0] =
"#eta_{i}";
227 binsvectors_Clustersize[0] = etabins_Layer;
230 std::ostringstream name;
231 std::ostringstream title;
232 name <<
"ResEta_Clustersize" << i+1;
233 title <<
"Local y resolution - Clustersize " << i+1;
236 ( title.str() +
" - Analog position").c_str(),
237 400, 100, binsvectors_Clustersize, binsnames_Clustersize)
241 ( title.str() +
" - Center position").c_str(),
242 400, 100, binsvectors_Clustersize, binsnames_Clustersize)
246 ( title.str() +
" - Cluster uncertainty").c_str(),
247 1000, 250, binsvectors_Clustersize, binsnames_Clustersize)
251 ( title.str() +
" - Pull").c_str(),
252 10., 100., binsvectors_Clustersize, binsnames_Clustersize)
254 std::ostringstream namecs;
255 std::ostringstream titlecs;
256 namecs <<
"Eta_Clustersize" << i+1;
257 titlecs <<
"#eta_{i} distribution - Clustersize " << i+1 ;
258 if (! etabins_Layer.empty()){
260 new TH1F(namecs.str().c_str(), titlecs.str().c_str(),
261 etabins_Layer.size(), etabins_Layer.front(),
262 etabins_Layer.back())
268 binsnames_Clustersize[0] =
"#phi_{i} [#circ]";
269 binsvectors_Clustersize[0] = std::move(phibins_Layer);
272 std::ostringstream name;
273 std::ostringstream title;
274 name <<
"ResPhi_Clustersize" << i+1;
275 title <<
"Local x resolution - Clustersize " << i+1;
278 ( title.str() +
" - Analog position").c_str(),
279 150, 100, binsvectors_Clustersize, binsnames_Clustersize)
283 ( title.str() +
" - Center position").c_str(),
284 150, 100, binsvectors_Clustersize, binsnames_Clustersize)
288 ( title.str() +
" - Cluster uncertainty").c_str(),
289 100, 100, binsvectors_Clustersize, binsnames_Clustersize)
293 ( title.str() +
" - Pull").c_str(),
294 10., 100., binsvectors_Clustersize, binsnames_Clustersize)
296 std::ostringstream namecs;
297 std::ostringstream titlecs;
298 namecs <<
"Phi_Clustersize" << i+1;
299 titlecs <<
"#phi_{i} distribution - Clustersize " << i+1 ;
301 new TH1F(namecs.str().c_str(), titlecs.str().c_str(),
307 "#phi_{i} #eta_{i} correlation", 100, -100,100, 100, -2.5, 2.5);
313 "#Deltarow #Deltacolumn correlation", 10, 0,10, 10, 0, 10);
319 double ptbins_Layerpointer[101];
323 for(
int i = 0; i < ntot2+1; i++){
324 ptbins_Layerpointer[i] = start2 * pow( end2/start2,
double(i)/
double(ntot2) );
327 "Local y residuals vs p_{T}",
328 100, ptbins_Layerpointer, 100, -1000, 1000);
330 100, ptbins_Layerpointer, 100, -400, 400);
553 int neta = etaModel->GetNbinsX();
554 int nalpha = phiModel->GetNbinsX();
555 int ntotbins = ncsx + ncsy + neta + nalpha;
557 std::vector<float> values;
558 values.reserve(ntotbins);
560 for (
int i=0; i<ncsx && globalindex<ntotbins; i++, globalindex++) {
561 values.push_back(i+0.5);
563 for (
int i=0; i<ncsy && globalindex<ntotbins; i++, globalindex++) {
564 values.push_back(i+0.5);
566 values.push_back(-2.5);
567 for (
int i=1; i<neta && globalindex<ntotbins; i++, globalindex++) {
568 values.push_back(etaModel->GetBinLowEdge(i+1));
570 values.push_back(-180);
571 for (
int i=1; i<nalpha && globalindex<ntotbins; i++, globalindex++) {
572 values.push_back(phiModel->GetBinLowEdge(i+1));
574 parameters->setParameters(ncsx, ncsy, neta, nalpha,0,std::move(values));
576 int ntotyconstnx = ncsx * nalpha;
578 for(
int i = 0; i < nalpha && globalindex < ntotyconstnx; i++)
579 for(
int j = 0; j < ncsx && globalindex < ntotyconstnx; j++, globalindex++){
580 double value =
m_phi_Clustersize[j]->GetRMSProfile(
"#phi_{i} [#circ]")->GetBinContent(i+1)/1000;
581 if (value == 0) value = (j+1)*50/sqrt(12)/1000;
582 parameters->setPixelBarrelPhiError(globalindex,value);
584 int ntotyconstny = ncsx * ncsy * neta;
586 for(
int i = 0; i < neta && globalindex < ntotyconstny; i++)
587 for(
int j = 0; j < ncsx && globalindex < ntotyconstny; j++)
588 for(
int k = 0; k < ncsy && globalindex < ntotyconstny; k++, globalindex++){
589 double value =
m_eta_Clustersize[k]->GetRMSProfile(
"#eta_{i}")->GetBinContent(i+1)/1000;
590 if (value == 0) value = (k+1)*400/sqrt(12)/1000;
591 parameters->setPixelBarrelEtaError(globalindex,value);
593 parameters->Print(name);
601 double Phi,
double CSphi,
double digResPhi,
double ResPhi,
double ErrPhi, Double_t PullPhi,
602 double Eta,
double CSeta,
double digResEta,
double ResEta,
double ErrEta, Double_t PullEta,
double Charge){
604 std::vector< float >parameters(3);
608 m_eta->Fill(
float(ResEta),parameters);
609 m_etaDig->Fill(
float(digResEta),parameters);
610 m_etaPull->Fill(
float(PullEta),parameters);
611 m_etaErr->Fill(
float(ErrEta), parameters);
612 m_phi_eta->Fill(
float(ResPhi),parameters);
620 m_phi->Fill(
float(ResPhi),parameters);
621 m_phiDig->Fill(
float(digResPhi),parameters);
622 m_phiPull->Fill(
float(PullPhi),parameters);
623 m_phiErr->Fill(
float(ErrPhi), parameters);
624 m_eta_phi->Fill(
float(ResEta),parameters);
631 std::vector< float >parameters_Layer(2);
632 if(GeVTrkPt < 10E10) parameters_Layer[0] = GeVTrkPt;
633 else parameters_Layer[0] = 1.;
635 parameters_Layer[1] = Eta;
636 m_eta_Layer[Layer]->Fill(
float(ResEta),parameters_Layer);
640 parameters_Layer[1] = Phi;
641 m_phi_Layer[Layer]->Fill(
float(ResPhi),parameters_Layer);
646 std::vector< float >parameters_Clustersize(1);
649 parameters_Clustersize[0] = Eta;
657 parameters_Clustersize[0] = Phi;