243 LogProblem(
"ElasticPlotDQMSource") <<
"ERROR in ElasticPlotDQMSource::analyze > some of the required inputs are " 244 "not valid. Skipping this event.\n" 245 <<
" hits.isValid = " <<
hits.isValid() <<
"\n" 246 <<
" patterns.isValid = " << patterns.
isValid() <<
"\n" 247 <<
" tracks.isValid = " <<
tracks.isValid();
255 map<unsigned int, unsigned int> rp_planes_u_too_full, rp_planes_v_too_full;
256 map<unsigned int, bool> rp_pat_suff;
257 map<unsigned int, const TotemRPLocalTrack *> rp_track;
259 for (
const auto &ds : *
hits) {
264 if (detId.isStripsCoordinateUDirection())
265 rp_planes_u_too_full[rpId]++;
267 rp_planes_v_too_full[rpId]++;
271 for (
auto &ds : *patterns) {
275 unsigned int n_pat_u = 0, n_pat_v = 0;
287 (n_pat_u > 0 || rp_planes_u_too_full[rpId] >= 3) && (n_pat_v > 0 || rp_planes_v_too_full[rpId] >= 3);
290 for (
auto &ds : *
tracks) {
294 for (
auto &ft : ds) {
301 rp_track[rpId] =
track;
308 auto &
dp = dpp.second;
311 bool cond_4rp =
true, cond_2rp =
true;
312 for (
unsigned int i = 0;
i < 4;
i++) {
313 if (rp_track[
dp.rpIds[
i]] ==
nullptr)
316 if ((
i == 0 ||
i == 3) && rp_track[
dp.rpIds[
i]] ==
nullptr)
326 for (
unsigned int i = 0;
i < 4;
i++) {
333 dp.v_h2_y_vs_x_dgn_4rp[
i]->Fill(tr_i->
x0(), tr_i->
y0());
336 dp.v_h2_y_vs_x_dgn_2rp[
i]->Fill(tr_i->
x0(), tr_i->
y0());
338 for (
unsigned int j = 0;
j < 4;
j++) {
339 if (rp_track[
dp.rpIds[
j]] ==
nullptr)
342 dp.h2_track_corr_vert->Fill(
i,
j);
344 dp.v_h_y[
i][
j]->Fill(tr_i->
y0());
352 for (
const auto &
p : rp_pat_suff) {
353 const auto &rpId =
p.first;
357 auto &
pp = pp_it->second;
359 const auto &pat_suff = rp_pat_suff[rpId];
360 const auto &has_track = (rp_track[rpId] !=
nullptr);
366 if (pat_suff && !has_track)
Detector ID class for TOTEM Si strip detectors.
edm::EDGetTokenT< edm::DetSetVector< TotemRPRecHit > > tokenRecHit
static constexpr double ls_duration_inverse
A track fit through a single RP.
edm::EDGetTokenT< edm::DetSetVector< TotemRPLocalTrack > > tokenLocalTrack
edm::EDGetTokenT< edm::DetSetVector< TotemRPUVPattern > > tokenUVPattern
std::map< unsigned int, PotPlots > potPlots
std::map< unsigned int, DiagonalPlots > diagonalPlots
Base class for CTPPS detector IDs.
Log< level::Error, true > LogProblem