source: trunk/source/processes/electromagnetic/lowenergy/test/hTest/include/hTestStepCut.hh @ 1250

Last change on this file since 1250 was 1199, checked in by garnier, 15 years ago

nvx fichiers dans CVS

File size: 4.4 KB
Line 
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#ifndef hTestStepCut_h
27#define hTestStepCut_h 1
28
29//---------------------------------------------------------------------------
30//
31//---------------------------------------------------------------------------
32//
33// ClassName:   hTestStepCut
34// 
35// Description: Cut on step length of charged particles
36//
37// Authors:   08.04.01  V.Ivanchenko
38//
39// Modified:
40//
41//----------------------------------------------------------------------------
42//
43
44//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
45//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
46
47#include "G4ios.hh"
48#include "globals.hh"
49#include "G4VDiscreteProcess.hh"
50#include "G4Step.hh"
51#include "G4Track.hh"
52#include "G4VParticleChange.hh"
53#include "hTestPhysicsList.hh"
54
55//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
56//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
57
58class hTestPhysicsList;
59
60class hTestStepCut : public G4VDiscreteProcess
61{
62public: // Without description   
63
64   hTestStepCut(const G4String&, const hTestPhysicsList*);
65
66  ~hTestStepCut();
67
68   G4double PostStepGetPhysicalInteractionLength(const G4Track&, G4double,
69                                                 G4ForceCondition*);
70
71   G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&);
72
73protected:
74
75     // it is not needed here !
76  G4double GetMeanFreePath(const G4Track&, G4double, G4ForceCondition*);
77                           
78private:
79 
80  // hide assignment operator as private
81  hTestStepCut(const hTestStepCut &right);
82  const hTestStepCut& operator=(const hTestStepCut &right);
83
84  const hTestPhysicsList* thePhysics;
85};
86
87// inlined function members implementation
88
89//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
90
91inline G4double hTestStepCut::PostStepGetPhysicalInteractionLength(
92                        const G4Track& aTrack,
93                              G4double,
94                              G4ForceCondition* condition)
95{
96  // condition is set to "Not Forced"
97  *condition = NotForced;
98   G4double step = DBL_MAX;
99
100   if(aTrack.GetVolume()->GetName() == "Absorber")
101        step = thePhysics->GetMaxChargedStep();
102
103   return step;
104}
105
106//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
107
108inline G4VParticleChange* hTestStepCut::PostStepDoIt(const G4Track& aTrack,
109                                                     const G4Step&)
110{
111   // do nothing
112   aParticleChange.Initialize(aTrack);
113   return &aParticleChange;
114}
115
116//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
117
118inline G4double hTestStepCut::GetMeanFreePath(const G4Track&, G4double,
119                                              G4ForceCondition*)
120{
121  return 0.;
122}
123
124//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
125
126#endif
127
Note: See TracBrowser for help on using the repository browser.