Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
Par01EMShowerModel Class Reference

#include <Par01EMShowerModel.hh>

Inheritance diagram for Par01EMShowerModel:
G4VFastSimulationModel

Public Member Functions

 Par01EMShowerModel (G4String, G4Region *)
 
 Par01EMShowerModel (G4String)
 
 ~Par01EMShowerModel ()
 
virtual G4bool IsApplicable (const G4ParticleDefinition &)
 
virtual G4bool ModelTrigger (const G4FastTrack &)
 
virtual void DoIt (const G4FastTrack &, G4FastStep &)
 
- Public Member Functions inherited from G4VFastSimulationModel
 G4VFastSimulationModel (const G4String &aName)
 
 G4VFastSimulationModel (const G4String &aName, G4Envelope *, G4bool IsUnique=FALSE)
 
virtual ~G4VFastSimulationModel ()
 
virtual G4bool AtRestModelTrigger (const G4FastTrack &)
 
virtual void AtRestDoIt (const G4FastTrack &, G4FastStep &)
 
const G4String GetName () const
 
G4bool operator== (const G4VFastSimulationModel &) const
 

Detailed Description

Definition at line 45 of file Par01EMShowerModel.hh.

Constructor & Destructor Documentation

Par01EMShowerModel::Par01EMShowerModel ( G4String  modelName,
G4Region envelope 
)

Definition at line 44 of file Par01EMShowerModel.cc.

References G4Step::GetPostStepPoint(), and G4Step::GetPreStepPoint().

45 : G4VFastSimulationModel(modelName, envelope)
46 {
47  fFakeStep = new G4Step();
48  fFakePreStepPoint = fFakeStep->GetPreStepPoint();
49  fFakePostStepPoint = fFakeStep->GetPostStepPoint();
50  fTouchableHandle = new G4TouchableHistory();
51  fpNavigator = new G4Navigator();
52  fNaviSetup = false;
53  fCsI = 0;
54 }
G4StepPoint * GetPreStepPoint() const
Definition: G4Step.hh:76
G4StepPoint * GetPostStepPoint() const
G4VFastSimulationModel(const G4String &aName)
Par01EMShowerModel::Par01EMShowerModel ( G4String  modelName)

Definition at line 56 of file Par01EMShowerModel.cc.

References G4Step::GetPostStepPoint(), and G4Step::GetPreStepPoint().

57 : G4VFastSimulationModel(modelName)
58 {
59  fFakeStep = new G4Step();
60  fFakePreStepPoint = fFakeStep->GetPreStepPoint();
61  fFakePostStepPoint = fFakeStep->GetPostStepPoint();
62  fTouchableHandle = new G4TouchableHistory();
63  fpNavigator = new G4Navigator();
64  fNaviSetup = false;
65  fCsI = 0;
66 }
G4StepPoint * GetPreStepPoint() const
Definition: G4Step.hh:76
G4StepPoint * GetPostStepPoint() const
G4VFastSimulationModel(const G4String &aName)
Par01EMShowerModel::~Par01EMShowerModel ( )

Definition at line 68 of file Par01EMShowerModel.cc.

69 {
70  delete fFakeStep;
71  delete fpNavigator;
72 }

Member Function Documentation

void Par01EMShowerModel::DoIt ( const G4FastTrack fastTrack,
G4FastStep fastStep 
)
virtual

Implements G4VFastSimulationModel.

Definition at line 88 of file Par01EMShowerModel.cc.

References G4Track::GetKineticEnergy(), G4FastTrack::GetPrimaryTrack(), G4FastStep::KillPrimaryTrack(), G4FastStep::ProposePrimaryTrackPathLength(), and G4FastStep::ProposeTotalEnergyDeposited().

90 {
91  // Kill the parameterised particle:
92  fastStep.KillPrimaryTrack();
93  fastStep.ProposePrimaryTrackPathLength(0.0);
95 
96  // split into "energy spots" energy according to the shower shape:
97  Explode(fastTrack);
98 
99  // and put those energy spots into the crystals:
100  BuildDetectorResponse();
101 
102 }
const G4Track * GetPrimaryTrack() const
Definition: G4FastTrack.hh:208
G4double GetKineticEnergy() const
void ProposePrimaryTrackPathLength(G4double)
void ProposeTotalEnergyDeposited(G4double anEnergyPart)
void KillPrimaryTrack()
Definition: G4FastStep.cc:87
G4bool Par01EMShowerModel::IsApplicable ( const G4ParticleDefinition particleType)
virtual

Implements G4VFastSimulationModel.

Definition at line 74 of file Par01EMShowerModel.cc.

References G4Electron::ElectronDefinition(), G4Gamma::GammaDefinition(), and G4Positron::PositronDefinition().

75 {
76  return
77  &particleType == G4Electron::ElectronDefinition() ||
78  &particleType == G4Positron::PositronDefinition() ||
79  &particleType == G4Gamma::GammaDefinition();
80 }
static G4Electron * ElectronDefinition()
Definition: G4Electron.cc:89
static G4Positron * PositronDefinition()
Definition: G4Positron.cc:89
static G4Gamma * GammaDefinition()
Definition: G4Gamma.cc:81
G4bool Par01EMShowerModel::ModelTrigger ( const G4FastTrack fastTrack)
virtual

Implements G4VFastSimulationModel.

Definition at line 82 of file Par01EMShowerModel.cc.

References G4Track::GetKineticEnergy(), G4FastTrack::GetPrimaryTrack(), and python.hepunit::MeV.

83 {
84  // Applies the parameterisation above 100 MeV:
85  return fastTrack.GetPrimaryTrack()->GetKineticEnergy() > 100*MeV;
86 }
const G4Track * GetPrimaryTrack() const
Definition: G4FastTrack.hh:208
G4double GetKineticEnergy() const

The documentation for this class was generated from the following files: