ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
DeadMaterialShower Class Reference

#include <DeadMaterialShower.h>

Inheritance diagram for DeadMaterialShower:
Collaboration diagram for DeadMaterialShower:

Public Member Functions

 DeadMaterialShower (const std::string &name, const double &highEnergy, const double &lowEnergy, const double &zcutoff)
 
 ~DeadMaterialShower ()
 
G4bool IsApplicable (const G4ParticleDefinition &) override final
 
void DoIt (const G4FastTrack &, G4FastStep &) override final
 
G4bool ModelTrigger (const G4FastTrack &) override final
 Determines the applicability of the fast sim model to this particular track. More...
 

Private Attributes

double m_highEnergy
 
double m_lowEnergy
 !< Kill everything but muons up to this energy More...
 
double m_zcutoff
 !< Kill only electrons and positrons up to this energy More...
 

Detailed Description

Definition at line 15 of file DeadMaterialShower.h.

Constructor & Destructor Documentation

◆ DeadMaterialShower()

DeadMaterialShower::DeadMaterialShower ( const std::string &  name,
const double &  highEnergy,
const double &  lowEnergy,
const double &  zcutoff 
)

Definition at line 19 of file DeadMaterialShower.cxx.

20  : G4VFastSimulationModel(name),
21  m_highEnergy(highEnergy),
22  m_lowEnergy(lowEnergy),
23  m_zcutoff(zcutoff)
24 {
25 
26 }

◆ ~DeadMaterialShower()

DeadMaterialShower::~DeadMaterialShower ( )
inline

Definition at line 20 of file DeadMaterialShower.h.

20 {}

Member Function Documentation

◆ DoIt()

void DeadMaterialShower::DoIt ( const G4FastTrack &  ,
G4FastStep &  fastStep 
)
finaloverride

Definition at line 68 of file DeadMaterialShower.cxx.

69 {
70  fastStep.KillPrimaryTrack();
71  fastStep.SetPrimaryTrackPathLength(0.0);
72 }

◆ IsApplicable()

G4bool DeadMaterialShower::IsApplicable ( const G4ParticleDefinition &  particleType)
finaloverride

Definition at line 28 of file DeadMaterialShower.cxx.

29 {
30  // Apply parameterization only to Electrons, Positrons, and Photons. ModelTrigger will not be called if this returns false
31  if ( &particleType == G4Electron::ElectronDefinition() ||
32  &particleType == G4Positron::PositronDefinition() ||
33  &particleType == G4PionPlus::PionPlusDefinition() ||
34  &particleType == G4PionMinus::PionMinusDefinition() ||
35  &particleType == G4Gamma::GammaDefinition() ||
36  &particleType == G4Neutron::NeutronDefinition()
37  )
38  {
39  return true;
40  }
41  return false;
42 
43 }

◆ ModelTrigger()

G4bool DeadMaterialShower::ModelTrigger ( const G4FastTrack &  fastTrack)
finaloverride

Determines the applicability of the fast sim model to this particular track.

Checks that geometric location, energy, and particle type are within bounds. Also checks for containment of the particle's shower within a specific detector region.

Definition at line 45 of file DeadMaterialShower.cxx.

46 {
47  if ( fabs( fastTrack.GetPrimaryTrack()->GetPosition().z() ) < m_zcutoff ){
48  // In front of the cut - kill e+/- up to low energy
49  if ( fastTrack.GetPrimaryTrack()->GetKineticEnergy() < m_lowEnergy &&
50  (fastTrack.GetPrimaryTrack()->GetDefinition() == G4Electron::Definition() ||
51  fastTrack.GetPrimaryTrack()->GetDefinition() == G4Positron::Definition() ) )
52  {
53  return true;
54  }
55  return false;
56  }
57 
58  // Behind the cut - kill !muons up to high energy
59  if ( fastTrack.GetPrimaryTrack()->GetKineticEnergy() > m_highEnergy ||
60  fastTrack.GetPrimaryTrack()->GetDefinition() == G4MuonPlus::Definition() ||
61  fastTrack.GetPrimaryTrack()->GetDefinition() == G4MuonMinus::Definition() )
62  {
63  return false;
64  }
65  return true;
66 }

Member Data Documentation

◆ m_highEnergy

double DeadMaterialShower::m_highEnergy
private

Definition at line 31 of file DeadMaterialShower.h.

◆ m_lowEnergy

double DeadMaterialShower::m_lowEnergy
private

!< Kill everything but muons up to this energy

Definition at line 32 of file DeadMaterialShower.h.

◆ m_zcutoff

double DeadMaterialShower::m_zcutoff
private

!< Kill only electrons and positrons up to this energy

Definition at line 33 of file DeadMaterialShower.h.


The documentation for this class was generated from the following files:
particleType
Definition: particleType.h:29
DeadMaterialShower::m_zcutoff
double m_zcutoff
!< Kill only electrons and positrons up to this energy
Definition: DeadMaterialShower.h:33
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
DeadMaterialShower::m_highEnergy
double m_highEnergy
Definition: DeadMaterialShower.h:31
DeadMaterialShower::m_lowEnergy
double m_lowEnergy
!< Kill everything but muons up to this energy
Definition: DeadMaterialShower.h:32