Warning, file /include/Geant4/G4PrimaryTransformer.hh was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 #ifndef G4PrimaryTransformer_hh
0036 #define G4PrimaryTransformer_hh 1
0037
0038 #include "globals.hh"
0039 #include "G4TrackVector.hh"
0040 #include "G4ParticleTable.hh"
0041 #include "G4PrimaryParticle.hh"
0042 #include "G4DynamicParticle.hh"
0043 #include "G4ExceptionSeverity.hh"
0044
0045 class G4Event;
0046 class G4PrimaryVertex;
0047
0048 class G4PrimaryTransformer
0049 {
0050 public:
0051
0052 G4PrimaryTransformer();
0053 virtual ~G4PrimaryTransformer() = default;
0054
0055 G4TrackVector* GimmePrimaries(G4Event* anEvent, G4int trackIDCounter=0);
0056 void CheckUnknown();
0057
0058 inline void SetVerboseLevel(G4int vl)
0059 { verboseLevel = vl; }
0060
0061 void SetUnknownParticleDefined(G4bool vl);
0062 void SetChargedUnknownParticleDefined(G4bool vl);
0063
0064
0065
0066
0067 inline G4bool GetUnknownParticleDefined() const
0068 { return unknownParticleDefined; }
0069
0070 inline G4bool GetChargedUnknownParticleDefined() const
0071 { return chargedUnknownParticleDefined; }
0072
0073 protected:
0074
0075 void GenerateTracks(G4PrimaryVertex* primaryVertex);
0076 void GenerateSingleTrack(G4PrimaryParticle* primaryParticle,
0077 G4double x0, G4double y0, G4double z0,
0078 G4double t0, G4double wv);
0079 void SetDecayProducts(G4PrimaryParticle* mother,
0080 G4DynamicParticle* motherDP);
0081 G4bool CheckDynamicParticle(G4DynamicParticle*DP);
0082
0083
0084
0085
0086 virtual G4ParticleDefinition* GetDefinition(G4PrimaryParticle* pp);
0087
0088
0089
0090
0091
0092 virtual G4bool IsGoodForTrack(G4ParticleDefinition* pd);
0093
0094
0095
0096
0097 protected:
0098
0099 G4TrackVector TV;
0100 G4ParticleTable* particleTable = nullptr;
0101
0102 G4ParticleDefinition* unknown = nullptr;
0103 G4ParticleDefinition* chargedunknown = nullptr;
0104 G4ParticleDefinition* opticalphoton = nullptr;
0105 G4int verboseLevel = 0;
0106 G4int trackID = 0;
0107 G4int nWarn = 0;
0108 G4bool unknownParticleDefined = false;
0109 G4bool chargedUnknownParticleDefined = false;
0110 G4bool opticalphotonDefined = false;
0111
0112 static G4double kETolerance;
0113 static G4ExceptionSeverity kETSeverity;
0114 public:
0115 static void SetKETolerance(G4double val, G4ExceptionSeverity sev = JustWarning)
0116 { kETolerance = val; kETSeverity = sev; }
0117
0118 };
0119
0120 #endif