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
G4PionMinusNuclearAtRestChips.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
// 17.02.2009 M.Kossov, now it is recommended to use the G4QCaptureAtRest process
27
//
28
#ifndef G4PionMinusNuclearAtRestChips_h
29
#define G4PionMinusNuclearAtRestChips_h
30
31
#include <
CLHEP/Units/SystemOfUnits.h
>
32
33
#include "
globals.hh
"
34
#include "
G4VRestProcess.hh
"
35
#include "
G4StopElementSelector.hh
"
36
#include "
G4PionMinus.hh
"
37
#include "
G4ChiralInvariantPhaseSpace.hh
"
38
#include "
G4HadronicProcessType.hh
"
39
#include "
G4HadronicDeprecate.hh
"
40
41
42
class
G4PionMinusNuclearAtRestChips
:
public
G4VRestProcess
43
{
44
private
:
45
// hide assignment operator as private
46
G4PionMinusNuclearAtRestChips
& operator=(
const
G4PionMinusNuclearAtRestChips
&
right
);
47
G4PionMinusNuclearAtRestChips
(
const
G4PionMinusNuclearAtRestChips
& );
48
49
public
:
50
51
G4PionMinusNuclearAtRestChips
(
const
G4String
& processName =
"PionMinusCaptureAtRest"
)
52
:
G4VRestProcess
(processName,
fHadronic
)
53
{
54
G4HadronicDeprecate
(
"G4PionMinusNuclearAtRestChips"
);
55
SetProcessSubType
(
fHadronAtRest
);
56
}
57
58
~G4PionMinusNuclearAtRestChips
() {}
59
60
G4bool
IsApplicable
(
const
G4ParticleDefinition
& aParticle)
61
{
62
return
( &aParticle ==
G4PionMinus::PionMinusDefinition
() );
63
}
64
65
// null physics table
66
void
BuildPhysicsTable
(
const
G4ParticleDefinition
&){}
67
68
G4double
AtRestGetPhysicalInteractionLength
(
const
G4Track
&track,
69
G4ForceCondition
*
condition
);
70
71
// zero mean lifetime
72
G4double
GetMeanLifeTime
(
const
G4Track
& aTrack,
73
G4ForceCondition
*
condition
) {
return
0.0;}
74
75
G4VParticleChange
*
AtRestDoIt
(
const
G4Track
&,
const
G4Step
&);
76
77
private
:
78
G4ChiralInvariantPhaseSpace
theModel;
79
G4StopElementSelector
theSelector;
// Assume identical laws as for muons
80
};
81
82
inline
83
G4VParticleChange
*
G4PionMinusNuclearAtRestChips::
84
AtRestDoIt
(
const
G4Track
& aTrack,
const
G4Step
&aStep)
85
{
86
if
(aTrack.
GetDynamicParticle
()->
GetDefinition
() !=
G4PionMinus::PionMinus
())
87
{
88
throw
G4HadronicException
(__FILE__, __LINE__,
89
"Calling G4PionMinusNuclearAtRestChips with particle other than pi-!!!"
);
90
}
91
92
// Create target
93
G4Element
*
theTarget
= theSelector.
GetElement
(aTrack.
GetMaterial
());
94
G4Nucleus
aTargetNucleus(theTarget->GetA_asInt(), theTarget->GetZ_asInt());
95
96
// Call chips
97
return
theModel.
ApplyYourself
(aTrack, aTargetNucleus);
98
}
99
100
G4double
G4PionMinusNuclearAtRestChips::
101
AtRestGetPhysicalInteractionLength
(
const
G4Track
&track,
G4ForceCondition
*
condition
)
102
{
103
ResetNumberOfInteractionLengthLeft
();
104
*condition =
NotForced
;
105
currentInteractionLength
=
GetMeanLifeTime
(track, condition);
106
#ifdef CHIPSdebug
107
if
((
currentInteractionLength
<0.0) || (
verboseLevel
>2))
108
{
109
G4cout
<<
"G4PionMinusNuclearAtRestChips::AtRestGetPhysicalInteractionLength "
;
110
G4cout
<<
"[ "
<<
GetProcessName
() <<
"]"
<<
G4endl
;
111
track.
GetDynamicParticle
()->
DumpInfo
();
112
G4cout
<<
" in Material "
<< track.
GetMaterial
()->
GetName
() <<
G4endl
;
113
G4cout
<<
"MeanLifeTime = "
<<
currentInteractionLength
/CLHEP::ns <<
"[ns]"
<<
G4endl
;
114
}
115
#endif
116
return
theNumberOfInteractionLengthLeft
*
currentInteractionLength
;
117
}
118
#endif
Generated on Sat May 25 2013 14:33:50 for Geant4 by
1.8.4