Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Par02FastSimModelHCal Class Reference

Shortcut to the ordinary tracking for hadronic calorimeters. More...

#include <Doxymodules_parameterisations.h>

Inheritance diagram for Par02FastSimModelHCal:
G4VFastSimulationModel

Public Member Functions

 Par02FastSimModelHCal (G4String aModelName, G4Region *aEnvelope, Par02DetectorParametrisation::Parametrisation aParamType)
 A constructor.
 
 Par02FastSimModelHCal (G4String aModelName, G4Region *aEnvelope)
 A constructor.
 
 Par02FastSimModelHCal (G4String aModelName)
 A constructor.
 
 ~Par02FastSimModelHCal ()
 
virtual G4bool IsApplicable (const G4ParticleDefinition &aParticle)
 Checks if this model should be applied to this particle type.
 
virtual G4bool ModelTrigger (const G4FastTrack &aFastTrack)
 Checks if the model should be applied, taking into account the kinematics of a track.
 
virtual void DoIt (const G4FastTrack &aFastTrack, G4FastStep &aFastStep)
 Smears the energy deposit and saves it, together with the position of the deposit, the hadronic calorimeter resolution and efficiency to the Par02PrimaryParticleInformation.
 

Private Attributes

Par02DetectorParametrisationfCalculateParametrisation
 A pointer to Par02DetectorParametrisation used to get the efficiency and resolution of the detector for a given particle and parametrisation type.
 
Par02DetectorParametrisation::Parametrisation fParametrisation
 A parametrisation type.
 

Detailed Description

Shortcut to the ordinary tracking for hadronic calorimeters.

Fast simulation model describes what should be done instead of a normal tracking. Instead of the ordinary tracking, a particle deposits its energy at the entrance to the hadronic calorimeter and its value is smeared (by Par02Smearer::SmearMomentum()). Based on G4 examples/extended/parametrisations/Par01/include/Par01EMShowerModel.hh .

Author
Anna Zaborowska

Definition at line 42 of file Doxymodules_parameterisations.h.

Constructor & Destructor Documentation

◆ Par02FastSimModelHCal() [1/3]

Par02FastSimModelHCal::Par02FastSimModelHCal ( G4String  aModelName,
G4Region aEnvelope,
Par02DetectorParametrisation::Parametrisation  aParamType 
)

A constructor.

Parameters
aModelNameA name of the fast simulation model.
aEnvelopeA region where the model can take over the ordinary tracking.
aParamTypeA parametrisation type.

Definition at line 46 of file Par02FastSimModelHCal.cc.

47 :
48 G4VFastSimulationModel( aModelName, aEnvelope ), fCalculateParametrisation(),
49 fParametrisation( aType ) {}
Par02DetectorParametrisation * fCalculateParametrisation
A pointer to Par02DetectorParametrisation used to get the efficiency and resolution of the detector f...
Par02DetectorParametrisation::Parametrisation fParametrisation
A parametrisation type.

◆ Par02FastSimModelHCal() [2/3]

Par02FastSimModelHCal::Par02FastSimModelHCal ( G4String  aModelName,
G4Region aEnvelope 
)

A constructor.

Parameters
aModelNameA name of the fast simulation model.
aEnvelopeA region where the model can take over the ordinary tracking.

Definition at line 53 of file Par02FastSimModelHCal.cc.

◆ Par02FastSimModelHCal() [3/3]

Par02FastSimModelHCal::Par02FastSimModelHCal ( G4String  aModelName)

A constructor.

Parameters
aModelNameA name of the fast simulation model.

Definition at line 60 of file Par02FastSimModelHCal.cc.

◆ ~Par02FastSimModelHCal()

Par02FastSimModelHCal::~Par02FastSimModelHCal ( )
default

Member Function Documentation

◆ IsApplicable()

G4bool Par02FastSimModelHCal::IsApplicable ( const G4ParticleDefinition aParticle)
virtual

Checks if this model should be applied to this particle type.

Parameters
aParticleA particle definition (type).

Definition at line 70 of file Par02FastSimModelHCal.cc.

70 {
71 G4bool isOk = false;
72 // Applicable to all hadrons, i.e. any particle made of quarks
73 if ( aParticleType.GetQuarkContent(1) +
74 aParticleType.GetQuarkContent(2) +
75 aParticleType.GetQuarkContent(3) +
76 aParticleType.GetQuarkContent(4) +
77 aParticleType.GetQuarkContent(5) +
78 aParticleType.GetQuarkContent(6) != 0 ) {
79 isOk = true;
80 }
81 return isOk;
82}

◆ ModelTrigger()

G4bool Par02FastSimModelHCal::ModelTrigger ( const G4FastTrack aFastTrack)
virtual

Checks if the model should be applied, taking into account the kinematics of a track.

Parameters
aFastTrackA track.

Definition at line 86 of file Par02FastSimModelHCal.cc.

86 {
87 return true; // No kinematical restrictions to apply the parametrisation
88}

◆ DoIt()

void Par02FastSimModelHCal::DoIt ( const G4FastTrack aFastTrack,
G4FastStep aFastStep 
)
virtual

Smears the energy deposit and saves it, together with the position of the deposit, the hadronic calorimeter resolution and efficiency to the Par02PrimaryParticleInformation.

Parameters
aFastTrackA track.
aFastStepA step.

Definition at line 92 of file Par02FastSimModelHCal.cc.

93 {
94 //G4cout << " ________HCal model triggered _________" << G4endl;
95
96 // Kill the parameterised particle at the entrance of the hadronic calorimeter
97 aFastStep.KillPrimaryTrack();
98 aFastStep.ProposePrimaryTrackPathLength( 0.0 );
99 G4double Edep = aFastTrack.GetPrimaryTrack()->GetKineticEnergy();
100
101 // Consider only primary tracks (do nothing else for secondary hadrons)
102 G4ThreeVector Pos = aFastTrack.GetPrimaryTrack()->GetPosition();
103 if ( ! aFastTrack.GetPrimaryTrack()->GetParentID() ) {
104 auto info = (Par02EventInformation*)
105 G4EventManager::GetEventManager()->GetUserInformation();
106 if ( info->GetDoSmearing() ) {
107 // Smearing according to the hadronic calorimeter resolution
108 G4ThreeVector Porg = aFastTrack.GetPrimaryTrack()->GetMomentum();
109 G4double res = fCalculateParametrisation->
111 fParametrisation, Porg.mag() );
112 G4double eff = fCalculateParametrisation->
114 fParametrisation, Porg.mag() );
115 G4double Esm;
116 Esm = std::abs( Par02Smearer::Instance()->
117 SmearEnergy( aFastTrack.GetPrimaryTrack(), res ) );
118 Par02Output::Instance()->FillHistogram( 2, (Esm/MeV) / (Edep/MeV) );
119 // Setting the values of Pos, Esm, res and eff
120 auto primaryInfo=
122 ( aFastTrack.GetPrimaryTrack()->GetDynamicParticle()->GetPrimaryParticle() )->
123 GetUserInformation() ) ;
124 primaryInfo->SetHCalPosition( Pos );
125 primaryInfo->SetHCalEnergy( Esm );
126 primaryInfo->SetHCalResolution( res );
127 primaryInfo->SetHCalEfficiency( eff );
128 // The (smeared) energy of the particle is deposited in the step
129 // (which corresponds to the entrance of the hadronic calorimeter)
130 aFastStep.ProposeTotalEnergyDeposited( Esm );
131 } else {
132 // No smearing: simply setting the value of Edep
134 ( aFastTrack.GetPrimaryTrack()->GetDynamicParticle()->GetPrimaryParticle() )->
135 GetUserInformation() ) )->SetHCalEnergy( Edep );
136 // The (initial) energy of the particle is deposited in the step
137 // (which corresponds to the entrance of the hadronic calorimeter)
138 aFastStep.ProposeTotalEnergyDeposited( Edep );
139 }
140 }
141}
void FillHistogram(G4int HNo, G4double value) const
Fills the histogram.
static Par02Output * Instance()
Allows the access to the unique Par02Output object.
void SetHCalPosition(G4ThreeVector aPosition)
Sets the position of the energy deposit in the hadronic calorimeter.
static Par02Smearer * Instance()
Allows the access to the unique Par02Smearer class object.

Member Data Documentation

◆ fCalculateParametrisation

Par02DetectorParametrisation* Par02FastSimModelHCal::fCalculateParametrisation
private

A pointer to Par02DetectorParametrisation used to get the efficiency and resolution of the detector for a given particle and parametrisation type.

Definition at line 87 of file Par02FastSimModelHCal.hh.

◆ fParametrisation

Par02DetectorParametrisation::Parametrisation Par02FastSimModelHCal::fParametrisation
private

A parametrisation type.

Definition at line 90 of file Par02FastSimModelHCal.hh.


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

Applications | User Support | Publications | Collaboration