43 edm::LogInfo(
"MillePedeDQMModule") <<
"Booking histograms";
48 h_xPos = booker.
book1D(
"Xpos",
"Alignment fit #DeltaX;;#mum", 36, 0., 36.);
49 h_xRot = booker.
book1D(
"Xrot",
"Alignment fit #Delta#theta_{X};;#murad", 36, 0., 36.);
50 h_yPos = booker.
book1D(
"Ypos",
"Alignment fit #DeltaY;;#mum", 36, 0., 36.);
51 h_yRot = booker.
book1D(
"Yrot",
"Alignment fit #Delta#theta_{Y};;#murad", 36, 0., 36.);
52 h_zPos = booker.
book1D(
"Zpos",
"Alignment fit #DeltaZ;;#mum", 36, 0., 36.);
53 h_zRot = booker.
book1D(
"Zrot",
"Alignment fit #Delta#theta_{Z};;#murad", 36, 0., 36.);
55 statusResults = booker.
book2D(
"statusResults",
"Status of SiPixelAli PCL workflow;;", 6, 0., 6., 1, 0., 1.);
67 throw cms::Exception(
"LogicError") <<
"@SUB=MillePedeDQMModule::dqmEndJob\n"
68 <<
"Try to read MillePede results before initializing MillePedeFileReader";
73 auto theResults =
mpReader_->getResults();
74 std::string exitCodeStr = theResults.getExitMessage();
96 auto thresholds_ = thresholdHandle.
product();
98 auto myThresholds = std::make_shared<AlignPCLThresholds>();
99 myThresholds->setAlignPCLThresholds(thresholds_->getNrecords(), thresholds_->getThreshold_Map());
103 const auto trackerGeometry = builder.
build(&(*geometricDet), *ptp, &(*tTopo));
104 tracker_ = std::make_unique<AlignableTracker>(trackerGeometry, &(*tTopo));
114 mpReader_ = std::make_unique<MillePedeFileReader>(
119 TH2F* histo_status = statusHisto->
getTH2F();
120 auto theResults =
mpReader_->getResults();
122 histo_status->SetBinContent(1, 1, theResults.getDBUpdated());
123 histo_status->GetXaxis()->SetBinLabel(1,
"DB updated");
124 histo_status->SetBinContent(2, 1, theResults.exceedsCutoffs());
125 histo_status->GetXaxis()->SetBinLabel(2,
"significant movement");
126 histo_status->SetBinContent(3, 1, theResults.getDBVetoed());
127 histo_status->GetXaxis()->SetBinLabel(3,
"DB update vetoed");
128 histo_status->SetBinContent(4, 1, !theResults.exceedsThresholds());
129 histo_status->GetXaxis()->SetBinLabel(4,
"within max movement");
130 histo_status->SetBinContent(5, 1, !theResults.exceedsMaxError());
131 histo_status->GetXaxis()->SetBinLabel(5,
"within max error");
132 histo_status->SetBinContent(6, 1, !theResults.belowSignificance());
133 histo_status->GetXaxis()->SetBinLabel(6,
"above significance");
137 std::array<double, 6> Xcut_, sigXcut_, maxMoveXcut_, maxErrorXcut_;
138 std::array<double, 6> tXcut_, sigtXcut_, maxMovetXcut_, maxErrortXcut_;
140 std::array<double, 6> Ycut_, sigYcut_, maxMoveYcut_, maxErrorYcut_;
141 std::array<double, 6> tYcut_, sigtYcut_, maxMovetYcut_, maxErrortYcut_;
143 std::array<double, 6> Zcut_, sigZcut_, maxMoveZcut_, maxErrorZcut_;
144 std::array<double, 6> tZcut_, sigtZcut_, maxMovetZcut_, maxErrortZcut_;
146 auto myMap =
mpReader_->getThresholdMap();
148 std::vector<std::string> alignablesList;
149 for (
auto it = myMap.begin(); it != myMap.end(); ++it) {
150 alignablesList.push_back(it->first);
153 for (
auto& alignable : alignablesList) {
156 Xcut_[detIndex] = myMap[alignable].getXcut();
157 sigXcut_[detIndex] = myMap[alignable].getSigXcut();
158 maxMoveXcut_[detIndex] = myMap[alignable].getMaxMoveXcut();
159 maxErrorXcut_[detIndex] = myMap[alignable].getErrorXcut();
161 Ycut_[detIndex] = myMap[alignable].getYcut();
162 sigYcut_[detIndex] = myMap[alignable].getSigYcut();
163 maxMoveYcut_[detIndex] = myMap[alignable].getMaxMoveYcut();
164 maxErrorYcut_[detIndex] = myMap[alignable].getErrorYcut();
166 Zcut_[detIndex] = myMap[alignable].getZcut();
167 sigZcut_[detIndex] = myMap[alignable].getSigZcut();
168 maxMoveZcut_[detIndex] = myMap[alignable].getMaxMoveZcut();
169 maxErrorZcut_[detIndex] = myMap[alignable].getErrorZcut();
171 tXcut_[detIndex] = myMap[alignable].getThetaXcut();
172 sigtXcut_[detIndex] = myMap[alignable].getSigThetaXcut();
173 maxMovetXcut_[detIndex] = myMap[alignable].getMaxMoveThetaXcut();
174 maxErrortXcut_[detIndex] = myMap[alignable].getErrorThetaXcut();
176 tYcut_[detIndex] = myMap[alignable].getThetaYcut();
177 sigtYcut_[detIndex] = myMap[alignable].getSigThetaYcut();
178 maxMovetYcut_[detIndex] = myMap[alignable].getMaxMoveThetaYcut();
179 maxErrortYcut_[detIndex] = myMap[alignable].getErrorThetaYcut();
181 tZcut_[detIndex] = myMap[alignable].getThetaZcut();
182 sigtZcut_[detIndex] = myMap[alignable].getSigThetaZcut();
183 maxMovetZcut_[detIndex] = myMap[alignable].getMaxMoveThetaZcut();
184 maxErrortZcut_[detIndex] = myMap[alignable].getErrorThetaZcut();
201 const std::array<double, 6>&
cut,
202 const std::array<double, 6>&
sigCut,
203 const std::array<double, 6>& maxMoveCut,
204 const std::array<double, 6>& maxErrorCut,
205 const std::array<double, 6>& obs,
206 const std::array<double, 6>& obsErr) {
207 TH1F* histo_0 =
histo->getTH1F();
209 double max_ = *std::max_element(maxMoveCut.begin(), maxMoveCut.end());
211 histo_0->SetMinimum(-(max_));
212 histo_0->SetMaximum(max_);
223 for (
size_t i = 0;
i < obs.size(); ++
i) {
225 histo_0->SetBinContent(
i + 1, obs[
i]);
226 histo_0->SetBinError(
i + 1, obsErr[
i]);
230 histo_0->SetBinContent(8 +
i * 5,
cut[
i]);
233 histo_0->SetBinContent(9 +
i * 5,
sigCut[
i]);
236 histo_0->SetBinContent(10 +
i * 5, maxMoveCut[
i]);
239 histo_0->SetBinContent(11 +
i * 5, maxErrorCut[
i]);
257 if (alignableId ==
"TPBHalfBarrelXminus") {
259 }
else if (alignableId ==
"TPBHalfBarrelXplus") {
261 }
else if (alignableId ==
"TPEHalfCylinderXminusZminus") {
263 }
else if (alignableId ==
"TPEHalfCylinderXplusZminus") {
265 }
else if (alignableId ==
"TPEHalfCylinderXminusZplus") {
267 }
else if (alignableId ==
"TPEHalfCylinderXplusZplus") {
270 throw cms::Exception(
"LogicError") <<
"@SUB=MillePedeDQMModule::getIndexFromString\n"
271 <<
"Retrieving conversion for not supported Alignable partition" << alignableId;