108 double d_residual_xmin =
Parameters.getParameter<
double>(
"xmin");
109 double d_residual_xmax =
Parameters.getParameter<
double>(
"xmax");
112 double d_normres_xmin =
Parameters.getParameter<
double>(
"xmin");
113 double d_normres_xmax =
Parameters.getParameter<
double>(
"xmax");
124 for (
DetId id : ids) {
125 auto ModuleID =
id.rawId();
126 auto isPixel =
id.subdetId() == 1 ||
id.subdetId() == 2;
132 switch (
id.subdetId()) {
134 pixel_organizer.setModuleFolder(ibooker, ModuleID, 0);
137 pixel_organizer.setModuleFolder(ibooker, ModuleID, 0);
144 std::string hid = hidmanager.createHistoId(
"HitResidualsX",
"det", ModuleID);
145 std::string normhid = hidmanager.createHistoId(
"NormalizedHitResidualsX",
"det", ModuleID);
147 histos.x.base = ibooker.book1D(hid, hid, i_residuals_Nbins, d_residual_xmin, d_residual_xmax);
148 histos.x.base->setAxisTitle(
"(x_{pred} - x_{rec})' [cm]");
149 histos.x.normed = ibooker.book1D(normhid, normhid, i_normres_Nbins, d_normres_xmin, d_normres_xmax);
150 histos.x.normed->setAxisTitle(
"(x_{pred} - x_{rec})'/#sigma");
153 std::string hid = hidmanager.createHistoId(
"HitResidualsY",
"det", ModuleID);
154 std::string normhid = hidmanager.createHistoId(
"NormalizedHitResidualsY",
"det", ModuleID);
156 histos.y.base = ibooker.book1D(hid, hid, i_residuals_Nbins, d_residual_xmin, d_residual_xmax);
157 histos.y.base->setAxisTitle(
"(y_{pred} - y_{rec})' [cm]");
158 histos.y.normed = ibooker.book1D(normhid, normhid, i_normres_Nbins, d_normres_xmin, d_normres_xmax);
159 histos.y.normed->setAxisTitle(
"(y_{pred} - y_{rec})'/#sigma");
167 switch (
id.subdetId()) {
172 ibooker.setCurrentFolder(
"Pixel/Barrel");
175 ibooker.setCurrentFolder(
"Pixel/Endcap");
179 strip_organizer.
setLayerFolder(ModuleID, tTopo, subdetandlayer.second);
182 auto isBarrel = subdetandlayer.first.find(
"B") != std::string::npos;
184 auto xy = std::vector<std::pair<HistoPair &, const char *>>{std::make_pair(std::ref(
histos.x),
"X"),
185 std::make_pair(std::ref(
histos.y),
"Y")};
186 for (
auto &histopair :
xy) {
191 if (!
isPixel && histopair.second[0] ==
'Y')
195 Form(
"HitResiduals%s_%s%d",
197 isBarrel ?
"L" : (subdetandlayer.second > 0 ?
"Dp" :
"Dm"),
199 : (Form(
"HitResiduals_%s__%s__%d",
201 subdetandlayer.first.c_str(),
205 std::string histotitle = Form(
"HitResiduals %s on %s%s full %s %d",
207 subdetandlayer.first.c_str(),
208 isBarrel ?
"" : (subdetandlayer.second > 0 ?
"+" :
"-"),
212 std::string normhistoname = Form(
"Normalized%s", histoname.c_str());
213 std::string normhistotitle = Form(
"Normalized%s", histotitle.c_str());
218 histopair.first.base =
219 ibooker.book1D(histoname.c_str(), histotitle.c_str(), i_residuals_Nbins, d_residual_xmin, d_residual_xmax);
220 histopair.first.base->setAxisTitle(
"(x_{pred} - x_{rec})' [cm]");
222 histopair.first.normed = ibooker.book1D(
223 normhistoname.c_str(), normhistotitle.c_str(), i_normres_Nbins, d_normres_xmin, d_normres_xmax);
224 histopair.first.normed->setAxisTitle(
"(x_{pred} - x_{rec})'/#sigma");