00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00031
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00047
00048 #ifndef G4Cerenkov_h
00049 #define G4Cerenkov_h 1
00050
00052
00054
00055 #include <CLHEP/Units/SystemOfUnits.h>
00056
00057 #include "globals.hh"
00058 #include "templates.hh"
00059 #include "Randomize.hh"
00060 #include "G4ThreeVector.hh"
00061 #include "G4ParticleMomentum.hh"
00062 #include "G4Step.hh"
00063 #include "G4VProcess.hh"
00064 #include "G4OpticalPhoton.hh"
00065 #include "G4DynamicParticle.hh"
00066 #include "G4Material.hh"
00067 #include "G4PhysicsTable.hh"
00068 #include "G4MaterialPropertyVector.hh"
00069 #include "G4MaterialPropertiesTable.hh"
00070 #include "G4PhysicsOrderedFreeVector.hh"
00071
00072
00073
00074
00075
00076
00078
00080
00081 class G4Cerenkov : public G4VProcess
00082 {
00083
00084 public:
00085
00087
00089
00090 G4Cerenkov(const G4String& processName = "Cerenkov",
00091 G4ProcessType type = fElectromagnetic);
00092 ~G4Cerenkov();
00093
00094 G4Cerenkov(const G4Cerenkov &right);
00095
00096 private:
00097
00099
00101
00102 G4Cerenkov& operator=(const G4Cerenkov &right);
00103
00104 public:
00105
00107
00109
00110 G4bool IsApplicable(const G4ParticleDefinition& aParticleType);
00111
00112
00113
00114 G4double GetMeanFreePath(const G4Track& aTrack,
00115 G4double ,
00116 G4ForceCondition* );
00117
00118
00119
00120 G4double PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
00121 G4double ,
00122 G4ForceCondition* );
00123
00124
00125
00126 G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
00127 const G4Step& aStep);
00128
00129
00130
00131 virtual G4double AlongStepGetPhysicalInteractionLength(
00132 const G4Track&,
00133 G4double ,
00134 G4double ,
00135 G4double& ,
00136 G4GPILSelection*
00137 ) { return -1.0; };
00138
00139 virtual G4double AtRestGetPhysicalInteractionLength(
00140 const G4Track& ,
00141 G4ForceCondition*
00142 ) { return -1.0; };
00143
00144
00145 virtual G4VParticleChange* AtRestDoIt(
00146 const G4Track& ,
00147 const G4Step&
00148 ) {return 0;};
00149
00150 virtual G4VParticleChange* AlongStepDoIt(
00151 const G4Track& ,
00152 const G4Step&
00153 ) {return 0;};
00154
00155 void SetTrackSecondariesFirst(const G4bool state);
00156
00157
00158
00159
00160 void SetMaxBetaChangePerStep(const G4double d);
00161
00162
00163
00164 void SetMaxNumPhotonsPerStep(const G4int NumPhotons);
00165
00166
00167
00168
00169
00170
00171
00172 G4PhysicsTable* GetPhysicsTable() const;
00173
00174
00175 void DumpPhysicsTable() const;
00176
00177
00178 private:
00179
00180 void BuildThePhysicsTable();
00181
00183
00185
00186 G4double GetAverageNumberOfPhotons(const G4double charge,
00187 const G4double beta,
00188 const G4Material *aMaterial,
00189 G4MaterialPropertyVector* Rindex) const;
00190
00192
00194
00195 protected:
00196
00197 G4PhysicsTable* thePhysicsTable;
00198
00199
00200
00201
00202 private:
00203
00204 G4bool fTrackSecondariesFirst;
00205 G4double fMaxBetaChange;
00206 G4int fMaxPhotons;
00207 };
00208
00210
00212
00213 inline
00214 G4bool G4Cerenkov::IsApplicable(const G4ParticleDefinition& aParticleType)
00215 {
00216 if (aParticleType.GetParticleName() == "chargedgeantino") return false;
00217 if (aParticleType.IsShortLived()) return false;
00218
00219 return (aParticleType.GetPDGCharge() != 0);
00220 }
00221
00222 inline
00223 void G4Cerenkov::SetTrackSecondariesFirst(const G4bool state)
00224 {
00225 fTrackSecondariesFirst = state;
00226 }
00227
00228 inline
00229 void G4Cerenkov::SetMaxBetaChangePerStep(const G4double value)
00230 {
00231 fMaxBetaChange = value*CLHEP::perCent;
00232 }
00233
00234 inline
00235 void G4Cerenkov::SetMaxNumPhotonsPerStep(const G4int NumPhotons)
00236 {
00237 fMaxPhotons = NumPhotons;
00238 }
00239
00240 inline
00241 void G4Cerenkov::DumpPhysicsTable() const
00242 {
00243 G4int PhysicsTableSize = thePhysicsTable->entries();
00244 G4PhysicsOrderedFreeVector *v;
00245
00246 for (G4int i = 0 ; i < PhysicsTableSize ; i++ )
00247 {
00248 v = (G4PhysicsOrderedFreeVector*)(*thePhysicsTable)[i];
00249 v->DumpValues();
00250 }
00251 }
00252
00253 inline
00254 G4PhysicsTable* G4Cerenkov::GetPhysicsTable() const
00255 {
00256 return thePhysicsTable;
00257 }
00258
00259 #endif