Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4UCNAbsorption Class Reference

#include <G4UCNAbsorption.hh>

Inheritance diagram for G4UCNAbsorption:
Collaboration diagram for G4UCNAbsorption:

Public Member Functions

 G4UCNAbsorption (const G4String &processName="UCNAbsorption", G4ProcessType type=fUCN)
 
virtual ~G4UCNAbsorption ()
 
G4bool IsApplicable (const G4ParticleDefinition &aParticleType)
 
G4double GetMeanFreePath (const G4Track &aTrack, G4double, G4ForceCondition *condition)
 
G4VParticleChangePostStepDoIt (const G4Track &aTrack, const G4Step &aStep)
 
- Public Member Functions inherited from G4VDiscreteProcess
 G4VDiscreteProcess (const G4String &, G4ProcessType aType=fNotDefined)
 
 G4VDiscreteProcess (G4VDiscreteProcess &)
 
virtual ~G4VDiscreteProcess ()
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &, G4double, G4double, G4double &, G4GPILSelection *)
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &, G4ForceCondition *)
 
virtual G4VParticleChangeAtRestDoIt (const G4Track &, const G4Step &)
 
virtual G4VParticleChangeAlongStepDoIt (const G4Track &, const G4Step &)
 
- Public Member Functions inherited from G4VProcess
 G4VProcess (const G4String &aName="NoName", G4ProcessType aType=fNotDefined)
 
 G4VProcess (const G4VProcess &right)
 
virtual ~G4VProcess ()
 
G4int operator== (const G4VProcess &right) const
 
G4int operator!= (const G4VProcess &right) const
 
G4double GetCurrentInteractionLength () const
 
void SetPILfactor (G4double value)
 
G4double GetPILfactor () const
 
G4double AlongStepGPIL (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
 
G4double AtRestGPIL (const G4Track &track, G4ForceCondition *condition)
 
G4double PostStepGPIL (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void PreparePhysicsTable (const G4ParticleDefinition &)
 
virtual G4bool StorePhysicsTable (const G4ParticleDefinition *, const G4String &, G4bool)
 
virtual G4bool RetrievePhysicsTable (const G4ParticleDefinition *, const G4String &, G4bool)
 
const G4StringGetPhysicsTableFileName (const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
 
const G4StringGetProcessName () const
 
G4ProcessType GetProcessType () const
 
void SetProcessType (G4ProcessType)
 
G4int GetProcessSubType () const
 
void SetProcessSubType (G4int)
 
virtual void StartTracking (G4Track *)
 
virtual void EndTracking ()
 
virtual void SetProcessManager (const G4ProcessManager *)
 
virtual const G4ProcessManagerGetProcessManager ()
 
virtual void ResetNumberOfInteractionLengthLeft ()
 
G4double GetNumberOfInteractionLengthLeft () const
 
G4double GetTotalNumberOfInteractionLengthTraversed () const
 
G4bool isAtRestDoItIsEnabled () const
 
G4bool isAlongStepDoItIsEnabled () const
 
G4bool isPostStepDoItIsEnabled () const
 
virtual void DumpInfo () const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
virtual void SetMasterProcess (G4VProcess *masterP)
 
const G4VProcessGetMasterProcess () const
 
virtual void BuildWorkerPhysicsTable (const G4ParticleDefinition &part)
 
virtual void PrepareWorkerPhysicsTable (const G4ParticleDefinition &)
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VProcess
static const G4StringGetProcessTypeName (G4ProcessType)
 
- Protected Member Functions inherited from G4VProcess
void SubtractNumberOfInteractionLengthLeft (G4double previousStepSize)
 
void ClearNumberOfInteractionLengthLeft ()
 
- Protected Attributes inherited from G4VProcess
const G4ProcessManageraProcessManager
 
G4VParticleChangepParticleChange
 
G4ParticleChange aParticleChange
 
G4double theNumberOfInteractionLengthLeft
 
G4double currentInteractionLength
 
G4double theInitialNumberOfInteractionLength
 
G4String theProcessName
 
G4String thePhysicsTableFileName
 
G4ProcessType theProcessType
 
G4int theProcessSubType
 
G4double thePILfactor
 
G4bool enableAtRestDoIt
 
G4bool enableAlongStepDoIt
 
G4bool enablePostStepDoIt
 
G4int verboseLevel
 

Detailed Description

Definition at line 66 of file G4UCNAbsorption.hh.

Constructor & Destructor Documentation

G4UCNAbsorption::G4UCNAbsorption ( const G4String processName = "UCNAbsorption",
G4ProcessType  type = fUCN 
)

Definition at line 74 of file G4UCNAbsorption.cc.

75  : G4VDiscreteProcess(processName, type)
76 {
77  if (verboseLevel>0) G4cout << GetProcessName() << " is created " << G4endl;
78 
80 }
G4int verboseLevel
Definition: G4VProcess.hh:368
G4GLOB_DLL std::ostream G4cout
void SetProcessSubType(G4int)
Definition: G4VProcess.hh:432
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

G4UCNAbsorption::~G4UCNAbsorption ( )
virtual

Definition at line 90 of file G4UCNAbsorption.cc.

90 {}

Member Function Documentation

G4double G4UCNAbsorption::GetMeanFreePath ( const G4Track aTrack,
G4double  ,
G4ForceCondition condition 
)
virtual

Implements G4VDiscreteProcess.

Definition at line 120 of file G4UCNAbsorption.cc.

123 {
124  G4double AttenuationLength = DBL_MAX;
125 
126  const G4Material* aMaterial = aTrack.GetMaterial();
127  G4MaterialPropertiesTable* aMaterialPropertiesTable =
128  aMaterial->GetMaterialPropertiesTable();
129 
130  G4double losscs = 0.0;
131  if (aMaterialPropertiesTable) {
132  losscs = aMaterialPropertiesTable->GetConstProperty("ABSCS");
133 // if (losscs == 0.0)
134 // G4cout << "No UCN Absorption length specified" << G4endl;
135  }
136 // else G4cout << "No UCN Absorption length specified" << G4endl;
137 
138  if (losscs) {
139 
140  // Calculate a UCN absorption length for this cross section
141 
142  // *** Thermal boost ***
143 
144  // Prepare neutron
145 
146  //G4double theA = aMaterial->GetElement(0)->GetN();
147  //G4double theZ = aMaterial->GetElement(0)->GetZ();
148 
149  //G4ReactionProduct
150  // theNeutron(const_cast<G4ParticleDefinition *>(aTrack.GetDefinition()));
151  //theNeutron.SetMomentum(aTrack.GetMomentum());
152  //theNeutron.SetKineticEnergy(aTrack.GetKineticEnergy());
153  //G4ThreeVector neuVelo = theNeutron.GetMomentum()/
154  // aTrack.GetDefinition()->GetPDGMass());
155 
156  // Prepare properly biased thermal nucleus
157 
158  //G4double theA = aMaterial->GetElement(0)->GetN();
159  //G4double theZ = aMaterial->GetElement(0)->GetZ();
160 
161  //G4double eps = 0.0001;
162 
163  //G4double eleMass =
164  // G4NucleiPropertiesTable::
165  // GetNuclearMass(static_cast<G4int>(theZ+eps),
166  // static_cast<G4int>(theA+eps)))
167  // / G4Neutron::Neutron()->GetPDGMass();
168 
169  //G4Nucleus aNuc;
170 
171  //G4ReactionProduct aThermalNuc =
172  // aNuc.GetBiasedThermalNucleus(eleMass,
173  // neuVelo,
174  // aMaterial->GetTemperature());
175 
176  // Boost to rest system and return
177 
178  //G4ReactionProduct boosted;
179  //boosted.Lorentz(theNeutron, aThermalNuc);
180 
181  //G4double vel = sqrt(2*boosted.GetKineticEnergy()/
182  // neutron_mass_c2*c_squared);
183 
184  G4double density = aMaterial->GetTotNbOfAtomsPerVolume();
185 
186  // Calculate cross section for a constant loss
187 
188  G4double vel = aTrack.GetVelocity();
189 
190  //G4cout << aTrack.GetVelocity()/meter*second << " "
191  // << vel/meter*second << "meters/second" << G4endl;
192 
193  // Input data is normally taken from the website:
194  // http://rrdjazz.nist.gov/resources/n-lengths/list.html
195  // and coresponds to 2200 m/s fast neutrons
196 
197  G4double crossect = losscs*barn*2200.*meter/second/vel;
198 
199  // In principle, if one asks for the MaterialProperty incoherent cross
200  // section, one could put the formula for inelastic up scattering here
201  // and add the cross section to the absorption
202 
203  // sigma inelastic = ... ignatovic, p. 174.
204 
205  // attenuation length in mm
206  AttenuationLength = 1./density/crossect;
207 
208  if (verboseLevel>0) G4cout << "UCNABSORPTION with"
209  << " AttenuationLength: " << AttenuationLength/m << "m"
210  << " CrossSection: " << crossect/barn << "barn" << G4endl;
211  }
212 
213  return AttenuationLength;
214 }
G4int verboseLevel
Definition: G4VProcess.hh:368
G4double GetVelocity() const
static constexpr double second
Definition: G4SIunits.hh:157
static constexpr double meter
Definition: G4SIunits.hh:82
G4GLOB_DLL std::ostream G4cout
static constexpr double m
Definition: G4SIunits.hh:129
G4Material * GetMaterial() const
G4double GetTotNbOfAtomsPerVolume() const
Definition: G4Material.hh:209
G4MaterialPropertiesTable * GetMaterialPropertiesTable() const
Definition: G4Material.hh:252
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
static constexpr double barn
Definition: G4SIunits.hh:105
#define DBL_MAX
Definition: templates.hh:83
G4double GetConstProperty(const char *key) const

Here is the call graph for this function:

G4bool G4UCNAbsorption::IsApplicable ( const G4ParticleDefinition aParticleType)
inlinevirtual

Reimplemented from G4VProcess.

Definition at line 114 of file G4UCNAbsorption.hh.

115 {
116  return ( &aParticleType == G4Neutron::NeutronDefinition() );
117 }
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:99

Here is the call graph for this function:

G4VParticleChange * G4UCNAbsorption::PostStepDoIt ( const G4Track aTrack,
const G4Step aStep 
)
virtual

Reimplemented from G4VDiscreteProcess.

Definition at line 100 of file G4UCNAbsorption.cc.

101 {
102  aParticleChange.Initialize(aTrack);
103 
105 
106  if ( verboseLevel > 0 ) G4cout << "UCNABSORPTION at: "
107  << aTrack.GetProperTime()/s << "s, "
108  << aTrack.GetGlobalTime()/s << "s. "
109  << ", after track length " << aTrack.GetTrackLength()/cm << "cm, "
110  << "in volume "
112  << G4endl;
113 
114  return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
115 }
G4int verboseLevel
Definition: G4VProcess.hh:368
G4double GetProperTime() const
const XML_Char * s
Definition: expat.h:262
G4GLOB_DLL std::ostream G4cout
G4VPhysicalVolume * GetPhysicalVolume() const
const G4String & GetName() const
static constexpr double cm
Definition: G4SIunits.hh:119
G4double GetGlobalTime() const
G4double GetTrackLength() const
virtual void Initialize(const G4Track &)
G4StepPoint * GetPostStepPoint() const
G4ParticleChange aParticleChange
Definition: G4VProcess.hh:289
#define G4endl
Definition: G4ios.hh:61
void ProposeTrackStatus(G4TrackStatus status)
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)

Here is the call graph for this function:


The documentation for this class was generated from the following files: