41fTransverseVariationMax(2.E-2 *
CLHEP::angstrom),
44 if(fChannelingID == -1){
59 if(trackdata ==
nullptr){
68void G4Channeling::GetEF(
const G4Track& aTrack,
71 out =
G4ThreeVector((GetMatData(aTrack)->GetEFX()->GetEC(pos)),
72 (GetMatData(aTrack)->GetEFY()->GetEC(pos)),
82 pos = ((*theTouchable->
GetRotation()).inverse())(pos);
99 G4double integrationLimit = std::fabs(posPost.
z() - posPre.
z());
101 if(integrationLimit > 0.){
129 mom.
rotate(axis010,-posPre.
z()/GetMatData(aTrack)->
GetBR(posPre).
x());
151 G4double nud_temp =0., eld_temp =0.;
168 UpdateIntegrationStep(aTrack,mom,step);
169 if(step + stepTot > integrationLimit){
170 step = integrationLimit - stepTot;
178 GetEF(aTrack,pos,efxy);
179 posk1 = step / mom.
z() * mom;
180 momk1 = step / beta * Z * efxy;
181 if(isBent) momk1.
setX(momk1.
x() - step * mom.
z() * beta / (GetMatData(aTrack)->GetBR(pos)).x());
183 GetEF(aTrack,pos_temp = pos + posk1 * 0.5,efxy);
184 posk2 = step / mom.
z() * (mom + momk1 * 0.5);
185 momk2 = step / beta * Z * efxy;
186 if(isBent) momk2.
setX(momk2.
x() - step * mom.
z() * beta / (GetMatData(aTrack)->
GetBR(pos_temp)).x());
188 GetEF(aTrack,pos_temp = pos + posk2 * 0.5,efxy);
189 posk3 = step / mom.
z() * (mom + momk2 * 0.5);
190 momk3 = step / beta * Z * efxy;
191 if(isBent) momk3.
setX(momk3.
x() - step * mom.
z() * beta / (GetMatData(aTrack)->
GetBR(pos_temp)).x());
193 GetEF(aTrack,pos_temp = pos + posk3,efxy);
194 posk4 = step / mom.
z() * (mom + momk3);
195 momk4 = step / beta * Z * efxy;
196 if(isBent) momk4.
setX(momk4.
x() - step * mom.
z() * beta / (GetMatData(aTrack)->
GetBR(pos_temp)).x());
198 pos =
pos + oneSixth * (posk1 + 2.*posk2 + 2.*posk3 + posk4);
199 mom = mom + oneSixth * (momk1 + 2.*momk2 + 2.*momk3 + momk4);
228 nud_temp = GetMatData(aTrack)->
GetNuD()->
GetEC(pos);
229 eld_temp = GetMatData(aTrack)->
GetElD()->
GetEC(pos);
231 if(nud_temp < 0.) {nud_temp = 0.;}
232 if(eld_temp < 0.) {eld_temp = 0.;}
234 nud += (step * nud_temp);
235 eld += (step * eld_temp);
237 efx += (step * GetMatData(aTrack)->
GetEFX()->
GetEC(pos));
238 efy += (step * GetMatData(aTrack)->
GetEFY()->
GetEC(pos));
240 }
while(stepTot<integrationLimit);
245 if(nud < 1.E-10) {nud = 1.E-10;}
246 if(eld < 1.E-10) {eld = 1.E-10;}
248 GetTrackData(aTrack)->
SetNuD(nud);
249 GetTrackData(aTrack)->
SetElD(eld);
251 GetTrackData(aTrack)->
SetEFX(efx);
252 GetTrackData(aTrack)->
SetEFY(efy);
254 GetTrackData(aTrack)->
SetMomCh(mom);
255 GetTrackData(aTrack)->
SetPosCh(pos);
268UpdateIntegrationStep(
const G4Track& aTrack,
272 if(mom.
x() != 0.0 || mom.
y() != 0.0){
273 double xy2 = mom.
x() * mom.
x() + mom.
y()*mom.
y();
276 step = std::fabs(fTransverseVariationMax * GetPre(aTrack)->GetKineticEnergy() / std::pow(xy2,0.5));
277 if(step < fTimeStepMin) step = fTimeStepMin;
279 fTimeStepMax = std::sqrt( fTransverseVariationMax * GetPre(aTrack)->GetKineticEnergy()
280 / std::fabs(GetMatData(aTrack)->GetEFX()->
GetMax()));
282 if(step > fTimeStepMax) step = fTimeStepMax;
318 fTimeStepMin = osc_per * 2.E-4;
319 return osc_per * 0.01;
322 GetTrackData(aTrack)->
Reset();
351 G4bool bModifiedTraj = UpdateParameters(aTrack);
353 if(bModifiedTraj==
true){
365 if(GetMatData(aTrack)->
IsBent()){
369 momCh.
rotate(axis010,posPost.
z()/GetMatData(aTrack)->
GetBR(posPost).
x());
391 GetTrackData(aTrack)->
Reset();
G4double condition(const G4ErrorSymMatrix &m)
CLHEP::Hep3Vector G4ThreeVector
Hep3Vector & rotate(double, const Hep3Vector &)
G4double GetIntSp(G4int index)
G4double GetEC(G4ThreeVector &)
G4ChannelingECHARM * GetEFY()
G4ChannelingECHARM * GetEFX()
virtual G4ThreeVector GetBR(G4ThreeVector &v3)
G4ChannelingECHARM * GetPot()
G4ChannelingECHARM * GetNuD()
G4ChannelingECHARM * GetElD()
void SetPosCh(G4ThreeVector a3vec)
void SetNuD(G4double aDouble)
void SetElD(G4double aDouble)
void SetEFY(G4double aDouble)
void SetEFX(G4double aDouble)
void SetMomCh(G4ThreeVector a3vec)
void PosToLattice(G4StepPoint *step, G4ThreeVector &)
virtual G4double GetMeanFreePath(const G4Track &, G4double, G4ForceCondition *)
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
G4double GetOscillationPeriod(const G4Track &aTrack)
const G4ThreeVector & RotateToSolid(G4ThreeVector &dir) const
static G4bool IsLattice(G4LogicalVolume *aLV)
const G4ThreeVector & RotateToLattice(G4ThreeVector &dir) const
void ProposePolarization(G4double Px, G4double Py, G4double Pz)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
virtual void Initialize(const G4Track &)
G4double GetPDGCharge() const
static G4int GetIndex(const G4String &)
static G4int Register(const G4String &)
const G4VTouchable * GetTouchable() const
G4ThreeVector GetMomentum() const
const G4ThreeVector & GetPosition() const
G4StepPoint * GetPreStepPoint() const
G4StepPoint * GetPostStepPoint() const
const G4RotationMatrix * GetRotation(G4int depth=0) const
const G4ThreeVector & GetTranslation(G4int depth=0) const
void SetAuxiliaryTrackInformation(G4int idx, G4VAuxiliaryTrackInformation *info) const
G4double GetVelocity() const
G4VPhysicalVolume * GetVolume() const
G4VPhysicalVolume * GetNextVolume() const
G4VAuxiliaryTrackInformation * GetAuxiliaryTrackInformation(G4int idx) const
const G4Step * GetStep() const
G4LogicalVolume * GetLogicalVolume() const
G4ParticleChange aParticleChange
G4double GetMax(const G4ToolsBaseHisto &baseHisto, G4int dimension)