267 for (uint8_t
i = 0;
i < CTPPSRecord::RomanPot::Last; ++
i) {
286 <<
" trackLites.isValid = " << tracks.
isValid();
294 set<signed int> s_rp_idx_global_hor, s_rp_idx_global_vert;
295 map<unsigned int, set<signed int>> ms_rp_idx_arm;
297 for (
auto &tr : *tracks)
300 const unsigned int arm = rpId.
arm();
301 const unsigned int stNum = rpId.station();
302 const unsigned int rpNum = rpId.rp();
303 const unsigned int stRPNum = stNum * 10 + rpNum;
307 if (stRPNum == 3) idx = 0;
308 if (stRPNum == 23) idx = 1;
309 if (stRPNum == 16) idx = 2;
312 s_rp_idx_global_hor.insert(3*arm + idx);
317 if (stRPNum == 4) idx = 0;
318 if (stRPNum == 5) idx = 1;
319 if (stRPNum == 24) idx = 2;
320 if (stRPNum == 25) idx = 3;
323 s_rp_idx_global_vert.insert(4*arm + idx);
328 if (stRPNum == 3) idx = 0;
329 if (stRPNum == 4) idx = 1;
330 if (stRPNum == 5) idx = 2;
331 if (stRPNum == 16) idx = 3;
332 if (stRPNum == 23) idx = 4;
333 if (stRPNum == 24) idx = 5;
334 if (stRPNum == 25) idx = 6;
336 const signed int hor = ((rpNum == 2) || (rpNum == 3) || (rpNum == 6)) ? 1 : 0;
339 ms_rp_idx_arm[arm].insert(idx * 10 + hor);
349 for (
const auto &idx1 : s_rp_idx_global_hor)
350 for (
const auto &idx2 : s_rp_idx_global_hor)
353 for (
const auto &idx1 : s_rp_idx_global_vert)
354 for (
const auto &idx2 : s_rp_idx_global_vert)
360 map<unsigned int, set<unsigned int>>
mTop, mHor, mBot;
362 for (
auto &tr : *tracks)
365 const unsigned int rpNum = rpId.
rp();
366 const unsigned int armIdx = rpId.arm();
368 if (rpNum == 0 || rpNum == 4)
369 mTop[armIdx].insert(rpId);
370 if (rpNum == 2 || rpNum == 3 || rpNum == 6)
371 mHor[armIdx].insert(rpId);
372 if (rpNum == 1 || rpNum == 5)
373 mBot[armIdx].insert(rpId);
378 p.second.h_numRPWithTrack_top->Fill(mTop[
p.first].size());
379 p.second.h_numRPWithTrack_hor->Fill(mHor[
p.first].size());
380 p.second.h_numRPWithTrack_bot->Fill(mBot[
p.first].size());
384 for (
const auto &ap : ms_rp_idx_arm)
386 auto &
plots = armPlots[ap.first];
388 for (
const auto &idx1 : ap.second)
390 for (
const auto &idx2 : ap.second)
392 plots.h_trackCorr->Fill(idx1/10, idx2/10);
394 if ((idx1 % 10) != (idx2 % 10))
395 plots.h_trackCorr_overlap->Fill(idx1/10, idx2/10);
edm::EDGetTokenT< std::vector< CTPPSLocalTrackLite > > tokenLocalTrackLite
MonitorElement * h_trackCorr_hor
std::vector< int > rpstate
std::map< unsigned int, ArmPlots > armPlots
edm::EDGetTokenT< CTPPSRecord > ctppsRecordToken
MonitorElement * events_per_bx
MonitorElement * events_per_bx_short
MonitorElement * h_trackCorr_vert
Status status(const uint8_t rp) const
Return the status of the given roman pot.
Base class for CTPPS detector IDs.