34 consumes<AlignmentToken, edm::InProcess>(
config.getParameter<
edm::InputTag>(
"alignmentTokenSrc"));
44 edm::LogInfo(
"MillePedeDQMModule") <<
"Booking histograms";
49 h_xPos = booker.
book1D(
"Xpos",
"Alignment fit #DeltaX;;#mum", 36, 0., 36.);
50 h_xRot = booker.
book1D(
"Xrot",
"Alignment fit #Delta#theta_{X};;#murad", 36, 0., 36.);
51 h_yPos = booker.
book1D(
"Ypos",
"Alignment fit #DeltaY;;#mum", 36, 0., 36.);
52 h_yRot = booker.
book1D(
"Yrot",
"Alignment fit #Delta#theta_{Y};;#murad", 36, 0., 36.);
53 h_zPos = booker.
book1D(
"Zpos",
"Alignment fit #DeltaZ;;#mum", 36, 0., 36.);
54 h_zRot = booker.
book1D(
"Zrot",
"Alignment fit #Delta#theta_{Z};;#murad", 36, 0., 36.);
56 statusResults = booker.
book2D(
"statusResults",
"Status of SiPixelAli PCL workflow;;", 6, 0., 6., 1, 0., 1.);
68 throw cms::Exception(
"LogicError") <<
"@SUB=MillePedeDQMModule::dqmEndJob\n"
69 <<
"Try to read MillePede results before initializing MillePedeFileReader";
74 auto theResults =
mpReader_->getResults();
75 std::string exitCodeStr = theResults.getExitMessage();
94 auto myThresholds = std::make_shared<AlignPCLThresholds>();
95 myThresholds->setAlignPCLThresholds(thresholds_->getNrecords(), thresholds_->getThreshold_Map());
99 const auto trackerGeometry = builder.
build(geometricDet, *ptp, tTopo);
100 tracker_ = std::make_unique<AlignableTracker>(trackerGeometry, tTopo);
110 mpReader_ = std::make_unique<MillePedeFileReader>(
115 TH2F* histo_status = statusHisto->
getTH2F();
116 auto theResults =
mpReader_->getResults();
118 histo_status->SetBinContent(1, 1, theResults.getDBUpdated());
119 histo_status->GetXaxis()->SetBinLabel(1,
"DB updated");
120 histo_status->SetBinContent(2, 1, theResults.exceedsCutoffs());
121 histo_status->GetXaxis()->SetBinLabel(2,
"significant movement");
122 histo_status->SetBinContent(3, 1, theResults.getDBVetoed());
123 histo_status->GetXaxis()->SetBinLabel(3,
"DB update vetoed");
124 histo_status->SetBinContent(4, 1, !theResults.exceedsThresholds());
125 histo_status->GetXaxis()->SetBinLabel(4,
"within max movement");
126 histo_status->SetBinContent(5, 1, !theResults.exceedsMaxError());
127 histo_status->GetXaxis()->SetBinLabel(5,
"within max error");
128 histo_status->SetBinContent(6, 1, !theResults.belowSignificance());
129 histo_status->GetXaxis()->SetBinLabel(6,
"above significance");
133 std::array<double, 6> Xcut_, sigXcut_, maxMoveXcut_, maxErrorXcut_;
134 std::array<double, 6> tXcut_, sigtXcut_, maxMovetXcut_, maxErrortXcut_;
136 std::array<double, 6> Ycut_, sigYcut_, maxMoveYcut_, maxErrorYcut_;
137 std::array<double, 6> tYcut_, sigtYcut_, maxMovetYcut_, maxErrortYcut_;
139 std::array<double, 6> Zcut_, sigZcut_, maxMoveZcut_, maxErrorZcut_;
140 std::array<double, 6> tZcut_, sigtZcut_, maxMovetZcut_, maxErrortZcut_;
142 auto myMap =
mpReader_->getThresholdMap();
144 std::vector<std::string> alignablesList;
145 for (
auto it = myMap.begin(); it != myMap.end(); ++it) {
146 alignablesList.push_back(it->first);
149 for (
auto& alignable : alignablesList) {
152 Xcut_[detIndex] = myMap[alignable].getXcut();
153 sigXcut_[detIndex] = myMap[alignable].getSigXcut();
154 maxMoveXcut_[detIndex] = myMap[alignable].getMaxMoveXcut();
155 maxErrorXcut_[detIndex] = myMap[alignable].getErrorXcut();
157 Ycut_[detIndex] = myMap[alignable].getYcut();
158 sigYcut_[detIndex] = myMap[alignable].getSigYcut();
159 maxMoveYcut_[detIndex] = myMap[alignable].getMaxMoveYcut();
160 maxErrorYcut_[detIndex] = myMap[alignable].getErrorYcut();
162 Zcut_[detIndex] = myMap[alignable].getZcut();
163 sigZcut_[detIndex] = myMap[alignable].getSigZcut();
164 maxMoveZcut_[detIndex] = myMap[alignable].getMaxMoveZcut();
165 maxErrorZcut_[detIndex] = myMap[alignable].getErrorZcut();
167 tXcut_[detIndex] = myMap[alignable].getThetaXcut();
168 sigtXcut_[detIndex] = myMap[alignable].getSigThetaXcut();
169 maxMovetXcut_[detIndex] = myMap[alignable].getMaxMoveThetaXcut();
170 maxErrortXcut_[detIndex] = myMap[alignable].getErrorThetaXcut();
172 tYcut_[detIndex] = myMap[alignable].getThetaYcut();
173 sigtYcut_[detIndex] = myMap[alignable].getSigThetaYcut();
174 maxMovetYcut_[detIndex] = myMap[alignable].getMaxMoveThetaYcut();
175 maxErrortYcut_[detIndex] = myMap[alignable].getErrorThetaYcut();
177 tZcut_[detIndex] = myMap[alignable].getThetaZcut();
178 sigtZcut_[detIndex] = myMap[alignable].getSigThetaZcut();
179 maxMovetZcut_[detIndex] = myMap[alignable].getMaxMoveThetaZcut();
180 maxErrortZcut_[detIndex] = myMap[alignable].getErrorThetaZcut();
197 const std::array<double, 6>&
cut,
198 const std::array<double, 6>&
sigCut,
199 const std::array<double, 6>& maxMoveCut,
200 const std::array<double, 6>& maxErrorCut,
201 const std::array<double, 6>& obs,
202 const std::array<double, 6>& obsErr) {
203 TH1F* histo_0 =
histo->getTH1F();
205 double max_ = *std::max_element(maxMoveCut.begin(), maxMoveCut.end());
207 histo_0->SetMinimum(-(max_));
208 histo_0->SetMaximum(max_);
219 for (
size_t i = 0;
i < obs.size(); ++
i) {
221 histo_0->SetBinContent(
i + 1, obs[
i]);
222 histo_0->SetBinError(
i + 1, obsErr[
i]);
226 histo_0->SetBinContent(8 +
i * 5,
cut[
i]);
229 histo_0->SetBinContent(9 +
i * 5,
sigCut[
i]);
232 histo_0->SetBinContent(10 +
i * 5, maxMoveCut[
i]);
235 histo_0->SetBinContent(11 +
i * 5, maxErrorCut[
i]);
253 if (alignableId ==
"TPBHalfBarrelXminus") {
255 }
else if (alignableId ==
"TPBHalfBarrelXplus") {
257 }
else if (alignableId ==
"TPEHalfCylinderXminusZminus") {
259 }
else if (alignableId ==
"TPEHalfCylinderXplusZminus") {
261 }
else if (alignableId ==
"TPEHalfCylinderXminusZplus") {
263 }
else if (alignableId ==
"TPEHalfCylinderXplusZplus") {
266 throw cms::Exception(
"LogicError") <<
"@SUB=MillePedeDQMModule::getIndexFromString\n"
267 <<
"Retrieving conversion for not supported Alignable partition" << alignableId;