35 consumes<AlignmentToken, edm::InProcess>(
config.getParameter<
edm::InputTag>(
"alignmentTokenSrc"));
45 edm::LogInfo(
"MillePedeDQMModule") <<
"Booking histograms";
50 h_xPos = booker.
book1D(
"Xpos",
"Alignment fit #DeltaX;;#mum", 36, 0., 36.);
51 h_xRot = booker.
book1D(
"Xrot",
"Alignment fit #Delta#theta_{X};;#murad", 36, 0., 36.);
52 h_yPos = booker.
book1D(
"Ypos",
"Alignment fit #DeltaY;;#mum", 36, 0., 36.);
53 h_yRot = booker.
book1D(
"Yrot",
"Alignment fit #Delta#theta_{Y};;#murad", 36, 0., 36.);
54 h_zPos = booker.
book1D(
"Zpos",
"Alignment fit #DeltaZ;;#mum", 36, 0., 36.);
55 h_zRot = booker.
book1D(
"Zrot",
"Alignment fit #Delta#theta_{Z};;#murad", 36, 0., 36.);
57 statusResults = booker.
book2D(
"statusResults",
"Status of SiPixelAli PCL workflow;;", 6, 0., 6., 1, 0., 1.);
69 throw cms::Exception(
"LogicError") <<
"@SUB=MillePedeDQMModule::dqmEndJob\n"
70 <<
"Try to read MillePede results before initializing MillePedeFileReader";
75 auto theResults =
mpReader_->getResults();
76 std::string exitCodeStr = theResults.getExitMessage();
96 auto myThresholds = std::make_shared<AlignPCLThresholds>();
97 myThresholds->setAlignPCLThresholds(thresholds_->getNrecords(), thresholds_->getThreshold_Map());
101 const auto trackerGeometry = builder.
build(geometricDet, ptitp, *ptp, tTopo);
102 tracker_ = std::make_unique<AlignableTracker>(trackerGeometry, tTopo);
112 mpReader_ = std::make_unique<MillePedeFileReader>(
117 TH2F* histo_status = statusHisto->
getTH2F();
118 auto theResults =
mpReader_->getResults();
120 histo_status->SetBinContent(1, 1, theResults.getDBUpdated());
121 histo_status->GetXaxis()->SetBinLabel(1,
"DB updated");
122 histo_status->SetBinContent(2, 1, theResults.exceedsCutoffs());
123 histo_status->GetXaxis()->SetBinLabel(2,
"significant movement");
124 histo_status->SetBinContent(3, 1, theResults.getDBVetoed());
125 histo_status->GetXaxis()->SetBinLabel(3,
"DB update vetoed");
126 histo_status->SetBinContent(4, 1, !theResults.exceedsThresholds());
127 histo_status->GetXaxis()->SetBinLabel(4,
"within max movement");
128 histo_status->SetBinContent(5, 1, !theResults.exceedsMaxError());
129 histo_status->GetXaxis()->SetBinLabel(5,
"within max error");
130 histo_status->SetBinContent(6, 1, !theResults.belowSignificance());
131 histo_status->GetXaxis()->SetBinLabel(6,
"above significance");
135 std::array<double, 6> Xcut_, sigXcut_, maxMoveXcut_, maxErrorXcut_;
136 std::array<double, 6> tXcut_, sigtXcut_, maxMovetXcut_, maxErrortXcut_;
138 std::array<double, 6> Ycut_, sigYcut_, maxMoveYcut_, maxErrorYcut_;
139 std::array<double, 6> tYcut_, sigtYcut_, maxMovetYcut_, maxErrortYcut_;
141 std::array<double, 6> Zcut_, sigZcut_, maxMoveZcut_, maxErrorZcut_;
142 std::array<double, 6> tZcut_, sigtZcut_, maxMovetZcut_, maxErrortZcut_;
144 auto myMap =
mpReader_->getThresholdMap();
146 std::vector<std::string> alignablesList;
147 for (
auto it = myMap.begin(); it != myMap.end(); ++it) {
148 alignablesList.push_back(it->first);
151 for (
auto& alignable : alignablesList) {
154 Xcut_[detIndex] = myMap[alignable].getXcut();
155 sigXcut_[detIndex] = myMap[alignable].getSigXcut();
156 maxMoveXcut_[detIndex] = myMap[alignable].getMaxMoveXcut();
157 maxErrorXcut_[detIndex] = myMap[alignable].getErrorXcut();
159 Ycut_[detIndex] = myMap[alignable].getYcut();
160 sigYcut_[detIndex] = myMap[alignable].getSigYcut();
161 maxMoveYcut_[detIndex] = myMap[alignable].getMaxMoveYcut();
162 maxErrorYcut_[detIndex] = myMap[alignable].getErrorYcut();
164 Zcut_[detIndex] = myMap[alignable].getZcut();
165 sigZcut_[detIndex] = myMap[alignable].getSigZcut();
166 maxMoveZcut_[detIndex] = myMap[alignable].getMaxMoveZcut();
167 maxErrorZcut_[detIndex] = myMap[alignable].getErrorZcut();
169 tXcut_[detIndex] = myMap[alignable].getThetaXcut();
170 sigtXcut_[detIndex] = myMap[alignable].getSigThetaXcut();
171 maxMovetXcut_[detIndex] = myMap[alignable].getMaxMoveThetaXcut();
172 maxErrortXcut_[detIndex] = myMap[alignable].getErrorThetaXcut();
174 tYcut_[detIndex] = myMap[alignable].getThetaYcut();
175 sigtYcut_[detIndex] = myMap[alignable].getSigThetaYcut();
176 maxMovetYcut_[detIndex] = myMap[alignable].getMaxMoveThetaYcut();
177 maxErrortYcut_[detIndex] = myMap[alignable].getErrorThetaYcut();
179 tZcut_[detIndex] = myMap[alignable].getThetaZcut();
180 sigtZcut_[detIndex] = myMap[alignable].getSigThetaZcut();
181 maxMovetZcut_[detIndex] = myMap[alignable].getMaxMoveThetaZcut();
182 maxErrortZcut_[detIndex] = myMap[alignable].getErrorThetaZcut();
199 const std::array<double, 6>&
cut,
200 const std::array<double, 6>&
sigCut,
201 const std::array<double, 6>& maxMoveCut,
202 const std::array<double, 6>& maxErrorCut,
203 const std::array<double, 6>& obs,
204 const std::array<double, 6>& obsErr) {
205 TH1F* histo_0 =
histo->getTH1F();
207 double max_ = *std::max_element(maxMoveCut.begin(), maxMoveCut.end());
209 histo_0->SetMinimum(-(max_));
210 histo_0->SetMaximum(max_);
221 for (
size_t i = 0;
i < obs.size(); ++
i) {
223 histo_0->SetBinContent(
i + 1, obs[
i]);
224 histo_0->SetBinError(
i + 1, obsErr[
i]);
228 histo_0->SetBinContent(8 +
i * 5,
cut[
i]);
231 histo_0->SetBinContent(9 +
i * 5,
sigCut[
i]);
234 histo_0->SetBinContent(10 +
i * 5, maxMoveCut[
i]);
237 histo_0->SetBinContent(11 +
i * 5, maxErrorCut[
i]);
255 if (alignableId ==
"TPBHalfBarrelXminus") {
257 }
else if (alignableId ==
"TPBHalfBarrelXplus") {
259 }
else if (alignableId ==
"TPEHalfCylinderXminusZminus") {
261 }
else if (alignableId ==
"TPEHalfCylinderXplusZminus") {
263 }
else if (alignableId ==
"TPEHalfCylinderXminusZplus") {
265 }
else if (alignableId ==
"TPEHalfCylinderXplusZplus") {
268 throw cms::Exception(
"LogicError") <<
"@SUB=MillePedeDQMModule::getIndexFromString\n"
269 <<
"Retrieving conversion for not supported Alignable partition" << alignableId;