26 #include "TGraphErrors.h" 62 outputFile_(ps.getParameter<
string>(
"outputFile")),
64 h_de_xi(new TH1D(
"",
";#Delta#xi", 200, -0.01, +0.01)),
65 h_de_th_x(new TH1D(
"",
";#Delta#theta_{x}", 200, -100E-6, +100E-6)),
66 h_de_th_y(new TH1D(
"",
";#Delta#theta_{y}", 200, -100E-6, +100E-6)),
67 h_de_vtx_y(new TH1D(
"",
";#Deltay^{*} (cm)", 200, -0.01, +0.01)) {}
79 if (hRecoProtonsRef->size() != hRecoProtonsTest->size()) {
81 <<
"Different number of Ref and Test protons. Skipping event.";
85 for (
unsigned int i = 0;
i < hRecoProtonsRef->size(); ++
i) {
86 const auto &pr_ref = hRecoProtonsRef->at(
i);
87 const auto &pr_test = hRecoProtonsTest->at(
i);
89 if (!pr_ref.validFit() || !pr_test.validFit())
92 h_de_xi->Fill(pr_test.xi() - pr_ref.xi());
93 h_de_th_x->Fill(pr_test.thetaX() - pr_ref.thetaX());
94 h_de_th_y->Fill(pr_test.thetaY() - pr_ref.thetaY());
102 auto f_out = std::make_unique<TFile>(
outputFile_.c_str(),
"recreate");
std::unique_ptr< TH1D > h_de_xi
edm::EDGetTokenT< reco::ForwardProtonCollection > tokenRecoProtonsTest_
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::ForwardProtonCollection > tokenRecoProtonsRef_
std::unique_ptr< TH1D > h_de_th_y
~CTPPSProtonReconstructionDiffPlotter() override
#define DEFINE_FWK_MODULE(type)
std::unique_ptr< TH1D > h_de_th_x
CTPPSProtonReconstructionDiffPlotter(const edm::ParameterSet &)
std::vector< ForwardProton > ForwardProtonCollection
Collection of ForwardProton objects.
Log< level::Warning, false > LogWarning
std::unique_ptr< TH1D > h_de_vtx_y