Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-15 08:58:33

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 // -------------------------------------------------------------------
0027 //
0028 // GEANT4 Class header file
0029 //
0030 // File name:     G4EmParameters
0031 //
0032 // Author:        Vladimir Ivanchenko for migration to MT
0033 //                  
0034 //
0035 // Creation date: 17.05.2013
0036 //
0037 // Modifications:
0038 //
0039 //
0040 // Class Description:
0041 //
0042 // A utility static class, responsable for keeping parameters
0043 // for all EM physics processes and models.
0044 //
0045 // It is initialized by the master thread but can be updated 
0046 // at any moment. Parameters may be used in run time or at 
0047 // initialisation
0048 //
0049 // -------------------------------------------------------------------
0050 //
0051 
0052 #ifndef G4EmParameters_h
0053 #define G4EmParameters_h 1
0054 
0055 #include "globals.hh"
0056 #include "G4ios.hh"
0057 #include "G4MscStepLimitType.hh"
0058 #include "G4NuclearFormfactorType.hh"
0059 #include "G4DNAModelSubType.hh"
0060 #include "G4EmFluoDirectory.hh"
0061 #include "G4EmSaturation.hh"
0062 #include "G4ThreeVector.hh"
0063 #include "G4ChemTimeStepModel.hh"
0064 #include <vector>
0065 #include <map>
0066 enum G4eSingleScatteringType
0067 {
0068   fWVI = 0,
0069   fMott,
0070   fDPWA
0071 };
0072 
0073 enum class G4TransportationWithMscType
0074 {
0075   fDisabled = 0,
0076   fEnabled,
0077   fMultipleSteps,
0078 };
0079 
0080 enum G4EmFluctuationType 
0081 {
0082   fDummyFluctuation = 0,
0083   fUniversalFluctuation,
0084   fUrbanFluctuation
0085 };
0086 
0087 enum G4PositronAtRestModelType 
0088 {
0089   fSimplePositronium = 0,
0090   fAllisonPositronium,
0091   fOrePowell,
0092   fOrePowellPolar
0093 };
0094 
0095 class G4EmParametersMessenger;
0096 class G4EmExtraParameters;
0097 class G4EmLowEParameters;
0098 class G4VAtomDeexcitation;
0099 class G4VEnergyLossProcess;
0100 class G4VEmProcess;
0101 class G4StateManager;
0102 
0103 class G4EmParameters
0104 {
0105 public:
0106 
0107   static G4EmParameters* Instance();
0108 
0109   ~G4EmParameters();
0110 
0111   void SetDefaults();
0112 
0113   // printing
0114   void StreamInfo(std::ostream& os) const;
0115   void Dump();
0116   friend std::ostream& operator<< (std::ostream& os, const G4EmParameters&);
0117 
0118   // boolean flags
0119   void SetLossFluctuations(G4bool val);
0120   G4bool LossFluctuation() const;
0121 
0122   void SetBuildCSDARange(G4bool val);
0123   G4bool BuildCSDARange() const;
0124 
0125   void SetLPM(G4bool val);
0126   G4bool LPM() const;
0127 
0128   void SetUseCutAsFinalRange(G4bool val);
0129   G4bool UseCutAsFinalRange() const;
0130 
0131   void SetApplyCuts(G4bool val);
0132   G4bool ApplyCuts() const;
0133 
0134   void SetFluo(G4bool val);
0135   G4bool Fluo() const;
0136 
0137   G4EmFluoDirectory FluoDirectory() const;
0138 
0139   void SetFluoDirectory(G4EmFluoDirectory);
0140   void SetBeardenFluoDir(G4bool val);
0141   void SetANSTOFluoDir(G4bool val);
0142   void SetXDB_EADLFluoDir(G4bool val);
0143 
0144   G4bool BeardenFluoDir();
0145   G4bool ANSTOFluoDir();
0146 
0147   void SetAuger(G4bool val);
0148   void SetAugerCascade(G4bool val) { SetAuger(val); };
0149   G4bool Auger() const;
0150   G4bool AugerCascade() const { return Auger(); }
0151 
0152   void SetPixe(G4bool val);
0153   G4bool Pixe() const;
0154 
0155   void SetDeexcitationIgnoreCut(G4bool val);
0156   G4bool DeexcitationIgnoreCut() const;
0157 
0158   void SetLateralDisplacement(G4bool val);
0159   G4bool LateralDisplacement() const;
0160 
0161   void SetLateralDisplacementAlg96(G4bool val);
0162   G4bool LateralDisplacementAlg96() const;
0163 
0164   void SetMuHadLateralDisplacement(G4bool val);
0165   G4bool MuHadLateralDisplacement() const;
0166 
0167   void ActivateAngularGeneratorForIonisation(G4bool val);
0168   G4bool UseAngularGeneratorForIonisation() const;
0169 
0170   void SetUseMottCorrection(G4bool val);
0171   G4bool UseMottCorrection() const;
0172 
0173   void SetIntegral(G4bool val);
0174   G4bool Integral() const;
0175 
0176   void SetBirksActive(G4bool val);
0177   G4bool BirksActive() const;
0178 
0179   void SetUseICRU90Data(G4bool val);
0180   G4bool UseICRU90Data() const;
0181 
0182   void SetFluctuationType(G4EmFluctuationType val);
0183   G4EmFluctuationType FluctuationType() const;
0184 
0185   void SetPositronAtRestModelType(G4PositronAtRestModelType val);
0186   G4PositronAtRestModelType PositronAtRestModelType() const;
0187 
0188   void SetDNAFast(G4bool val);
0189   G4bool DNAFast() const;
0190 
0191   void SetDNAStationary(G4bool val);
0192   G4bool DNAStationary() const;
0193 
0194   void SetDNAElectronMsc(G4bool val);
0195   G4bool DNAElectronMsc() const;
0196 
0197   // if general interaction is enabled then 
0198   // force interaction options should be disabled
0199   void SetGeneralProcessActive(G4bool val);
0200   G4bool GeneralProcessActive() const;
0201 
0202   void SetEnableSamplingTable(G4bool val);
0203   G4bool EnableSamplingTable() const;
0204 
0205   void SetEnablePolarisation(G4bool val);
0206   G4bool EnablePolarisation() const;
0207 
0208   G4bool GetDirectionalSplitting() const;
0209   void SetDirectionalSplitting(G4bool v);
0210 
0211   G4bool QuantumEntanglement() const;
0212   void SetQuantumEntanglement(G4bool v);
0213 
0214   G4bool RetrieveMuDataFromFile() const;
0215   void SetRetrieveMuDataFromFile(G4bool v);
0216 
0217   G4bool PhotoeffectBelowKShell() const;
0218   void SetPhotoeffectBelowKShell(G4bool v);
0219 
0220   G4bool MscPositronCorrection() const;
0221   void SetMscPositronCorrection(G4bool v);
0222 
0223   G4bool UseEPICS2017XS() const;
0224   void SetUseEPICS2017XS(G4bool v);
0225 
0226   G4bool Use3GammaAnnihilationOnFly() const;
0227   void Set3GammaAnnihilationOnFly(G4bool v);
0228 
0229   G4bool UseRiGePairProductionModel() const;
0230   void SetUseRiGePairProductionModel(G4bool v);
0231 
0232   // 5d
0233   void SetOnIsolated(G4bool val);
0234   G4bool OnIsolated() const;
0235 
0236   void ActivateDNA();
0237   void SetIsPrintedFlag(G4bool val);
0238   G4bool IsPrintLocked() const;
0239 
0240   // double parameters with values
0241   void SetMinEnergy(G4double val);
0242   G4double MinKinEnergy() const;
0243 
0244   void SetMaxEnergy(G4double val);
0245   G4double MaxKinEnergy() const;
0246 
0247   void SetMaxEnergyForCSDARange(G4double val);
0248   G4double MaxEnergyForCSDARange() const;
0249 
0250   void SetLowestElectronEnergy(G4double val);
0251   G4double LowestElectronEnergy() const;
0252 
0253   void SetLowestMuHadEnergy(G4double val);
0254   G4double LowestMuHadEnergy() const;
0255 
0256   void SetLowestTripletEnergy(G4double val);
0257   G4double LowestTripletEnergy() const;
0258 
0259   void SetLinearLossLimit(G4double val);
0260   G4double LinearLossLimit() const;
0261 
0262   void SetBremsstrahlungTh(G4double val);
0263   G4double BremsstrahlungTh() const;
0264   void SetMuHadBremsstrahlungTh(G4double val);
0265   G4double MuHadBremsstrahlungTh() const;
0266 
0267   void SetLambdaFactor(G4double val);
0268   G4double LambdaFactor() const;
0269 
0270   void SetFactorForAngleLimit(G4double val);
0271   G4double FactorForAngleLimit() const;
0272 
0273   void SetMscThetaLimit(G4double val);
0274   G4double MscThetaLimit() const;
0275 
0276   void SetMscEnergyLimit(G4double val);
0277   G4double MscEnergyLimit() const;
0278 
0279   void SetMscRangeFactor(G4double val);
0280   G4double MscRangeFactor() const;
0281 
0282   void SetMscMuHadRangeFactor(G4double val);
0283   G4double MscMuHadRangeFactor() const;
0284 
0285   void SetMscGeomFactor(G4double val);
0286   G4double MscGeomFactor() const;
0287 
0288   void SetMscSafetyFactor(G4double val);
0289   G4double MscSafetyFactor() const;
0290 
0291   void SetMscLambdaLimit(G4double val);
0292   G4double MscLambdaLimit() const;
0293 
0294   void SetMscSkin(G4double val);
0295   G4double MscSkin() const;
0296 
0297   void SetScreeningFactor(G4double val);
0298   G4double ScreeningFactor() const;
0299 
0300   void SetMaxNIELEnergy(G4double val);
0301   G4double MaxNIELEnergy() const;
0302 
0303   void SetMaxEnergyFor5DMuPair(G4double val);
0304   G4double MaxEnergyFor5DMuPair() const;
0305 
0306   void SetStepFunction(G4double v1, G4double v2);
0307   void SetStepFunctionMuHad(G4double v1, G4double v2);
0308   void SetStepFunctionLightIons(G4double v1, G4double v2);
0309   void SetStepFunctionIons(G4double v1, G4double v2);
0310   void FillStepFunction(const G4ParticleDefinition*, G4VEnergyLossProcess*) const;
0311 
0312   void SetDirectionalSplittingRadius(G4double r);
0313   G4double GetDirectionalSplittingRadius();
0314 
0315   void SetDirectionalSplittingTarget(const G4ThreeVector& v);
0316   G4ThreeVector GetDirectionalSplittingTarget() const;
0317 
0318   // integer parameters 
0319   
0320   void SetNumberOfBinsPerDecade(G4int val);
0321   G4int NumberOfBinsPerDecade() const;
0322   G4int NumberOfBins() const;
0323 
0324   void SetVerbose(G4int val);
0325   G4int Verbose() const;
0326 
0327   void SetWorkerVerbose(G4int val);
0328   G4int WorkerVerbose() const;
0329 
0330   void SetNumberForFreeVector(G4int val);
0331   G4int NumberForFreeVector() const;
0332 
0333   void SetTransportationWithMsc(G4TransportationWithMscType val);
0334   G4TransportationWithMscType TransportationWithMsc() const;
0335 
0336   void SetMscStepLimitType(G4MscStepLimitType val);
0337   G4MscStepLimitType MscStepLimitType() const;
0338 
0339   void SetMscMuHadStepLimitType(G4MscStepLimitType val);
0340   G4MscStepLimitType MscMuHadStepLimitType() const;
0341 
0342   void SetSingleScatteringType(G4eSingleScatteringType val); 
0343   G4eSingleScatteringType SingleScatteringType() const;
0344 
0345   void SetNuclearFormfactorType(G4NuclearFormfactorType val);
0346   G4NuclearFormfactorType NuclearFormfactorType() const;
0347 
0348   void SetDNAeSolvationSubType(G4DNAModelSubType val);
0349   G4DNAModelSubType DNAeSolvationSubType() const;
0350 
0351   //DNA chemistry model
0352   void SetTimeStepModel(const G4ChemTimeStepModel& model);
0353   G4ChemTimeStepModel GetTimeStepModel() const;
0354   //5d
0355   void  SetConversionType(G4int val);
0356   G4int GetConversionType() const;
0357 
0358   // string parameters 
0359   void SetPIXECrossSectionModel(const G4String&);
0360   const G4String& PIXECrossSectionModel();
0361 
0362   void SetPIXEElectronCrossSectionModel(const G4String&);
0363   const G4String& PIXEElectronCrossSectionModel();
0364 
0365   void SetLivermoreDataDir(const G4String&);
0366   const G4String& LivermoreDataDir();
0367 
0368   // parameters per region or per process 
0369   void AddPAIModel(const G4String& particle,
0370                    const G4String& region,
0371                    const G4String& type);
0372   const std::vector<G4String>& ParticlesPAI() const;
0373   const std::vector<G4String>& RegionsPAI() const;
0374   const std::vector<G4String>& TypesPAI() const;
0375 
0376   void AddMicroElec(const G4String& region);
0377   const std::vector<G4String>& RegionsMicroElec() const;
0378 
0379   void AddDNA(const G4String& region, const G4String& type);
0380   const std::vector<G4String>& RegionsDNA() const;
0381   const std::vector<G4String>& TypesDNA() const;
0382 
0383   void AddPhysics(const G4String& region, const G4String& type);
0384   const std::vector<G4String>& RegionsPhysics() const;
0385   const std::vector<G4String>& TypesPhysics() const;
0386 
0387   void SetSubCutRegion(const G4String& region = "");
0388 
0389   void SetDeexActiveRegion(const G4String& region, G4bool fdeex,
0390                G4bool fauger, G4bool fpixe);
0391 
0392   void SetProcessBiasingFactor(const G4String& procname, 
0393                                G4double val, G4bool wflag);
0394 
0395   void ActivateForcedInteraction(const G4String& procname, 
0396                                  const G4String& region,
0397                                  G4double length, 
0398                                  G4bool wflag);
0399 
0400   void ActivateSecondaryBiasing(const G4String& name,
0401                 const G4String& region, 
0402                 G4double factor,
0403                 G4double energyLimit);
0404 
0405   // define external saturation class
0406   void SetEmSaturation(G4EmSaturation*);
0407   // create and access saturation class
0408   G4EmSaturation* GetEmSaturation();
0409 
0410   // initialisation methods
0411   void DefineRegParamForLoss(G4VEnergyLossProcess*) const;
0412   void DefineRegParamForEM(G4VEmProcess*) const;
0413   void DefineRegParamForDeex(G4VAtomDeexcitation*) const;
0414 
0415   const G4String& GetDirLEDATA() const;
0416 
0417   G4EmParameters(G4EmParameters &) = delete;
0418   G4EmParameters & operator=(const G4EmParameters &right) = delete;  
0419 
0420 private:
0421 
0422   G4EmParameters();
0423 
0424   void Initialise();
0425 
0426   G4bool IsLocked() const;
0427 
0428   void PrintWarning(G4ExceptionDescription& ed) const; 
0429 
0430   static G4EmParameters* theInstance;
0431 
0432   G4EmParametersMessenger* theMessenger;
0433   G4EmExtraParameters* fBParameters;
0434   G4EmLowEParameters* fCParameters;
0435   G4StateManager*  fStateManager;
0436   G4EmSaturation*  emSaturation;
0437 
0438   G4bool lossFluctuation;
0439   G4bool buildCSDARange;
0440   G4bool flagLPM;
0441   G4bool cutAsFinalRange;
0442   G4bool applyCuts;
0443   G4bool lateralDisplacement;
0444   G4bool lateralDisplacementAlg96;
0445   G4bool muhadLateralDisplacement;
0446   G4bool useAngGeneratorForIonisation;
0447   G4bool useMottCorrection;
0448   G4bool integral;
0449   G4bool birks;
0450   G4bool fICRU90;
0451   G4bool gener;
0452   G4bool fSamplingTable;
0453   G4bool fPolarisation;
0454   G4bool fMuDataFromFile;
0455   G4bool fPEKShell;
0456   G4bool fMscPosiCorr;
0457   G4bool fUseEPICS2017XS;
0458   G4bool f3GammaAnnihilationOnFly;
0459   G4bool fUseRiGePairProductionModel;
0460   G4bool onIsolated; // 5d model conversion on free ions
0461   G4bool fDNA;
0462   G4bool fIsPrinted;
0463   
0464   G4double minKinEnergy;
0465   G4double maxKinEnergy;
0466   G4double maxKinEnergyCSDA;
0467   G4double max5DEnergyForMuPair;
0468   G4double lowestElectronEnergy;
0469   G4double lowestMuHadEnergy;
0470   G4double lowestTripletEnergy;
0471   G4double linLossLimit;
0472   G4double bremsTh;
0473   G4double bremsMuHadTh;
0474   G4double lambdaFactor;
0475   G4double factorForAngleLimit;
0476   G4double thetaLimit;
0477   G4double energyLimit;
0478   G4double maxNIELEnergy;
0479   G4double rangeFactor;
0480   G4double rangeFactorMuHad;
0481   G4double geomFactor;
0482   G4double safetyFactor;
0483   G4double lambdaLimit;
0484   G4double skin;
0485   G4double factorScreen;
0486 
0487   G4int nbinsPerDecade;
0488   G4int verbose;
0489   G4int workerVerbose;
0490   G4int nForFreeVector;
0491   G4int tripletConv;  // 5d model triplet generation type
0492 
0493   G4TransportationWithMscType fTransportationWithMsc;
0494   G4MscStepLimitType mscStepLimit;
0495   G4MscStepLimitType mscStepLimitMuHad;
0496   G4NuclearFormfactorType nucFormfactor;
0497   G4eSingleScatteringType fSStype;
0498   G4EmFluctuationType fFluct;
0499   G4PositronAtRestModelType fPositronium;
0500 
0501   G4String fDirLEDATA;
0502 };
0503 
0504 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0505 
0506 #endif
0507