Smears the energy deposit and saves it, together with the position of the deposit, the electromagnetic calorimeter resolution and efficiency to the Par02PrimaryParticleInformation.
91 {
92
93
94
95 aFastStep.KillPrimaryTrack();
96 aFastStep.ProposePrimaryTrackPathLength( 0.0 );
97 G4double Edep = aFastTrack.GetPrimaryTrack()->GetKineticEnergy();
98
99
100 G4ThreeVector Pos = aFastTrack.GetPrimaryTrack()->GetPosition();
101 if ( ! aFastTrack.GetPrimaryTrack()->GetParentID() ) {
103 G4EventManager::GetEventManager()->GetUserInformation();
104 if ( info->GetDoSmearing() ) {
105
106 G4ThreeVector Porg = aFastTrack.GetPrimaryTrack()->GetMomentum();
111 G4double Esm;
113 SmearEnergy( aFastTrack.GetPrimaryTrack(), res ) );
115
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 );
128
129
130 aFastStep.ProposeTotalEnergyDeposited( Esm );
131 } else {
132
134 ( aFastTrack.GetPrimaryTrack()->GetDynamicParticle()->GetPrimaryParticle() )->
135 GetUserInformation() ) )->SetEMCalEnergy( Edep );
136
137
138 aFastStep.ProposeTotalEnergyDeposited( Edep );
139 }
140 }
141}
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.
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.