1 #ifndef FastSimulation_MaterialEffects_NuclearInteractionSimulator_H
2 #define FastSimulation_MaterialEffects_NuclearInteractionSimulator_H
39 std::vector<int>& pionTypes,
40 std::vector<std::string>& pionNames,
41 std::vector<double>& pionMasses,
42 std::vector<double>& pionPMin,
44 std::vector<double>& lengthRatio,
45 std::vector< std::vector<double> >& ratios,
46 std::map<int,int >& idMap,
48 unsigned int distAlgo,
59 bool read(std::string inputFile);
71 unsigned index(
int thePid);
void compute(ParticlePropagator &Particle)
Generate a nuclear interaction according to the probability that it happens.
std::map< int, int > theIDMap
std::vector< std::vector< TFile * > > theFiles
std::vector< std::vector< unsigned > > theNumberOfInteractions
std::vector< double > thePionMA
std::vector< std::vector< TTree * > > theTrees
std::vector< int > thePionID
std::vector< std::vector< unsigned > > theCurrentEntry
std::vector< std::vector< std::string > > theFileNames
std::vector< std::vector< unsigned > > theNumberOfEntries
std::vector< std::vector< double > > thePionCM
bool read(std::string inputFile)
Read former nuclear interaction (from previous run)
unsigned index(int thePid)
Return a hashed index for a given pid.
std::vector< std::string > thePionNA
std::vector< std::vector< TBranch * > > theBranches
std::vector< std::vector< unsigned > > theCurrentInteraction
std::vector< std::vector< double > > theRatios
~NuclearInteractionSimulator()
Default Destructor.
std::ofstream myOutputFile
std::vector< double > theLengthRatio
std::vector< double > thePionEN
NuclearInteractionSimulator(std::vector< double > &pionEnergies, std::vector< int > &pionTypes, std::vector< std::string > &pionNames, std::vector< double > &pionMasses, std::vector< double > &pionPMin, 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, const RandomEngine *engine)
Constructor.
std::vector< std::vector< NUEvent * > > theNUEvents
std::vector< double > thePionPMin
void save()
Save current nuclear interaction (for later use)
double distanceToPrimary(const RawParticle &Particle, const RawParticle &aDaughter) const
Compute distance between secondary and primary.