38#include "G4RunManager.hh"
39#include "G4AnalysisManager.hh"
41#include "Randomize.hh"
42#include "G4SystemOfUnits.hh"
44#include "G4Electron.hh"
45#include "G4Positron.hh"
53 fParametrisation( aType ) {}
77 return &aParticleType == G4Electron::Definition() ||
78 &aParticleType == G4Positron::Definition() ||
79 &aParticleType == G4Gamma::Definition();
95 aFastStep.KillPrimaryTrack();
96 aFastStep.ProposePrimaryTrackPathLength( 0.0 );
97 G4double Edep = aFastTrack.GetPrimaryTrack()->GetKineticEnergy();
100 G4ThreeVector Pos = aFastTrack.GetPrimaryTrack()->GetPosition();
101 if ( ! aFastTrack.GetPrimaryTrack()->GetParentID() ) {
103 G4EventManager::GetEventManager()->GetUserInformation();
104 if ( info->GetDoSmearing() ) {
106 G4ThreeVector Porg = aFastTrack.GetPrimaryTrack()->GetMomentum();
113 SmearEnergy( aFastTrack.GetPrimaryTrack(), res ) );
117 ( aFastTrack.GetPrimaryTrack()->GetDynamicParticle()->GetPrimaryParticle() )->
118 GetUserInformation() ) )->SetEMCalPosition( Pos );
120 ( aFastTrack.GetPrimaryTrack()->GetDynamicParticle()->GetPrimaryParticle() )->
121 GetUserInformation() ) )->SetEMCalEnergy( Esm );
123 ( aFastTrack.GetPrimaryTrack()->GetDynamicParticle()->GetPrimaryParticle() )->
124 GetUserInformation() ) )->SetEMCalResolution( res );
126 ( aFastTrack.GetPrimaryTrack()->GetDynamicParticle()->GetPrimaryParticle() )->
127 GetUserInformation() ) )->SetEMCalEfficiency( eff );
130 aFastStep.ProposeTotalEnergyDeposited( Esm );
134 ( aFastTrack.GetPrimaryTrack()->GetDynamicParticle()->GetPrimaryParticle() )->
135 GetUserInformation() ) )->SetEMCalEnergy( Edep );
138 aFastStep.ProposeTotalEnergyDeposited( Edep );
Definition of the Par02FastSimModelEMCal class.
Definition of the Par02Output class.
Definition of the Par02PrimaryParticleInformation class.
Definition of the Par02Smearer class.
Definition of detector resolution and efficiency.
Parametrisation
A parametrisation type (CMS, ATLAS, ALEPH).
G4double GetEfficiency(Detector aDetector, Parametrisation aParametrisation, G4double aMomentum)
Gets the efficiency of a detector for a given particle.
G4double GetResolution(Detector aDetector, Parametrisation aParametrisation, G4double aMomentum)
Gets the resolution of a detector for a given particle.
~Par02FastSimModelEMCal()
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,...
Par02DetectorParametrisation::Parametrisation fParametrisation
A parametrisation type.
Par02FastSimModelEMCal(G4String aModelName, G4Region *aEnvelope, Par02DetectorParametrisation::Parametrisation aParamType)
A constructor.
virtual G4bool IsApplicable(const G4ParticleDefinition &aParticle)
Checks if this model should be applied to this particle type.
Par02DetectorParametrisation * fCalculateParametrisation
A pointer to Par02DetectorParametrisation used to get the efficiency and resolution of the detector f...
void FillHistogram(G4int HNo, G4double value) const
Fills the histogram.
static Par02Output * Instance()
Allows the access to the unique Par02Output object.
Primary particle information.
static Par02Smearer * Instance()
Allows the access to the unique Par02Smearer class object.