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))
216 for (
unsigned int arm = 0;
arm < 2;
arm++)
219 for (
unsigned int st : {0, 2})
222 for (
unsigned int rp : {4, 5})
256 "ERROR in ElasticPlotDQMSource::analyze > some of the required inputs are not valid. Skipping this event.\n" 257 <<
" hits.isValid = " << hits.
isValid() <<
"\n" 258 <<
" patterns.isValid = " << patterns.
isValid() <<
"\n" 259 <<
" tracks.isValid = " << tracks.
isValid();
267 map<unsigned int, unsigned int> rp_planes_u_too_full, rp_planes_v_too_full;
268 map<unsigned int, bool> rp_pat_suff;
269 map<unsigned int, const TotemRPLocalTrack*> rp_track;
271 for (
const auto &ds : *hits)
278 if (detId.isStripsCoordinateUDirection())
279 rp_planes_u_too_full[rpId]++;
281 rp_planes_v_too_full[
rpId]++;
285 for (
auto &ds : *patterns)
290 unsigned int n_pat_u = 0, n_pat_v = 0;
293 if (!
p.getFittable())
302 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);
305 for (
auto &ds : *tracks)
327 auto &dp = dpp.second;
330 bool cond_4rp =
true, cond_2rp =
true;
331 for (
unsigned int i = 0;
i < 4;
i++)
333 if (rp_track[dp.rpIds[
i]] ==
nullptr)
336 if ((
i == 0 ||
i == 3) && rp_track[dp.rpIds[
i]] ==
nullptr)
346 for (
unsigned int i = 0;
i < 4;
i++)
354 dp.v_h2_y_vs_x_dgn_4rp[
i]->Fill(tr_i->
getX0(), tr_i->
getY0());
357 dp.v_h2_y_vs_x_dgn_2rp[
i]->Fill(tr_i->
getX0(), tr_i->
getY0());
359 for (
unsigned int j = 0; j < 4; j++)
361 if (rp_track[dp.rpIds[j]] ==
nullptr)
364 dp.h2_track_corr_vert->Fill(
i, j);
366 dp.v_h_y[
i][j]->Fill(tr_i->
getY0());
374 for (
const auto &
p : rp_pat_suff)
376 const auto &
rpId =
p.first;
380 auto &
pp = pp_it->second;
382 const auto &pat_suff = rp_pat_suff[
rpId];
383 const auto &has_track = (rp_track[
rpId] !=
nullptr);
389 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
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
#define DEFINE_FWK_MODULE(type)
void setCurrentFolder(std::string const &fullpath)
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
~ElasticPlotDQMSource() override
std::map< unsigned int, DiagonalPlots > diagonalPlots
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