256 <<
"ERROR in TotemDQMModuleRP::analyze > some of the required inputs are not valid. Skipping this event.\n"
257 <<
" status.isValid = " <<
status.isValid() <<
"\n"
258 <<
" digi.isValid = " << digi.
isValid() <<
"\n"
259 <<
" digCluster.isValid = " << digCluster.
isValid() <<
"\n"
260 <<
" hits.isValid = " <<
hits.isValid() <<
"\n"
261 <<
" patterns.isValid = " << patterns.
isValid() <<
"\n"
262 <<
" tracks.isValid = " <<
tracks.isValid();
271 for (
auto &ds : *
status) {
273 unsigned int plNum = detId.
plane();
279 auto &
plots = it->second;
283 plots.vfat_problem->Fill(plNum,
s.chipPosition());
284 plots.vfat_missing->Fill(plNum,
s.chipPosition());
287 if (
s.isECProgressError() ||
s.isBCProgressError()) {
288 plots.vfat_problem->Fill(plNum,
s.chipPosition());
289 plots.vfat_ec_bc_error->Fill(plNum,
s.chipPosition());
292 if (
s.isIDMismatch() ||
s.isFootprintError() ||
s.isCRCError()) {
293 plots.vfat_problem->Fill(plNum,
s.chipPosition());
294 plots.vfat_corruption->Fill(plNum,
s.chipPosition());
309 auto &
plots = plIt->second;
312 plots.digi_profile_cumulative->Fill(dit->stripNumber());
322 auto &
plots = plIt->second;
325 plots.hit_multiplicity->Fill(it->size());
329 plots.cluster_profile_cumulative->Fill(dit->centerStripPosition());
332 plots.cluster_size->Fill(dit->numberOfStrips());
337 for (
auto &ds : *
tracks) {
340 for (
auto &ft : ds) {
346 for (
unsigned int plNum = 0; plNum < 10; ++plNum) {
353 auto &
plots = plIt->second;
355 double ft_z = ft.z0();
356 double ft_x = ft.x0() + ft.tx() * (ft_z - rp_z);
357 double ft_y = ft.y0() + ft.ty() * (ft_z - rp_z);
361 bool hasMatchingHit =
false;
362 const auto &hit_ds_it =
hits->find(plId);
363 if (hit_ds_it !=
hits->end()) {
364 for (
const auto &
h : *hit_ds_it) {
365 bool match = (fabs(ft_v -
h.position()) < 2. * 0.066);
367 hasMatchingHit =
true;
373 plots.efficiency_den->Fill(ft_v);
375 plots.efficiency_num->Fill(ft_v);
384 map<unsigned int, set<unsigned int>> planes;
385 map<unsigned int, set<unsigned int>> planes_u;
386 map<unsigned int, set<unsigned int>> planes_v;
387 for (
const auto &ds : *
hits) {
392 unsigned int planeNum = detId.
plane();
395 planes[
rpId].insert(planeNum);
396 if (detId.isStripsCoordinateUDirection())
399 planes_v[
rpId].insert(planeNum);
402 for (
const auto &ds : *
status) {
403 bool activity =
false;
404 for (
const auto &
s : ds) {
405 if (
s.isNumberOfClustersSpecified() &&
s.numberOfClusters() > 0) {
415 unsigned int planeNum = detId.
plane();
418 planes[
rpId].insert(planeNum);
419 if (detId.isStripsCoordinateUDirection())
422 planes_v[
rpId].insert(planeNum);
426 for (std::map<unsigned int, PotPlots>::iterator it =
potPlots.begin(); it !=
potPlots.end(); it++) {
427 it->second.activity->Fill(planes[it->first].size());
428 it->second.activity_u->Fill(planes_u[it->first].size());
429 it->second.activity_v->Fill(planes_v[it->first].size());
431 if (planes[it->first].size() >= 6) {
432 it->second.activity_per_bx->Fill(
event.bunchCrossing());
433 it->second.activity_per_bx_short->Fill(
event.bunchCrossing());
439 unsigned int planeNum = detId.
plane();
445 auto &
plots = plIt->second;
448 plots.hit_plane_hist->Fill(planeNum, dit->centerStripPosition());
452 for (
auto &ds : *patterns) {
458 auto &
plots = plIt->second;
461 unsigned int u = 0,
v = 0;
473 plots.patterns_u->Fill(u);
474 plots.patterns_v->Fill(
v);
480 auto &
pp = it.second;
483 unsigned int pl_u = planes_u[
rpId].size();
484 unsigned int pl_v = planes_v[
rpId].size();
487 const auto &rp_pat_it = patterns->find(
rpId);
489 unsigned int pat_u = 0, pat_v = 0;
490 if (rp_pat_it != patterns->end()) {
491 for (
auto &
p : *rp_pat_it) {
506 if (pl_u == 0 && pl_v == 0)
509 if (
category == -1 && pat_u + pat_v <= 1) {
516 if (pat_u == 1 && pat_v == 1)
526 set<unsigned int> rps_with_tracks;
528 for (
auto &ds : *
tracks) {
531 rps_with_tracks.insert(
rpId);
536 auto &
plots = plIt->second;
538 for (
auto &ft : ds) {
543 unsigned int n_pl_in_fit_u = 0, n_pl_in_fit_v = 0;
544 for (
auto &hds : ft.hits()) {
548 for (
auto &
h : hds) {
557 plots.h_planes_fit_u->Fill(n_pl_in_fit_u);
558 plots.h_planes_fit_v->Fill(n_pl_in_fit_v);
566 double rp_x = (
geometry->sensor(plId_V)->translation().x() +
geometry->sensor(plId_U)->translation().x()) / 2.;
567 double rp_y = (
geometry->sensor(plId_V)->translation().y() +
geometry->sensor(plId_U)->translation().y()) / 2.;
573 double x = ft.x0() - rp_x;
574 double y = ft.y0() - rp_y;
576 plots.trackHitsCumulativeHist->Fill(
x,
y);
578 double U =
x * rod_U.x() +
y * rod_U.y();
579 double V =
x * rod_V.x() +
y * rod_V.y();
581 plots.track_u_profile->Fill(
U);
582 plots.track_v_profile->Fill(
V);
587 map<unsigned int, map<unsigned int, map<unsigned int, unsigned int>>>
589 for (
const auto &
dp : *digi) {
595 for (
const auto &
d :
dp) {
596 unsigned int sector =
d.stripNumber() / 32;
600 for (
const auto §or :
sectors)
601 triggerSectorMap[
rpId][uvFlag][sector]++;
604 for (
auto &rpp : triggerSectorMap) {
605 const unsigned int rpId = rpp.first;
609 set<unsigned int> triggerSectorsU;
610 for (
const auto sp : rpp.second[0]) {
612 triggerSectorsU.insert(sp.first);
615 set<unsigned int> triggerSectorsV;
616 for (
const auto sp : rpp.second[1]) {
618 triggerSectorsV.insert(sp.first);
624 auto &
plots = plIt->second;
626 const bool high_mult = (triggerSectorsU.size() > 2 && triggerSectorsV.size() > 2);
628 const bool has_track = (rps_with_tracks.find(
rpId) != rps_with_tracks.end());
630 for (
const auto &secU : triggerSectorsU) {
631 for (
const auto &secV : triggerSectorsV) {
632 plots.triggerSectorUVCorrelation_all->Fill(secV, secU);
635 plots.triggerSectorUVCorrelation_mult2->Fill(secV, secU);
638 plots.triggerSectorUVCorrelation_track->Fill(secV, secU);