53 std::vector<float> *layers = getLayersBins();
54 std::vector<float> clustersizeEta = model.getClusterSizeYBins();
55 clustersizeEta.insert(clustersizeEta.begin(),0.5);
56 clustersizeEta.push_back(100);
57 std::vector<float> clustersizePhi = model.getClusterSizeXBins();
58 clustersizePhi.insert(clustersizePhi.begin(),0.5);
59 clustersizePhi.push_back(100);
61 std::vector<float> phibins_Layer;
62 for(
int i = -60; i <= 60; i+=2) phibins_Layer.push_back(i);
63 std::vector<float> etabins_Layer;
64 for(
float i = -2.5; i <= 2.5; i+=0.125) etabins_Layer.push_back(i);
65 std::vector<float> ptbins_Layer;
69 ptbins_Layer.reserve(ntot+1);
70for(
int i = 0; i < ntot+1; i++){
71 ptbins_Layer.push_back( start * pow( end/start,
double(i)/
double(ntot) ) );
76 std::vector<std::string> binsnames(3);
77 std::vector<std::vector <float> > binsvectors(3);
88 std::string(
"Local y residuals - Analog position"),
89 500,100,binsvectors,binsnames);
92 std::string(
"Local y residuals - Center position"),
93 500,100,binsvectors,binsnames);
96 std::string(
"Local y pulls - Analog position"),
97 10.,100,binsvectors,binsnames);
100 std::string(
"Local y errors - Cluster uncertainty"),
101 1000,250,binsvectors,binsnames);
104 std::string(
"Local x residuals - Analog position"),
105 150, 100, binsvectors,binsnames);
108 std::string(
"Local x residuals - Center position"),
109 150, 100, binsvectors,binsnames);
112 std::string(
"Local x pulls - Analog position"),
113 10.,100,binsvectors,binsnames);
116 std::string(
"Local x errors - Cluster uncertainty"),
117 100,100,binsvectors,binsnames);
120 std::string(
"Charge"),
121 600000,600,binsvectors,binsnames);
129 std::string(
"Local x residuals - Analog position"),
130 150, 100, binsvectors,binsnames);
133 std::string(
"Local x residuals - Center position"),
134 150, 100, binsvectors,binsnames);
137 std::string(
"Local x pulls - Analog position"),
138 10.,100,binsvectors,binsnames);
141 std::string(
"Local x errors - Cluster uncertainty"),
142 100,100,binsvectors,binsnames);
145 std::string(
"Local y residuals - Analog position"),
146 500,100,binsvectors,binsnames);
149 std::string(
"Local y residuals - Center position"),
150 500,100,binsvectors,binsnames);
153 std::string(
"Local y pulls - Analog position"),
154 10.,100,binsvectors,binsnames);
157 std::string(
"Local y errors - Cluster uncertainty"),
158 1000,250,binsvectors,binsnames);
161 std::string(
"Charge"),
162 600000,600,binsvectors,binsnames);
164 std::vector<std::string> binsnames_Layer(2);
165 std::vector<std::vector <float> > binsvectors_Layer(2);
167 binsnames_Layer[0] =
"p_{T} [GeV]";
168 binsnames_Layer[1] =
"#eta_{i}";
170 binsvectors_Layer[0] = std::move(ptbins_Layer);
171 binsvectors_Layer[1] = etabins_Layer;
173 for(
int i = 0 ; i <
NLAYERS; i++){
175 std::cout <<
"layers " <<
NLAYERS <<
" " << i << std::endl;
177 std::ostringstream name;
178 std::ostringstream title;
179 name <<
"ResEta_Layer" << i;
180 title <<
"Local y resolution - Layer " << i ;
183 ( title.str() +
" - Analog position").c_str(),
184 500, 100, binsvectors_Layer, binsnames_Layer)
188 ( title.str() +
" - Center position").c_str(),
189 500, 100, binsvectors_Layer, binsnames_Layer)
193 ( title.str() +
" - Pulls").c_str(),
194 10., 100, binsvectors_Layer, binsnames_Layer)
199 binsnames_Layer[1] =
"#phi_{i} [#circ]";
200 binsvectors_Layer[1] = phibins_Layer;
202 for(
int i = 0 ; i <
NLAYERS; i++){
203 std::ostringstream name;
204 std::ostringstream title;
205 name <<
"ResPhi_Layer" << i;
206 title <<
"Local x resolution - Layer " << i ;
209 ( title.str() +
" - Analog position").c_str(),
210 150, 100, binsvectors_Layer, binsnames_Layer)
214 ( title.str() +
" - Center position").c_str(),
215 150, 100, binsvectors_Layer, binsnames_Layer)
219 ( title.str() +
" - Pulls").c_str(),
220 10., 100, binsvectors_Layer, binsnames_Layer)
224 std::vector<std::string> binsnames_Clustersize(1);
225 std::vector<std::vector <float> > binsvectors_Clustersize(1);
227 binsnames_Clustersize[0] =
"#eta_{i}";
228 binsvectors_Clustersize[0] = etabins_Layer;
231 std::ostringstream name;
232 std::ostringstream title;
233 name <<
"ResEta_Clustersize" << i+1;
234 title <<
"Local y resolution - Clustersize " << i+1;
237 ( title.str() +
" - Analog position").c_str(),
238 400, 100, binsvectors_Clustersize, binsnames_Clustersize)
242 ( title.str() +
" - Center position").c_str(),
243 400, 100, binsvectors_Clustersize, binsnames_Clustersize)
247 ( title.str() +
" - Cluster uncertainty").c_str(),
248 1000, 250, binsvectors_Clustersize, binsnames_Clustersize)
252 ( title.str() +
" - Pull").c_str(),
253 10., 100., binsvectors_Clustersize, binsnames_Clustersize)
255 std::ostringstream namecs;
256 std::ostringstream titlecs;
257 namecs <<
"Eta_Clustersize" << i+1;
258 titlecs <<
"#eta_{i} distribution - Clustersize " << i+1 ;
259 if (! etabins_Layer.empty()){
261 new TH1F(namecs.str().c_str(), titlecs.str().c_str(),
262 etabins_Layer.size(), etabins_Layer.front(),
263 etabins_Layer.back())
269 binsnames_Clustersize[0] =
"#phi_{i} [#circ]";
270 binsvectors_Clustersize[0] = std::move(phibins_Layer);
273 std::ostringstream name;
274 std::ostringstream title;
275 name <<
"ResPhi_Clustersize" << i+1;
276 title <<
"Local x resolution - Clustersize " << i+1;
279 ( title.str() +
" - Analog position").c_str(),
280 150, 100, binsvectors_Clustersize, binsnames_Clustersize)
284 ( title.str() +
" - Center position").c_str(),
285 150, 100, binsvectors_Clustersize, binsnames_Clustersize)
289 ( title.str() +
" - Cluster uncertainty").c_str(),
290 100, 100, binsvectors_Clustersize, binsnames_Clustersize)
294 ( title.str() +
" - Pull").c_str(),
295 10., 100., binsvectors_Clustersize, binsnames_Clustersize)
297 std::ostringstream namecs;
298 std::ostringstream titlecs;
299 namecs <<
"Phi_Clustersize" << i+1;
300 titlecs <<
"#phi_{i} distribution - Clustersize " << i+1 ;
302 new TH1F(namecs.str().c_str(), titlecs.str().c_str(),
308 "#phi_{i} #eta_{i} correlation", 100, -100,100, 100, -2.5, 2.5);
314 "#Deltarow #Deltacolumn correlation", 10, 0,10, 10, 0, 10);
320 double ptbins_Layerpointer[101];
324 for(
int i = 0; i < ntot2+1; i++){
325 ptbins_Layerpointer[i] = start2 * pow( end2/start2,
double(i)/
double(ntot2) );
328 "Local y residuals vs p_{T}",
329 100, ptbins_Layerpointer, 100, -1000, 1000);
331 100, ptbins_Layerpointer, 100, -400, 400);
554 int neta = etaModel->GetNbinsX();
555 int nalpha = phiModel->GetNbinsX();
556 int ntotbins = ncsx + ncsy + neta + nalpha;
558 std::vector<float> values;
559 values.reserve(ntotbins);
561 for (
int i=0; i<ncsx && globalindex<ntotbins; i++, globalindex++) {
562 values.push_back(i+0.5);
564 for (
int i=0; i<ncsy && globalindex<ntotbins; i++, globalindex++) {
565 values.push_back(i+0.5);
567 values.push_back(-2.5);
568 for (
int i=1; i<neta && globalindex<ntotbins; i++, globalindex++) {
569 values.push_back(etaModel->GetBinLowEdge(i+1));
571 values.push_back(-180);
572 for (
int i=1; i<nalpha && globalindex<ntotbins; i++, globalindex++) {
573 values.push_back(phiModel->GetBinLowEdge(i+1));
575 parameters->setParameters(ncsx, ncsy, neta, nalpha,0,std::move(values));
577 int ntotyconstnx = ncsx * nalpha;
579 const std::string phiStr{
"#phi_{i} [#circ]"};
580 const std::string etaStr{
"#eta_{i}"};
581 for(
int i = 0; i < nalpha && globalindex < ntotyconstnx; i++)
582 for(
int j = 0; j < ncsx && globalindex < ntotyconstnx; j++, globalindex++){
583 double value =
m_phi_Clustersize[j]->GetRMSProfile(phiStr)->GetBinContent(i+1)/1000;
584 if (value == 0) value = (j+1)*50/sqrt(12)/1000;
585 parameters->setPixelBarrelPhiError(globalindex,value);
587 int ntotyconstny = ncsx * ncsy * neta;
590 for(
int i = 0; i < neta && globalindex < ntotyconstny; i++)
591 for(
int j = 0; j < ncsx && globalindex < ntotyconstny; j++)
592 for(
int k = 0; k < ncsy && globalindex < ntotyconstny; k++, globalindex++){
593 double value =
m_eta_Clustersize[k]->GetRMSProfile(etaStr)->GetBinContent(i+1)/1000;
594 if (value == 0) value = (k+1)*400/sqrt(12)/1000;
595 parameters->setPixelBarrelEtaError(globalindex,value);
597 parameters->Print(name);
605 double Phi,
double CSphi,
double digResPhi,
double ResPhi,
double ErrPhi, Double_t PullPhi,
606 double Eta,
double CSeta,
double digResEta,
double ResEta,
double ErrEta, Double_t PullEta,
double Charge){
608 std::vector< float >parameters(3);
612 m_eta->Fill(
float(ResEta),parameters);
613 m_etaDig->Fill(
float(digResEta),parameters);
614 m_etaPull->Fill(
float(PullEta),parameters);
615 m_etaErr->Fill(
float(ErrEta), parameters);
616 m_phi_eta->Fill(
float(ResPhi),parameters);
624 m_phi->Fill(
float(ResPhi),parameters);
625 m_phiDig->Fill(
float(digResPhi),parameters);
626 m_phiPull->Fill(
float(PullPhi),parameters);
627 m_phiErr->Fill(
float(ErrPhi), parameters);
628 m_eta_phi->Fill(
float(ResEta),parameters);
635 std::vector< float >parameters_Layer(2);
636 if(GeVTrkPt < 10E10) parameters_Layer[0] = GeVTrkPt;
637 else parameters_Layer[0] = 1.;
639 parameters_Layer[1] = Eta;
640 m_eta_Layer[Layer]->Fill(
float(ResEta),parameters_Layer);
644 parameters_Layer[1] = Phi;
645 m_phi_Layer[Layer]->Fill(
float(ResPhi),parameters_Layer);
650 std::vector< float >parameters_Clustersize(1);
653 parameters_Clustersize[0] = Eta;
661 parameters_Clustersize[0] = Phi;