25 #include "TGraphErrors.h" 66 for (
int bi = 1; bi <= p->GetNbinsX(); ++bi) {
67 double c = p->GetBinCenter(bi);
69 double N = p->GetBinEntries(bi);
70 double Sy = p->GetBinContent(bi) *
N;
71 double Syy = p->GetSumw2()->At(bi);
73 double si_sq = Syy / N - Sy * Sy / N /
N;
74 double si = (si_sq >= 0.) ?
sqrt(si_sq) : 0.;
75 double si_unc_sq = si_sq / 2. /
N;
76 double si_unc = (si_unc_sq >= 0.) ?
sqrt(si_unc_sq) : 0.;
79 g->SetPoint(idx, c, si);
80 g->SetPointError(idx, 0., si_unc);
92 std::unique_ptr<TH1D>
h_xi;
100 : h_multiplicity(new TH1D(
"",
";reconstructed protons", 11, -0.5, 10.5)),
101 h_xi(new TH1D(
"",
";#xi", 100, 0., 0.3)),
102 h2_th_y_vs_xi(new TH2D(
"",
";#xi;#theta_{y} (rad)", 100, 0., 0.3, 100, -500E-6, +500E-6)),
103 p_th_y_vs_xi(new TProfile(
"",
";#xi;#theta_{y} (rad)", 100, 0., 0.3)),
104 h_xi_n1f1(new TH1D(
"",
";#xi", 100, 0., 0.3)) {
105 for (
unsigned int n = 2;
n <= 10; ++
n)
106 m_h_xi_nTracks[
n] =
new TH1D(*h_xi);
113 const double th_y = p.
thetaY();
114 h2_th_y_vs_xi->Fill(p.
xi(), th_y);
115 p_th_y_vs_xi->Fill(p.
xi(), th_y);
117 auto it = m_h_xi_nTracks.find(nTracks);
118 if (it != m_h_xi_nTracks.end())
119 it->second->Fill(p.
xi());
122 h_xi_n1f1->Fill(p.
xi());
127 h_multiplicity->Write(
"h_multiplicity");
130 h2_th_y_vs_xi->Write(
"h2_th_y_vs_xi");
131 p_th_y_vs_xi->Write(
"p_th_y_vs_xi");
133 TDirectory *d_top = gDirectory;
135 gDirectory = d_top->mkdir(
"h_xi_nTracks");
136 for (
const auto p : m_h_xi_nTracks) {
138 sprintf(buf,
"h_xi_nTracks_%u",
p.first);
139 p.second->Write(buf);
144 h_xi_n1f1->Write(
"h_xi_n1f1");
152 std::unique_ptr<TH1D>
h_xi, h_th_x, h_th_y, h_vtx_y, h_t_unif, h_t, h_chi_sq, h_log_chi_sq, h_chi_sq_norm;
166 h_de_x_match_timing_vs_tracking_ClCo;
171 : h_multiplicity(new TH1D(
"",
";reconstructed protons per event", 11, -0.5, 10.5)),
172 h_xi(new TH1D(
"",
";#xi", 100, 0., 0.3)),
173 h_th_x(new TH1D(
"",
";#theta_{x} (rad)", 250, -500E-6, +500E-6)),
174 h_th_y(new TH1D(
"",
";#theta_{y} (rad)", 500, -1000E-6, +1000E-6)),
175 h_vtx_y(new TH1D(
"",
";vtx_{y} (cm)", 100, -100E-3, +100E-3)),
176 h_chi_sq(new TH1D(
"",
";#chi^{2}", 100, 0., 10.)),
177 h_log_chi_sq(new TH1D(
"",
";log_{10} #chi^{2}", 100, -20., 5.)),
178 h_chi_sq_norm(new TH1D(
"",
";#chi^{2}/ndf", 100, 0., 5.)),
179 h_time(new TH1D(
"",
";time", 100, -2., +2.)),
180 h_n_contrib_tracking_tracks(new TH1D(
"",
";n of contrib. tracking tracks per reco proton", 4, -0.5, +3.5)),
181 h_n_contrib_timing_tracks(new TH1D(
"",
";n of contrib. timing tracks per reco proton", 4, -0.5, +3.5)),
182 h2_th_x_vs_xi(new TH2D(
"",
";#xi;#theta_{x} (rad)", 100, 0., 0.3, 100, -500E-6, +500E-6)),
183 h2_th_y_vs_xi(new TH2D(
"",
";#xi;#theta_{y} (rad)", 100, 0., 0.3, 200, -1000E-6, +1000E-6)),
184 h2_vtx_y_vs_xi(new TH2D(
"",
";#xi;vtx_{y} (cm)", 100, 0., 0.3, 100, -100E-3, +100E-3)),
185 p_th_x_vs_xi(new TProfile(
"",
";#xi;#theta_{x} (rad)", 100, 0., 0.3)),
186 p_th_y_vs_xi(new TProfile(
"",
";#xi;#theta_{y} (rad)", 100, 0., 0.3)),
187 p_vtx_y_vs_xi(new TProfile(
"",
";#xi;vtx_{y} (cm)", 100, 0., 0.3)),
188 h2_timing_tracks_vs_prot_mult(
189 new TH2D(
"",
";reco protons per event;timing tracks per event", 11, -0.5, 10.5, 11, -0.5, 10.5)),
190 h_xi_n1f1(new TH1D(
"",
";#xi", 100, 0., 0.3)),
192 h_de_x_timing_vs_tracking(new TH1D(
"",
";#Delta x (mm)", 200, -1., +1.)),
193 h_de_x_rel_timing_vs_tracking(new TH1D(
"",
";#Delta x / #sigma(x)", 200, -20., +20.)),
194 h_de_x_match_timing_vs_tracking(new TH1D(
"",
";match between tracking and timing tracks", 2, -0.5, +1.5)),
196 h_de_x_timing_vs_tracking_ClCo(new TH1D(
"",
";#Delta x (mm)", 200, -1., +1.)),
197 h_de_x_rel_timing_vs_tracking_ClCo(new TH1D(
"",
";#Delta x / #sigma(x)", 200, -20., +20.)),
198 h_de_x_match_timing_vs_tracking_ClCo(
199 new TH1D(
"",
";match between tracking and timing tracks", 2, -0.5, +1.5)),
201 h2_y_vs_x_tt0_ClCo(new TH2D(
"",
";x (mm);y (mm)", 100, -5., 25., 100, -15., +15.)),
202 h2_y_vs_x_tt1_ClCo(new TH2D(
"",
";x (mm);y (mm)", 100, -5., 25., 100, -15., +15.)),
203 h2_y_vs_x_ttm_ClCo(new TH2D(
"",
";x (mm);y (mm)", 100, -5., 25., 100, -15., +15.)) {
204 std::vector<double> v_t_bin_edges;
205 for (
double t = 0;
t <= 5.;) {
206 v_t_bin_edges.push_back(
t);
207 const double de_t = 0.05 + 0.09 *
t + 0.02 *
t *
t;
210 h_t_unif.reset(
new TH1D(
"",
";|t| (GeV^2)", 100, 0., 5.));
211 h_t.reset(
new TH1D(
"",
";|t| (GeV^2)", v_t_bin_edges.size() - 1, v_t_bin_edges.data()));
212 h_t_xi_range1.reset(
new TH1D(
"",
";|t| (GeV^2)", v_t_bin_edges.size() - 1, v_t_bin_edges.data()));
213 h_t_xi_range2.reset(
new TH1D(
"",
";|t| (GeV^2)", v_t_bin_edges.size() - 1, v_t_bin_edges.data()));
214 h_t_xi_range3.reset(
new TH1D(
"",
";|t| (GeV^2)", v_t_bin_edges.size() - 1, v_t_bin_edges.data()));
216 new TH2D(
"",
";#xi;|t| (GeV^2)", 100, 0., 0.3, v_t_bin_edges.size() - 1, v_t_bin_edges.data()));
218 for (
unsigned int n = 2;
n <= 10; ++
n)
219 m_h_xi_nTracks[
n] =
new TH1D(*h_xi);
226 unsigned int n_contrib_tracking_tracks = 0, n_contrib_timing_tracks = 0;
230 n_contrib_tracking_tracks++;
232 n_contrib_timing_tracks++;
235 const double th_x = p.
thetaX();
236 const double th_y = p.
thetaY();
237 const double mt = -p.
t();
239 h_chi_sq->Fill(p.
chi2());
240 h_log_chi_sq->Fill(log10(p.
chi2()));
244 h_n_contrib_tracking_tracks->Fill(n_contrib_tracking_tracks);
245 h_n_contrib_timing_tracks->Fill(n_contrib_timing_tracks);
252 h_vtx_y->Fill(p.
vertex().y());
256 if (p.
xi() > 0.04 && p.
xi() < 0.07)
257 h_t_xi_range1->Fill(mt);
258 if (p.
xi() > 0.07 && p.
xi() < 0.10)
259 h_t_xi_range2->Fill(mt);
260 if (p.
xi() > 0.10 && p.
xi() < 0.13)
261 h_t_xi_range3->Fill(mt);
263 h_time->Fill(p.
time());
265 h2_th_x_vs_xi->Fill(p.
xi(), th_x);
266 h2_th_y_vs_xi->Fill(p.
xi(), th_y);
267 h2_vtx_y_vs_xi->Fill(p.
xi(), p.
vertex().y());
268 h2_t_vs_xi->Fill(p.
xi(),
mt);
270 p_th_x_vs_xi->Fill(p.
xi(), th_x);
271 p_th_y_vs_xi->Fill(p.
xi(), th_y);
272 p_vtx_y_vs_xi->Fill(p.
xi(), p.
vertex().y());
274 auto it = m_h_xi_nTracks.find(nTracks);
275 if (it != m_h_xi_nTracks.end())
276 it->second->Fill(p.
xi());
279 h_xi_n1f1->Fill(p.
xi());
283 h_multiplicity->Write(
"h_multiplicity");
285 h_chi_sq->Write(
"h_chi_sq");
286 h_log_chi_sq->Write(
"h_log_chi_sq");
287 h_chi_sq_norm->Write(
"h_chi_sq_norm");
289 h_n_contrib_tracking_tracks->Write(
"h_n_contrib_tracking_tracks");
290 h_n_contrib_timing_tracks->Write(
"h_n_contrib_timing_tracks");
292 h2_timing_tracks_vs_prot_mult->Write(
"h2_timing_tracks_vs_prot_mult");
296 h_th_x->Write(
"h_th_x");
297 h2_th_x_vs_xi->Write(
"h2_th_x_vs_xi");
298 p_th_x_vs_xi->Write(
"p_th_x_vs_xi");
299 auto g_th_x_RMS_vs_xi = std::make_unique<TGraphErrors>();
301 g_th_x_RMS_vs_xi->Write(
"g_th_x_RMS_vs_xi");
303 h_th_y->Write(
"h_th_y");
304 h2_th_y_vs_xi->Write(
"h2_th_y_vs_xi");
305 p_th_y_vs_xi->Write(
"p_th_y_vs_xi");
306 auto g_th_y_RMS_vs_xi = std::make_unique<TGraphErrors>();
308 g_th_y_RMS_vs_xi->Write(
"g_th_y_RMS_vs_xi");
310 h_vtx_y->Write(
"h_vtx_y");
311 h2_vtx_y_vs_xi->Write(
"h2_vtx_y_vs_xi");
312 p_vtx_y_vs_xi->Write(
"p_vtx_y_vs_xi");
313 auto g_vtx_y_RMS_vs_xi = std::make_unique<TGraphErrors>();
315 g_vtx_y_RMS_vs_xi->Write(
"g_vtx_y_RMS_vs_xi");
317 h_t->Scale(1.,
"width");
319 h_t_unif->Write(
"h_t_unif");
321 h_t_xi_range1->Write(
"h_t_xi_range1");
322 h_t_xi_range2->Write(
"h_t_xi_range2");
323 h_t_xi_range3->Write(
"h_t_xi_range3");
325 h2_t_vs_xi->Write(
"h2_t_vs_xi");
327 h_time->Write(
"h_time");
329 TDirectory *d_top = gDirectory;
331 gDirectory = d_top->mkdir(
"h_xi_nTracks");
332 for (
const auto p : m_h_xi_nTracks) {
334 sprintf(buf,
"h_xi_nTracks_%u",
p.first);
335 p.second->Write(buf);
340 h_xi_n1f1->Write(
"h_xi_n1f1");
342 h_de_x_timing_vs_tracking->Write(
"h_de_x_timing_vs_tracking");
343 h_de_x_rel_timing_vs_tracking->Write(
"h_de_x_rel_timing_vs_tracking");
344 h_de_x_match_timing_vs_tracking->Write(
"h_de_x_match_timing_vs_tracking");
346 h_de_x_timing_vs_tracking_ClCo->Write(
"h_de_x_timing_vs_tracking_ClCo");
347 h_de_x_rel_timing_vs_tracking_ClCo->Write(
"h_de_x_rel_timing_vs_tracking_ClCo");
348 h_de_x_match_timing_vs_tracking_ClCo->Write(
"h_de_x_match_timing_vs_tracking_ClCo");
350 h2_y_vs_x_tt0_ClCo->Write(
"h2_y_vs_x_tt0_ClCo");
351 h2_y_vs_x_tt1_ClCo->Write(
"h2_y_vs_x_tt1_ClCo");
352 h2_y_vs_x_ttm_ClCo->Write(
"h2_y_vs_x_ttm_ClCo");
368 : h2_xi_mu_vs_xi_si(new TH2D(
"",
";#xi_{single};#xi_{multi}", 100, 0., 0.3, 100, 0., 0.3)),
369 h_xi_diff_mu_si(new TH1D(
"",
";#xi_{multi} - #xi_{single}", 100, -0.1, +0.1)),
370 h_xi_diff_si_mu(new TH1D(
"",
";#xi_{single} - #xi_{multi}", 100, -0.1, +0.1)),
371 h2_xi_diff_si_mu_vs_xi_mu(
372 new TH2D(
"",
";#xi_{multi};#xi_{single} - #xi_{multi}", 100, 0., 0.3, 100, -0.10, 0.10)),
373 p_xi_diff_si_mu_vs_xi_mu(new TProfile(
"",
";#xi_{multi};#xi_{single} - #xi_{multi}", 100, 0., 0.3)),
374 h2_th_y_mu_vs_th_y_si(
375 new TH2D(
"",
";#theta^{*}_{y,si};#theta^{*}_{y,mu}", 100, -500E-6, +500E-6, 100, -500E-6, +500E-6)) {}
379 h2_xi_mu_vs_xi_si->Fill(p_single.
xi(), p_multi.
xi());
380 h_xi_diff_mu_si->Fill(p_multi.
xi() - p_single.
xi());
381 h_xi_diff_si_mu->Fill(p_single.
xi() - p_multi.
xi());
383 h2_xi_diff_si_mu_vs_xi_mu->Fill(p_multi.
xi(), p_single.
xi() - p_multi.
xi());
384 p_xi_diff_si_mu_vs_xi_mu->Fill(p_multi.
xi(), p_single.
xi() - p_multi.
xi());
386 const double th_y_si = p_single.
thetaY();
387 const double th_y_mu = p_multi.
thetaY();
389 h2_th_y_mu_vs_th_y_si->Fill(th_y_si, th_y_mu);
394 h2_xi_mu_vs_xi_si->Write(
"h2_xi_mu_vs_xi_si");
395 h_xi_diff_mu_si->Write(
"h_xi_diff_mu_si");
396 h_xi_diff_si_mu->Write(
"h_xi_diff_si_mu");
398 h2_xi_diff_si_mu_vs_xi_mu->Write(
"h2_xi_diff_si_mu_vs_xi_mu");
399 p_xi_diff_si_mu_vs_xi_mu->Write(
"p_xi_diff_si_mu_vs_xi_mu");
401 h2_th_y_mu_vs_th_y_si->Write(
"h2_th_y_mu_vs_th_y_si");
416 : h_xi_si_diffNF(new TH1D(
"",
";#xi_{sF} - #xi_{sN}", 100, -0.02, +0.02)),
417 h2_xi_si_diffNF_vs_xi_mu(new TH2D(
"",
";#xi_{m};#xi_{sF} - #xi_{sN}", 100, 0., 0.3, 100, -0.02, +0.02)),
418 p_xi_si_diffNF_vs_xi_mu(new TProfile(
"",
";#xi_{m};#xi_{sF} - #xi_{sN}", 100, 0., 0.3)),
419 h_th_y_si_diffNF(new TH1D(
"",
";#theta_{y,sF} - #theta_{y,sN}", 100, -100E-6, +100E-6)),
420 p_th_y_si_diffNF_vs_xi_mu(new TProfile(
"",
";#xi_{m};#theta_{y,sF} - #theta_{y,sN}", 100, 0., 0.3)) {}
426 const double th_y_s_N = p_s_N.
thetaY();
427 const double th_y_s_F = p_s_F.
thetaY();
429 h_xi_si_diffNF->Fill(p_s_F.
xi() - p_s_N.
xi());
430 h2_xi_si_diffNF_vs_xi_mu->Fill(p_m.
xi(), p_s_F.
xi() - p_s_N.
xi());
431 p_xi_si_diffNF_vs_xi_mu->Fill(p_m.
xi(), p_s_F.
xi() - p_s_N.
xi());
433 h_th_y_si_diffNF->Fill(th_y_s_F - th_y_s_N);
434 p_th_y_si_diffNF_vs_xi_mu->Fill(p_m.
xi(), th_y_s_F - th_y_s_N);
438 h_xi_si_diffNF->Write(
"h_xi_si_diffNF");
439 h2_xi_si_diffNF_vs_xi_mu->Write(
"h2_xi_si_diffNF_vs_xi_mu");
440 p_xi_si_diffNF_vs_xi_mu->Write(
"p_xi_si_diffNF_vs_xi_mu");
442 h_th_y_si_diffNF->Write(
"h_th_y_si_diffNF");
443 p_th_y_si_diffNF_vs_xi_mu->Write(
"p_th_y_si_diffNF_vs_xi_mu");
480 p_y_L_diffNF_vs_y_L_N_(new TProfile(
"p_y_L_diffNF_vs_y_L_N",
";y_{LN};y_{LF} - y_{LN}", 100, -20., +20.)),
481 p_y_R_diffNF_vs_y_R_N_(new TProfile(
"p_y_R_diffNF_vs_y_R_N",
";y_{RN};y_{RF} - y_{RN}", 100, -20., +20.)),
485 const unsigned int arm = (sector ==
"45") ? 0 : 1;
507 const double f_i = (z_ti - z_j) / (z_i - z_j), f_j = (z_i - z_ti) / (z_i - z_j);
508 const double x_inter = f_i * tr_i.getX() + f_j * tr_j.getX();
509 const double x_inter_unc_sq =
510 f_i * f_i * tr_i.getXUnc() * tr_i.getXUnc() + f_j * f_j * tr_j.getXUnc() * tr_j.getXUnc();
513 de_x = tr_ti.
getX() - x_inter;
530 if (!hRecoProtonsSingleRP->empty())
534 throw cms::Exception(
"CTPPSProtonReconstructionPlotter") <<
"Number of non empty events reached maximum.";
545 std::map<unsigned int, unsigned int> armTrackCounter, armTimingTrackCounter;
546 std::map<unsigned int, unsigned int> armTrackCounter_N, armTrackCounter_F;
548 for (
const auto &tr : *hTracks) {
554 armTrackCounter_N[0]++;
558 armTrackCounter_F[0]++;
562 armTrackCounter_N[1]++;
566 armTrackCounter_F[1]++;
569 armTrackCounter[
rpId.arm()]++;
571 const bool trackerRP =
574 armTimingTrackCounter[
rpId.arm()]++;
577 if (tr_L_N && tr_L_F) {
582 if (tr_R_N && tr_R_F) {
588 std::map<unsigned int, unsigned int> singleRPMultiplicity, multiRPMultiplicity;
591 multiRPMultiplicity[0] = multiRPMultiplicity[1] = 0;
594 for (
const auto &proton : *hRecoProtonsSingleRP) {
595 CTPPSDetId rpId((*proton.contributingLocalTracks().begin())->getRPId());
598 const bool n1f1 = (armTrackCounter_N[
rpId.arm()] == 1 && armTrackCounter_F[
rpId.arm()] == 1);
602 if (proton.validFit())
603 singleRPMultiplicity[decRPId]++;
606 for (
const auto it : singleRPMultiplicity)
610 for (
const auto &proton : *hRecoProtonsMultiRP) {
611 CTPPSDetId rpId((*proton.contributingLocalTracks().begin())->getRPId());
612 unsigned int armId =
rpId.arm();
614 const bool n1f1 = (armTrackCounter_N[armId] == 1 && armTrackCounter_F[armId] == 1);
616 multiRPPlots_[armId].fill(proton, armTrackCounter[armId], n1f1);
618 if (proton.validFit())
619 multiRPMultiplicity[armId]++;
622 for (
const auto it : multiRPMultiplicity) {
624 pl.h_multiplicity->Fill(it.second);
625 pl.h2_timing_tracks_vs_prot_mult->Fill(it.second, armTimingTrackCounter[it.first]);
629 map<unsigned int, bool> clCo;
630 clCo[0] = (singleRPMultiplicity[
rpId_45_N_] && singleRPMultiplicity[
rpId_45_F_] && multiRPMultiplicity[0] == 1);
631 clCo[1] = (singleRPMultiplicity[
rpId_56_N_] && singleRPMultiplicity[
rpId_56_F_] && multiRPMultiplicity[1] == 1);
634 for (
const auto &proton : *hRecoProtonsMultiRP) {
635 if (!proton.validFit())
638 CTPPSDetId rpId_proton((*proton.contributingLocalTracks().begin())->getRPId());
639 unsigned int armId = rpId_proton.
arm();
642 for (
const auto &tr : *hTracks) {
644 if (rpId_tr.arm() != armId)
647 const bool trackerRP =
652 double de_x = 0., de_x_unc = 0.;
655 const double rd = (de_x_unc > 0.) ? de_x / de_x_unc : -1E10;
657 const bool match = (ac.ti_tr_min <= fabs(rd) && fabs(rd) <= ac.ti_tr_max);
659 pl.h_de_x_timing_vs_tracking->Fill(de_x);
660 pl.h_de_x_rel_timing_vs_tracking->Fill(rd);
661 pl.h_de_x_match_timing_vs_tracking->Fill(match ? 1. : 0.);
663 if (clCo[armId] && armTimingTrackCounter[armId] == 1) {
664 pl.h_de_x_timing_vs_tracking_ClCo->Fill(de_x);
665 pl.h_de_x_rel_timing_vs_tracking_ClCo->Fill(rd);
666 pl.h_de_x_match_timing_vs_tracking_ClCo->Fill(match ? 1. : 0.);
672 for (
const auto &proton : *hRecoProtonsMultiRP) {
673 if (!proton.validFit())
676 CTPPSDetId rpId((*proton.contributingLocalTracks().begin())->getRPId());
677 unsigned int armId =
rpId.arm();
679 const auto &nTimingTracks = armTimingTrackCounter[armId];
684 double x_ref = 0., y_ref = 0.;
686 x_ref = tr_L_N->
getX();
687 y_ref = tr_L_N->
getY();
690 x_ref = tr_R_N->
getX();
691 y_ref = tr_R_N->
getY();
694 if (nTimingTracks == 0)
695 pl.h2_y_vs_x_tt0_ClCo->Fill(x_ref, y_ref);
696 if (nTimingTracks == 1)
697 pl.h2_y_vs_x_tt1_ClCo->Fill(x_ref, y_ref);
698 if (nTimingTracks > 1)
699 pl.h2_y_vs_x_ttm_ClCo->Fill(x_ref, y_ref);
703 for (
const auto &proton_m : *hRecoProtonsMultiRP) {
704 CTPPSDetId rpId_m((*proton_m.contributingLocalTracks().begin())->getRPId());
705 unsigned int arm = rpId_m.arm();
709 for (
const auto &proton_s : *hRecoProtonsSingleRP) {
712 bool compatible =
false;
713 for (
const auto &tr_m : proton_m.contributingLocalTracks()) {
714 if (tr_m.key() == key_s) {
724 CTPPSDetId rpId_s((*proton_s.contributingLocalTracks().begin())->getRPId());
725 const unsigned int idx = rpId_s.arm() * 1000 + rpId_s.station() * 100 + rpId_s.rp() * 10 + rpId_s.arm();
729 const unsigned int rpDecId_s = rpId_s.arm() * 100 + rpId_s.station() * 10 + rpId_s.rp();
747 auto f_out = std::make_unique<TFile>(
outputFile_.c_str(),
"recreate");
755 TDirectory *d_singleRPPlots = f_out->mkdir(
"singleRPPlots");
757 gDirectory = d_singleRPPlots->mkdir(Form(
"rp%u", it.first));
761 TDirectory *d_multiRPPlots = f_out->mkdir(
"multiRPPlots");
763 gDirectory = d_multiRPPlots->mkdir(Form(
"arm%u", it.first));
767 TDirectory *d_singleMultiCorrelationPlots = f_out->mkdir(
"singleMultiCorrelationPlots");
769 unsigned int si_rp = it.first / 10;
770 unsigned int mu_arm = it.first % 10;
772 gDirectory = d_singleMultiCorrelationPlots->mkdir(Form(
"si_rp%u_mu_arm%u", si_rp, mu_arm));
776 TDirectory *d_armCorrelationPlots = f_out->mkdir(
"armCorrelationPlots");
778 gDirectory = d_armCorrelationPlots->mkdir(Form(
"arm%u", it.first));
const Point & vertex() const
fitted vertex position
T getParameter(std::string const &) const
std::unique_ptr< TH2D > h2_timing_tracks_vs_prot_mult
static void profileToRMSGraph(TProfile *p, TGraphErrors *g)
std::unique_ptr< TH1D > h_th_y_si_diffNF
std::map< unsigned int, MultiRPPlots > multiRPPlots_
const unsigned int nTracks(const reco::Vertex &sv)
edm::EDGetTokenT< reco::ForwardProtonCollection > tokenRecoProtonsSingleRP_
std::unique_ptr< TH2D > h2_xi_mu_vs_xi_si
std::unique_ptr< TProfile > p_y_R_diffNF_vs_y_R_N_
float getXUnc() const
returns the horizontal track position uncertainty
std::unique_ptr< TProfile > p_x_R_diffNF_vs_x_R_N_
std::map< unsigned int, SingleRPPlots > singleRPPlots_
Local (=single RP) track with essential information only.
std::unique_ptr< TH1D > h_xi_si_diffNF
std::unique_ptr< TH1D > h_xi_diff_si_mu
void analyze(const edm::Event &, const edm::EventSetup &) override
signed int n_non_empty_events_
std::unique_ptr< TH1D > h_xi_n1f1
std::unique_ptr< TProfile > p_y_L_diffNF_vs_y_L_N_
float t() const
four-momentum transfer squared, in GeV^2
edm::EDGetTokenT< CTPPSLocalTrackLiteCollection > tokenTracks_
std::unique_ptr< TH2D > h2_th_y_vs_xi
std::unique_ptr< TProfile > p_th_y_si_diffNF_vs_xi_mu
std::unique_ptr< TH1D > h_n_contrib_tracking_tracks
void fill(const reco::ForwardProton &p_single, const reco::ForwardProton &p_multi)
float getX() const
returns the horizontal track position
std::unique_ptr< TH2D > h2_xi_si_diffNF_vs_xi_mu
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Event setup record containing the real (actual) geometry information.
float chi2() const
chi-squared of the fit
std::map< unsigned int, TH1D * > m_h_xi_nTracks
float thetaX() const
vertical scattering angle, in rad
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
uint32_t getRPId() const
returns the RP id
std::unique_ptr< TH1D > h_t_xi_range3
#define DEFINE_FWK_MODULE(type)
std::unique_ptr< TH1D > h_xi
std::unique_ptr< TProfile > p_vtx_y_vs_xi
std::unique_ptr< TH2D > h2_xi_diff_si_mu_vs_xi_mu
std::unique_ptr< TProfile > p_th_y_vs_xi
float normalizedChi2() const
chi-squared divided by ndof (or chi-squared * 1e6 if ndof is zero)
float xi() const
longitudinal fractional momentum loss
float getY() const
returns the vertical track position
const CTPPSLocalTrackLiteRefVector & contributingLocalTracks() const
list of RP tracks that contributed to this global track
std::unique_ptr< TH1D > h_de_x_timing_vs_tracking_ClCo
std::unique_ptr< TH2D > h2_th_y_mu_vs_th_y_si
std::map< unsigned int, ArmCorrelationPlots > armCorrelationPlots_
The manager class for TOTEM RP geometry.
std::unique_ptr< TH1D > h_multiplicity
std::unique_ptr< TH1D > h_time
void CalculateTimingTrackingDistance(const reco::ForwardProton &proton, const CTPPSLocalTrackLite &tr, const CTPPSGeometry &geometry, double &de_x, double &de_x_unc)
CLHEP::Hep3Vector getRPTranslation(unsigned int id) const
SingleMultiCorrelationPlots()
bool validFit() const
flag for the fit validity
std::unique_ptr< TH1D > h_de_x_timing_vs_tracking
std::unique_ptr< TProfile > p_xi_diff_si_mu_vs_xi_mu
std::vector< CTPPSLocalTrackLite > CTPPSLocalTrackLiteCollection
Collection of CTPPSLocalTrackLite objects.
ParameterSet const & getParameterSet(std::string const &) const
std::unique_ptr< TH2D > h2_vtx_y_vs_xi
~CTPPSProtonReconstructionPlotter() override
Base class for CTPPS detector IDs.
signed int maxNonEmptyEvents_
value_type const at(size_type idx) const
Retrieve an element of the RefVector.
CTPPSProtonReconstructionPlotter(const edm::ParameterSet &)
std::unique_ptr< TH1D > h_xi
std::unique_ptr< TH2D > h2_y_vs_x_ttm_ClCo
std::map< unsigned int, SingleMultiCorrelationPlots > singleMultiCorrelationPlots_
std::map< unsigned int, TH1D * > m_h_xi_nTracks
float thetaY() const
horizontal scattering angle, in rad
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
std::vector< ForwardProton > ForwardProtonCollection
Collection of ForwardProton objects.
void fill(const reco::ForwardProton &p_s_N, const reco::ForwardProton &p_s_F, const reco::ForwardProton &p_m)
float time() const
time of proton arrival at forward stations
std::unique_ptr< TH1D > h_xi_n1f1
edm::EDGetTokenT< reco::ForwardProtonCollection > tokenRecoProtonsMultiRP_
std::map< unsigned int, AssociationCuts > association_cuts_
std::unique_ptr< TH1D > h_multiplicity
std::unique_ptr< TProfile > p_x_L_diffNF_vs_x_L_N_
void fill(const reco::ForwardProton &p, unsigned int nTracks, bool n1f1)
std::unique_ptr< TProfile > p_xi_si_diffNF_vs_xi_mu
void fill(const reco::ForwardProton &p, unsigned int nTracks, bool n1f1)
void load(const edm::ParameterSet &ps)
unsigned int ndof() const
number of degrees of freedom for the track fit