Import Geant4 10.7.0.beta source tree
This commit is contained in:
@@ -23,83 +23,84 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4PrimaryTransformer
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// This class is exclusively used by G4EventManager for the conversion
|
||||
// from G4PrimaryVertex/G4PrimaryParticle to G4DynamicParticle/G4Track.
|
||||
|
||||
#ifndef G4PromaryTransformer_h
|
||||
#define G4PromaryTransformer_h 1
|
||||
// Author: Makoto Asai, 1999
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4PrimaryTransformer_hh
|
||||
#define G4PrimaryTransformer_hh 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4TrackVector.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "globals.hh"
|
||||
class G4Event;
|
||||
class G4PrimaryVertex;
|
||||
#include "G4PrimaryParticle.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This class is exclusively used by G4EventManager for the conversion
|
||||
// from G4PrimaryVertex/G4PrimaryParticle to G4DynamicParticle/G4Track.
|
||||
//
|
||||
class G4Event;
|
||||
class G4PrimaryVertex;
|
||||
|
||||
class G4PrimaryTransformer
|
||||
{
|
||||
public:
|
||||
|
||||
G4PrimaryTransformer();
|
||||
virtual ~G4PrimaryTransformer();
|
||||
|
||||
G4TrackVector* GimmePrimaries(G4Event* anEvent, G4int trackIDCounter=0);
|
||||
void CheckUnknown();
|
||||
|
||||
protected:
|
||||
G4TrackVector TV;
|
||||
G4ParticleTable* particleTable;
|
||||
G4int verboseLevel;
|
||||
G4int trackID;
|
||||
|
||||
G4ParticleDefinition* unknown;
|
||||
G4bool unknownParticleDefined;
|
||||
G4ParticleDefinition* opticalphoton;
|
||||
G4bool opticalphotonDefined;
|
||||
|
||||
G4int nWarn;
|
||||
|
||||
public:
|
||||
inline void SetVerboseLevel(G4int vl)
|
||||
{ verboseLevel = vl; };
|
||||
{ verboseLevel = vl; }
|
||||
|
||||
public: //with description
|
||||
void SetUnknnownParticleDefined(G4bool vl);
|
||||
// By invoking this Set method, the user can alter the treatment of unknown
|
||||
// particle. The ideal place to invoke this method is in the BeginOfRunAction.
|
||||
// By invoking this method, the user can alter the treatment of unknown
|
||||
// particles. The ideal place to invoke this method is in the
|
||||
// BeginOfRunAction().
|
||||
|
||||
inline G4bool GetUnknownParticleDefined() const
|
||||
{ return unknownParticleDefined; }
|
||||
{ return unknownParticleDefined; }
|
||||
|
||||
protected:
|
||||
|
||||
void GenerateTracks(G4PrimaryVertex* primaryVertex);
|
||||
void GenerateSingleTrack(G4PrimaryParticle* primaryParticle,
|
||||
G4double x0,G4double y0,G4double z0,G4double t0,G4double wv);
|
||||
G4double x0, G4double y0, G4double z0,
|
||||
G4double t0, G4double wv);
|
||||
void SetDecayProducts(G4PrimaryParticle* mother,
|
||||
G4DynamicParticle* motherDP);
|
||||
G4DynamicParticle* motherDP);
|
||||
G4bool CheckDynamicParticle(G4DynamicParticle*DP);
|
||||
|
||||
protected: //with description
|
||||
// Following two virtual methods are provided to customize the use of PrimaryTransformer
|
||||
// for particle types exotic to Geant4.
|
||||
// Following two virtual methods are provided to customize the use
|
||||
// of G4PrimaryTransformer for particle types exotic to Geant4.
|
||||
|
||||
virtual G4ParticleDefinition* GetDefinition(G4PrimaryParticle*pp);
|
||||
// Return appropriate G4ParticleDefinition w.r.t. the primary particle.
|
||||
// If NULL is returned, the particle will not be treated as a track, but its daughters
|
||||
// will be examined in case it has "pre-assigned decay products".
|
||||
virtual G4ParticleDefinition* GetDefinition(G4PrimaryParticle* pp);
|
||||
// Return appropriate G4ParticleDefinition w.r.t. the primary particle.
|
||||
// If nullptr is returned, the particle will not be treated as a track,
|
||||
// but its daughters will be examined in case it has "pre-assigned
|
||||
// decay products".
|
||||
|
||||
virtual G4bool IsGoodForTrack(G4ParticleDefinition*pd);
|
||||
// Return true if a primary particle should be converted into a track.
|
||||
// By default, all particles of non-shortlived and shortlived with valid decay
|
||||
// tables are converted.
|
||||
virtual G4bool IsGoodForTrack(G4ParticleDefinition* pd);
|
||||
// Return true if a primary particle should be converted into a track.
|
||||
// By default, all particles of non-shortlived and shortlived with
|
||||
// valid decay tables are converted.
|
||||
|
||||
protected:
|
||||
|
||||
G4TrackVector TV;
|
||||
G4ParticleTable* particleTable = nullptr;
|
||||
|
||||
G4ParticleDefinition* unknown = nullptr;
|
||||
G4ParticleDefinition* opticalphoton = nullptr;
|
||||
G4int verboseLevel = 0;
|
||||
G4int trackID = 0;
|
||||
G4int nWarn = 0;
|
||||
G4bool unknownParticleDefined = false;
|
||||
G4bool opticalphotonDefined = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user