260 <<
"ERROR in TotemDQMModuleRP::analyze > some of the required inputs are not valid. Skipping this event.\n" 261 <<
" status.isValid = " <<
status.isValid() <<
"\n" 262 <<
" digi.isValid = " << digi.
isValid() <<
"\n" 263 <<
" digCluster.isValid = " << digCluster.
isValid() <<
"\n" 264 <<
" hits.isValid = " <<
hits.isValid() <<
"\n" 265 <<
" patterns.isValid = " << patterns.
isValid() <<
"\n" 266 <<
" tracks.isValid = " <<
tracks.isValid();
275 for (
auto &ds : *
status) {
277 unsigned int plNum = detId.
plane();
283 auto &
plots = it->second;
287 plots.vfat_problem->Fill(plNum,
s.chipPosition());
288 plots.vfat_missing->Fill(plNum,
s.chipPosition());
291 if (
s.isECProgressError() ||
s.isBCProgressError()) {
292 plots.vfat_problem->Fill(plNum,
s.chipPosition());
293 plots.vfat_ec_bc_error->Fill(plNum,
s.chipPosition());
296 if (
s.isIDMismatch() ||
s.isFootprintError() ||
s.isCRCError()) {
297 plots.vfat_problem->Fill(plNum,
s.chipPosition());
298 plots.vfat_corruption->Fill(plNum,
s.chipPosition());
313 auto &
plots = plIt->second;
316 plots.digi_profile_cumulative->Fill(dit->stripNumber());
326 auto &
plots = plIt->second;
329 plots.hit_multiplicity->Fill(it->size());
333 plots.cluster_profile_cumulative->Fill(dit->centerStripPosition());
336 plots.cluster_size->Fill(dit->numberOfStrips());
341 for (
auto &ds : *
tracks) {
344 for (
auto &ft : ds) {
348 double rp_z =
geometry.rpTranslation(rpId).z();
350 for (
unsigned int plNum = 0; plNum < 10; ++plNum) {
357 auto &
plots = plIt->second;
359 double ft_z = ft.z0();
360 double ft_x = ft.x0() + ft.tx() * (ft_z - rp_z);
361 double ft_y = ft.y0() + ft.ty() * (ft_z - rp_z);
365 bool hasMatchingHit =
false;
366 const auto &hit_ds_it =
hits->find(plId);
367 if (hit_ds_it !=
hits->end()) {
368 for (
const auto &
h : *hit_ds_it) {
369 bool match = (fabs(ft_v -
h.position()) < 2. * 0.066);
371 hasMatchingHit =
true;
377 plots.efficiency_den->Fill(ft_v);
379 plots.efficiency_num->Fill(ft_v);
388 map<unsigned int, set<unsigned int>> planes;
389 map<unsigned int, set<unsigned int>> planes_u;
390 map<unsigned int, set<unsigned int>> planes_v;
391 for (
const auto &ds : *
hits) {
396 unsigned int planeNum = detId.
plane();
399 planes[rpId].insert(planeNum);
400 if (detId.isStripsCoordinateUDirection())
401 planes_u[rpId].
insert(planeNum);
403 planes_v[rpId].insert(planeNum);
406 for (
const auto &ds : *
status) {
407 bool activity =
false;
408 for (
const auto &
s : ds) {
409 if (
s.isNumberOfClustersSpecified() &&
s.numberOfClusters() > 0) {
419 unsigned int planeNum = detId.
plane();
422 planes[rpId].insert(planeNum);
423 if (detId.isStripsCoordinateUDirection())
424 planes_u[rpId].
insert(planeNum);
426 planes_v[rpId].insert(planeNum);
430 for (std::map<unsigned int, PotPlots>::iterator it =
potPlots.begin(); it !=
potPlots.end(); it++) {
431 it->second.activity->Fill(planes[it->first].size());
432 it->second.activity_u->Fill(planes_u[it->first].size());
433 it->second.activity_v->Fill(planes_v[it->first].size());
435 if (planes[it->first].size() >= 6) {
436 it->second.activity_per_bx->Fill(
event.bunchCrossing());
437 it->second.activity_per_bx_short->Fill(
event.bunchCrossing());
443 unsigned int planeNum = detId.
plane();
449 auto &
plots = plIt->second;
452 plots.hit_plane_hist->Fill(planeNum, dit->centerStripPosition());
456 for (
auto &ds : *patterns) {
462 auto &
plots = plIt->second;
465 unsigned int u = 0,
v = 0;
477 plots.patterns_u->Fill(u);
478 plots.patterns_v->Fill(
v);
484 auto &
pp = it.second;
487 unsigned int pl_u = planes_u[rpId].size();
488 unsigned int pl_v = planes_v[rpId].size();
491 const auto &rp_pat_it = patterns->find(rpId);
493 unsigned int pat_u = 0, pat_v = 0;
494 if (rp_pat_it != patterns->end()) {
495 for (
auto &
p : *rp_pat_it) {
510 if (pl_u == 0 && pl_v == 0)
513 if (
category == -1 && pat_u + pat_v <= 1) {
520 if (pat_u == 1 && pat_v == 1)
530 set<unsigned int> rps_with_tracks;
532 for (
auto &ds : *
tracks) {
535 rps_with_tracks.insert(rpId);
540 auto &
plots = plIt->second;
542 for (
auto &ft : ds) {
547 unsigned int n_pl_in_fit_u = 0, n_pl_in_fit_v = 0;
548 for (
auto &hds : ft.hits()) {
552 for (
auto &
h : hds) {
561 plots.h_planes_fit_u->Fill(n_pl_in_fit_u);
562 plots.h_planes_fit_v->Fill(n_pl_in_fit_v);
570 double rp_x = (
geometry.sensor(plId_V)->translation().x() +
geometry.sensor(plId_U)->translation().x()) / 2.;
571 double rp_y = (
geometry.sensor(plId_V)->translation().y() +
geometry.sensor(plId_U)->translation().y()) / 2.;
577 double x = ft.x0() - rp_x;
578 double y = ft.y0() - rp_y;
580 plots.trackHitsCumulativeHist->Fill(
x,
y);
582 double U =
x * rod_U.x() +
y * rod_U.y();
583 double V =
x * rod_V.x() +
y * rod_V.y();
585 plots.track_u_profile->Fill(
U);
586 plots.track_v_profile->Fill(
V);
591 map<unsigned int, map<unsigned int, map<unsigned int, unsigned int>>>
593 for (
const auto &
dp : *digi) {
599 for (
const auto &
d :
dp) {
600 unsigned int sector =
d.stripNumber() / 32;
605 triggerSectorMap[rpId][uvFlag][
sector]++;
608 for (
auto &rpp : triggerSectorMap) {
609 const unsigned int rpId = rpp.first;
613 set<unsigned int> triggerSectorsU;
614 for (
const auto sp : rpp.second[0]) {
616 triggerSectorsU.insert(sp.first);
619 set<unsigned int> triggerSectorsV;
620 for (
const auto sp : rpp.second[1]) {
622 triggerSectorsV.insert(sp.first);
628 auto &
plots = plIt->second;
630 const bool high_mult = (triggerSectorsU.size() > 2 && triggerSectorsV.size() > 2);
632 const bool has_track = (rps_with_tracks.find(rpId) != rps_with_tracks.end());
634 for (
const auto &secU : triggerSectorsU) {
635 for (
const auto &secV : triggerSectorsV) {
636 plots.triggerSectorUVCorrelation_all->Fill(secV, secU);
639 plots.triggerSectorUVCorrelation_mult2->Fill(secV, secU);
642 plots.triggerSectorUVCorrelation_track->Fill(secV, secU);
Detector ID class for TOTEM Si strip detectors.
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > geometryToken_
DetGeomDesc::Translation Vector
edm::EDGetTokenT< edm::DetSetVector< TotemVFATStatus > > tokenStatus
std::map< unsigned int, PlanePlots > planePlots
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t V
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
edm::EDGetTokenT< edm::DetSetVector< TotemRPUVPattern > > tokenUVPattern
void setPlane(uint32_t det)
edm::EDGetTokenT< edm::DetSetVector< TotemRPCluster > > tokenCluster
Base class for CTPPS detector IDs.
edm::EDGetTokenT< edm::DetSetVector< TotemRPRecHit > > tokenRecHit
edm::EDGetTokenT< edm::DetSetVector< TotemRPLocalTrack > > tokenLocalTrack
std::map< unsigned int, PotPlots > potPlots
bool isStripsCoordinateUDirection() const
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
edm::EDGetTokenT< edm::DetSetVector< TotemRPDigi > > tokenDigi
Log< level::Error, true > LogProblem