48 using namespace HepMC;
56 h_xi_(new TH1D(
"h_xi",
";#xi", 100, 0., 0.30)),
57 h_th_x_(new TH1D(
"h_th_x",
";#theta^{*}_{x}", 100, -300E-6, +300E-6)),
58 h_th_y_(new TH1D(
"h_th_y",
";#theta^{*}_{y}", 100, -300E-6, +300E-6))
75 for (
auto it = hepMCEvent->particles_begin(); it != hepMCEvent->particles_end(); ++it)
77 const auto &
part = *it;
80 if (
part->pdg_id() != 2212)
83 if (
part->status() != 1)
89 const auto &mom =
part->momentum();
90 const double p_nom = hLHCInfo->
energy();
92 if (mom.rho() / p_nom < 0.7)
95 const double xi_simu = (p_nom - mom.e()) / p_nom;
96 const double th_x_simu = mom.x() / mom.rho();
97 const double th_y_simu = mom.y() / mom.rho();
109 auto f_out = std::make_unique<TFile>(
outputFile_.c_str(),
"recreate");
edm::EDGetTokenT< edm::HepMCProduct > tokenHepMC_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
CTPPSHepMCDistributionPlotter(const edm::ParameterSet &)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::string lhcInfoLabel_
#define DEFINE_FWK_MODULE(type)
std::unique_ptr< TH1D > h_th_x_
std::unique_ptr< TH1D > h_xi_
const HepMC::GenEvent * GetEvent() const
std::unique_ptr< TH1D > h_th_y_
void analyze(const edm::Event &, const edm::EventSetup &) override
float const energy() const