Geant4  10.02.p03
ExExChProcessChanneling Class Reference

#include <ExExChProcessChanneling.hh>

Inheritance diagram for ExExChProcessChanneling:
Collaboration diagram for ExExChProcessChanneling:

Public Member Functions

 ExExChProcessChanneling (const G4String &processName="ExExChProcessChanneling")
 
virtual ~ExExChProcessChanneling ()
 
virtual G4VParticleChange * PostStepDoIt (const G4Track &, const G4Step &)
 
virtual G4bool IsApplicable (const G4ParticleDefinition &)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
XVCrystalCharacteristicGetPotential ()
 
void SetPotential (XVCrystalCharacteristic *)
 
XVCrystalCharacteristicGetElectricField ()
 
void SetElectricField (XVCrystalCharacteristic *)
 
XCrystalIntegratedDensityHubGetIntegratedDensity ()
 
void SetIntegratedDensity (XCrystalIntegratedDensityHub *)
 
XVCrystalCharacteristicGetNucleiDensity ()
 
void SetNucleiDensity (XVCrystalCharacteristic *)
 
XVCrystalCharacteristicGetElectronDensity ()
 
void SetElectronDensity (XVCrystalCharacteristic *)
 
G4double GetTransverseVariationMax ()
 
void SetTransverseVariationMax (G4double aDouble)
 
G4double GetTimeStepMin ()
 
void SetTimeStepMin (G4double aDouble)
 
void ReadFromFileCharacteristics (G4bool)
 
void SetFileCharacteristicsName (const G4String &vFilename)
 
G4bool GetFileCharacteristicsName ()
 
- Public Member Functions inherited from G4VDiscreteProcess
 G4VDiscreteProcess (const G4String &, G4ProcessType aType=fNotDefined)
 
 G4VDiscreteProcess (G4VDiscreteProcess &)
 
virtual ~G4VDiscreteProcess ()
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &, G4double, G4double, G4double &, G4GPILSelection *)
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &, G4ForceCondition *)
 
virtual G4VParticleChange * AtRestDoIt (const G4Track &, const G4Step &)
 
virtual G4VParticleChange * AlongStepDoIt (const G4Track &, const G4Step &)
 
- Public Member Functions inherited from G4VProcess
 G4VProcess (const G4String &aName="NoName", G4ProcessType aType=fNotDefined)
 
 G4VProcess (const G4VProcess &right)
 
virtual ~G4VProcess ()
 
G4int operator== (const G4VProcess &right) const
 
G4int operator!= (const G4VProcess &right) const
 
G4double GetCurrentInteractionLength () const
 
void SetPILfactor (G4double value)
 
G4double GetPILfactor () const
 
G4double AlongStepGPIL (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
 
G4double AtRestGPIL (const G4Track &track, G4ForceCondition *condition)
 
G4double PostStepGPIL (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
virtual void PreparePhysicsTable (const G4ParticleDefinition &)
 
virtual G4bool StorePhysicsTable (const G4ParticleDefinition *, const G4String &, G4bool)
 
virtual G4bool RetrievePhysicsTable (const G4ParticleDefinition *, const G4String &, G4bool)
 
const G4StringGetPhysicsTableFileName (const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
 
const G4StringGetProcessName () const
 
G4ProcessType GetProcessType () const
 
void SetProcessType (G4ProcessType)
 
G4int GetProcessSubType () const
 
void SetProcessSubType (G4int)
 
virtual void StartTracking (G4Track *)
 
virtual void EndTracking ()
 
virtual void SetProcessManager (const G4ProcessManager *)
 
virtual const G4ProcessManagerGetProcessManager ()
 
virtual void ResetNumberOfInteractionLengthLeft ()
 
G4double GetNumberOfInteractionLengthLeft () const
 
G4double GetTotalNumberOfInteractionLengthTraversed () const
 
G4bool isAtRestDoItIsEnabled () const
 
G4bool isAlongStepDoItIsEnabled () const
 
G4bool isPostStepDoItIsEnabled () const
 
virtual void DumpInfo () const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
virtual void SetMasterProcess (G4VProcess *masterP)
 
const G4VProcessGetMasterProcess () const
 
virtual void BuildWorkerPhysicsTable (const G4ParticleDefinition &part)
 
virtual void PrepareWorkerPhysicsTable (const G4ParticleDefinition &)
 

Protected Member Functions

virtual G4double GetMeanFreePath (const G4Track &, G4double, G4ForceCondition *)
 
- Protected Member Functions inherited from G4VProcess
void SubtractNumberOfInteractionLengthLeft (G4double previousStepSize)
 
void ClearNumberOfInteractionLengthLeft ()
 

Private Member Functions

G4double GetChannelingMeanFreePath (const G4Track &)
 
void UpdateParameters (const G4Track &)
 
G4bool UpdateInitialParameters (const G4Track &)
 
void ResetDensity (const G4Track &)
 
G4double ComputeCriticalEnergyBent (const G4Track &)
 
G4double ComputeCriticalEnergyMinimumBent (const G4Track &)
 
G4double ComputePotentialEnergyBent (const G4Track &)
 
G4ThreeVector ComputeTransverseEnergyBent (const G4Track &)
 
G4ThreeVector ComputePositionInTheCrystal (G4StepPoint *, const G4Track &)
 
G4StepPoint * CheckStepPointLatticeForVolume (G4StepPoint *, const G4Track &)
 
G4StepPoint * CheckStepPointLatticeForPosition (G4StepPoint *, const G4Track &)
 
G4ThreeVector ComputeTransverseEnergy (const G4Track &)
 
G4ThreeVector ComputeKineticEnergy (const G4Track &)
 
G4ThreeVector ComputePotentialEnergy (const G4Track &)
 
G4ThreeVector ComputeMomentum (const G4Track &, G4StepPoint *)
 
G4ThreeVector ComputeCentrifugalEnergy (const G4Track &, G4ThreeVector)
 
G4ThreeVector ComputeCentrifugalEnergyMaximumVariation (const G4Track &)
 
G4double ComputeCriticalEnergyMaximum (const G4Track &)
 
G4double ComputeCriticalEnergyMinimum (const G4Track &)
 
G4double ComputeCriticalAngle (const G4Track &)
 
G4double ComputeCriticalRadius (const G4Track &)
 
G4double ComputeOscillationPeriod (const G4Track &)
 
G4ThreeVector ComputePotentialWellCentre (const G4Track &)
 
G4bool HasLattice (const G4Track &)
 
G4bool HasLatticeOnBoundary (const G4Track &)
 
G4bool HasLatticeOnBoundaryPre (const G4Track &)
 
G4bool HasLatticeOnBoundaryPost (const G4Track &)
 
G4bool ParticleIsNegative (const G4Track &)
 
G4bool ParticleIsNotOnBoundaryPre (const G4Track &)
 
G4bool ParticleIsNotOnBoundaryPost (const G4Track &)
 
G4bool ParticleIsNotOnBoundary (const G4Track &)
 
void ComputeCrystalCharacteristic (const G4Track &)
 
XPhysicalLatticeGetXPL (const G4Track &)
 
G4VPhysicalVolumeGetVolume (const G4Track &)
 
ExExChParticleUserInfoGetInfo (const G4Track &)
 
G4ParticleDefinitionGetParticleDefinition (const G4Track &aTrack)
 
 ExExChProcessChanneling (ExExChProcessChanneling &)
 
ExExChProcessChannelingoperator= (const ExExChProcessChanneling &right)
 
G4bool UpdateIntegrationStep (const G4Track &, G4ThreeVector &)
 

Private Attributes

XLatticeManager3fLatticeManager
 
XVCrystalCharacteristicfPotentialEnergy
 
XVCrystalCharacteristicfElectricField
 
XCrystalIntegratedDensityHubfIntegratedDensity
 
XVCrystalCharacteristicfNucleiDensity
 
XVCrystalCharacteristicfElectronDensity
 
G4String fFileCharacteristicsName
 
G4double fTimeStep
 
G4double fTimeStepMin
 
G4double fTimeStepMax
 
G4double fTimeStepTotal
 
G4bool bHasToComputeTrajectory
 
G4double bPointYPost
 
G4double bPointYPre
 
G4double fTransverseVariationMax
 
G4double fIntegrationPeriod
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VProcess
static const G4StringGetProcessTypeName (G4ProcessType)
 
- Protected Attributes inherited from G4VProcess
const G4ProcessManageraProcessManager
 
G4VParticleChange * pParticleChange
 
G4ParticleChange aParticleChange
 
G4double theNumberOfInteractionLengthLeft
 
G4double currentInteractionLength
 
G4double theInitialNumberOfInteractionLength
 
G4String theProcessName
 
G4String thePhysicsTableFileName
 
G4ProcessType theProcessType
 
G4int theProcessSubType
 
G4double thePILfactor
 
G4bool enableAtRestDoIt
 
G4bool enableAlongStepDoIt
 
G4bool enablePostStepDoIt
 
G4int verboseLevel
 

Detailed Description

Definition at line 43 of file ExExChProcessChanneling.hh.

Constructor & Destructor Documentation

◆ ExExChProcessChanneling() [1/2]

ExExChProcessChanneling::ExExChProcessChanneling ( const G4String processName = "ExExChProcessChanneling")

Definition at line 59 of file ExExChProcessChanneling.cc.

59  :
60 G4VDiscreteProcess(aName){
62 
63  G4double kCarTolerance =
65  G4cout<<"\n ExExChProcessChanneling::Constructor:";
66  G4cout<<"Geometry surface tolerance is: ";
67  G4cout<< kCarTolerance / mm << " mm"<<G4endl;
68  if(verboseLevel>1) {
69  G4cout << GetProcessName() << " is created "<< G4endl;
70  }
71 
73  fTimeStepMax = 0.;
76 
77  bPointYPre = -1.;
78  bPointYPost = -1.;
79 }
static XLatticeManager3 * GetXLatticeManager()
G4int verboseLevel
Definition: G4VProcess.hh:368
G4double GetSurfaceTolerance() const
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
static const double angstrom
Definition: SystemOfUnits.h:81
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
static const double mm
Definition: G4SIunits.hh:114
static G4GeometryTolerance * GetInstance()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~ExExChProcessChanneling()

ExExChProcessChanneling::~ExExChProcessChanneling ( )
virtual

Definition at line 83 of file ExExChProcessChanneling.cc.

83  {
84 }
Here is the call graph for this function:

◆ ExExChProcessChanneling() [2/2]

ExExChProcessChanneling::ExExChProcessChanneling ( ExExChProcessChanneling right)
private

Definition at line 89 of file ExExChProcessChanneling.cc.

89  :
90 G4VDiscreteProcess(right){
91  ;
92 }

Member Function Documentation

◆ BuildPhysicsTable()

void ExExChProcessChanneling::BuildPhysicsTable ( const G4ParticleDefinition )
virtual

Reimplemented from G4VProcess.

Definition at line 849 of file ExExChProcessChanneling.cc.

849  {
850 
851 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckStepPointLatticeForPosition()

G4StepPoint * ExExChProcessChanneling::CheckStepPointLatticeForPosition ( G4StepPoint *  vStep,
const G4Track &  aTrack 
)
private

Definition at line 405 of file ExExChProcessChanneling.cc.

405  {
406 
407  G4StepPoint* vStepPre = aTrack.GetStep()->GetPreStepPoint();
408  G4StepPoint* vStepPost = aTrack.GetStep()->GetPostStepPoint();
409 
410  if( fLatticeManager->HasLattice(vStep->GetPhysicalVolume()) ) {
411  return vStep;
412  }
413  else if(fLatticeManager->HasLattice(vStepPost->GetPhysicalVolume())
414  == false &&
415  fLatticeManager->HasLattice(vStepPre->GetPhysicalVolume())
416  == true &&
417  vStep == vStepPost &&
418  vStepPost->GetStepStatus() == fGeomBoundary) {
419  return vStepPost;
420  }
421  else if(fLatticeManager->HasLattice(vStepPre->GetPhysicalVolume())
422  == false &&
423  fLatticeManager->HasLattice(vStepPost->GetPhysicalVolume())
424  == true &&
425  vStep == vStepPre &&
426  vStepPre->GetStepStatus() == fGeomBoundary) {
427  return vStepPre;
428  }
429  else{
430  return vStep;
431  }
432 }
bool HasLattice(G4VPhysicalVolume *)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckStepPointLatticeForVolume()

G4StepPoint * ExExChProcessChanneling::CheckStepPointLatticeForVolume ( G4StepPoint *  vStep,
const G4Track &  aTrack 
)
private

Definition at line 373 of file ExExChProcessChanneling.cc.

373  {
374 
375  G4StepPoint* vStepPre = aTrack.GetStep()->GetPreStepPoint();
376  G4StepPoint* vStepPost = aTrack.GetStep()->GetPostStepPoint();
377 
378  if( fLatticeManager->HasLattice(vStep->GetPhysicalVolume()) ) {
379  return vStep;
380  }
381  else if(fLatticeManager->HasLattice(vStepPost->GetPhysicalVolume())
382  == false
383  && fLatticeManager->HasLattice(vStepPre->GetPhysicalVolume())
384  == true
385  && vStep == vStepPost &&
386  vStepPost->GetStepStatus() == fGeomBoundary) {
387  return vStepPre;
388  }
389  else if(fLatticeManager->HasLattice(vStepPre->GetPhysicalVolume())
390  == false &&
391  fLatticeManager->HasLattice(vStepPost->GetPhysicalVolume())
392  == true &&
393  vStep == vStepPre &&
394  vStepPre->GetStepStatus() == fGeomBoundary) {
395  return vStepPost;
396  }
397  else{
398  return vStep;
399  }
400 }
bool HasLattice(G4VPhysicalVolume *)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeCentrifugalEnergy()

G4ThreeVector ExExChProcessChanneling::ComputeCentrifugalEnergy ( const G4Track &  aTrack,
G4ThreeVector  vPosition 
)
private

Definition at line 626 of file ExExChProcessChanneling.cc.

626  {
627  //----------------------------------------
628  // compute the transverse energy variation
629  // in the crystal reference system
630  //----------------------------------------
631 
632  G4double vTotalEnergy =
633  aTrack.GetStep()->GetPreStepPoint()->GetTotalEnergy();
634 
635  G4double vPositionX = vPosition.x();
636 
637  if(ParticleIsNegative(aTrack) && false){
638  vPositionX -=
639  GetXPL(aTrack)->ComputeInterplanarPeriod() * 0.5;
640  }
641  G4ThreeVector vEnergyVariation = G4ThreeVector();;
642  if(GetXPL(aTrack)->IsBent()){
643  vEnergyVariation =
644  G4ThreeVector(vTotalEnergy * vPositionX /
645  GetXPL(aTrack)->GetCurvatureRadius().x(),
646  0.,
647  0.);
648  }
649 
650  return vEnergyVariation;
651 }
CLHEP::Hep3Vector G4ThreeVector
G4bool ParticleIsNegative(const G4Track &)
double x() const
XPhysicalLattice * GetXPL(const G4Track &)
double G4double
Definition: G4Types.hh:76
G4double ComputeInterplanarPeriod()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeCentrifugalEnergyMaximumVariation()

G4ThreeVector ExExChProcessChanneling::ComputeCentrifugalEnergyMaximumVariation ( const G4Track &  aTrack)
private

Definition at line 675 of file ExExChProcessChanneling.cc.

675  {
676  //----------------------------------------
677  // compute the transverse energy variation
678  // in the crystal reference system
679  //----------------------------------------
680 
681  G4double vTotalEnergy =
682  aTrack.GetStep()->GetPreStepPoint()->GetTotalEnergy();
683 
684  G4ThreeVector vEnergyVariation = G4ThreeVector();
685  if(GetXPL(aTrack)->IsBent()){
686  vEnergyVariation = G4ThreeVector(vTotalEnergy *
687  GetXPL(aTrack)->ComputeInterplanarPeriod() /
688  GetXPL(aTrack)->GetCurvatureRadius().x(),
689  0.,
690  0.);
691  }
692 
693  return vEnergyVariation;
694 }
CLHEP::Hep3Vector G4ThreeVector
XPhysicalLattice * GetXPL(const G4Track &)
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeCriticalAngle()

G4double ExExChProcessChanneling::ComputeCriticalAngle ( const G4Track &  aTrack)
private

Definition at line 752 of file ExExChProcessChanneling.cc.

752  {
753  //----------------------------------------
754  // compute the critical angle
755  // for chenneling
756  //----------------------------------------
757 
758  G4double vTotalEnergy =
759  aTrack.GetStep()->GetPostStepPoint()->GetTotalEnergy();
760  G4double vCriticalAngle = std::pow( 2.0 *
761  std::fabs( ( ComputeCriticalEnergyMaximum(aTrack)
762  - ComputeCriticalEnergyMinimum(aTrack) )
763  / vTotalEnergy ) , 0.5);
764  return vCriticalAngle;
765 }
G4double ComputeCriticalEnergyMinimum(const G4Track &)
G4double ComputeCriticalEnergyMaximum(const G4Track &)
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeCriticalEnergyBent()

G4double ExExChProcessChanneling::ComputeCriticalEnergyBent ( const G4Track &  )
private
Here is the caller graph for this function:

◆ ComputeCriticalEnergyMaximum()

G4double ExExChProcessChanneling::ComputeCriticalEnergyMaximum ( const G4Track &  aTrack)
private

Definition at line 702 of file ExExChProcessChanneling.cc.

702  {
703  //----------------------------------------
704  // compute the critical energy
705  // for channeling
706  //----------------------------------------
707 
708  G4double vCriticalEnergy = 0.;
709 
710  if(ParticleIsNegative(aTrack)){
711  vCriticalEnergy =
712  - fPotentialEnergy->GetMinimum(GetXPL(aTrack));
713  }
714  else{
715  vCriticalEnergy =
716  + fPotentialEnergy->GetMaximum(GetXPL(aTrack));
717  }
718 
719  vCriticalEnergy *= std::fabs(GetParticleDefinition(aTrack)->GetPDGCharge());
720 
721  return vCriticalEnergy;
722 }
G4bool ParticleIsNegative(const G4Track &)
virtual G4double GetMinimum(XPhysicalLattice *)
G4ParticleDefinition * GetParticleDefinition(const G4Track &aTrack)
virtual G4double GetMaximum(XPhysicalLattice *)
XPhysicalLattice * GetXPL(const G4Track &)
double G4double
Definition: G4Types.hh:76
XVCrystalCharacteristic * fPotentialEnergy
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeCriticalEnergyMinimum()

G4double ExExChProcessChanneling::ComputeCriticalEnergyMinimum ( const G4Track &  aTrack)
private

Definition at line 727 of file ExExChProcessChanneling.cc.

727  {
728  //----------------------------------------
729  // compute the critical energy minimum
730  // for channeling
731  //----------------------------------------
732 
733  G4double vCriticalEnergy = 0.;
734 
735  if(ParticleIsNegative(aTrack)){
736  vCriticalEnergy =
737  - fPotentialEnergy->GetMaximum(GetXPL(aTrack));
738  }
739  else{
740  vCriticalEnergy =
741  + fPotentialEnergy->GetMinimum(GetXPL(aTrack));
742  }
743 
744  vCriticalEnergy *= std::fabs(GetParticleDefinition(aTrack)->GetPDGCharge());
745 
746  return vCriticalEnergy;
747 }
G4bool ParticleIsNegative(const G4Track &)
virtual G4double GetMinimum(XPhysicalLattice *)
G4ParticleDefinition * GetParticleDefinition(const G4Track &aTrack)
virtual G4double GetMaximum(XPhysicalLattice *)
XPhysicalLattice * GetXPL(const G4Track &)
double G4double
Definition: G4Types.hh:76
XVCrystalCharacteristic * fPotentialEnergy
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeCriticalEnergyMinimumBent()

G4double ExExChProcessChanneling::ComputeCriticalEnergyMinimumBent ( const G4Track &  )
private
Here is the caller graph for this function:

◆ ComputeCriticalRadius()

G4double ExExChProcessChanneling::ComputeCriticalRadius ( const G4Track &  aTrack)
private

Definition at line 786 of file ExExChProcessChanneling.cc.

786  {
787  //----------------------------------------
788  // compute the critical radius
789  // for channeling
790  //----------------------------------------
791 
792  G4double vTotalEnergy =
793  aTrack.GetStep()->GetPreStepPoint()->GetTotalEnergy();
794 
795  G4double vCriticalRadius = 1.E-20;
796  if(fElectricField->GetMaximum(GetXPL(aTrack)) != 0.){
797  vCriticalRadius = vTotalEnergy
798  / fElectricField->GetMaximum(GetXPL(aTrack));
799  }
800  return vCriticalRadius;
801 }
XVCrystalCharacteristic * fElectricField
virtual G4double GetMaximum(XPhysicalLattice *)
XPhysicalLattice * GetXPL(const G4Track &)
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeCrystalCharacteristic()

void ExExChProcessChanneling::ComputeCrystalCharacteristic ( const G4Track &  aTrack)
private

Definition at line 994 of file ExExChProcessChanneling.cc.

994  {
997 
998  if(fFileCharacteristicsName != ""){
999  G4String filename;
1004 
1005  filename = fFileCharacteristicsName + "_pot.txt";
1006  G4cout << filename << G4endl;
1008  fPotentialEnergy->PrintOnFile("temppot.dat",GetXPL(aTrack));
1009 
1010  filename = fFileCharacteristicsName + "_efx.txt";
1011  G4cout << filename << G4endl;
1013  fElectricField->PrintOnFile("tempefx.dat",GetXPL(aTrack));
1014 
1015  filename = fFileCharacteristicsName + "_atd.txt";
1016  G4cout << filename << G4endl;
1017  fNucleiDensity->ReadFromECHARM(filename);
1018 
1019  filename = fFileCharacteristicsName + "_eld.txt";
1020  G4cout << filename << G4endl;
1021  fElectronDensity->ReadFromECHARM(filename);
1023  }
1024  else{
1026  GetXPL(aTrack));
1028  }
1029 }
XVCrystalCharacteristic * fElectronDensity
static const double m
XCrystalIntegratedDensityHub * fIntegratedDensity
void SetXPhysicalLattice(XPhysicalLattice *)
G4GLOB_DLL std::ostream G4cout
XVCrystalCharacteristic * fNucleiDensity
virtual void PrintOnFile(const G4String &, XPhysicalLattice *, G4double=1)=0
XVCrystalCharacteristic * fElectricField
void InitializePhysicalLattice(XPhysicalLattice *)
XPhysicalLattice * GetXPL(const G4Track &)
#define G4endl
Definition: G4ios.hh:61
static const double eV
XVCrystalCharacteristic * fPotentialEnergy
virtual void ReadFromECHARM(const G4String &, G4double=1)=0
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeKineticEnergy()

G4ThreeVector ExExChProcessChanneling::ComputeKineticEnergy ( const G4Track &  aTrack)
private

Definition at line 585 of file ExExChProcessChanneling.cc.

585  {
586  //----------------------------------------
587  // compute the particle kinetic energy
588  // in the crystal reference system
589  //----------------------------------------
590 
591  G4double vTotalEnergy =
592  aTrack.GetStep()->GetPostStepPoint()->GetTotalEnergy();
593 
594  G4ThreeVector vMom = GetInfo(aTrack)->GetMomentumChanneled();
595 
596  G4ThreeVector vKineticEnergy = 0.5 *
597  G4ThreeVector((vMom.x() * vMom.x()) / vTotalEnergy,
598  0.,
599  (vMom.z() * vMom.z()) / vTotalEnergy);
600 
601  return vKineticEnergy;
602 }
CLHEP::Hep3Vector G4ThreeVector
double x() const
double z() const
ExExChParticleUserInfo * GetInfo(const G4Track &)
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeMomentum()

G4ThreeVector ExExChProcessChanneling::ComputeMomentum ( const G4Track &  aTrack,
G4StepPoint *  vStep 
)
private

Definition at line 656 of file ExExChProcessChanneling.cc.

656  {
657  //----------------------------------------
658  // compute the particle momentum
659  // in the crystal reference system
660  //----------------------------------------
661 
662  G4ThreeVector vPosition = ComputePositionInTheCrystal(vStep,aTrack);
663 
664  G4ThreeVector vMomentum = aTrack.GetMomentum();
665 
666  GetXPL(aTrack)->
667  ProjectMomentumVectorFromWorldToLattice(vMomentum,vPosition);
668 
669  return vMomentum;
670 }
XPhysicalLattice * GetXPL(const G4Track &)
G4ThreeVector ComputePositionInTheCrystal(G4StepPoint *, const G4Track &)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeOscillationPeriod()

G4double ExExChProcessChanneling::ComputeOscillationPeriod ( const G4Track &  aTrack)
private

Definition at line 770 of file ExExChProcessChanneling.cc.

770  {
771  //----------------------------------------
772  // compute the particle oscillation
773  // period in the crystal channel
774  //----------------------------------------
775 
776  G4double vInterplanarPeriod =
777  GetXPL(aTrack)->ComputeInterplanarPeriod();
778  G4double vOscillationPeriod =
779  CLHEP::pi * vInterplanarPeriod / ComputeCriticalAngle(aTrack);
780  return vOscillationPeriod;
781 }
static const double pi
Definition: SystemOfUnits.h:53
XPhysicalLattice * GetXPL(const G4Track &)
G4double ComputeCriticalAngle(const G4Track &)
double G4double
Definition: G4Types.hh:76
G4double ComputeInterplanarPeriod()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputePositionInTheCrystal()

G4ThreeVector ExExChProcessChanneling::ComputePositionInTheCrystal ( G4StepPoint *  vStep,
const G4Track &  aTrack 
)
private

Definition at line 341 of file ExExChProcessChanneling.cc.

341  {
342 
343  G4StepPoint* vStepVol = CheckStepPointLatticeForVolume(vStep,aTrack);
344  G4StepPoint* vStepPos = CheckStepPointLatticeForPosition(vStep,aTrack);
345 
346  G4TouchableHistory* theTouchable =
347  (G4TouchableHistory*)(vStepVol->GetTouchable());
348  G4ThreeVector vWorldPos = vStepPos->GetPosition();
349  G4ThreeVector vLocalPos =
350  theTouchable->GetHistory()->GetTopTransform().TransformPoint(vWorldPos);
351 
352 
353  if(GetXPL(aTrack)->IsBent() == false){
354  G4Box* vXtalSolid =
355  (G4Box*) vStepVol->GetPhysicalVolume()
356  ->GetLogicalVolume()->GetSolid();
357  vLocalPos += G4ThreeVector(vXtalSolid->GetXHalfLength(),
358  vXtalSolid->GetYHalfLength(),
359  vXtalSolid->GetZHalfLength());
360  }
361  else{
362  G4Tubs* vXtalSolid =
363  (G4Tubs*) vStepVol->GetPhysicalVolume()
364  ->GetLogicalVolume()->GetSolid();
365  vLocalPos.rotateZ(-vXtalSolid->GetStartPhiAngle());
366  }
367  return vLocalPos;
368 }
CLHEP::Hep3Vector G4ThreeVector
const G4NavigationHistory * GetHistory() const
Definition: G4Box.hh:64
G4ThreeVector TransformPoint(const G4ThreeVector &vec) const
Definition: G4Tubs.hh:85
G4double GetXHalfLength() const
G4StepPoint * CheckStepPointLatticeForVolume(G4StepPoint *, const G4Track &)
G4double GetZHalfLength() const
Hep3Vector & rotateZ(double)
Definition: ThreeVector.cc:110
G4StepPoint * CheckStepPointLatticeForPosition(G4StepPoint *, const G4Track &)
G4double GetYHalfLength() const
const G4AffineTransform & GetTopTransform() const
XPhysicalLattice * GetXPL(const G4Track &)
G4double GetStartPhiAngle() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputePotentialEnergy()

G4ThreeVector ExExChProcessChanneling::ComputePotentialEnergy ( const G4Track &  aTrack)
private

Definition at line 607 of file ExExChProcessChanneling.cc.

607  {
608  //----------------------------------------
609  // compute the particle transverse energy
610  // in the crystal reference system
611  //----------------------------------------
612 
613 
614  G4ThreeVector vPotentialEnergy =
615  fPotentialEnergy->GetEC(GetInfo(aTrack)->GetPositionChanneled(),
616  GetXPL(aTrack));
617 
618  vPotentialEnergy *= GetParticleDefinition(aTrack)->GetPDGCharge();
619 
620  return vPotentialEnergy;
621 }
G4ThreeVector GetEC(G4ThreeVector, XPhysicalLattice *)
G4ParticleDefinition * GetParticleDefinition(const G4Track &aTrack)
ExExChParticleUserInfo * GetInfo(const G4Track &)
XPhysicalLattice * GetXPL(const G4Track &)
G4double GetPDGCharge() const
XVCrystalCharacteristic * fPotentialEnergy
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputePotentialEnergyBent()

G4double ExExChProcessChanneling::ComputePotentialEnergyBent ( const G4Track &  )
private
Here is the caller graph for this function:

◆ ComputePotentialWellCentre()

G4ThreeVector ExExChProcessChanneling::ComputePotentialWellCentre ( const G4Track &  aTrack)
private

Definition at line 805 of file ExExChProcessChanneling.cc.

805  {
806  //----------------------------------------
807  // compute the central point of
808  // the potential well for channeling
809  //----------------------------------------
810 
811  G4double vInterplanarPeriodHalf =
812  0.5 * GetXPL(aTrack)->ComputeInterplanarPeriod();
813 
814  G4double vCentreX = vInterplanarPeriodHalf;
815 
816  if(GetXPL(aTrack)->IsBent()){
817  G4double vTotalEnergy =
818  aTrack.GetStep()->GetPreStepPoint()->GetTotalEnergy();
819 
820  G4double vPotentialWellDepth =
822  - (ComputeCriticalEnergyMinimum(aTrack));
823 
824  vCentreX *= (1. - 0.5 * vTotalEnergy /
825  vPotentialWellDepth /
826  GetXPL(aTrack)->GetCurvatureRadius().x() *
827  vInterplanarPeriodHalf );
828  }
829 
830  G4ThreeVector vCentre = G4ThreeVector(vCentreX,0.,0.);
831 
832 
833  return vCentre;
834 }
G4double ComputeCriticalEnergyMinimum(const G4Track &)
CLHEP::Hep3Vector G4ThreeVector
G4ThreeVector GetCurvatureRadius()
G4double ComputeCriticalEnergyMaximum(const G4Track &)
double x() const
XPhysicalLattice * GetXPL(const G4Track &)
double G4double
Definition: G4Types.hh:76
G4double ComputeInterplanarPeriod()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeTransverseEnergy()

G4ThreeVector ExExChProcessChanneling::ComputeTransverseEnergy ( const G4Track &  aTrack)
private

Definition at line 572 of file ExExChProcessChanneling.cc.

572  {
573  //----------------------------------------
574  // compute the particle transverse energy
575  // in the crystal reference system
576  //----------------------------------------
577 
578  G4ThreeVector vTransverseEnergy = ComputePotentialEnergy(aTrack)
579  + ComputeKineticEnergy(aTrack);
580  return vTransverseEnergy;
581 }
G4ThreeVector ComputeKineticEnergy(const G4Track &)
G4ThreeVector ComputePotentialEnergy(const G4Track &)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeTransverseEnergyBent()

G4ThreeVector ExExChProcessChanneling::ComputeTransverseEnergyBent ( const G4Track &  )
private
Here is the caller graph for this function:

◆ GetChannelingMeanFreePath()

G4double ExExChProcessChanneling::GetChannelingMeanFreePath ( const G4Track &  aTrack)
private

Definition at line 475 of file ExExChProcessChanneling.cc.

475  {
476  //----------------------------------------
477  // return the channeling MFP
478  //----------------------------------------
479 
480 
481  G4double vMFP = 0.1 * ComputeOscillationPeriod(aTrack);
482 
483  if(HasLatticeOnBoundaryPre(aTrack) == true){
484  vMFP = 0.001 * ComputeOscillationPeriod(aTrack);
485  }
486 
487  return vMFP;
488 }
G4bool HasLatticeOnBoundaryPre(const G4Track &)
G4double ComputeOscillationPeriod(const G4Track &)
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetElectricField()

XVCrystalCharacteristic * ExExChProcessChanneling::GetElectricField ( )

Definition at line 109 of file ExExChProcessChanneling.cc.

109  {
110  return fElectricField;
111 }
XVCrystalCharacteristic * fElectricField
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetElectronDensity()

XVCrystalCharacteristic * ExExChProcessChanneling::GetElectronDensity ( )

Definition at line 149 of file ExExChProcessChanneling.cc.

149  {
150  return fElectronDensity;
151 }
XVCrystalCharacteristic * fElectronDensity
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFileCharacteristicsName()

G4bool ExExChProcessChanneling::GetFileCharacteristicsName ( )
inline

Definition at line 99 of file ExExChProcessChanneling.hh.

Here is the call graph for this function:

◆ GetInfo()

ExExChParticleUserInfo * ExExChProcessChanneling::GetInfo ( const G4Track &  aTrack)
private

Definition at line 980 of file ExExChProcessChanneling.cc.

980  {
981  return (ExExChParticleUserInfo*) aTrack.GetUserInformation();
982 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetIntegratedDensity()

XCrystalIntegratedDensityHub * ExExChProcessChanneling::GetIntegratedDensity ( )

Definition at line 123 of file ExExChProcessChanneling.cc.

123  {
124  return fIntegratedDensity;
125 }
XCrystalIntegratedDensityHub * fIntegratedDensity
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetMeanFreePath()

G4double ExExChProcessChanneling::GetMeanFreePath ( const G4Track &  aTrack,
G4double  ,
G4ForceCondition *  condition 
)
protectedvirtual

Implements G4VDiscreteProcess.

Definition at line 493 of file ExExChProcessChanneling.cc.

495  {
496 
497  //----------------------------------------
498  // the condition is forced to check if
499  // the volume has a lattice at each step.
500  // if it hasn't, return DBL_MAX
501  //----------------------------------------
502 
503  *condition = Forced;
504 
505  if(HasLattice(aTrack)){
506  GetInfo(aTrack)->SetInTheCrystal(true);
507  return GetChannelingMeanFreePath(aTrack);
508  }
509  else{
510  GetInfo(aTrack)->SetInTheCrystal(false);
511  return DBL_MAX;
512  }
513 }
G4double condition(const G4ErrorSymMatrix &m)
G4bool HasLattice(const G4Track &)
G4double GetChannelingMeanFreePath(const G4Track &)
ExExChParticleUserInfo * GetInfo(const G4Track &)
#define DBL_MAX
Definition: templates.hh:83
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNucleiDensity()

XVCrystalCharacteristic * ExExChProcessChanneling::GetNucleiDensity ( )

Definition at line 136 of file ExExChProcessChanneling.cc.

136  {
137  return fNucleiDensity;
138 }
XVCrystalCharacteristic * fNucleiDensity
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetParticleDefinition()

G4ParticleDefinition * ExExChProcessChanneling::GetParticleDefinition ( const G4Track &  aTrack)
private

Definition at line 987 of file ExExChProcessChanneling.cc.

987  {
988  return const_cast<G4ParticleDefinition*>(aTrack.GetParticleDefinition());
989 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPotential()

XVCrystalCharacteristic * ExExChProcessChanneling::GetPotential ( )

Definition at line 96 of file ExExChProcessChanneling.cc.

96  {
97  return fPotentialEnergy;
98 }
XVCrystalCharacteristic * fPotentialEnergy
Here is the call graph for this function:

◆ GetTimeStepMin()

G4double ExExChProcessChanneling::GetTimeStepMin ( )
inline

Definition at line 92 of file ExExChProcessChanneling.hh.

◆ GetTransverseVariationMax()

G4double ExExChProcessChanneling::GetTransverseVariationMax ( )
inline

Definition at line 84 of file ExExChProcessChanneling.hh.

84  {
86  };

◆ GetVolume()

G4VPhysicalVolume* ExExChProcessChanneling::GetVolume ( const G4Track &  )
private
Here is the caller graph for this function:

◆ GetXPL()

XPhysicalLattice * ExExChProcessChanneling::GetXPL ( const G4Track &  aTrack)
private

Definition at line 856 of file ExExChProcessChanneling.cc.

856  {
858  aTrack.GetStep()->GetPostStepPoint()->GetPhysicalVolume())){
859  return fLatticeManager->GetXPhysicalLattice(aTrack.GetStep()
860  ->GetPostStepPoint()->GetPhysicalVolume());
861  }
862  else if(fLatticeManager->HasLattice(aTrack.GetStep()->GetPreStepPoint()
863  ->GetPhysicalVolume()) &&
864  aTrack.GetStep()->GetPostStepPoint()->GetStepStatus()
865  == fGeomBoundary) {
866  return fLatticeManager->GetXPhysicalLattice(aTrack.GetStep()
867  ->GetPreStepPoint()->GetPhysicalVolume());
868  }
869  else{
870  G4cout << "LATTICE NOT FOUND: ERROR" << G4endl;
871  return NULL;
872  }
873 }
G4GLOB_DLL std::ostream G4cout
XPhysicalLattice * GetXPhysicalLattice(G4VPhysicalVolume *)
#define G4endl
Definition: G4ios.hh:61
bool HasLattice(G4VPhysicalVolume *)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasLattice()

G4bool ExExChProcessChanneling::HasLattice ( const G4Track &  aTrack)
private

Definition at line 877 of file ExExChProcessChanneling.cc.

877  {
878  if(fLatticeManager->HasLattice(aTrack.GetStep()
879  ->GetPostStepPoint()->GetPhysicalVolume())){
880  return true;
881  }
882  else{
883  return false;
884  }
885 }
bool HasLattice(G4VPhysicalVolume *)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasLatticeOnBoundary()

G4bool ExExChProcessChanneling::HasLatticeOnBoundary ( const G4Track &  aTrack)
private

Definition at line 890 of file ExExChProcessChanneling.cc.

890  {
891  if(HasLatticeOnBoundaryPost(aTrack) || HasLatticeOnBoundaryPre(aTrack)) {
892  return true;
893  }
894  else{
895  return false;
896  }
897 }
G4bool HasLatticeOnBoundaryPre(const G4Track &)
G4bool HasLatticeOnBoundaryPost(const G4Track &)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasLatticeOnBoundaryPost()

G4bool ExExChProcessChanneling::HasLatticeOnBoundaryPost ( const G4Track &  aTrack)
private

Definition at line 916 of file ExExChProcessChanneling.cc.

916  {
917  if(fLatticeManager->HasLattice(aTrack.GetStep()->
918  GetPostStepPoint()->GetPhysicalVolume()) &&
919  aTrack.GetStep()->GetPostStepPoint()->GetStepStatus() == fGeomBoundary) {
920  return true;
921  }
922  else{
923  return false;
924  }
925 }
bool HasLattice(G4VPhysicalVolume *)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasLatticeOnBoundaryPre()

G4bool ExExChProcessChanneling::HasLatticeOnBoundaryPre ( const G4Track &  aTrack)
private

Definition at line 902 of file ExExChProcessChanneling.cc.

902  {
903  if(fLatticeManager->HasLattice(aTrack.GetStep()->GetPreStepPoint()->
904  GetPhysicalVolume()) &&
905  aTrack.GetStep()->GetPreStepPoint()->GetStepStatus() == fGeomBoundary) {
906  return true;
907  }
908  else{
909  return false;
910  }
911 }
bool HasLattice(G4VPhysicalVolume *)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsApplicable()

G4bool ExExChProcessChanneling::IsApplicable ( const G4ParticleDefinition aPD)
virtual

Reimplemented from G4VProcess.

Definition at line 842 of file ExExChProcessChanneling.cc.

842  {
843  return(aPD.GetPDGCharge() != 0.);
844 }
G4double GetPDGCharge() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

ExExChProcessChanneling& ExExChProcessChanneling::operator= ( const ExExChProcessChanneling right)
private
Here is the caller graph for this function:

◆ ParticleIsNegative()

G4bool ExExChProcessChanneling::ParticleIsNegative ( const G4Track &  aTrack)
private

Definition at line 929 of file ExExChProcessChanneling.cc.

929  {
930  if(GetParticleDefinition(aTrack)->GetPDGCharge() < 0.) {
931  return true;
932  }
933  else{
934  return false;
935  }
936 }
G4ParticleDefinition * GetParticleDefinition(const G4Track &aTrack)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParticleIsNotOnBoundary()

G4bool ExExChProcessChanneling::ParticleIsNotOnBoundary ( const G4Track &  aTrack)
private

Definition at line 967 of file ExExChProcessChanneling.cc.

967  {
968  if(ParticleIsNotOnBoundaryPost(aTrack) ||
970  return true;
971  }
972  else{
973  return false;
974  }
975 }
G4bool ParticleIsNotOnBoundaryPost(const G4Track &)
G4bool ParticleIsNotOnBoundaryPre(const G4Track &)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParticleIsNotOnBoundaryPost()

G4bool ExExChProcessChanneling::ParticleIsNotOnBoundaryPost ( const G4Track &  aTrack)
private

Definition at line 955 of file ExExChProcessChanneling.cc.

955  {
956  if(aTrack.GetStep()->GetPostStepPoint()->GetStepStatus() != fGeomBoundary){
957  return true;
958  }
959  else{
960  return false;
961  }
962 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParticleIsNotOnBoundaryPre()

G4bool ExExChProcessChanneling::ParticleIsNotOnBoundaryPre ( const G4Track &  aTrack)
private

Definition at line 943 of file ExExChProcessChanneling.cc.

943  {
944  if(aTrack.GetStep()->GetPreStepPoint()->GetStepStatus() != fGeomBoundary){
945  return true;
946  }
947  else{
948  return false;
949  }
950 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PostStepDoIt()

G4VParticleChange * ExExChProcessChanneling::PostStepDoIt ( const G4Track &  aTrack,
const G4Step &   
)
virtual

Reimplemented from G4VDiscreteProcess.

Definition at line 518 of file ExExChProcessChanneling.cc.

519  {
520 
521  //----------------------------------------
522  // check if the volume has a lattice
523  // and if the particle is in channeling.
524  // If it is so, the particle is forced
525  // to follow the channeling plane
526  // direction. If the particle has
527  // dechanneled or exited the crystal,
528  // the outgoing angle is evaluated
529  //----------------------------------------
530 
531  aParticleChange.Initialize(aTrack);
532 
534 
535  if((HasLattice(aTrack) == true) &&
536  (HasLatticeOnBoundaryPost(aTrack) == false)){
537  UpdateParameters(aTrack);
538 
539  G4ThreeVector vMomentum =
540  GetInfo(aTrack)->GetMomentumChanneled().unit();
541 
542  G4ThreeVector vPosition;
543  vPosition =
544  ComputePositionInTheCrystal(aTrack.GetStep()->GetPostStepPoint(),
545  aTrack);
546 
548  vPosition);
549 
550  aParticleChange.ProposeMomentumDirection(vMomentum.unit());
551  }
552  else{
553  // if the volume has no lattice it resets the density factors
554  ResetDensity(aTrack);
556  DBL_MAX,
557  DBL_MAX));
558 
560  DBL_MAX,
561  DBL_MAX));
562  }
563 
564  return &aParticleChange;
565 }
G4bool HasLattice(const G4Track &)
CLHEP::Hep3Vector G4ThreeVector
void SetMomentumChanneled(G4ThreeVector)
void SetPositionChanneled(G4ThreeVector)
Hep3Vector unit() const
G4ThreeVector ProjectMomentumVectorFromLatticeToWorld(G4ThreeVector &, G4ThreeVector &)
void UpdateParameters(const G4Track &)
G4bool HasLatticeOnBoundaryPost(const G4Track &)
G4ParticleChange aParticleChange
Definition: G4VProcess.hh:289
ExExChParticleUserInfo * GetInfo(const G4Track &)
XPhysicalLattice * GetXPL(const G4Track &)
G4ThreeVector ComputePositionInTheCrystal(G4StepPoint *, const G4Track &)
#define DBL_MAX
Definition: templates.hh:83
void ResetDensity(const G4Track &)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadFromFileCharacteristics()

void ExExChProcessChanneling::ReadFromFileCharacteristics ( G4bool  )
Here is the caller graph for this function:

◆ ResetDensity()

void ExExChProcessChanneling::ResetDensity ( const G4Track &  aTrack)
private

Definition at line 330 of file ExExChProcessChanneling.cc.

330  {
331  GetInfo(aTrack)->SetNucleiDensity(1.);
332  GetInfo(aTrack)->SetElectronDensity(1.);
333 }
ExExChParticleUserInfo * GetInfo(const G4Track &)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetElectricField()

void ExExChProcessChanneling::SetElectricField ( XVCrystalCharacteristic vElectricField)

Definition at line 116 of file ExExChProcessChanneling.cc.

116  {
117  fElectricField = vElectricField;
118 }
XVCrystalCharacteristic * fElectricField
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetElectronDensity()

void ExExChProcessChanneling::SetElectronDensity ( XVCrystalCharacteristic vElectronDensity)

Definition at line 156 of file ExExChProcessChanneling.cc.

156  {
157  fElectronDensity = vElectronDensity;
158 }
XVCrystalCharacteristic * fElectronDensity
Here is the caller graph for this function:

◆ SetFileCharacteristicsName()

void ExExChProcessChanneling::SetFileCharacteristicsName ( const G4String vFilename)
inline

Definition at line 97 of file ExExChProcessChanneling.hh.

Here is the caller graph for this function:

◆ SetIntegratedDensity()

void ExExChProcessChanneling::SetIntegratedDensity ( XCrystalIntegratedDensityHub vIntegratedDensity)

Definition at line 130 of file ExExChProcessChanneling.cc.

130  {
131  fIntegratedDensity = vIntegratedDensity;
132 }
XCrystalIntegratedDensityHub * fIntegratedDensity
Here is the caller graph for this function:

◆ SetNucleiDensity()

void ExExChProcessChanneling::SetNucleiDensity ( XVCrystalCharacteristic vNucleiDensity)

Definition at line 143 of file ExExChProcessChanneling.cc.

143  {
144  fNucleiDensity = vNucleiDensity;
145 }
XVCrystalCharacteristic * fNucleiDensity
Here is the caller graph for this function:

◆ SetPotential()

void ExExChProcessChanneling::SetPotential ( XVCrystalCharacteristic vPotential)

Definition at line 103 of file ExExChProcessChanneling.cc.

103  {
104  fPotentialEnergy = vPotential;
105 }
XVCrystalCharacteristic * fPotentialEnergy
Here is the caller graph for this function:

◆ SetTimeStepMin()

void ExExChProcessChanneling::SetTimeStepMin ( G4double  aDouble)
inline

Definition at line 93 of file ExExChProcessChanneling.hh.

93 {fTimeStepMin = aDouble;};
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetTransverseVariationMax()

void ExExChProcessChanneling::SetTransverseVariationMax ( G4double  aDouble)
inline

Definition at line 88 of file ExExChProcessChanneling.hh.

88  {
89  fTransverseVariationMax = aDouble;
90  };
Here is the caller graph for this function:

◆ UpdateInitialParameters()

G4bool ExExChProcessChanneling::UpdateInitialParameters ( const G4Track &  aTrack)
private

Definition at line 162 of file ExExChProcessChanneling.cc.

162  {
163 
164  if(GetInfo(aTrack)->GetPositionChanneled().x() == DBL_MAX){
165  // when the particle enters the crystal the position in the channel
166  //is randomly generated using a uniform distribution
167  G4double vXposition = G4UniformRand() *
168  GetXPL(aTrack)->ComputeInterplanarPeriod();
169 
170  //vXposition = 1.0 * CLHEP::angstrom;
171 
172  //initial position in the channel is stored
173  GetInfo(aTrack)->SetPositionChanneled(G4ThreeVector(vXposition,
174  0.,
175  0.));
177  0.,
178  0.));
179  }
180 
181  if(GetInfo(aTrack)->GetMomentumChanneledInitial().x() == DBL_MAX){
182  // the first time it enter the crystal we take the momentum
183  // for the post step which is the only one in the crystal
184  G4ThreeVector vMomentum =
185  ComputeMomentum(aTrack,aTrack.GetStep()->GetPostStepPoint());
186 
187  GetInfo(aTrack)->SetMomentumChanneled(vMomentum);
188  GetInfo(aTrack)->SetMomentumChanneledInitial(vMomentum);
189  return true;
190  }
191 
192  return false;
193 }
void SetMomentumChanneledInitial(G4ThreeVector)
CLHEP::Hep3Vector G4ThreeVector
G4ThreeVector ComputeMomentum(const G4Track &, G4StepPoint *)
void SetMomentumChanneled(G4ThreeVector)
#define G4UniformRand()
Definition: Randomize.hh:97
void SetPositionChanneled(G4ThreeVector)
ExExChParticleUserInfo * GetInfo(const G4Track &)
XPhysicalLattice * GetXPL(const G4Track &)
double G4double
Definition: G4Types.hh:76
#define DBL_MAX
Definition: templates.hh:83
G4double ComputeInterplanarPeriod()
void SetPositionChanneledInitial(G4ThreeVector)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateIntegrationStep()

G4bool ExExChProcessChanneling::UpdateIntegrationStep ( const G4Track &  aTrack,
G4ThreeVector vMom 
)
private

Definition at line 437 of file ExExChProcessChanneling.cc.

437  {
438 
439  if(vMom.x() != 0.0 || vMom.y() != 0.0){
440  double xy2 = vMom.x() * vMom.x() + vMom.y()*vMom.y();
441 
442  if(xy2!=0.){
443  fTimeStep =
444  std::fabs(fTransverseVariationMax *
445  aTrack.GetStep()->GetPreStepPoint()->GetTotalEnergy() /
446  std::pow(xy2,0.5));
448  else{
450  aTrack.GetStep()->GetPreStepPoint()->GetTotalEnergy() /
451  std::fabs(fElectricField->GetMaximum(GetXPL(aTrack))));
452 
454  }
455  }
456  else{
458  }
459 
462  }
463 
464  return true;
465  }
466  else{
468  }
469  return false;
470 }
XVCrystalCharacteristic * fElectricField
double x() const
virtual G4double GetMaximum(XPhysicalLattice *)
double y() const
XPhysicalLattice * GetXPL(const G4Track &)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateParameters()

void ExExChProcessChanneling::UpdateParameters ( const G4Track &  aTrack)
private

Definition at line 196 of file ExExChProcessChanneling.cc.

196  {
197 
199  == false){
201  G4cout << "ChannelingProcess::UpdatePositionMomentumDensity::";
202  G4cout<<"fIntegratedDensity->Initialized" << G4endl;
203  }
204 
205  if(UpdateInitialParameters(aTrack) == false){
206  G4ThreeVector vMomentumNew =
207  ComputeMomentum(aTrack,
208  aTrack.GetStep()->GetPreStepPoint());
209  GetInfo(aTrack)->SetMomentumChanneled(vMomentumNew);
210  }
211  G4ThreeVector vPositionPost =
212  ComputePositionInTheCrystal(aTrack.GetStep()->GetPostStepPoint(),aTrack);
213  G4ThreeVector vPositionPre =
214  ComputePositionInTheCrystal(aTrack.GetStep()->GetPreStepPoint(),aTrack);
215 
217 
218  if(vPositionPost.y() == bPointYPost &&
219  vPositionPre.y() == bPointYPre){
220  bHasToComputeTrajectory = false;
221  }
222  else{
223  if(GetXPL(aTrack)->IsBent()){
224  bPointYPre = vPositionPre.y();
225  bPointYPost = vPositionPost.y();
226  }
227  else{
228  bPointYPre = vPositionPre.z();
229  bPointYPost = vPositionPost.z();
230  }
231  }
232 
233  G4ThreeVector fMom = GetInfo(aTrack)->GetMomentumChanneled();
234  G4ThreeVector fPos = GetInfo(aTrack)->GetPositionChanneled();
235  G4ThreeVector fMomHalf = GetInfo(aTrack)->GetMomentumChanneled();
236  G4ThreeVector fPosHalf = GetInfo(aTrack)->GetPositionChanneled();
237 
238  if(GetXPL(aTrack)->IsBent()){
239  fIntegrationPeriod = (vPositionPost.phi() - vPositionPre.phi())*
240  GetXPL(aTrack)->GetCurvatureRadius().x();
241  fIntegrationPeriod = vPositionPost.y() - vPositionPre.y();
242  }
243  else{
244  fIntegrationPeriod = vPositionPost.z() - vPositionPre.z();
245  }
246 
247  fTimeStepTotal = 0.;
248 
249  G4double vNucleiDensity=0.;
250  G4double vElectronDensity=0.;
251 
252  if(fIntegrationPeriod>0. && bHasToComputeTrajectory==true){
253  G4double kBeta = 0.;
254  G4double kPos = 0.;
255  G4double kMom = 0.;
256  G4double kBR = 0.;
257  G4double Z = 0.;
258  do{
259  UpdateIntegrationStep(aTrack,fMom);
260 
261  fPosHalf = fPos;
262  fMomHalf = fMom;
263 
264  kBeta = aTrack.GetVelocity()/c_light;
265  if(fMom.z()!=0.){
266  kPos = fTimeStep / fMom.z();
267  }
268  else{
269  kPos = fTimeStep / 1.E-20;
270  }
271  kMom = fTimeStep / kBeta;
272  kBR = fTimeStep * (fMom.z() * kBeta);;
273  Z = GetParticleDefinition(aTrack)->GetPDGCharge();
274 
275  fPosHalf += (fMom * kPos * 0.5);
276  fMomHalf +=
277  (GetElectricField()->GetEC(fPos,GetXPL(aTrack))
278  * Z * kMom * 0.5);
279 
280  if(GetXPL(aTrack)->IsBent()){
281  G4double temp =
282  fMomHalf.x() + kBR * 0.5 /
283  (GetXPL(aTrack)->GetCurvatureRadius()).x();
284  fMomHalf.setX(temp);
285  }
286 
287  fPos += (fMomHalf * kPos);
288  fMom +=
289  (GetElectricField()->GetEC(fPosHalf,GetXPL(aTrack))
290  * Z * kMom );
291 
292  if(GetXPL(aTrack)->IsBent()){
293  G4double temp =
294  fMom.x() + kBR /
295  (GetXPL(aTrack)->GetCurvatureRadius()).x();
296  fMom.setX(temp);
297  }
298 
300 
301  vNucleiDensity +=
302  (fTimeStep *
303  (GetNucleiDensity()->GetEC(fPos,GetXPL(aTrack)).x()
304  +GetNucleiDensity()->GetEC(fPos,GetXPL(aTrack)).x()
305  ) * 0.5);
306  vElectronDensity +=
307  (fTimeStep * (
308  GetElectronDensity()->GetEC(fPos,GetXPL(aTrack)).x() +
309  GetElectronDensity()->GetEC(fPos,GetXPL(aTrack)).x()) * 0.5);
310 
311 
313 
314  vNucleiDensity /= fIntegrationPeriod;
315  vElectronDensity /= fIntegrationPeriod;
316  GetInfo(aTrack)->SetNucleiDensity(vNucleiDensity);
317  GetInfo(aTrack)->SetElectronDensity(vElectronDensity);
318  }
319  else{
320  ResetDensity(aTrack);
321  }
322 
323  GetInfo(aTrack)->SetMomentumChanneled(fMom);
324  GetInfo(aTrack)->SetPositionChanneled(fPos);
325 
326 }
double phi() const
XVCrystalCharacteristic * GetNucleiDensity()
G4ThreeVector ComputeMomentum(const G4Track &, G4StepPoint *)
G4ThreeVector GetCurvatureRadius()
void setX(double)
XCrystalIntegratedDensityHub * fIntegratedDensity
G4bool HasBeenInitialized(XPhysicalLattice *)
void SetMomentumChanneled(G4ThreeVector)
G4GLOB_DLL std::ostream G4cout
XVCrystalCharacteristic * GetElectronDensity()
Float_t Z
void SetPositionChanneled(G4ThreeVector)
XVCrystalCharacteristic * GetElectricField()
double x() const
G4ThreeVector GetEC(G4ThreeVector, XPhysicalLattice *)
G4bool UpdateInitialParameters(const G4Track &)
G4ParticleDefinition * GetParticleDefinition(const G4Track &aTrack)
double y() const
double z() const
G4bool UpdateIntegrationStep(const G4Track &, G4ThreeVector &)
ExExChParticleUserInfo * GetInfo(const G4Track &)
XPhysicalLattice * GetXPL(const G4Track &)
G4ThreeVector ComputePositionInTheCrystal(G4StepPoint *, const G4Track &)
#define G4endl
Definition: G4ios.hh:61
void ComputeCrystalCharacteristic(const G4Track &)
double G4double
Definition: G4Types.hh:76
void ResetDensity(const G4Track &)
G4double GetPDGCharge() const
float c_light
Definition: hepunit.py:257
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ bHasToComputeTrajectory

G4bool ExExChProcessChanneling::bHasToComputeTrajectory
private

Definition at line 173 of file ExExChProcessChanneling.hh.

◆ bPointYPost

G4double ExExChProcessChanneling::bPointYPost
private

Definition at line 174 of file ExExChProcessChanneling.hh.

◆ bPointYPre

G4double ExExChProcessChanneling::bPointYPre
private

Definition at line 175 of file ExExChProcessChanneling.hh.

◆ fElectricField

XVCrystalCharacteristic* ExExChProcessChanneling::fElectricField
private

Definition at line 158 of file ExExChProcessChanneling.hh.

◆ fElectronDensity

XVCrystalCharacteristic* ExExChProcessChanneling::fElectronDensity
private

Definition at line 162 of file ExExChProcessChanneling.hh.

◆ fFileCharacteristicsName

G4String ExExChProcessChanneling::fFileCharacteristicsName
private

Definition at line 164 of file ExExChProcessChanneling.hh.

◆ fIntegratedDensity

XCrystalIntegratedDensityHub* ExExChProcessChanneling::fIntegratedDensity
private

Definition at line 159 of file ExExChProcessChanneling.hh.

◆ fIntegrationPeriod

G4double ExExChProcessChanneling::fIntegrationPeriod
private

Definition at line 178 of file ExExChProcessChanneling.hh.

◆ fLatticeManager

XLatticeManager3* ExExChProcessChanneling::fLatticeManager
private

Definition at line 155 of file ExExChProcessChanneling.hh.

◆ fNucleiDensity

XVCrystalCharacteristic* ExExChProcessChanneling::fNucleiDensity
private

Definition at line 161 of file ExExChProcessChanneling.hh.

◆ fPotentialEnergy

XVCrystalCharacteristic* ExExChProcessChanneling::fPotentialEnergy
private

Definition at line 157 of file ExExChProcessChanneling.hh.

◆ fTimeStep

G4double ExExChProcessChanneling::fTimeStep
private

Definition at line 168 of file ExExChProcessChanneling.hh.

◆ fTimeStepMax

G4double ExExChProcessChanneling::fTimeStepMax
private

Definition at line 170 of file ExExChProcessChanneling.hh.

◆ fTimeStepMin

G4double ExExChProcessChanneling::fTimeStepMin
private

Definition at line 169 of file ExExChProcessChanneling.hh.

◆ fTimeStepTotal

G4double ExExChProcessChanneling::fTimeStepTotal
private

Definition at line 171 of file ExExChProcessChanneling.hh.

◆ fTransverseVariationMax

G4double ExExChProcessChanneling::fTransverseVariationMax
private

Definition at line 177 of file ExExChProcessChanneling.hh.


The documentation for this class was generated from the following files: