DummyProcessAtRest.cc
Go to the documentation of this file.
1 #include <G4Version.hh>
2 
3 #include "DummyProcessAtRest.h"
4 #include "G4ParticleTypes.hh"
5 #include <stdio.h>
6 
7 #include <utl/AugerException.h>
8 
9 using namespace tls;
10 
11 DummyProcessAtRest::DummyProcessAtRest(const G4String& processName,
12  G4ProcessType aType ):
13  G4VRestProcess (processName, aType)
14 {
15  if (verboseLevel>0) {
16  G4cerr << GetProcessName() << " is created "<< G4endl;
17  }
18 #if (G4VERSION_NUMBER>=920)
19  SetProcessSubType(0); //subtype 0 is not defined for G4EmProcessSubType
20 #endif
21 }
22 
24 {
25 }
26 
27 
28 void
29 DummyProcessAtRest::BuildPhysicsTable(const G4ParticleDefinition& /*p*/)
30 {
31 }
32 
33 
34 G4bool
35 DummyProcessAtRest::IsApplicable(const G4ParticleDefinition& /*particle*/)
36 {
37  return true;
38 }
39 
40 
41 G4double
43  G4ForceCondition* condition)
44 {
45  ResetNumberOfInteractionLengthLeft();
46 
47  *condition = NotForced;
48 
49  if (verboseLevel>2) {
50  G4cerr << "DummyProcessAtRestProcess::AtRestGetPhysicalInteractionLength "<<G4endl;
51  }
52 
53  return DBL_MAX;
54 }
55 
56 
57 G4VParticleChange*
58 DummyProcessAtRest::AtRestDoIt(const G4Track& track,
59  const G4Step& step)
60 {
61  throw utl::AugerException("DummyProcessAtRest::AtRestDoIt should never be called!");
62 
63  aParticleChange.Initialize(track);
64  if (verboseLevel>1) {
65  G4cerr << "DummyProcessAtRest::AtRestDoIt is invoked " <<G4endl;
66  }
67  aParticleChange.SetNumberOfSecondaries( 0 );
68  aParticleChange.ProposeLocalEnergyDeposit( 0.0*CLHEP::GeV );
69 
70  return G4VRestProcess::AtRestDoIt(track, step);
71 }
72 
73 
74 G4double
75 DummyProcessAtRest::GetMeanLifeTime(const G4Track& /*track*/,
76  G4ForceCondition* condition)
77 {
78  throw utl::AugerException("DummyProcessAtRest::GetMeanLifeTime should never be called!");
79 
80  *condition = NotForced;
81  return DBL_MAX;
82 }
Base class for all exceptions used in the auger offline code.
DummyProcessAtRest(const DummyProcessAtRest &)
G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &)
G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *)
G4double GetMeanLifeTime(const G4Track &, G4ForceCondition *)
constexpr double GeV
Definition: AugerUnits.h:187
G4bool IsApplicable(const G4ParticleDefinition &)
void BuildPhysicsTable(const G4ParticleDefinition &)

, generated on Tue Sep 26 2023.