10 #ifndef IMeVPrtlStage_h
11 #define IMeVPrtlStage_h
14 #include "fhiclcpp/ParameterSet.h"
15 #include "art/Framework/Principal/Event.h"
18 #include "nurandom/RandomUtils/NuRandomService.h"
19 #include "CLHEP/Random/JamesRandom.h"
20 #include "CLHEP/Random/RandFlat.h"
48 art::ServiceHandle<rndm::NuRandomService> seedSvc;
49 fEngine =
new CLHEP::HepJamesRandom;
50 seedSvc->registerEngine(rndm::NuRandomService::CLHEPengineSeeder(
fEngine), name);
59 virtual void configure(
const fhicl::ParameterSet&) = 0;
67 double costheta = CLHEP::RandFlat::shoot(
fEngine, -1, 1);
68 double sintheta = sqrt(1. - costheta * costheta);
69 double phi = CLHEP::RandFlat::shoot(
fEngine, 0, 2*M_PI);
70 return TVector3(sintheta * cos(phi), sintheta * sin(phi), costheta);
73 return CLHEP::RandFlat::shoot(
fEngine);
CLHEP::HepRandomEngine * fEngine
virtual double MaxWeight()=0
IMeVPrtlStage interface class definiton. General interface behind each stage. Provides random number ...
virtual ~IMeVPrtlStage() noexcept
Virtual Destructor.
virtual void configure(const fhicl::ParameterSet &)=0
Interface for configuring the particular algorithm tool.
TVector3 RandomUnitVector()
IMeVPrtlStage(const char *name)