CMS 3D CMS Logo

CTPPSProtonReconstructionSimulationValidator.cc
Go to the documentation of this file.
1 /****************************************************************************
2  * Authors:
3  * Jan Kašpar
4  ****************************************************************************/
5 
12 
14 
17 
19 
23 
24 #include "TFile.h"
25 #include "TH1D.h"
26 #include "TH2D.h"
27 #include "TProfile.h"
28 #include "TGraphErrors.h"
29 
30 #include "CLHEP/Units/GlobalPhysicalConstants.h"
31 
32 #include <map>
33 #include <string>
34 
35 //----------------------------------------------------------------------------------------------------
36 
38 public:
40 
41 private:
42  void analyze(const edm::Event &, const edm::EventSetup &) override;
43  void endJob() override;
44 
45  void fillPlots(unsigned int meth_idx,
46  unsigned int idx,
47  const reco::ForwardProton &rec_pr,
48  const HepMC::FourVector &vtx,
49  const HepMC::FourVector &mom,
50  const LHCInfo &lhcInfo);
51 
54 
57 
59 
61 
62  struct PlotGroup {
63  std::unique_ptr<TH1D> h_de_xi;
64  std::unique_ptr<TProfile> p_de_xi_vs_xi_simu;
65  std::unique_ptr<TH2D> h_xi_reco_vs_xi_simu;
66 
67  std::unique_ptr<TH1D> h_de_th_x;
68  std::unique_ptr<TProfile> p_de_th_x_vs_xi_simu;
69 
70  std::unique_ptr<TH1D> h_de_th_y;
71  std::unique_ptr<TProfile> p_de_th_y_vs_xi_simu;
72 
73  std::unique_ptr<TH1D> h_de_vtx_y;
74  std::unique_ptr<TProfile> p_de_vtx_y_vs_xi_simu;
75 
76  std::unique_ptr<TH1D> h_de_t;
77  std::unique_ptr<TProfile> p_de_t_vs_xi_simu, p_de_t_vs_t_simu;
78 
79  PlotGroup()
80  : h_de_xi(new TH1D("", ";#xi_{reco} - #xi_{simu}", 100, 0., 0.)),
81  p_de_xi_vs_xi_simu(new TProfile("", ";#xi_{simu};#xi_{reco} - #xi_{simu}", 50, 0., 0.25)),
82  h_xi_reco_vs_xi_simu(new TH2D("", ";#xi_{simu};#xi_{reco}", 100, 0., 0.30, 100, 0., 0.30)),
83 
84  h_de_th_x(new TH1D("", ";#theta_{x,reco} - #theta_{x,simu}", 100, 0., 0.)),
85  p_de_th_x_vs_xi_simu(new TProfile("", ";#xi_{simu};#theta_{x,reco} - #theta_{x,simu}", 50, 0., 0.25)),
86 
87  h_de_th_y(new TH1D("", ";#theta_{y,reco} - #theta_{y,simu}", 100, 0., 0.)),
88  p_de_th_y_vs_xi_simu(new TProfile("", ";#xi_{simu};#theta_{y,reco} - #theta_{y,simu}", 50, 0., 0.25)),
89 
90  h_de_vtx_y(new TH1D("", ";vtx_{y,reco} - vtx_{y,simu} (mm)", 100, 0., 0.)),
91  p_de_vtx_y_vs_xi_simu(new TProfile("", ";#xi_{simu};vtx_{y,reco} - vtx_{y,simu} (mm)", 50, 0., 0.25)),
92 
93  h_de_t(new TH1D("", ";t_{reco} - t_{simu}", 100, -1., +1.)),
94  p_de_t_vs_xi_simu(new TProfile("", ";xi_{simu};t_{reco} - t_{simu}", 50, 0., 0.25)),
95  p_de_t_vs_t_simu(new TProfile("", ";t_{simu};t_{reco} - t_{simu}", 20, 0., 5.)) {}
96 
97  static TGraphErrors profileToRMSGraph(TProfile *p, const char *name = "") {
98  TGraphErrors gr_err;
99  gr_err.SetName(name);
100 
101  for (int bi = 1; bi <= p->GetNbinsX(); ++bi) {
102  double c = p->GetBinCenter(bi);
103  double w = p->GetBinWidth(bi);
104 
105  double N = p->GetBinEntries(bi);
106  double Sy = p->GetBinContent(bi) * N;
107  double Syy = p->GetSumw2()->At(bi);
108 
109  double si_sq = Syy / N - Sy * Sy / N / N;
110  double si = (si_sq >= 0.) ? sqrt(si_sq) : 0.;
111  double si_unc_sq = si_sq / 2. / N; // Gaussian approximation
112  double si_unc = (si_unc_sq >= 0.) ? sqrt(si_unc_sq) : 0.;
113 
114  int idx = gr_err.GetN();
115  gr_err.SetPoint(idx, c, si);
116  gr_err.SetPointError(idx, w / 2., si_unc);
117  }
118 
119  return gr_err;
120  }
121 
122  void write() const {
123  h_xi_reco_vs_xi_simu->Write("h_xi_reco_vs_xi_simu");
124  h_de_xi->Write("h_de_xi");
125  p_de_xi_vs_xi_simu->Write("p_de_xi_vs_xi_simu");
126  profileToRMSGraph(p_de_xi_vs_xi_simu.get(), "g_rms_de_xi_vs_xi_simu").Write();
127 
128  h_de_th_x->Write("h_de_th_x");
129  p_de_th_x_vs_xi_simu->Write("p_de_th_x_vs_xi_simu");
130  profileToRMSGraph(p_de_th_x_vs_xi_simu.get(), "g_rms_de_th_x_vs_xi_simu").Write();
131 
132  h_de_th_y->Write("h_de_th_y");
133  p_de_th_y_vs_xi_simu->Write("p_de_th_y_vs_xi_simu");
134  profileToRMSGraph(p_de_th_y_vs_xi_simu.get(), "g_rms_de_th_y_vs_xi_simu").Write();
135 
136  h_de_vtx_y->Write("h_de_vtx_y");
137  p_de_vtx_y_vs_xi_simu->Write("p_de_vtx_y_vs_xi_simu");
138  profileToRMSGraph(p_de_vtx_y_vs_xi_simu.get(), "g_rms_de_vtx_y_vs_xi_simu").Write();
139 
140  h_de_t->Write("h_de_t");
141  p_de_t_vs_xi_simu->Write("p_de_t_vs_xi_simu");
142  profileToRMSGraph(p_de_t_vs_xi_simu.get(), "g_rms_de_t_vs_xi_simu").Write();
143  p_de_t_vs_t_simu->Write("p_de_t_vs_t_simu");
144  profileToRMSGraph(p_de_t_vs_t_simu.get(), "g_rms_de_t_vs_t_simu").Write();
145  }
146  };
147 
148  std::map<unsigned int, std::map<unsigned int, PlotGroup>> plots_;
149 
150  struct DoubleArmPlotGroup {
151  std::unique_ptr<TH2D> h2_t_sh_vs_vtx_t, h2_t_dh_vs_vtx_z;
152  std::unique_ptr<TH1D> h_t_sh_minus_vtx_t, h_t_dh_minus_vtx_z;
153 
155  : h2_t_sh_vs_vtx_t(new TH2D("", ";vtx_t (mm);(t_56 + t_45)/2 (mm)", 100, -250., -250., 100, +250., +250.)),
156  h2_t_dh_vs_vtx_z(new TH2D("", ";vtx_z (mm);(t_56 - t_45)/2 (mm)", 100, -250., -250., 100, +250., +250.)),
157  h_t_sh_minus_vtx_t(new TH1D("", ";(t_56 + t_45)/2 - vtx_t (mm)", 100, -100., +100.)),
158  h_t_dh_minus_vtx_z(new TH1D("", ";(t_56 - t_45)/2 - vtx_z (mm)", 100, -100., +100.)) {}
159 
160  void fill(double time_45, double time_56, double vtx_z, double vtx_t) {
161  const double t_sum_half = (time_56 + time_45) / 2. * CLHEP::c_light;
162  const double t_dif_half = (time_56 - time_45) / 2. * CLHEP::c_light;
163 
164  h2_t_sh_vs_vtx_t->Fill(t_sum_half, vtx_t);
165  h_t_sh_minus_vtx_t->Fill(t_sum_half - vtx_t);
166 
167  h2_t_dh_vs_vtx_z->Fill(t_dif_half, vtx_z);
168  h_t_dh_minus_vtx_z->Fill(t_dif_half - vtx_z);
169  }
170 
171  void write() const {
172  h2_t_sh_vs_vtx_t->Write("h2_t_sh_vs_vtx_t");
173  h_t_sh_minus_vtx_t->Write("h_t_sh_minus_vtx_t");
174 
175  h2_t_dh_vs_vtx_z->Write("h2_t_dh_vs_vtx_z");
176  h_t_dh_minus_vtx_z->Write("h_t_dh_minus_vtx_z");
177  }
178  };
179 
180  DoubleArmPlotGroup double_arm_plots_;
181 };
182 
183 //----------------------------------------------------------------------------------------------------
184 
185 using namespace std;
186 using namespace edm;
187 using namespace HepMC;
188 
189 //----------------------------------------------------------------------------------------------------
190 
192  const edm::ParameterSet &iConfig)
193  : tokenHepMCBeforeSmearing_(
194  consumes<edm::HepMCProduct>(iConfig.getParameter<edm::InputTag>("tagHepMCBeforeSmearing"))),
195  tokenHepMCAfterSmearing_(
196  consumes<edm::HepMCProduct>(iConfig.getParameter<edm::InputTag>("tagHepMCAfterSmearing"))),
197  tokenRecoProtonsSingleRP_(
198  consumes<reco::ForwardProtonCollection>(iConfig.getParameter<InputTag>("tagRecoProtonsSingleRP"))),
199  tokenRecoProtonsMultiRP_(
200  consumes<reco::ForwardProtonCollection>(iConfig.getParameter<InputTag>("tagRecoProtonsMultiRP"))),
201  lhcInfoESToken_(esConsumes(ESInputTag("", iConfig.getParameter<std::string>("lhcInfoLabel")))),
202  outputFile_(iConfig.getParameter<string>("outputFile")) {}
203 
204 //----------------------------------------------------------------------------------------------------
205 
207  // get conditions
208  const auto &lhcInfo = iSetup.getData(lhcInfoESToken_);
209 
210  // get input
211  edm::Handle<edm::HepMCProduct> hHepMCBeforeSmearing;
212  iEvent.getByToken(tokenHepMCBeforeSmearing_, hHepMCBeforeSmearing);
213  HepMC::GenEvent *hepMCEventBeforeSmearing = (HepMC::GenEvent *)hHepMCBeforeSmearing->GetEvent();
214 
215  edm::Handle<edm::HepMCProduct> hHepMCAfterSmearing;
216  iEvent.getByToken(tokenHepMCAfterSmearing_, hHepMCAfterSmearing);
217  HepMC::GenEvent *hepMCEventAfterSmearing = (HepMC::GenEvent *)hHepMCAfterSmearing->GetEvent();
218 
219  Handle<reco::ForwardProtonCollection> hRecoProtonsSingleRP;
220  iEvent.getByToken(tokenRecoProtonsSingleRP_, hRecoProtonsSingleRP);
221 
222  Handle<reco::ForwardProtonCollection> hRecoProtonsMultiRP;
223  iEvent.getByToken(tokenRecoProtonsMultiRP_, hRecoProtonsMultiRP);
224 
225  // extract vertex position
226  bool vertex_set = false;
227  FourVector vtx;
228  for (auto it = hepMCEventAfterSmearing->vertices_begin(); it != hepMCEventAfterSmearing->vertices_end(); ++it) {
229  if (vertex_set) {
230  LogError("CTPPSProtonReconstructionSimulationValidator") << "Multiple vertices found.";
231  return;
232  }
233 
234  vertex_set = true;
235  vtx = (*it)->position();
236  }
237 
238  // extract forward protons
239  bool proton_45_set = false;
240  bool proton_56_set = false;
241  FourVector mom_45, mom_56;
242 
243  for (auto it = hepMCEventBeforeSmearing->particles_begin(); it != hepMCEventBeforeSmearing->particles_end(); ++it) {
244  const auto &part = *it;
245 
246  // accept only stable non-beam protons
247  if (part->pdg_id() != 2212)
248  continue;
249 
250  if (part->status() != 1)
251  continue;
252 
253  if (part->is_beam())
254  continue;
255 
256  const auto &mom = part->momentum();
257 
258  if (mom.e() < 4500.)
259  continue;
260 
261  if (mom.z() > 0) {
262  // 45
263  if (proton_45_set) {
264  LogError("CTPPSProtonReconstructionSimulationValidator") << "Found multiple protons in sector 45.";
265  return;
266  }
267 
268  proton_45_set = true;
269  mom_45 = mom;
270  } else {
271  // 56
272  if (proton_56_set) {
273  LogError("CTPPSProtonReconstructionSimulationValidator") << "Found multiple protons in sector 56.";
274  return;
275  }
276 
277  proton_56_set = true;
278  mom_56 = mom;
279  }
280  }
281 
282  // single-arm comparison
283  for (const auto &handle : {hRecoProtonsSingleRP, hRecoProtonsMultiRP}) {
284  for (const auto &rec_pr : *handle) {
285  if (!rec_pr.validFit())
286  continue;
287 
288  unsigned int idx = 12345;
289 
290  bool mom_set = false;
291  FourVector mom;
292 
294  idx = 0;
295  mom_set = proton_45_set;
296  mom = mom_45;
297  }
299  idx = 1;
300  mom_set = proton_56_set;
301  mom = mom_56;
302  }
303 
304  if (!mom_set)
305  continue;
306 
307  unsigned int meth_idx = 1234;
308 
310  meth_idx = 0;
311 
313  idx = 100 * rpId.arm() + 10 * rpId.station() + rpId.rp();
314  }
315 
317  meth_idx = 1;
318 
319  fillPlots(meth_idx, idx, rec_pr, vtx, mom, lhcInfo);
320  }
321  }
322 
323  // double-arm comparison
324  bool time_set_45 = false, time_set_56 = false;
325  double time_45 = 0., time_56 = 0.;
326  for (const auto &rec_pr : *hRecoProtonsMultiRP) {
327  if (!rec_pr.validFit())
328  continue;
329 
330  // skip protons with no timing information
331  if (rec_pr.timeError() < 1E-3)
332  continue;
333 
335  time_set_45 = true;
336  time_45 = rec_pr.time();
337  }
339  time_set_56 = true;
340  time_56 = rec_pr.time();
341  }
342  }
343 
344  if (time_set_45 && time_set_56)
345  double_arm_plots_.fill(time_45, time_56, vtx.z(), vtx.t());
346 }
347 
348 //----------------------------------------------------------------------------------------------------
349 
351  unsigned int idx,
352  const reco::ForwardProton &rec_pr,
353  const HepMC::FourVector &vtx,
354  const HepMC::FourVector &mom,
355  const LHCInfo &lhcInfo) {
356  const double p_nom = lhcInfo.energy();
357  const double xi_simu = (p_nom - mom.rho()) / p_nom;
358  const double th_x_simu = mom.x() / mom.rho();
359  const double th_y_simu = mom.y() / mom.rho();
360  const double vtx_y_simu = vtx.y();
361  const double th_simu = sqrt(th_x_simu * th_x_simu + th_y_simu * th_y_simu);
362  const double t_simu = -reco::ForwardProton::calculateT(p_nom, mom.rho(), th_simu);
363 
364  const double xi_reco = rec_pr.xi();
365  const double th_x_reco = rec_pr.thetaX();
366  const double th_y_reco = rec_pr.thetaY();
367  const double vtx_y_reco = rec_pr.vertex().y() * 10.; // conversion: cm --> mm
368  const double t_reco = -rec_pr.t();
369 
370  auto &plt = plots_[meth_idx][idx];
371 
372  plt.h_xi_reco_vs_xi_simu->Fill(xi_simu, xi_reco);
373  plt.h_de_xi->Fill(xi_reco - xi_simu);
374  plt.p_de_xi_vs_xi_simu->Fill(xi_simu, xi_reco - xi_simu);
375 
376  plt.h_de_th_x->Fill(th_x_reco - th_x_simu);
377  plt.p_de_th_x_vs_xi_simu->Fill(xi_simu, th_x_reco - th_x_simu);
378 
379  plt.h_de_th_y->Fill(th_y_reco - th_y_simu);
380  plt.p_de_th_y_vs_xi_simu->Fill(xi_simu, th_y_reco - th_y_simu);
381 
382  plt.h_de_vtx_y->Fill(vtx_y_reco - vtx_y_simu);
383  plt.p_de_vtx_y_vs_xi_simu->Fill(xi_simu, vtx_y_reco - vtx_y_simu);
384 
385  plt.h_de_t->Fill(t_reco - t_simu);
386  plt.p_de_t_vs_xi_simu->Fill(xi_simu, t_reco - t_simu);
387  plt.p_de_t_vs_t_simu->Fill(t_simu, t_reco - t_simu);
388 }
389 
390 //----------------------------------------------------------------------------------------------------
391 
393  auto f_out = std::make_unique<TFile>(outputFile_.c_str(), "recreate");
394 
395  for (const auto &mit : plots_) {
396  const char *method = (mit.first == 0) ? "single rp" : "multi rp";
397  TDirectory *d_method = f_out->mkdir(method);
398 
399  for (const auto &eit : mit.second) {
400  gDirectory = d_method->mkdir(Form("%i", eit.first));
401  eit.second.write();
402  }
403  }
404 
405  gDirectory = f_out->mkdir("double arm");
407 }
408 
409 //----------------------------------------------------------------------------------------------------
410 
LHCInfo::energy
const float energy() const
Definition: LHCInfo.cc:190
CTPPSProtonReconstructionSimulationValidator::lhcInfoESToken_
edm::ESGetToken< LHCInfo, LHCInfoRcd > lhcInfoESToken_
Definition: CTPPSProtonReconstructionSimulationValidator.cc:59
CTPPSProtonReconstructionSimulationValidator::endJob
void endJob() override
Definition: CTPPSProtonReconstructionSimulationValidator.cc:391
EDAnalyzer.h
CTPPSProtonReconstructionSimulationValidator::tokenHepMCAfterSmearing_
edm::EDGetTokenT< edm::HepMCProduct > tokenHepMCAfterSmearing_
Definition: CTPPSProtonReconstructionSimulationValidator.cc:54
edm::ESInputTag
Definition: ESInputTag.h:87
reco::ForwardProton::ReconstructionMethod::singleRP
CTPPSProtonReconstructionSimulationValidator::PlotGroup::h_de_t
std::unique_ptr< TH1D > h_de_t
Definition: CTPPSProtonReconstructionSimulationValidator.cc:77
CTPPSProtonReconstructionSimulationValidator::PlotGroup
Definition: CTPPSProtonReconstructionSimulationValidator.cc:63
ESHandle.h
CTPPSProtonReconstructionSimulationValidator::DoubleArmPlotGroup::write
void write() const
Definition: CTPPSProtonReconstructionSimulationValidator.cc:172
patZpeak.handle
handle
Definition: patZpeak.py:23
CTPPSProtonReconstructionSimulationValidator::PlotGroup::p_de_th_x_vs_xi_simu
std::unique_ptr< TProfile > p_de_th_x_vs_xi_simu
Definition: CTPPSProtonReconstructionSimulationValidator.cc:69
edm::EDGetTokenT< edm::HepMCProduct >
edm
HLT enums.
Definition: AlignableModifier.h:19
CTPPSProtonReconstructionSimulationValidator::DoubleArmPlotGroup::DoubleArmPlotGroup
DoubleArmPlotGroup()
Definition: CTPPSProtonReconstructionSimulationValidator.cc:155
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
reco::ForwardProton::thetaY
float thetaY() const
horizontal scattering angle, in rad
Definition: ForwardProton.h:88
AlcaSiPixelAliHarvester0T_cff.method
method
Definition: AlcaSiPixelAliHarvester0T_cff.py:41
CTPPSProtonReconstructionSimulationValidator::fillPlots
void fillPlots(unsigned int meth_idx, unsigned int idx, const reco::ForwardProton &rec_pr, const HepMC::FourVector &vtx, const HepMC::FourVector &mom, const LHCInfo &lhcInfo)
Definition: CTPPSProtonReconstructionSimulationValidator.cc:349
edm::RefVector::begin
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:223
LHCInfo.h
reco::ForwardProton
Definition: ForwardProton.h:21
LHCInfo
Definition: LHCInfo.h:12
CTPPSLocalTrackLite.h
reco::ForwardProton::vertex
const Point & vertex() const
fitted vertex position
Definition: ForwardProton.h:56
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
edm::Handle< edm::HepMCProduct >
CTPPSProtonReconstructionSimulationValidator::plots_
std::map< unsigned int, std::map< unsigned int, PlotGroup > > plots_
Definition: CTPPSProtonReconstructionSimulationValidator.cc:149
CTPPSProtonReconstructionSimulationValidator::CTPPSProtonReconstructionSimulationValidator
CTPPSProtonReconstructionSimulationValidator(const edm::ParameterSet &)
Definition: CTPPSProtonReconstructionSimulationValidator.cc:190
CTPPSProtonReconstructionSimulationValidator::PlotGroup::write
void write() const
Definition: CTPPSProtonReconstructionSimulationValidator.cc:123
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
CTPPSProtonReconstructionSimulationValidator::DoubleArmPlotGroup
Definition: CTPPSProtonReconstructionSimulationValidator.cc:151
CTPPSProtonReconstructionSimulationValidator::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: CTPPSProtonReconstructionSimulationValidator.cc:205
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
MakerMacros.h
part
part
Definition: HCALResponse.h:20
CTPPSProtonReconstructionSimulationValidator::tokenRecoProtonsMultiRP_
edm::EDGetTokenT< reco::ForwardProtonCollection > tokenRecoProtonsMultiRP_
Definition: CTPPSProtonReconstructionSimulationValidator.cc:57
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
w
const double w
Definition: UKUtility.cc:23
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
N
#define N
Definition: blowfish.cc:9
reco::ForwardProton::time
float time() const
time of proton arrival at forward stations
Definition: ForwardProton.h:116
CTPPSProtonReconstructionSimulationValidator::DoubleArmPlotGroup::h_t_dh_minus_vtx_z
std::unique_ptr< TH1D > h_t_dh_minus_vtx_z
Definition: CTPPSProtonReconstructionSimulationValidator.cc:153
ForwardProtonFwd.h
CTPPSProtonReconstructionSimulationValidator::tokenHepMCBeforeSmearing_
edm::EDGetTokenT< edm::HepMCProduct > tokenHepMCBeforeSmearing_
Definition: CTPPSProtonReconstructionSimulationValidator.cc:53
reco::ForwardProton::contributingLocalTracks
const CTPPSLocalTrackLiteRefVector & contributingLocalTracks() const
list of RP tracks that contributed to this global track
Definition: ForwardProton.h:136
CTPPSProtonReconstructionSimulationValidator::PlotGroup::h_de_th_y
std::unique_ptr< TH1D > h_de_th_y
Definition: CTPPSProtonReconstructionSimulationValidator.cc:71
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
vtx_t
ap_int< 5 > vtx_t
Definition: data.h:8
reco::ForwardProtonCollection
std::vector< ForwardProton > ForwardProtonCollection
Collection of ForwardProton objects.
Definition: ForwardProtonFwd.h:25
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
CTPPSProtonReconstructionSimulationValidator::PlotGroup::p_de_th_y_vs_xi_simu
std::unique_ptr< TProfile > p_de_th_y_vs_xi_simu
Definition: CTPPSProtonReconstructionSimulationValidator.cc:72
ForwardProton.h
reco::ForwardProton::LHCSector::sector56
CTPPSDetId
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:31
reco::ForwardProton::xi
float xi() const
longitudinal fractional momentum loss
Definition: ForwardProton.h:84
iEvent
int iEvent
Definition: GenABIO.cc:224
CTPPSProtonReconstructionSimulationValidator
Definition: CTPPSProtonReconstructionSimulationValidator.cc:36
reco::ForwardProton::calculateT
static float calculateT(double beam_mom, double proton_mom, double theta)
compute the squared four-momentum transfer from incident and scattered momenta, and angular informati...
Definition: ForwardProton.cc:44
edm::EventSetup
Definition: EventSetup.h:58
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:37
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
reco::ForwardProton::method
ReconstructionMethod method() const
reconstruction method for this track
Definition: ForwardProton.h:131
reco::ForwardProton::thetaX
float thetaX() const
vertical scattering angle, in rad
Definition: ForwardProton.h:86
CTPPSProtonReconstructionSimulationValidator::PlotGroup::p_de_t_vs_xi_simu
std::unique_ptr< TProfile > p_de_t_vs_xi_simu
Definition: CTPPSProtonReconstructionSimulationValidator.cc:78
CTPPSProtonReconstructionSimulationValidator::PlotGroup::profileToRMSGraph
static TGraphErrors profileToRMSGraph(TProfile *p, const char *name="")
Definition: CTPPSProtonReconstructionSimulationValidator.cc:98
edm::ESGetToken< LHCInfo, LHCInfoRcd >
CTPPSProtonReconstructionSimulationValidator::PlotGroup::h_de_xi
std::unique_ptr< TH1D > h_de_xi
Definition: CTPPSProtonReconstructionSimulationValidator.cc:64
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
CTPPSProtonReconstructionSimulationValidator::PlotGroup::h_de_th_x
std::unique_ptr< TH1D > h_de_th_x
Definition: CTPPSProtonReconstructionSimulationValidator.cc:68
reco::ForwardProton::validFit
bool validFit() const
flag for the fit validity
Definition: ForwardProton.h:126
profile_2016_postTS2_cff.rpId
rpId
Definition: profile_2016_postTS2_cff.py:21
CTPPSProtonReconstructionSimulationValidator::PlotGroup::h_de_vtx_y
std::unique_ptr< TH1D > h_de_vtx_y
Definition: CTPPSProtonReconstructionSimulationValidator.cc:74
std
Definition: JetResolutionObject.h:76
CTPPSProtonReconstructionSimulationValidator::DoubleArmPlotGroup::h2_t_dh_vs_vtx_z
std::unique_ptr< TH2D > h2_t_dh_vs_vtx_z
Definition: CTPPSProtonReconstructionSimulationValidator.cc:152
reco::ForwardProton::ReconstructionMethod::multiRP
CTPPSProtonReconstructionSimulationValidator::DoubleArmPlotGroup::h_t_sh_minus_vtx_t
std::unique_ptr< TH1D > h_t_sh_minus_vtx_t
Definition: CTPPSProtonReconstructionSimulationValidator.cc:153
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:18
CTPPSProtonReconstructionSimulationValidator::PlotGroup::p_de_t_vs_t_simu
std::unique_ptr< TProfile > p_de_t_vs_t_simu
Definition: CTPPSProtonReconstructionSimulationValidator.cc:78
Frameworkfwd.h
reco::ForwardProton::LHCSector::sector45
HepMC
Definition: GenParticle.h:15
CTPPSProtonReconstructionSimulationValidator::PlotGroup::h_xi_reco_vs_xi_simu
std::unique_ptr< TH2D > h_xi_reco_vs_xi_simu
Definition: CTPPSProtonReconstructionSimulationValidator.cc:66
CTPPSProtonReconstructionSimulationValidator::outputFile_
std::string outputFile_
Definition: CTPPSProtonReconstructionSimulationValidator.cc:61
CTPPSProtonReconstructionSimulationValidator::DoubleArmPlotGroup::fill
void fill(double time_45, double time_56, double vtx_z, double vtx_t)
Definition: CTPPSProtonReconstructionSimulationValidator.cc:161
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
EventSetup.h
CTPPSDetId.h
reco::ForwardProton::timeError
float timeError() const
uncertainty on time of proton arrival at forward stations
Definition: ForwardProton.h:120
edm::HepMCProduct
Definition: HepMCProduct.h:21
LHCInfoRcd.h
reco::ForwardProton::t
float t() const
four-momentum transfer squared, in GeV^2
Definition: ForwardProton.cc:51
HepMCProduct.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
CTPPSProtonReconstructionSimulationValidator::PlotGroup::PlotGroup
PlotGroup()
Definition: CTPPSProtonReconstructionSimulationValidator.cc:80
edm::Event
Definition: Event.h:73
CTPPSProtonReconstructionSimulationValidator::PlotGroup::p_de_vtx_y_vs_xi_simu
std::unique_ptr< TProfile > p_de_vtx_y_vs_xi_simu
Definition: CTPPSProtonReconstructionSimulationValidator.cc:75
CTPPSProtonReconstructionSimulationValidator::DoubleArmPlotGroup::h2_t_sh_vs_vtx_t
std::unique_ptr< TH2D > h2_t_sh_vs_vtx_t
Definition: CTPPSProtonReconstructionSimulationValidator.cc:152
CTPPSProtonReconstructionSimulationValidator::double_arm_plots_
DoubleArmPlotGroup double_arm_plots_
Definition: CTPPSProtonReconstructionSimulationValidator.cc:181
edm::InputTag
Definition: InputTag.h:15
CTPPSProtonReconstructionSimulationValidator::PlotGroup::p_de_xi_vs_xi_simu
std::unique_ptr< TProfile > p_de_xi_vs_xi_simu
Definition: CTPPSProtonReconstructionSimulationValidator.cc:65
CTPPSProtonReconstructionSimulationValidator::tokenRecoProtonsSingleRP_
edm::EDGetTokenT< reco::ForwardProtonCollection > tokenRecoProtonsSingleRP_
Definition: CTPPSProtonReconstructionSimulationValidator.cc:56
reco::ForwardProton::lhcSector
LHCSector lhcSector() const
Definition: ForwardProton.h:140