Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
source
processes
hadronic
models
chiral_inv_phase_space
interface
include
G4ProtonAntiProtonAtRestChips.hh
Go to the documentation of this file.
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
// (Why only antiproton-proton, when the antiproton-nucleus is made? - M.K.)
27
// 17.02.2009 M.Kossov, now it is recommended to use the G4QCaptureAtRest process
28
#ifndef G4ProtonAntiProtonAtRestChips_h
29
#define G4ProtonAntiProtonAtRestChips_h
30
31
#include <
CLHEP/Units/SystemOfUnits.h
>
32
33
#include "
globals.hh
"
34
#include "
G4VRestProcess.hh
"
35
#include "
G4ParticleTable.hh
"
36
#include "
G4Quasmon.hh
"
37
#include "
G4QHadronVector.hh
"
38
#include "
G4ParticleChange.hh
"
39
#include "
G4LorentzVector.hh
"
40
#include "
G4DynamicParticle.hh
"
41
#include "
G4IonTable.hh
"
42
#include "
G4Neutron.hh
"
43
#include "
G4StopElementSelector.hh
"
44
#include "
G4ChiralInvariantPhaseSpace.hh
"
45
#include "
G4HadronicProcessType.hh
"
46
#include "
G4HadronicDeprecate.hh
"
47
48
49
class
G4ProtonAntiProtonAtRestChips
:
public
G4VRestProcess
50
{
51
private
:
52
// hide assignment operator as private
53
G4ProtonAntiProtonAtRestChips
& operator=(
const
G4ProtonAntiProtonAtRestChips
&
right
);
54
G4ProtonAntiProtonAtRestChips
(
const
G4ProtonAntiProtonAtRestChips
& );
55
56
public
:
57
58
G4ProtonAntiProtonAtRestChips
(
const
G4String
& processName=
59
"AntiProtonAnnihilationAtRest"
)
60
:
G4VRestProcess
(processName,
fHadronic
)
61
{
62
G4HadronicDeprecate
(
"G4ProtonAntiProtonAtRestChips"
);
63
SetProcessSubType
(
fHadronAtRest
);
64
}
65
66
~G4ProtonAntiProtonAtRestChips
() {}
67
68
G4bool
IsApplicable
(
const
G4ParticleDefinition
& aParticle)
69
{
70
return
( &aParticle ==
G4AntiProton::AntiProtonDefinition
() );
71
}
72
73
// null physics table
74
void
BuildPhysicsTable
(
const
G4ParticleDefinition
&){}
75
76
G4double
AtRestGetPhysicalInteractionLength
(
const
G4Track
&track,
77
G4ForceCondition
*
condition
);
78
79
// zero mean lifetime
80
G4double
GetMeanLifeTime
(
const
G4Track
& aTrack,
81
G4ForceCondition
*
condition
) {
return
0.0;}
82
83
G4VParticleChange
*
AtRestDoIt
(
const
G4Track
&,
const
G4Step
&);
84
85
private
:
86
G4ChiralInvariantPhaseSpace
theModel;
87
G4StopElementSelector
theSelector;
// Assume identical laws as for muons
88
};
89
90
inline
91
G4VParticleChange
*
G4ProtonAntiProtonAtRestChips::
92
AtRestDoIt
(
const
G4Track
& aTrack,
const
G4Step
&aStep)
93
{
94
// Create target
95
G4Element
*
theTarget
= theSelector.
GetElement
(aTrack.
GetMaterial
());
96
G4Nucleus
aTargetNucleus(theTarget->GetA_asInt(), theTarget->GetZ_asInt());
97
98
// Check model validity - note this will be a sub-branch in the ordinary stopping @@@@@@
99
// in the long haul. @@@@@@
100
if
(aTrack.
GetDynamicParticle
()->
GetDefinition
() !=
G4AntiProton::AntiProton
())
101
{
102
throw
G4HadronicException
(__FILE__, __LINE__,
103
"Calling G4ProtonAntiProtonAtRestChips with particle other than p-bar!!!"
);
104
}
105
if
(aTargetNucleus.GetZ_asInt() != 1)
106
{
107
throw
G4HadronicException
(__FILE__, __LINE__,
108
"Calling G4ProtonAntiProtonAtRestChips for target other than Hydrogen!!!"
);
109
}
110
111
// Call chips
112
return
theModel.
ApplyYourself
(aTrack, aTargetNucleus);
113
}
114
115
G4double
G4ProtonAntiProtonAtRestChips::
116
AtRestGetPhysicalInteractionLength
(
const
G4Track
&track,
117
G4ForceCondition
*
condition
)
118
{
119
ResetNumberOfInteractionLengthLeft
();
120
*condition =
NotForced
;
121
currentInteractionLength
=
GetMeanLifeTime
(track, condition);
122
#ifdef CHIPSdebug
123
if
((
currentInteractionLength
<0.0) || (
verboseLevel
>2))
124
{
125
G4cout
<<
"G4ProtonAntiProtonAtRestChips::AtRestGetPhysicalInteractionLength "
;
126
G4cout
<<
"[ "
<<
GetProcessName
() <<
"]"
<<
G4endl
;
127
track.
GetDynamicParticle
()->
DumpInfo
();
128
G4cout
<<
" in Material "
<< track.
GetMaterial
()->
GetName
() <<
G4endl
;
129
G4cout
<<
"MeanLifeTime = "
<<
currentInteractionLength
/CLHEP::ns <<
"[ns]"
<<
G4endl
;
130
}
131
#endif
132
return
theNumberOfInteractionLengthLeft
*
currentInteractionLength
;
133
}
134
#endif
Generated on Sat May 25 2013 14:33:50 for Geant4 by
1.8.4