56 std::array<unsigned int, 4>
rpIds;
62 std::array<std::array<MonitorElement *, 4>, 4>
v_h_y;
112 bool diag = (top45 != top56);
114 string name =
string( (diag) ?
"diagonal" :
"antidiagonal" )
115 +
" 45" + ( (top45) ?
"top" :
"bot")
116 +
" - 56" + ( (top56) ?
"top" :
"bot" );
131 TAxis *xa = h2->GetXaxis(), *ya = h2->GetYaxis();
132 for (
unsigned int i = 0;
i < 4;
i++)
136 rpName = rpName.substr(15);
138 xa->SetBinLabel(i+1, rpName.c_str());
139 ya->SetBinLabel(i+1, rpName.c_str());
145 for (
unsigned int i = 0;
i < 4;
i++)
149 rpName = rpName.substr(15);
153 v_h2_y_vs_x_dgn_4rp[
i] = ibooker.
book2D(
"xy hist - " + rpName +
" - 4 RPs cond", title+
";x (mm);y (mm)", 100, -18., +18., 100, -18., +18.);
154 v_h2_y_vs_x_dgn_2rp[
i] = ibooker.
book2D(
"xy hist - " + rpName +
" - 2 RPs cond", title+
";x (mm);y (mm)", 100, -18., +18., 100, -18., +18.);
158 for (
unsigned int j = 0; j < 4; j++)
162 rpCoincName = rpCoincName.substr(15);
164 v_h_y[
i][j] = ibooker.
book1D(
"y hist - " + rpName +
" - coinc " + rpCoincName, title+
";y (mm)", 180, -18., +18.);
189 verbosity(ps.getUntrackedParameter<unsigned
int>(
"verbosity", 0))
214 for (
unsigned int arm = 0; arm < 2; arm++)
217 for (
unsigned int st : {0, 2})
220 for (
unsigned int rp : {4, 5})
254 "ERROR in TotemDQMModuleRP::analyze > some of the required inputs are not valid. Skipping this event.\n" 255 <<
" hits.isValid = " << hits.
isValid() <<
"\n" 256 <<
" patterns.isValid = " << patterns.
isValid() <<
"\n" 257 <<
" tracks.isValid = " << tracks.
isValid();
265 map<unsigned int, unsigned int> rp_planes_u_too_full, rp_planes_v_too_full;
266 map<unsigned int, bool> rp_pat_suff;
267 map<unsigned int, const TotemRPLocalTrack*> rp_track;
269 for (
const auto &ds : *hits)
276 if (detId.isStripsCoordinateUDirection())
277 rp_planes_u_too_full[rpId]++;
279 rp_planes_v_too_full[rpId]++;
283 for (
auto &ds : *patterns)
288 unsigned int n_pat_u = 0, n_pat_v = 0;
291 if (!
p.getFittable())
300 rp_pat_suff[rpId] = (n_pat_u > 0 || rp_planes_u_too_full[rpId] >= 3) && (n_pat_v > 0 || rp_planes_v_too_full[rpId] >= 3);
303 for (
auto &ds : *tracks)
317 rp_track[rpId] =
track;
325 auto &
dp = dpp.second;
328 bool cond_4rp =
true, cond_2rp =
true;
329 for (
unsigned int i = 0;
i < 4;
i++)
331 if (rp_track[
dp.rpIds[
i]] ==
nullptr)
334 if ((
i == 0 ||
i == 3) && rp_track[
dp.rpIds[
i]] ==
nullptr)
344 for (
unsigned int i = 0;
i < 4;
i++)
352 dp.v_h2_y_vs_x_dgn_4rp[
i]->Fill(tr_i->
getX0(), tr_i->
getY0());
355 dp.v_h2_y_vs_x_dgn_2rp[
i]->Fill(tr_i->
getX0(), tr_i->
getY0());
357 for (
unsigned int j = 0; j < 4; j++)
359 if (rp_track[
dp.rpIds[j]] ==
nullptr)
362 dp.h2_track_corr_vert->Fill(
i, j);
364 dp.v_h_y[
i][j]->Fill(tr_i->
getY0());
372 for (
const auto &
p : rp_pat_suff)
374 const auto &rpId =
p.first;
378 auto &
pp = pp_it->second;
380 const auto &pat_suff = rp_pat_suff[rpId];
381 const auto &has_track = (rp_track[rpId] !=
nullptr);
387 if (pat_suff && !has_track)
Detector ID class for TOTEM Si strip detectors.
T getParameter(std::string const &) const
ElasticPlotDQMSource(const edm::ParameterSet &ps)
static unsigned int ls_max
#define DEFINE_FWK_MODULE(type)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::LuminosityBlockNumber_t luminosityBlock() const
static double ls_duration_inverse
MonitorElement * h_rate_vs_time_dgn_2rp
A track fit through a single RP.
edm::EDGetTokenT< edm::DetSetVector< TotemRPLocalTrack > > tokenLocalTrack
std::array< unsigned int, 4 > rpIds
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
static unsigned int ls_min
MonitorElement * book1D(Args &&...args)
std::array< std::array< MonitorElement *, 4 >, 4 > v_h_y
void rpName(std::string &name, NameFlag flag=nFull) const
std::map< unsigned int, PotPlots > potPlots
CTPPSDetId getRPId() const
~ElasticPlotDQMSource() override
std::map< unsigned int, DiagonalPlots > diagonalPlots
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
edm::EDGetTokenT< edm::DetSetVector< TotemRPRecHit > > tokenRecHit
std::array< MonitorElement *, 4 > v_h2_y_vs_x_dgn_4rp
Base class for CTPPS detector IDs.
std::array< MonitorElement *, 4 > v_h2_y_vs_x_dgn_2rp
MonitorElement * h_rate_vs_time_dgn_4rp
edm::EDGetTokenT< edm::DetSetVector< TotemRPUVPattern > > tokenUVPattern
plots related to one (anti)diagonal
MonitorElement * h2_track_corr_vert