Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-25 09:13:16

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 // INCL++ intra-nuclear cascade model
0027 // Alain Boudard, CEA-Saclay, France
0028 // Joseph Cugnon, University of Liege, Belgium
0029 // Jean-Christophe David, CEA-Saclay, France
0030 // Pekka Kaitaniemi, CEA-Saclay, France, and Helsinki Institute of Physics, Finland
0031 // Sylvie Leray, CEA-Saclay, France
0032 // Davide Mancusi, CEA-Saclay, France
0033 //
0034 #define INCLXX_IN_GEANT4_MODE 1
0035 
0036 #include "globals.hh"
0037 
0038 #ifndef G4INCLConfig_hh
0039 #define G4INCLConfig_hh 1
0040 
0041 #include "G4INCLParticleSpecies.hh"
0042 #include "G4INCLConfigEnums.hh"
0043 #include "G4INCLRandomSeedVector.hh"
0044 #include <iostream>
0045 #include <string>
0046 #include <sstream>
0047 // #include <cassert>
0048 
0049 class ConfigParser;
0050 
0051 namespace G4INCL {
0052 
0053   /**
0054    * The INCL configuration object
0055    *
0056    * The Config object keeps track of various INCL physics options
0057    * (e.g. which Pauli blocking scheme to use, whether to use local
0058    * energy option or not, etc.
0059    */
0060   class Config {
0061   public:
0062     /// \brief Default constructor
0063     Config();
0064 
0065     /// \brief Default destructor
0066     ~Config();
0067 
0068     /// \brief Initialise the members
0069     void init();
0070 
0071     /// \brief Return a summary of the run configuration.
0072     std::string summary();
0073 
0074     /// \brief Get the verbosity.
0075     G4int getVerbosity() const { return verbosity; }
0076 
0077     /// \brief Get the run title.
0078     std::string const &getCalculationTitle() const { return title; }
0079 
0080     /// \brief Get the output file root.
0081     std::string const &getOutputFileRoot() const { return outputFileRoot; }
0082 
0083     /// \brief Get the number of shots.
0084     G4int getNumberOfShots() const { return nShots; }
0085 
0086     /// \brief Natural targets.
0087     G4bool isNaturalTarget() const { return naturalTarget; }
0088 
0089     /** \brief Get the target mass number.
0090      *
0091      * Note that A==0 means natural target. You should first check the
0092      * isNaturalTarget() method.
0093      */
0094     G4int getTargetA() const { return targetSpecies.theA; }
0095 
0096     /// \brief Get the target charge number.
0097     G4int getTargetZ() const { return targetSpecies.theZ; }
0098 
0099     /// \brief Get the target strangess number.
0100     G4int getTargetS() const { return targetSpecies.theS; }
0101 
0102     /// \brief Set target mass number
0103     void setTargetA(G4int A) { targetSpecies.theA = A; }
0104 
0105     /// \brief Set target charge number
0106     void setTargetZ(G4int Z) { targetSpecies.theZ = Z; }
0107 
0108     /// \brief Set target strangess number
0109     void setTargetS(G4int S) { targetSpecies.theS = S; }
0110 
0111     /// \brief Get the projectile type
0112     ParticleType getProjectileType() const { return projectileSpecies.theType; }
0113 
0114     /// \brief Get the projectile species
0115     ParticleSpecies getProjectileSpecies() const { return projectileSpecies; }
0116 
0117     /// \brief Set the projectile species
0118     void setProjectileSpecies(ParticleSpecies const &pars) { projectileSpecies=pars; }
0119 
0120     /// \brief Get the projectile kinetic energy.
0121     G4double getProjectileKineticEnergy() const { return projectileKineticEnergy; }
0122 
0123     /// \brief Set the projectile kinetic energy.
0124     void setProjectileKineticEnergy(G4double const kinE) { projectileKineticEnergy=kinE; }
0125 
0126     /// \brief Get the number of the verbose event.
0127     G4int getVerboseEvent() const { return verboseEvent; }
0128 
0129     /// \brief Get the INCL version ID.
0130     static std::string const getVersionID();
0131 
0132     /// \brief Get the INCL version hash.
0133     static std::string const getVersionHash();
0134 
0135     /// \brief Get the INCL version string.
0136     static std::string const getVersionString() {
0137       std::stringstream ss;
0138       ss << getVersionID() << "-" << getVersionHash();
0139       return ss.str();
0140     }
0141 
0142     /// \brief Get the seeds for the random-number generator.
0143     Random::SeedVector getRandomSeeds() const {
0144       return randomSeedVector;
0145     }
0146 
0147     /// \brief Get the Pauli-blocking algorithm.
0148     PauliType getPauliType() const { return pauliType; }
0149 
0150     /// \brief Do we want CDPP?
0151     G4bool getCDPP() const { return CDPP; }
0152 
0153     /// \brief Get the Coulomb-distortion algorithm.
0154     CoulombType getCoulombType() const { return coulombType; }
0155 
0156     /// \brief Set the Coulomb-distortion algorithm.
0157     void setCoulombType(CoulombType const c) { coulombType = c; }
0158 
0159     /// \brief Get the type of the potential for nucleons.
0160     PotentialType getPotentialType() const { return potentialType; }
0161 
0162     /// \brief Set the type of the potential for nucleons.
0163     void setPotentialType(PotentialType type) { potentialType = type; }
0164 
0165     /// \brief Do we want the pion potential?
0166     G4bool getPionPotential() const { return pionPotential; }
0167 
0168     /// \brief Set the type of the potential for nucleons.
0169     void setPionPotential(const G4bool pionPot) { pionPotential = pionPot; }
0170 
0171     /// \brief Get the type of local energy for N-N avatars.
0172     LocalEnergyType getLocalEnergyBBType() const { return localEnergyBBType; }
0173 
0174     /// \brief Set the type of local energy for N-N avatars.
0175     void setLocalEnergyBBType(const LocalEnergyType t) { localEnergyBBType=t; }
0176 
0177     /// \brief Get the type of local energy for pi-N and decay avatars.
0178     LocalEnergyType getLocalEnergyPiType() const { return localEnergyPiType; }
0179 
0180     /// \brief Set the type of local energy for N-N avatars.
0181     void setLocalEnergyPiType(const LocalEnergyType t) { localEnergyPiType=t; }
0182 
0183     /// \brief Get the log file name.
0184     std::string const &getLogFileName() const { return logFileName; }
0185 
0186     /// \brief Get the de-excitation model.
0187     DeExcitationType getDeExcitationType() const { return deExcitationType; }
0188 
0189     /// \brief Get the de-excitation string.
0190     std::string getDeExcitationString() const { return deExcitationString; }
0191 
0192     /// \brief Get the clustering algorithm.
0193     ClusterAlgorithmType getClusterAlgorithm() const { return clusterAlgorithmType; }
0194 
0195     /// \brief Set the clustering algorithm.
0196     void setClusterAlgorithm(ClusterAlgorithmType const c) { clusterAlgorithmType = c; }
0197 
0198     /// \brief Get the maximum mass for production of clusters.
0199     G4int getClusterMaxMass() const { return clusterMaxMass; }
0200 
0201     /// \brief Set the maximum mass for production of clusters.
0202     void setClusterMaxMass(const G4int clm){ clusterMaxMass=clm; }
0203 
0204     /// \brief Get back-to-spectator
0205     G4bool getBackToSpectator() const { return backToSpectator; }
0206 
0207     /// \brief Set back-to-spectator
0208     void setBackToSpectator(const G4bool b) { backToSpectator = b; }
0209 
0210     /// \brief Whether to use real masses
0211     G4bool getUseRealMasses() const { return useRealMasses; }
0212 
0213     /// \brief Set whether to use real masses
0214     void setUseRealMasses(G4bool use) { useRealMasses = use; }
0215 
0216     /// \brief Set the INCLXX datafile path
0217     void setINCLXXDataFilePath(std::string const &path) { INCLXXDataFilePath=path; }
0218     
0219     /// \brief Set the ABLAXX datafile path
0220 #ifdef INCL_DEEXCITATION_ABLAXX
0221     void setABLAXXDataFilePath(std::string const &path) { ablaxxDataFilePath=path; }
0222     G4double getFissionDispCoeff() const { return fissdisscoeff; }
0223     G4double getLevDensAv() const { return levdensav; }
0224     G4double getLevDensAs() const { return levdensas; }
0225     G4double getLevDensAk() const { return levdensak; }
0226     G4double getTempFreezeOut() const { return tfreezeout; }
0227     G4float getEmissionBarrierFactorH2() const { return barrierfactorh2; }
0228     G4float getEmissionBarrierFactorH3() const { return barrierfactorh3; }
0229     G4float getEmissionBarrierFactorHe3() const { return barrierfactorhe3; }
0230     G4float getEmissionBarrierFactorHe4() const { return barrierfactorhe4; }
0231     G4float getEmissionBarrierFactorHe6() const { return barrierfactorhe6; }
0232 #endif    
0233 
0234     std::string const &getINCLXXDataFilePath() const {
0235       return INCLXXDataFilePath;
0236     }
0237 
0238 #ifdef INCL_DEEXCITATION_ABLAXX
0239     std::string const &getABLAXXDataFilePath() const {
0240       return ablaxxDataFilePath;
0241     }
0242 #endif
0243 
0244 #ifdef INCL_DEEXCITATION_ABLA07
0245     std::string const &getABLA07DataFilePath() const {
0246       return abla07DataFilePath;
0247     }
0248 #endif
0249 #ifdef INCL_DEEXCITATION_GEMINIXX
0250     std::string const &getGEMINIXXDataFilePath() const {
0251       return geminixxDataFilePath;
0252     }
0253 #endif
0254 
0255     G4double getImpactParameter() const { return impactParameter; }
0256 
0257     /// \brief Get the separation-energy type
0258     SeparationEnergyType getSeparationEnergyType() const { return separationEnergyType; }
0259 
0260     /// \brief Get the Fermi-momentum type
0261     FermiMomentumType getFermiMomentumType() const { return fermiMomentumType; }
0262 
0263     /// \brief Set the Fermi-momentum type
0264     void setFermiMomentumType(FermiMomentumType const f) { fermiMomentumType=f; }
0265 
0266     /// \brief Get the Fermi momentum
0267     G4double getFermiMomentum() const { return fermiMomentum; }
0268 
0269     /// \brief Set the Fermi momentum
0270     void setFermiMomentum(const G4double p) { fermiMomentum = p; }
0271 
0272     G4double getCutNN() const { return cutNN; }
0273 
0274 #ifdef INCL_ROOT_USE
0275     std::string const &getROOTSelectionString() const {
0276       return rootSelectionString;
0277     }
0278 #endif
0279 
0280 #ifdef INCL_DEEXCITATION_FERMI_BREAKUP
0281     G4int getMaxMassFermiBreakUp() const {
0282       return maxMassFermiBreakUp;
0283     }
0284 
0285     G4int getMaxChargeFermiBreakUp() const {
0286       return maxChargeFermiBreakUp;
0287     }
0288 #endif
0289 
0290     /// \brief Get the r-p correlation coefficient
0291     G4double getRPCorrelationCoefficient(const ParticleType t) const {
0292 // assert(t==Proton || t==Neutron);
0293       return ((t==Proton) ? rpCorrelationCoefficientProton : rpCorrelationCoefficientNeutron);
0294     }
0295 
0296     /// \brief Set the r-p correlation coefficient
0297     void setRPCorrelationCoefficient(const ParticleType t, const G4double corrCoeff) {
0298 // assert(t==Proton || t==Neutron);
0299       if(t==Proton)
0300         rpCorrelationCoefficientProton=corrCoeff;
0301       else
0302         rpCorrelationCoefficientNeutron=corrCoeff;
0303     }
0304 
0305     /// \brief Set the r-p correlation coefficient
0306     void setRPCorrelationCoefficient(const G4double corrCoeff) {
0307       setRPCorrelationCoefficient(Proton,corrCoeff);
0308       setRPCorrelationCoefficient(Neutron,corrCoeff);
0309     }
0310 
0311     /// \brief Get the neutron-skin thickness
0312     G4double getNeutronSkin() const { return neutronSkin; }
0313 
0314     /// \brief Set the neutron-skin thickness
0315     void setNeutronSkin(const G4double d) { neutronSkin=d; }
0316 
0317     /// \brief Get the neutron-halo size
0318     G4double getNeutronHalo() const { return neutronHalo; }
0319 
0320     /// \brief Set the neutron-halo size
0321     void setNeutronHalo(const G4double d) { neutronHalo=d; }
0322 
0323     /// \brief True if we should use refraction
0324     G4bool getRefraction() const { return refraction; }
0325 
0326     /// \brief Set the refraction variable
0327     void setRefraction(const G4bool r) { refraction = r; }
0328 
0329     /// \brief Get the RNG type
0330     RNGType getRNGType() const { return rngType; }
0331 
0332     /// \brief Set the RNG type
0333     void setRNGType(RNGType const r) { rngType=r; }
0334 
0335     /// \brief Get the phase-space-generator type
0336     PhaseSpaceGeneratorType getPhaseSpaceGeneratorType() const { return phaseSpaceGeneratorType; }
0337 
0338     /// \brief Set the phase-space-generator type
0339     void setPhaseSpaceGeneratorType(PhaseSpaceGeneratorType const p) { phaseSpaceGeneratorType=p; }
0340 
0341     /// \brief Get the cascade-action type
0342     CascadeActionType getCascadeActionType() const { return cascadeActionType; }
0343 
0344     /// \brief Set the cascade-action type
0345     void setCascadeActionType(CascadeActionType const c) { cascadeActionType=c; }
0346 
0347     /// \brief Get the autosave frequency
0348     unsigned int getAutosaveFrequency() const { return autosaveFrequency; }
0349 
0350     /// \brief Set the autosave frequency
0351     void setAutosaveFrequency(const unsigned int f) { autosaveFrequency=f; }
0352 
0353     /// \brief Get the Cross Section type
0354     CrossSectionsType getCrossSectionsType() const { return crossSectionsType; }
0355 
0356     /// \brief Get the maximum number of pions for multipion collisions
0357     G4int getMaxNumberMultipions() const { return maxNumberMultipions; }
0358 
0359     /// \brief Set the maximum number of pions for multipion collisions
0360     void setMaxNumberMultipions(const G4int n) { maxNumberMultipions=n; }
0361 
0362     /// \brief Set the Cross Section type
0363     void setCrossSectionsType(CrossSectionsType const c) { crossSectionsType=c; }
0364 
0365     /// \brief Get the hadronization time
0366     G4double getHadronizationTime() const { return hadronizationTime; }
0367 
0368     /// \brief Set the hadronization time
0369     void setHadronizationTime(const G4double t) { hadronizationTime=t; }
0370 
0371 #ifdef INCL_ROOT_USE
0372     G4bool getConciseROOTTree() const { return conciseROOTTree; }
0373 #endif
0374 
0375     G4bool getInverseKinematics() const { return inverseKinematics; }
0376     
0377     G4bool getsrcPairConfig() const { return srcPairCorrelations; }
0378     
0379     G4float getsrcPairDist() const { return srcPairDistance; }
0380 
0381     /// \brief Get the decay time threshold time
0382     G4double getDecayTimeThreshold() const { return decayTimeThreshold; }
0383 
0384     /// \brief Set decay time threshold time
0385     void setDecayTimeThreshold(const G4double t) { decayTimeThreshold=t; }
0386 
0387     /// \brief Get the bias
0388     G4double getBias() const { return bias; }
0389 
0390     /// \brief Get the pbar at rest annihilation threshold
0391     G4double getAtrestThreshold() const { return atrestThreshold; }
0392 
0393     /// \brief Set the pbar at rest annihilation threshold
0394     void setAtrestThreshold(const G4double t) { atrestThreshold=t; }
0395  
0396     /// \brief Get the nbar at rest annihilation threshold
0397     G4double getnbAtrestThreshold() const {return nbatrestThreshold;} 
0398 
0399     /// \brief Set the nbar at rest annihilation threshold
0400     void setnbAtrestThreshold(const G4double t){ nbatrestThreshold=t;}
0401  
0402     /// \brief Get the dbar at rest annihilation threshold
0403     G4double getdbAtrestThreshold() const {return dbatrestThreshold;}
0404 
0405     /// \brief Set the dbar at rest annihilation threshold
0406     void setdbAtrestThreshold(const G4double t){ dbatrestThreshold=t;} 
0407 
0408 
0409   private:
0410 
0411     G4int verbosity;
0412     std::string inputFileName;
0413     std::string title;
0414     std::string outputFileRoot;
0415     std::string fileSuffix;
0416     std::string logFileName;
0417 
0418     G4int nShots;
0419 
0420     std::string targetString;
0421     ParticleSpecies targetSpecies;
0422     G4bool naturalTarget;
0423 
0424     std::string projectileString;
0425     ParticleSpecies projectileSpecies;
0426     G4double projectileKineticEnergy;
0427 
0428     G4int verboseEvent;
0429 
0430     std::string randomSeeds;
0431     Random::SeedVector randomSeedVector;
0432 
0433     std::string pauliString;
0434     PauliType pauliType;
0435     G4bool CDPP;
0436 
0437     std::string coulombString;
0438     CoulombType coulombType;
0439 
0440     std::string potentialString;
0441     PotentialType potentialType;
0442     G4bool pionPotential;
0443 
0444     std::string localEnergyBBString;
0445     LocalEnergyType localEnergyBBType;
0446 
0447     std::string localEnergyPiString;
0448     LocalEnergyType localEnergyPiType;
0449 
0450     std::string deExcitationModelList;
0451     std::string deExcitationOptionDescription;
0452     std::string deExcitationString;
0453     DeExcitationType deExcitationType;
0454 #ifdef INCL_DEEXCITATION_ABLAXX
0455     std::string ablaxxDataFilePath;
0456     G4double fissdisscoeff;
0457     G4double levdensav;
0458     G4double levdensas;
0459     G4double levdensak;
0460     G4double tfreezeout;
0461     G4float barrierfactorh2;
0462     G4float barrierfactorh3;
0463     G4float barrierfactorhe3;
0464     G4float barrierfactorhe4;
0465     G4float barrierfactorhe6;
0466 #endif
0467 #ifdef INCL_DEEXCITATION_ABLA07
0468     std::string abla07DataFilePath;
0469 #endif
0470 #ifdef INCL_DEEXCITATION_GEMINIXX
0471     std::string geminixxDataFilePath;
0472 #endif
0473     std::string INCLXXDataFilePath;
0474 
0475     std::string clusterAlgorithmString;
0476     ClusterAlgorithmType clusterAlgorithmType;
0477 
0478     G4int clusterMaxMass;
0479 
0480     G4bool backToSpectator;
0481 
0482     G4bool useRealMasses;
0483 
0484     G4double impactParameter;
0485 
0486     std::string separationEnergyString;
0487     SeparationEnergyType separationEnergyType;
0488 
0489     std::string fermiMomentumString;
0490     FermiMomentumType fermiMomentumType;
0491 
0492     G4double fermiMomentum;
0493 
0494     G4double cutNN;
0495 
0496     //G4bool ann;
0497     
0498     G4double bias;
0499 
0500     G4double atrestThreshold;
0501  
0502     G4double nbatrestThreshold;
0503  
0504     G4double dbatrestThreshold;
0505 
0506 #ifdef INCL_ROOT_USE
0507     std::string rootSelectionString;
0508 #endif
0509 
0510 #ifdef INCL_DEEXCITATION_FERMI_BREAKUP
0511     G4int maxMassFermiBreakUp;
0512     G4int maxChargeFermiBreakUp;
0513 #endif
0514 
0515     G4double rpCorrelationCoefficient;
0516     G4double rpCorrelationCoefficientProton;
0517     G4double rpCorrelationCoefficientNeutron;
0518 
0519     G4double neutronSkin;
0520     G4double neutronHalo;
0521 
0522     G4bool refraction;
0523 
0524     std::string randomNumberGenerator;
0525     RNGType rngType;
0526 
0527     std::string phaseSpaceGenerator;
0528     PhaseSpaceGeneratorType phaseSpaceGeneratorType;
0529 
0530     unsigned int autosaveFrequency;
0531 
0532     std::string crossSectionsString;
0533     CrossSectionsType crossSectionsType;
0534     G4int maxNumberMultipions;
0535 
0536     std::string cascadeAction;
0537     CascadeActionType cascadeActionType;
0538 
0539     G4double hadronizationTime;
0540 
0541 #ifdef INCL_ROOT_USE
0542     G4bool conciseROOTTree;
0543 #endif
0544 
0545     G4bool inverseKinematics;
0546     
0547     G4bool srcPairCorrelations;
0548     
0549     G4float srcPairDistance;
0550 
0551     G4double decayTimeThreshold;
0552 
0553     friend class ::ConfigParser;
0554   };
0555 
0556 }
0557 
0558 #endif