49 h_de_x(new TH1D(
"",
";#Deltax (mm)", 1000, -1., +1.)),
50 h_de_y(new TH1D(
"",
";#Deltay (mm)", 1000, -1., +1.))
59 h_de_x->Write(
"h_de_x");
60 h_de_y->Write(
"h_de_y");
76 chiSqCut_ (iConfig.getParameter<double>(
"chiSqCut")),
89 if (hOpticalFunctions->empty())
97 for (
const auto &
pr : *hRecoProtons)
105 for (
const auto &tr :
pr.contributingLocalTracks())
108 unsigned int rpDecId =
rpId.arm()*100 +
rpId.station()*10 +
rpId.rp();
115 auto it = hOpticalFunctions->find(
rpId);
116 if (it == hOpticalFunctions->end())
122 it->second.transport(k_in_beam, k_out_beam);
126 it->second.transport(k_in, k_out);
129 const double de_x = (k_out.
x - k_out_beam.
x) * 10. - tr->getX();
130 const double de_y = (k_out.
y - k_out_beam.
y) * 10. - tr->getY();
141 auto f_out = std::make_unique<TFile>(
outputFile_.c_str(),
"recreate");
144 gDirectory = f_out->mkdir(Form(
"%u",
p.first));
void fill(double de_x, double de_y)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::unique_ptr< TH1D > h_de_y
edm::EDGetTokenT< reco::ForwardProtonCollection > tokenRecoProtons_
std::unique_ptr< TH1D > h_de_x
CTPPSProtonReconstructionValidator(const edm::ParameterSet &)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
#define DEFINE_FWK_MODULE(type)
void analyze(const edm::Event &, const edm::EventSetup &) override
std::map< unsigned int, RPPlots > rp_plots_
proton kinematics description
Base class for CTPPS detector IDs.
std::vector< ForwardProton > ForwardProtonCollection
Collection of ForwardProton objects.