ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4Channeling.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4Channeling.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 #ifndef G4Channeling_h
29 #define G4Channeling_h 1
30 
31 #include "G4ios.hh"
32 #include "globals.hh"
33 #include "G4VDiscreteProcess.hh"
35 #include "G4ExtendedMaterial.hh"
37 
39 
41 {
42 public:
43 
44  G4Channeling();
45  virtual ~G4Channeling();
46  virtual G4VParticleChange* PostStepDoIt(const G4Track&,
47  const G4Step&);
49  return(aPD.GetPDGCharge() != 0.);
50  };
51  virtual void BuildPhysicsTable(const G4ParticleDefinition&){;};
52 
53 protected:
54  virtual G4double GetMeanFreePath(const G4Track&,
55  G4double,
57 
58 private:
60  return const_cast<G4ParticleDefinition*>(aTrack.GetParticleDefinition());
61  }
62 private:
63  G4StepPoint* GetPre(const G4Track& aTrack){return aTrack.GetStep()->GetPreStepPoint();}
64  G4StepPoint* GetPost(const G4Track& aTrack){return aTrack.GetStep()->GetPostStepPoint();}
65 
66 
67 private:
69  G4LogicalVolume* aLV = aTrack.GetVolume()->GetLogicalVolume();
70  if(aLV->IsExtended() == true){
72  return (G4ChannelingMaterialData*) aEM->RetrieveExtension("channeling");
73  }
74  else{
75  return nullptr;
76  }
77  }
78 
79  //----------------------------------------
80  // Functions for the calculations of
81  // parameters related to channeling
82  //----------------------------------------
83 public:
85  return std::sqrt(2.0*GetMatData(aTrack)->GetPot()->GetMaxMin()
86  /GetPre(aTrack)->GetTotalEnergy());}
88  return (CLHEP::pi * GetMatData(aTrack)->GetPot()->GetIntSp(0)
89  / GetCriticalAngle(aTrack));
90  }
91  //----------------------------------------
92  // Channeling Auxiliary Track Information
93  //----------------------------------------
94 private:
97 
98  //----------------------------------------
99  // Variables for the integration
100  // of the particle trajectory
101  //----------------------------------------
102 private:
104  G4ThreeVector&,
105  G4double&);
107 
108  void GetEF(const G4Track&,G4ThreeVector&,G4ThreeVector&);
109 
110 public:
112 
113 public:
116 
118  void SetTimeStepMin(G4double aDouble) {fTimeStepMin = aDouble;};
119 
120 private:
123 
125 
128 };
129 
130 #endif
131 
132 
133 
134 
135 
136 
137 
138 
139 
140