File indexing completed on 2025-01-31 09:21:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044 #ifndef CEXMC_PHYSICS_MANAGER_HH
0045 #define CEXMC_PHYSICS_MANAGER_HH
0046
0047 #include <G4Types.hh>
0048 #include <G4ThreeVector.hh>
0049
0050 class G4ParticleDefinition;
0051 class G4Track;
0052 class G4StepPoint;
0053 class CexmcProductionModel;
0054 class CexmcSetup;
0055 class CexmcPhysicsManagerMessenger;
0056
0057
0058 class CexmcPhysicsManager
0059 {
0060 public:
0061 CexmcPhysicsManager();
0062
0063 virtual ~CexmcPhysicsManager();
0064
0065 public:
0066 virtual CexmcProductionModel * GetProductionModel( void ) = 0;
0067
0068 virtual G4bool IsStudiedProcessAllowed( void ) const = 0;
0069
0070 virtual void ResampleTrackLengthInTarget( const G4Track * track,
0071 const G4StepPoint * stepPoint = NULL ) = 0;
0072
0073 virtual void SetupConstructionHook( const CexmcSetup * setup ) = 0;
0074
0075 public:
0076 G4bool OnlyBeamParticleCanTriggerStudiedProcess( void ) const;
0077
0078 void IncrementNumberOfTriggeredStudiedInteractions( void );
0079
0080 void ResetNumberOfTriggeredStudiedInteractions( void );
0081
0082 G4double GetProposedMaxIL( void ) const;
0083
0084 void SetMaxIL( const G4ThreeVector & direction );
0085
0086 void SetMaxILCorrection( G4double value );
0087
0088 void SetProposedMaxIL( G4double value );
0089
0090 protected:
0091 virtual void CalculateBasicMaxIL(
0092 const G4ThreeVector & direction ) = 0;
0093
0094 protected:
0095 G4double basicMaxIL;
0096
0097 G4double maxILCorrection;
0098
0099 G4double proposedMaxIL;
0100
0101 G4int numberOfTriggeredStudiedInteractions;
0102
0103 G4bool onlyBeamParticleCanTriggerStudiedProcess;
0104
0105 private:
0106 CexmcPhysicsManagerMessenger * messenger;
0107 };
0108
0109
0110 inline G4bool CexmcPhysicsManager::OnlyBeamParticleCanTriggerStudiedProcess(
0111 void ) const
0112 {
0113 return onlyBeamParticleCanTriggerStudiedProcess;
0114 }
0115
0116
0117 inline void CexmcPhysicsManager::IncrementNumberOfTriggeredStudiedInteractions(
0118 void )
0119 {
0120 ++numberOfTriggeredStudiedInteractions;
0121 }
0122
0123
0124 inline void CexmcPhysicsManager::ResetNumberOfTriggeredStudiedInteractions(
0125 void )
0126 {
0127 numberOfTriggeredStudiedInteractions = 0;
0128 }
0129
0130
0131 inline G4double CexmcPhysicsManager::GetProposedMaxIL( void ) const
0132 {
0133 return proposedMaxIL;
0134 }
0135
0136
0137 inline void CexmcPhysicsManager::SetMaxIL( const G4ThreeVector & direction )
0138 {
0139 CalculateBasicMaxIL( direction );
0140 proposedMaxIL = basicMaxIL + maxILCorrection;
0141 }
0142
0143
0144 inline void CexmcPhysicsManager::SetMaxILCorrection( G4double value )
0145 {
0146 maxILCorrection = value;
0147 proposedMaxIL = basicMaxIL + maxILCorrection;
0148 }
0149
0150
0151 inline void CexmcPhysicsManager::SetProposedMaxIL( G4double value )
0152 {
0153 proposedMaxIL = value;
0154 }
0155
0156
0157 #endif
0158