#include <NuclearInteractionSimulator.h>
Public Member Functions | |
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. More... | |
bool | read (std::string inputFile) |
Read former nuclear interaction (from previous run) More... | |
void | save () |
Save current nuclear interaction (for later use) More... | |
~NuclearInteractionSimulator () | |
Default Destructor. More... | |
Public Member Functions inherited from MaterialEffectsSimulator | |
RHEP_const_iter | beginDaughters () const |
Returns const iterator to the beginning of the daughters list. More... | |
int | closestDaughterId () |
The id of the closest charged daughter (filled for nuclear interactions only) More... | |
double | eMass () const |
Electron mass in GeV/c2. More... | |
RHEP_const_iter | endDaughters () const |
Returns const iterator to the end of the daughters list. More... | |
double | excitE () const |
Mean excitation energy (in GeV) More... | |
MaterialEffectsSimulator (const RandomEngine *engine, double A=28.0855, double Z=14.0000, double density=2.329, double radLen=9.360) | |
unsigned | nDaughters () const |
Returns the number of daughters. More... | |
XYZVector | orthogonal (const XYZVector &) const |
A vector orthogonal to another one (because it's not in XYZTLorentzVector) More... | |
double | radLenIncm () const |
One radiation length in cm. More... | |
double | rho () const |
Density in g/cm3. More... | |
void | setNormalVector (const GlobalVector &normal) |
Sets the vector normal to the surface traversed. More... | |
double | theA () const |
A. More... | |
double | theZ () const |
Z. More... | |
void | updateState (ParticlePropagator &myTrack, double radlen) |
Compute the material effect (calls the sub class) More... | |
virtual | ~MaterialEffectsSimulator () |
Private Member Functions | |
void | compute (ParticlePropagator &Particle) |
Generate a nuclear interaction according to the probability that it happens. More... | |
double | distanceToPrimary (const RawParticle &Particle, const RawParticle &aDaughter) const |
Compute distance between secondary and primary. More... | |
unsigned | index (int thePid) |
Return a hashed index for a given pid. More... | |
Private Attributes | |
unsigned | ien4 |
unsigned | myOutputBuffer |
std::ofstream | myOutputFile |
std::vector< std::vector < TBranch * > > | theBranches |
std::vector< std::vector < unsigned > > | theCurrentEntry |
std::vector< std::vector < unsigned > > | theCurrentInteraction |
unsigned | theDistAlgo |
double | theDistCut |
std::vector< std::vector < std::string > > | theFileNames |
std::vector< std::vector < TFile * > > | theFiles |
std::map< int, int > | theIDMap |
std::vector< double > | theLengthRatio |
std::vector< std::vector < NUEvent * > > | theNUEvents |
std::vector< std::vector < unsigned > > | theNumberOfEntries |
std::vector< std::vector < unsigned > > | theNumberOfInteractions |
std::vector< std::vector < double > > | thePionCM |
std::vector< double > | thePionEN |
double | thePionEnergy |
std::vector< int > | thePionID |
std::vector< double > | thePionMA |
std::vector< std::string > | thePionNA |
std::vector< double > | thePionPMin |
std::vector< std::vector < double > > | theRatios |
std::vector< std::vector < TTree * > > | theTrees |
Additional Inherited Members | |
Public Types inherited from MaterialEffectsSimulator | |
typedef std::vector < RawParticle > ::const_iterator | RHEP_const_iter |
Protected Attributes inherited from MaterialEffectsSimulator | |
std::vector< RawParticle > | _theUpdatedState |
double | A |
double | density |
double | radLen |
double | radLengths |
const RandomEngine * | random |
int | theClosestChargedDaughterId |
GlobalVector | theNormalVector |
double | Z |
Definition at line 33 of file NuclearInteractionSimulator.h.
NuclearInteractionSimulator::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.
Definition at line 20 of file NuclearInteractionSimulator.cc.
References gather_cfg::cout, edm::hlt::Exception, lut2db_cfg::filename, RandomEngine::flatShoot(), edm::FileInPath::fullPath(), ien4, LaserDQM_cfg::input, myOutputBuffer, myOutputFile, MaterialEffectsSimulator::random, read(), mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, theBranches, theCurrentEntry, theCurrentInteraction, theFileNames, theFiles, theNUEvents, theNumberOfEntries, theNumberOfInteractions, thePionCM, thePionEN, thePionMA, thePionNA, and theTrees.
NuclearInteractionSimulator::~NuclearInteractionSimulator | ( | ) |
Default Destructor.
Definition at line 193 of file NuclearInteractionSimulator.cc.
References compare_using_db::ifile, myOutputFile, and theFiles.
|
privatevirtual |
Generate a nuclear interaction according to the probability that it happens.
Implements MaterialEffectsSimulator.
Definition at line 215 of file NuclearInteractionSimulator.cc.
References MaterialEffectsSimulator::_theUpdatedState, abs, RawParticle::boost(), distanceToPrimary(), relval_parameters_module::energy, create_public_lumi_plots::exp, NUEvent::NUInteraction::first, RandomEngine::flatShoot(), NUEvent::NUParticle::id, ien4, index(), NUEvent::NUInteraction::last, create_public_lumi_plots::log, NUEvent::NUParticle::mass, RawParticle::mass(), MaterialEffectsSimulator::orthogonal(), phi, RawParticle::pid(), funct::pow(), NUEvent::NUParticle::px, NUEvent::NUParticle::py, NUEvent::NUParticle::pz, MaterialEffectsSimulator::radLengths, MaterialEffectsSimulator::random, RawParticle::rotate(), RawParticle::setID(), funct::sin(), slope, mathSSE::sqrt(), MaterialEffectsSimulator::theA(), MaterialEffectsSimulator::theClosestChargedDaughterId, theCurrentEntry, theCurrentInteraction, theDistCut, theIDMap, theLengthRatio, theNUEvents, theNumberOfEntries, theNumberOfInteractions, thePionCM, thePionEnergy, thePionPMin, theRatios, theta(), and theTrees.
|
private |
Compute distance between secondary and primary.
Definition at line 529 of file NuclearInteractionSimulator.cc.
References RawParticle::charge(), and theDistAlgo.
Referenced by compute().
|
private |
Return a hashed index for a given pid.
Definition at line 688 of file NuclearInteractionSimulator.cc.
References thePionID.
Referenced by compute().
bool NuclearInteractionSimulator::read | ( | std::string | inputFile | ) |
Read former nuclear interaction (from previous run)
Definition at line 624 of file NuclearInteractionSimulator.cc.
References python.entryComment::results, findQualityFiles::size, theCurrentEntry, and theCurrentInteraction.
Referenced by Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::goto(), NuclearInteractionSimulator(), and Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::setFilterBranches().
void NuclearInteractionSimulator::save | ( | ) |
Save current nuclear interaction (for later use)
Definition at line 571 of file NuclearInteractionSimulator.cc.
References myOutputBuffer, myOutputFile, findQualityFiles::size, theCurrentEntry, and theCurrentInteraction.
Referenced by Vispa.Main.TabController.TabController::allowClose(), Vispa.Main.TabController.TabController::checkModificationTimestamp(), and MaterialEffects::save().
|
private |
Definition at line 94 of file NuclearInteractionSimulator.h.
Referenced by compute(), and NuclearInteractionSimulator().
|
private |
Definition at line 99 of file NuclearInteractionSimulator.h.
Referenced by NuclearInteractionSimulator(), and save().
|
private |
Definition at line 98 of file NuclearInteractionSimulator.h.
Referenced by NuclearInteractionSimulator(), save(), and ~NuclearInteractionSimulator().
|
private |
Definition at line 84 of file NuclearInteractionSimulator.h.
Referenced by NuclearInteractionSimulator().
|
private |
Definition at line 86 of file NuclearInteractionSimulator.h.
Referenced by compute(), NuclearInteractionSimulator(), read(), and save().
|
private |
Definition at line 87 of file NuclearInteractionSimulator.h.
Referenced by compute(), NuclearInteractionSimulator(), read(), and save().
|
private |
Definition at line 95 of file NuclearInteractionSimulator.h.
Referenced by distanceToPrimary().
|
private |
Definition at line 96 of file NuclearInteractionSimulator.h.
Referenced by compute().
|
private |
Definition at line 90 of file NuclearInteractionSimulator.h.
Referenced by NuclearInteractionSimulator().
|
private |
Definition at line 82 of file NuclearInteractionSimulator.h.
Referenced by NuclearInteractionSimulator(), and ~NuclearInteractionSimulator().
|
private |
Definition at line 93 of file NuclearInteractionSimulator.h.
Referenced by compute().
|
private |
Definition at line 79 of file NuclearInteractionSimulator.h.
Referenced by compute().
|
private |
Definition at line 85 of file NuclearInteractionSimulator.h.
Referenced by compute(), and NuclearInteractionSimulator().
|
private |
Definition at line 88 of file NuclearInteractionSimulator.h.
Referenced by compute(), and NuclearInteractionSimulator().
|
private |
Definition at line 89 of file NuclearInteractionSimulator.h.
Referenced by compute(), and NuclearInteractionSimulator().
|
private |
Definition at line 91 of file NuclearInteractionSimulator.h.
Referenced by compute(), and NuclearInteractionSimulator().
|
private |
Definition at line 73 of file NuclearInteractionSimulator.h.
Referenced by NuclearInteractionSimulator().
|
private |
Definition at line 78 of file NuclearInteractionSimulator.h.
Referenced by compute().
|
private |
Definition at line 74 of file NuclearInteractionSimulator.h.
Referenced by index().
|
private |
Definition at line 76 of file NuclearInteractionSimulator.h.
Referenced by NuclearInteractionSimulator().
|
private |
Definition at line 75 of file NuclearInteractionSimulator.h.
Referenced by NuclearInteractionSimulator().
|
private |
Definition at line 77 of file NuclearInteractionSimulator.h.
Referenced by compute().
|
private |
Definition at line 80 of file NuclearInteractionSimulator.h.
Referenced by compute().
|
private |
Definition at line 83 of file NuclearInteractionSimulator.h.
Referenced by compute(), and NuclearInteractionSimulator().