Belle II Software development
ExtEnergyLoss.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <globals.hh>
12#include <G4VContinuousProcess.hh>
13
14class G4ParticleDefinition;
15class G4Track;
16class G4Step;
17
18namespace Belle2 {
23
24 namespace Simulation {
25
27
31 class ExtEnergyLoss: public G4VContinuousProcess {
32
33 public:
34
36 ExtEnergyLoss(const G4String& processName = "ExtEnergyLoss", G4ProcessType aType = fElectromagnetic);
37
39 virtual ~ExtEnergyLoss();
40
42 inline G4bool IsApplicable(const G4ParticleDefinition&);
43
45 G4double GetContinuousStepLimit(const G4Track&, G4double, G4double, G4double&);
46
48 G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step&);
49
51 inline G4double GetStepLimit();
52
54 inline void SetStepLimit(G4double);
55
56 private:
57
60
62 G4double m_StepLimit;
63
64 };
65
66 inline G4bool ExtEnergyLoss::IsApplicable(const G4ParticleDefinition& aParticle)
67 {
68 // This process applies to all geant4e-specific charged particles.
69 // (Verified that it is only called for these - but let's check anyway.)
70 return ((aParticle.GetPDGCharge() != 0) && (aParticle.GetParticleName().compare(0, 4, "g4e_") == 0));
71 }
72
74 {
75 return m_StepLimit;
76 }
77
78 inline void ExtEnergyLoss::SetStepLimit(G4double val)
79 {
80 m_StepLimit = val;
81 }
82
83 } //end namespace Simulation
84
86} //end Belle2 namespace
Calculate energy loss, fluctuation, and multiple-scattering angle for extrapolator.
G4double GetContinuousStepLimit(const G4Track &, G4double, G4double, G4double &)
Gets step limit for the particle being swum.
G4bool IsApplicable(const G4ParticleDefinition &)
Reports if this process is applicable to the particle being swum.
EnergyLossForExtrapolator * m_energyLossForExtrapolator
Pointer to the geant4e-specific energy-loss and mult-scat class.
G4double GetStepLimit()
Gets the step limit for this process.
G4double m_StepLimit
Step limit for this process (fraction of KE that could be lost in one step)
G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &)
Apply energy loss process along the step.
void SetStepLimit(G4double)
Sets the step limit for this process.
ExtEnergyLoss(const G4String &processName="ExtEnergyLoss", G4ProcessType aType=fElectromagnetic)
constructor
Abstract base class for different kinds of events.