19 #include <momemta/ParameterSet.h> 20 #include <momemta/Module.h> 21 #include <momemta/Types.h> 67 m_ps_point = get<double>(parameters.get<
InputTag>(
"ps_point"));
68 m_input = get<LorentzVector>(parameters.get<
InputTag>(
"reco_particle"));
70 m_PMin = parameters.get<
double>(
"min");
71 m_PMax = parameters.get<
double>(
"max");
74 virtual Status
work()
override {
76 const double& ps_point = *m_ps_point;
77 const LorentzVector& reco_particle = *m_input;
79 const double range = m_PMax - m_PMin;
80 const double gen_P = m_PMin + range*ps_point;
83 double gen_E = sqrt(
SQ(gen_P) +
SQ(reco_particle.M()));
84 output->SetCoordinates(
85 gen_P * std::sin(reco_particle.Theta()) * std::cos(reco_particle.Phi()),
86 gen_P * std::sin(reco_particle.Theta()) * std::sin(reco_particle.Phi()),
87 gen_P * std::cos(reco_particle.Theta()),
91 *TF_times_jacobian = range;
98 double m_PMin, m_PMax;
105 std::shared_ptr<LorentzVector> output = produce<LorentzVector>(
"output");
106 std::shared_ptr<double> TF_times_jacobian = produce<double>(
"TF_times_jacobian");
111 .Input(
"reco_particle")
113 .Output(
"TF_times_jacobian")
Parent class for all the modules.
A class encapsulating a lua table.
Flat transfer function on |P| (mainly for testing purposes).
Module(PoolPtr pool, const std::string &name)
Constructor.
virtual Status work() override
Main function.