49 (fMapBendingAngle.count(crystalID) > 0)
54 (fMapMiscutAngle.count(crystalID) > 0)
60 (fMapCUAmplitudePeriodPhase.count(crystalID) > 0)
73 fMapBendingAngle[crystalID]=tetab;
91 G4cout <<
"Warning: bending angle is lower than 1 urad => set to 0" <<
G4endl;
114 G4cout <<
"Warning: bending angle is negative => set to be positive" <<
G4endl;
128 fMapMiscutAngle[crystalID]=tetam;
132 if (std::abs(tetam)>1.*mrad)
135 G4cout <<
"Warning: miscut angle is higher than 1 mrad => " <<
G4endl;
136 G4cout <<
"coordinate transformation routines may be unstable" <<
G4endl;
156 G4cout <<
"Warning: The crystalline undulator parameters are out of range "
157 "=> the crystalline undulator mode switched off" <<
G4endl;
172 fMapCUAmplitudePeriodPhase[crystalID]=amplitudePeriodPhase;
174 G4double period = amplitudePeriodPhase.
y();
183 fCUK = CLHEP::twopi/period;
191 G4cout <<
"Warning: crystalline undulator is not compatible with "
192 "a bent crystal mode => setting bending angle to 0." <<
G4endl;
201 fMapCUAmplitudePeriodPhase[crystalID] =
G4ThreeVector(0.,0.,0.);
225 fTetaL = std::sqrt(
fVmax2/fPV);
230 fGamma = etotal/mass;
231 fMe2Gamma = 2*CLHEP::electron_mass_c2*fGamma;
233 fTmax = fMe2Gamma*fGamma*fV2/
234 (CLHEP::electron_mass_c2/mass*CLHEP::electron_mass_c2/mass +
235 1. + fMe2Gamma/mass);
281 G4double pv0 = etotal-mass*mass/etotal;
282 return std::sqrt(2*
fVmax/pv0);
302 angle = std::abs(tx);
306 angle = std::sqrt(tx*tx+ty*ty);
312 simulationstep = fChannelingStep;
319 return simulationstep;
355 if (teta122<=
fTeta12[ielement]*1.000125)
362 teta22=teta122-
fTeta12[ielement];
368 (1.-std::exp(-aa*
fBB[ielement]))/aa1+
370 (expint(
fBB[ielement]*aa1)-
fE1XBbb[ielement]));
378 t=std::sqrt(-tetamsi*
G4Log(ksi));
382 tx+=t*std::cos(CLHEP::twopi*ksi);
383 ty+=t*std::sin(CLHEP::twopi*ksi);
426 tx+=t*std::cos(CLHEP::twopi*ksi);
427 ty+=t*std::sin(CLHEP::twopi*ksi);
459 if (eMinIonization<0.5*eV){eMinIonization=0.5*eV;}
462 if ((eMinIonization<fTmax)&&(electronDensity>
DBL_EPSILON))
469 zss=-1.0*
G4Log(ksi)/(
fK3*electronDensity)/(1./eMinIonization-1./fTmax);
479 G4double e1=eMinIonization/(1.-ksi*(1.-eMinIonization/fTmax));
482 G4double t=std::sqrt(e1*(e1+2.*CLHEP::electron_mass_c2))/fPz;
485 if (fHadron) {eloss=e1;}
489 tx+=t*std::cos(CLHEP::twopi*ksi);
490 ty+=t*std::sin(CLHEP::twopi*ksi);
498 zss=-1.0*
G4Log(ksi)/(
fK3*electronDensity)/(1./eMinIonization-1./fTmax);
511 if (fHadron) {elosses=
fKD[ielement]/fV2*
512 (
G4Log(fMe2Gamma*fV2/
fI0[ielement]/fGamma) - fV2)*dz;}
539 for(
int K=1; K<=25; K++)
541 R=-R*K*X/std::pow(K+1.,2.);
543 if (std::abs(R)<=std::abs(E1)*1.0e-15) {
break;}
546 E1=-0.5772156649015328-
G4Log(X)+X*E1;
550 M=20+std::trunc(80.0/X);
553 for(
int K=
M; K>=1; K--)
G4double G4Log(G4double x)
CLHEP::Hep3Vector G4ThreeVector
Definition of the G4VChannelingFastSimCrystalData class The class contains the data and properties re...
G4GLOB_DLL std::ostream G4cout
G4VSolid * GetSolid() const
G4int GetInstanceID() const
const G4String & GetName() const
std::vector< G4double > fBB
std::vector< G4double > fI0
std::vector< G4double > fTeta12
G4double IonizationLosses(G4double dz, G4int ielement)
ionization losses
std::vector< G4double > fK20
coefficients necessary for multiple and single coulomb scattering
G4double GetLindhardAngle()
Calculate the value of the Lindhard angle (!!! the value for a straight crystal)
void SetGeometryParameters(const G4LogicalVolume *crystallogic)
set geometry parameters from current logical volume
std::vector< G4double > fK40
void SetCUParameters(const G4ThreeVector &litudePeriodPhase, const G4LogicalVolume *crystallogic)
std::vector< G4double > fPzu11
std::vector< G4double > fBBDEXP
void SetCrystallineUndulatorParameters(G4double amplitude, G4double period, G4double phase, const G4LogicalVolume *crystallogic)
G4ThreeVector fHalfDimBoundingBox
values related to the crystal geometry
G4double GetSimulationStep(G4double tx, G4double ty)
void SetBendingAngle(G4double tetab, const G4LogicalVolume *crystallogic)
std::vector< G4double > fKD
std::vector< G4double > fTetamax0
G4VChannelingFastSimCrystalData()
G4int fNelements
values related to the crystal lattice
G4ThreeVector CoulombElectronScattering(G4double eMinIonization, G4double electronDensity, G4double step)
multiple and single scattering on electrons
std::vector< G4double > fTeta10
angles necessary for multiple and single coulomb scattering
void SetParticleProperties(G4double etotal, G4double mp, G4double charge, G4bool ifhadron)
G4double GetMaxSimulationStep(G4double etotal, G4double mass)
Calculate maximal simulation step (standard value for channeling particles)
std::vector< G4double > fTetamax12
std::vector< G4double > fPu11
coefficients for multiple scattering suppression
G4ThreeVector CoulombAtomicScattering(G4double effectiveStep, G4double step, G4int ielement)
multiple and single scattering on screened potential
std::vector< G4double > fE1XBbb
std::vector< G4double > fTetamax2
std::vector< G4double > fK2
virtual ~G4VChannelingFastSimCrystalData()
void SetMiscutAngle(G4double tetam, const G4LogicalVolume *crystallogic)
virtual void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const