125 for (
DetId id : ids) {
126 auto ModuleID =
id.rawId();
127 auto isPixel =
id.subdetId() == 1 ||
id.subdetId() == 2;
133 switch (
id.subdetId()) {
135 pixel_organizer.setModuleFolder(ibooker, ModuleID, 0);
138 pixel_organizer.setModuleFolder(ibooker, ModuleID, 0);
145 std::string hid = hidmanager.createHistoId(
"HitResidualsX",
"det", ModuleID);
146 std::string normhid = hidmanager.createHistoId(
"NormalizedHitResidualsX",
"det", ModuleID);
148 histos.x.base = ibooker.
book1D(hid, hid, i_residuals_Nbins, d_residual_xmin, d_residual_xmax);
149 histos.x.base->setAxisTitle(
"(x_{pred} - x_{rec})' [cm]");
150 histos.x.normed = ibooker.
book1D(normhid, normhid, i_normres_Nbins, d_normres_xmin, d_normres_xmax);
151 histos.x.normed->setAxisTitle(
"(x_{pred} - x_{rec})'/#sigma");
154 std::string hid = hidmanager.createHistoId(
"HitResidualsY",
"det", ModuleID);
155 std::string normhid = hidmanager.createHistoId(
"NormalizedHitResidualsY",
"det", ModuleID);
157 histos.y.base = ibooker.
book1D(hid, hid, i_residuals_Nbins, d_residual_xmin, d_residual_xmax);
158 histos.y.base->setAxisTitle(
"(y_{pred} - y_{rec})' [cm]");
159 histos.y.normed = ibooker.
book1D(normhid, normhid, i_normres_Nbins, d_normres_xmin, d_normres_xmax);
160 histos.y.normed->setAxisTitle(
"(y_{pred} - y_{rec})'/#sigma");
168 switch (
id.subdetId()) {
180 strip_organizer.
setLayerFolder(ModuleID, tTopo, subdetandlayer.second);
183 auto isBarrel = subdetandlayer.first.find(
"B") != std::string::npos;
185 auto xy = std::vector<std::pair<HistoPair &, const char *>>{std::make_pair(std::ref(
histos.x),
"X"),
186 std::make_pair(std::ref(
histos.y),
"Y")};
187 for (
auto &histopair :
xy) {
192 if (!
isPixel && histopair.second[0] ==
'Y')
196 Form(
"HitResiduals%s_%s%d",
198 isBarrel ?
"L" : (subdetandlayer.second > 0 ?
"Dp" :
"Dm"),
200 : (Form(
"HitResiduals_%s__%s__%d",
202 subdetandlayer.first.c_str(),
206 std::string histotitle = Form(
"HitResiduals %s on %s%s full %s %d",
208 subdetandlayer.first.c_str(),
209 isBarrel ?
"" : (subdetandlayer.second > 0 ?
"+" :
"-"),
213 std::string normhistoname = Form(
"Normalized%s", histoname.c_str());
214 std::string normhistotitle = Form(
"Normalized%s", histotitle.c_str());
219 histopair.first.base =
220 ibooker.
book1D(histoname.c_str(), histotitle.c_str(), i_residuals_Nbins, d_residual_xmin, d_residual_xmax);
221 histopair.first.base->
setAxisTitle(
"(x_{pred} - x_{rec})' [cm]");
223 histopair.first.normed = ibooker.
book1D(
224 normhistoname.c_str(), normhistotitle.c_str(), i_normres_Nbins, d_normres_xmin, d_normres_xmax);
225 histopair.first.normed->
setAxisTitle(
"(x_{pred} - x_{rec})'/#sigma");
T getParameter(std::string const &) const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
virtual void setCurrentFolder(std::string const &fullpath)
const DetIdContainer & detIds() const override
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
edm::ParameterSet Parameters
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyRunToken_
void setLayerFolder(uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=false)
void setDetectorFolder(uint32_t rawdetid, const TrackerTopology *tTopo)
HistoSet m_ModuleResiduals
HistoSet m_SubdetLayerResiduals
Abs< T >::type abs(const T &t)
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryToken_
bool isPixel(HitType hitType)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
std::pair< std::string, int32_t > findSubdetAndLayer(uint32_t ModuleID, const TrackerTopology *tTopo)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)