52 h2_xr_vs_xs(new TH2D(
"",
";x_simu (mm);x_reco (mm)", 100, -10., +10., 100, -10, +10.)),
53 h2_yr_vs_ys(new TH2D(
"",
"y_simu (mm);y_reco (mm)", 100, -10., +10., 100, -10, +10.)),
54 h_de_x(new TH1D(
"",
";x (mm)", 200, -100E-3, +100E-3)),
55 h_de_y(new TH1D(
"",
";y (mm)", 200, -100E-3, +100E-3))
58 void fill(
double simu_x,
double simu_y,
double reco_x,
double reco_y)
60 h2_xr_vs_xs->Fill(simu_x, reco_x);
61 h2_yr_vs_ys->Fill(simu_y, reco_y);
63 h_de_x->Fill(reco_x - simu_x);
64 h_de_y->Fill(reco_y - simu_y);
69 h2_xr_vs_xs->Write(
"h2_xr_vs_xs");
70 h2_yr_vs_ys->Write(
"h2_yr_vs_ys");
71 h_de_x->Write(
"h_de_x");
72 h_de_y->Write(
"h_de_y");
99 for (
const auto& simuTrack : *simuTracks) {
101 for (
const auto& recoTrack : *recoTracks) {
102 if (simuTrack.getRPId() == recoTrack.getRPId()) {
103 unsigned int rpDecId =
rpId.arm()*100 +
rpId.station()*10 +
rpId.rp();
104 rpPlots_[rpDecId].fill(simuTrack.getX(), simuTrack.getY(), recoTrack.getX(), recoTrack.getY());
114 auto f_out = std::make_unique<TFile>(
outputFile_.c_str(),
"recreate");
117 gDirectory = f_out->mkdir(Form(
"RP %u", it.first));
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::unique_ptr< TH1D > h_de_x
std::unique_ptr< TH1D > h_de_y
std::map< unsigned int, RPPlots > rpPlots_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
#define DEFINE_FWK_MODULE(type)
void analyze(const edm::Event &, const edm::EventSetup &) override
std::unique_ptr< TH2D > h2_yr_vs_ys
std::vector< CTPPSLocalTrackLite > CTPPSLocalTrackLiteCollection
Collection of CTPPSLocalTrackLite objects.
edm::EDGetTokenT< CTPPSLocalTrackLiteCollection > recoTracksToken_
edm::EDGetTokenT< CTPPSLocalTrackLiteCollection > simuTracksToken_
Base class for CTPPS detector IDs.
void fill(double simu_x, double simu_y, double reco_x, double reco_y)
std::unique_ptr< TH2D > h2_xr_vs_xs
CTPPSDirectProtonSimulationValidator(const edm::ParameterSet &)