All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
evgen::ldm::IMeVPrtlStage Class Referenceabstract

IMeVPrtlStage interface class definiton. General interface behind each stage. Provides random number generation. More...

#include <IMeVPrtlStage.h>

Inheritance diagram for evgen::ldm::IMeVPrtlStage:
evgen::ldm::IMesonGen evgen::ldm::IMeVPrtlDecay evgen::ldm::IMeVPrtlFlux evgen::ldm::IRayTrace evgen::ldm::EmptyKaonGen evgen::ldm::NuMiKaonGen evgen::ldm::HiggsMakeDecay evgen::ldm::HNLMakeDecay evgen::ldm::Kaon2HiggsFlux evgen::ldm::Kaon2HNLFlux evgen::ldm::MonoEnergyHiggsFlux evgen::ldm::MixedWeightRayTraceBox evgen::ldm::RayTraceBox evgen::ldm::ReThrowRayTraceBox evgen::ldm::WeightedRayTraceBox

Public Member Functions

virtual ~IMeVPrtlStage () noexcept
 Virtual Destructor. More...
 
 IMeVPrtlStage (const char *name)
 
virtual void configure (const fhicl::ParameterSet &)=0
 Interface for configuring the particular algorithm tool. More...
 
virtual double MaxWeight ()=0
 
TVector3 RandomUnitVector ()
 
double GetRandom ()
 
const char * Name ()
 

Protected Attributes

CLHEP::HepRandomEngine * fEngine
 
const char * fName
 

Detailed Description

IMeVPrtlStage interface class definiton. General interface behind each stage. Provides random number generation.

Definition at line 36 of file IMeVPrtlStage.h.

Constructor & Destructor Documentation

virtual evgen::ldm::IMeVPrtlStage::~IMeVPrtlStage ( )
inlinevirtualnoexcept

Virtual Destructor.

Definition at line 42 of file IMeVPrtlStage.h.

42  {
43  if (fEngine) delete fEngine;
44  }
CLHEP::HepRandomEngine * fEngine
Definition: IMeVPrtlStage.h:79
evgen::ldm::IMeVPrtlStage::IMeVPrtlStage ( const char *  name)
inline

Definition at line 46 of file IMeVPrtlStage.h.

46  {
47  // setup the random number engine
48  art::ServiceHandle<rndm::NuRandomService> seedSvc;
49  fEngine = new CLHEP::HepJamesRandom;
50  seedSvc->registerEngine(rndm::NuRandomService::CLHEPengineSeeder(fEngine), name);
51  fName = name;
52  }
CLHEP::HepRandomEngine * fEngine
Definition: IMeVPrtlStage.h:79
then echo fcl name

Member Function Documentation

virtual void evgen::ldm::IMeVPrtlStage::configure ( const fhicl::ParameterSet &  )
pure virtual
double evgen::ldm::IMeVPrtlStage::GetRandom ( )
inline

Definition at line 72 of file IMeVPrtlStage.h.

72  {
73  return CLHEP::RandFlat::shoot(fEngine);
74  }
CLHEP::HepRandomEngine * fEngine
Definition: IMeVPrtlStage.h:79
virtual double evgen::ldm::IMeVPrtlStage::MaxWeight ( )
pure virtual
const char* evgen::ldm::IMeVPrtlStage::Name ( )
inline

Definition at line 76 of file IMeVPrtlStage.h.

76 { return fName; }
TVector3 evgen::ldm::IMeVPrtlStage::RandomUnitVector ( )
inline

Definition at line 64 of file IMeVPrtlStage.h.

64  {
65  // In order to pick a random point on a sphere -- pick a random value of _costh_, __not__ theta
66  // b.c. d\Omega = d\phi dcos\theta, i.e. d\Omega != d\phi d\theta
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);
71  }
CLHEP::HepRandomEngine * fEngine
Definition: IMeVPrtlStage.h:79

Member Data Documentation

CLHEP::HepRandomEngine* evgen::ldm::IMeVPrtlStage::fEngine
protected

Definition at line 79 of file IMeVPrtlStage.h.

const char* evgen::ldm::IMeVPrtlStage::fName
protected

Definition at line 80 of file IMeVPrtlStage.h.


The documentation for this class was generated from the following file: