ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4VRangeToEnergyConverter.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4VRangeToEnergyConverter.hh
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 //
27 //
28 //
29 // ------------------------------------------------------------
30 // GEANT 4 class header file
31 //
32 //
33 // Class Description
34 // This class is base class for Range to Energy Converters.
35 // Cut in energy corresponding to given cut value in range
36 // is calculated for a material by using Convert method
37 //
38 // ------------------------------------------------------------
39 // First Implementation 5 Oct. 2002 H.Kurahige
40 // ------------------------------------------------------------
41 
42 #ifndef G4VRangeToEnergyConverter_h
43 #define G4VRangeToEnergyConverter_h 1
44 
45 #include "globals.hh"
46 #include <cmath>
47 #include "G4ios.hh"
48 #include <vector>
49 
50 #include "G4ParticleDefinition.hh"
51 
52 #include "G4PhysicsTable.hh"
53 #include "G4Element.hh"
54 #include "G4Material.hh"
55 class G4PhysicsLogVector;
56 
58 {
59  public: // with description
60  // constructor
62 
63  // copy constructor
65 
67 
68  public:
69  // destructor
71 
72  // equal opperators
73  G4bool operator==(const G4VRangeToEnergyConverter &right) const;
74  G4bool operator!=(const G4VRangeToEnergyConverter &right) const;
75 
76  public: // with description
77  // calculate energy cut from given range cut for the material
78  virtual G4double Convert(G4double rangeCut, const G4Material* material);
79 
80  // set energy range for all particle type
81  static void SetEnergyRange(G4double lowedge, G4double highedge);
82 
83  // get energy range for all particle type
84  static G4double GetLowEdgeEnergy();
85  static G4double GetHighEdgeEnergy();
86 
87  // get/set max cut energy for all particle type
88  static G4double GetMaxEnergyCut();
89  static void SetMaxEnergyCut(G4double value);
90 
91  // return pointer to the particle type which this converter takes care
93 
94  // return the Loss Table
95  const G4PhysicsTable* GetLossTable() const;
96  //-------------- Loss Table ------------------------------------------
97  // theLossTable is a collection of loss vectors for all elements.
98  // Each loss vector has energy loss values (cross section values
99  // for neutral particles) which are calculated by
100  // ComputeLoss(G4double AtomicNumber,G4double KineticEnergy).
101  // ComputeLoss method is pure virtual and should be provided for each
102  // particle type
103 
104  // reset Loss Table and Range Vectors
105  virtual void Reset();
106 
107  protected:
108 
112 
117 
119  const G4int TotBin;
120 
121  protected:// with description
122  virtual void BuildLossTable();
123 
124  virtual G4double ComputeLoss(G4double AtomicNumber,
125  G4double KineticEnergy
126  ) =0;
127 
128  //-------------- Range Table ------------------------------------------
129  protected:
131 
132  virtual void BuildRangeVector(const G4Material* aMaterial,
133  G4RangeVector* rangeVector);
134 
135  std::vector< G4RangeVector* > fRangeVectorStore;
136 
137  protected:
139  G4RangeVector* theRangeVector,
140  G4double theCutInLength,
141  size_t materialIndex
142  ) const;
143 
144  public: // with description
145  void SetVerboseLevel(G4int value);
146  G4int GetVerboseLevel() const;
147  // controle flag for output message
148  // 0: Silent
149  // 1: Warning message
150  // 2: More
151 
152  private:
154 
155 };
156 
157 inline
159 {
161 }
162 
163 inline
165 {
166  return verboseLevel;
167 }
168 
169 
170 inline
172 {
173  return theParticle;
174 }
175 #endif
176 
177 
178 
179 
180 
181 
182 
183