11 #ifndef IMeVPrtlFlux_h
12 #define IMeVPrtlFlux_h
15 #include "fhiclcpp/ParameterSet.h"
16 #include "art/Framework/Principal/Event.h"
18 #include "nusimdata/SimulationBase/MCFlux.h"
22 #include "nugen/EventGeneratorBase/GENIE/EvtTimeShiftFactory.h"
23 #include "nugen/EventGeneratorBase/GENIE/EvtTimeShiftI.h"
52 std::vector<double> rotation = pset.get<std::vector<double>>(
"Beam2DetectorRotation");
53 assert(rotation.size() == 9);
55 TVector3 beam2DetX(rotation[0], rotation[3], rotation[6]);
56 TVector3 beam2DetY(rotation[1], rotation[4], rotation[7]);
57 TVector3 beam2DetZ(rotation[2], rotation[5], rotation[8]);
59 fBeam2Det.RotateAxes(beam2DetX, beam2DetY, beam2DetZ);
62 std::vector<double>
origin = pset.get<std::vector<double>>(
"BeamOrigin");
63 assert(origin.size() == 3 || origin.size() == 6);
65 if (origin.size() == 3) {
66 fBeamOrigin.SetXYZ(origin[0], origin[1], origin[2]);
69 else if (origin.size() == 6) {
70 TVector3 userpos = TVector3(origin[0], origin[1], origin[2]);
71 TVector3 beampos = TVector3(origin[3], origin[4], origin[5]);
76 unsigned seed = art::ServiceHandle<rndm::NuRandomService>()->getSeed();
89 evgb::EvtTimeShiftFactory::Instance().Print();
119 double EnuLab(
double enucm, TLorentzVector meson_mom, TLorentzVector meson_pos) {
121 double costh = meson_mom.Vect().Unit().Dot(-meson_pos.Vect().Unit());
124 double M = 1. / (meson_mom.Gamma() * (1 - meson_mom.Beta() * costh));
IMeVPrtlFlux(const fhicl::ParameterSet &pset)
std::string fSpillTimeConfig
virtual bool MakeFlux(const simb::MCFlux &mcflux, MeVPrtlFlux &flux, double &weight)=0
IMeVPrtlStage interface class definiton. General interface behind each stage. Provides random number ...
This provides an art tool interface definition for tools which can create fake particles to overlay o...
static const Constants & Instance()
TLorentzVector BeamOrigin()
double EnuLab(double enucm, TLorentzVector meson_mom, TLorentzVector meson_pos)
IMeVPrtlFlux interface class definiton.
evgb::EvtTimeShiftI * fTimeShiftMethod
BEGIN_PROLOG could also be cout
constexpr Point origin()
Returns a origin position with a point of the specified type.
virtual ~IMeVPrtlFlux() noexcept=default
Virtual Destructor.