Class to wrap PunchThrough simulation inside FastCaloSim; Runs both PunchThroughG4Classifier and PunchThroughG4Tool methods.
More...
#include <PunchThroughSimWrapper.h>
|
| | PunchThroughSimWrapper (const std::string &, const std::string &, const IInterface *) |
| | Constructor.
|
| virtual | ~PunchThroughSimWrapper ()=default |
| | Destructor.
|
| virtual StatusCode | initialize () |
| | AlgTool initialize method.
|
| virtual StatusCode | finalize () |
| | AlgTool finalize method.
|
| virtual void | DoPunchThroughSim (G4ParticleTable &ptable, CLHEP::HepRandomEngine *rng, const double simE, std::vector< double > simEfrac, const G4FastTrack &fastTrack, G4FastStep &fastStep) |
◆ PunchThroughSimWrapper()
| PunchThroughSimWrapper::PunchThroughSimWrapper |
( |
const std::string & | type, |
|
|
const std::string & | name, |
|
|
const IInterface * | parent ) |
◆ ~PunchThroughSimWrapper()
| virtual PunchThroughSimWrapper::~PunchThroughSimWrapper |
( |
| ) |
|
|
virtualdefault |
◆ DoPunchThroughSim()
| void PunchThroughSimWrapper::DoPunchThroughSim |
( |
G4ParticleTable & | ptable, |
|
|
CLHEP::HepRandomEngine * | rng, |
|
|
const double | simE, |
|
|
std::vector< double > | simEfrac, |
|
|
const G4FastTrack & | fastTrack, |
|
|
G4FastStep & | fastStep ) |
|
virtual |
Definition at line 30 of file PunchThroughSimWrapper.cxx.
31{
32
33 const G4Track* G4PrimaryTrack = fastTrack.GetPrimaryTrack();
34
35
37
38
39 std::vector<std::map<std::string, double>> secKinematicsMapVect;
40
41
42 auto secTrackCont = std::make_unique<G4TrackVector>();
43
44
45 double punchThroughClassifierRand = CLHEP::RandFlat::shoot(rng);
46
47
49
50
51 if( punchThroughProbability > punchThroughClassifierRand){
52 secKinematicsMapVect =
m_PunchThroughG4Tool->computePunchThroughParticles(fastTrack, rng, punchThroughProbability, punchThroughClassifierRand);
53
54
55 if(secKinematicsMapVect.size()!=0){
56
57 m_PunchThroughG4Tool->createAllSecondaryTracks(ptable, fastStep, *G4PrimaryTrack, secKinematicsMapVect, *secTrackCont, caloMSVars);
58 }
59 }
60
61}
PublicToolHandle< IPunchThroughG4Tool > m_PunchThroughG4Tool
PublicToolHandle< IPunchThroughG4Classifier > m_PunchThroughG4Classifier
◆ finalize()
| StatusCode PunchThroughSimWrapper::finalize |
( |
| ) |
|
|
virtual |
◆ initialize()
| StatusCode PunchThroughSimWrapper::initialize |
( |
| ) |
|
|
virtual |
◆ m_PunchThroughG4Classifier
| PublicToolHandle<IPunchThroughG4Classifier> PunchThroughSimWrapper::m_PunchThroughG4Classifier {this, "PunchThroughG4Classifier", "PunchThroughG4Classifier", ""} |
|
private |
◆ m_PunchThroughG4Tool
| PublicToolHandle<IPunchThroughG4Tool> PunchThroughSimWrapper::m_PunchThroughG4Tool {this, "PunchThroughG4Tool", "PunchThroughG4Tool", ""} |
|
private |
The documentation for this class was generated from the following files: