Go to the documentation of this file. 1 #ifndef FastSimulation_MaterialEffects_NuclearInteractionSimulator_H
2 #define FastSimulation_MaterialEffects_NuclearInteractionSimulator_H
43 std::vector<std::vector<double> >&
ratios,
44 std::map<int, int>& idMap,
66 unsigned index(
int thePid);
std::vector< std::vector< unsigned > > theNumberOfEntries
unsigned index(int thePid)
Return a hashed index for a given pid.
std::map< int, int > theIDMap
std::vector< double > thePionEN
void compute(ParticlePropagator &Particle, RandomEngineAndDistribution const *) override
Generate a nuclear interaction according to the probability that it happens.
std::vector< double > thePionPMin
std::vector< std::vector< unsigned > > theCurrentInteraction
std::vector< std::string > thePionNA
bool read(std::string inputFile)
Read former nuclear interaction (from previous run)
std::vector< std::vector< NUEvent * > > theNUEvents
std::ofstream myOutputFile
std::vector< std::vector< double > > thePionCM
void save() override
Save current nuclear interaction (for later use)
std::vector< std::vector< unsigned > > theNumberOfInteractions
std::vector< std::vector< double > > theRatios
std::vector< std::vector< TBranch * > > theBranches
NuclearInteractionSimulator(std::vector< double > &hadronEnergies, std::vector< int > &hadronTypes, std::vector< std::string > &hadronNames, std::vector< double > &hadronMasses, std::vector< double > &hadronPMin, double pionEnergy, std::vector< double > &lengthRatio, std::vector< std::vector< double > > &ratios, std::map< int, int > &idMap, std::string inputFile, unsigned int distAlgo, double distCut)
Constructor.
std::vector< std::vector< TTree * > > theTrees
std::vector< std::vector< unsigned > > theCurrentEntry
std::vector< int > thePionID
~NuclearInteractionSimulator() override
Default Destructor.
std::vector< double > theLengthRatio
bool currentValuesWereSet
double distanceToPrimary(const RawParticle &Particle, const RawParticle &aDaughter) const
Compute distance between secondary and primary.
std::vector< std::vector< std::string > > theFileNames
std::vector< double > thePionMA
lengthRatio
Default is 0.020 for algo 1;.