49 h_de_x(new TH1D(
"",
";#Deltax (mm)", 100, -2., +2.)),
50 h_de_y(new TH1D(
"",
";#Deltay (mm)", 100, -2., +2.))
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();
110 auto it = hOpticalFunctions->find(rpId);
114 it->second.transport(k_in_beam, k_out_beam);
118 it->second.transport(k_in, k_out);
120 const double de_x = (k_out.
x - k_out_beam.
x) * 10. - tr->getX();
121 const double de_y = (k_out.
y - k_out_beam.
y) * 10. - tr->getY();
132 auto f_out = std::make_unique<TFile>(
outputFile_.c_str(),
"recreate");
135 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.