49 :
h2_xr_vs_xs(new TH2D(
"",
";x_simu (mm);x_reco (mm)", 100, -10., +10., 100, -10, +10.)),
50 h2_yr_vs_ys(new TH2D(
"",
"y_simu (mm);y_reco (mm)", 100, -10., +10., 100, -10, +10.)),
51 h_de_x(new TH1D(
"",
";x (mm)", 200, -100E-3, +100E-3)),
52 h_de_y(new TH1D(
"",
";y (mm)", 200, -100E-3, +100E-3)) {}
54 void fill(
double simu_x,
double simu_y,
double reco_x,
double reco_y) {
58 h_de_x->Fill(reco_x - simu_x);
59 h_de_y->Fill(reco_y - simu_y);
78 outputFile_(iConfig.getParameter<
std::
string>(
"outputFile")) {}
91 for (
const auto& simuTrack : *simuTracks) {
93 for (
const auto& recoTrack : *recoTracks) {
94 if (simuTrack.rpId() == recoTrack.rpId()) {
95 unsigned int rpDecId = rpId.
arm() * 100 + rpId.station() * 10 + rpId.rp();
96 rpPlots_[rpDecId].fill(simuTrack.x(), simuTrack.y(), recoTrack.x(), recoTrack.y());
105 auto f_out = std::make_unique<TFile>(
outputFile_.c_str(),
"recreate");
108 gDirectory = f_out->mkdir(Form(
"RP %u", it.first));
std::unique_ptr< TH1D > h_de_x
std::unique_ptr< TH1D > h_de_y
std::map< unsigned int, RPPlots > rpPlots_
void analyze(const edm::Event &, const edm::EventSetup &) override
std::unique_ptr< TH2D > h2_yr_vs_ys
#define DEFINE_FWK_MODULE(type)
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 &)