Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-06-26 07:06:20

0001 ///////////////////////////////////////////////////////////////////////////
0002 //
0003 //    Copyright 2010
0004 //
0005 //    This file is part of starlight.
0006 //
0007 //    starlight is free software: you can redistribute it and/or modify
0008 //    it under the terms of the GNU General Public License as published by
0009 //    the Free Software Foundation, either version 3 of the License, or
0010 //    (at your option) any later version.
0011 //
0012 //    starlight is distributed in the hope that it will be useful,
0013 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
0014 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0015 //    GNU General Public License for more details.
0016 //
0017 //    You should have received a copy of the GNU General Public License
0018 //    along with starlight. If not, see <http://www.gnu.org/licenses/>.
0019 //
0020 ///////////////////////////////////////////////////////////////////////////
0021 //
0022 // File and Version Information:
0023 // $Rev:: 276                         $: revision of last commit
0024 // $Author:: jnystrand                $: author of last commit
0025 // $Date:: 2016-09-13 19:54:42 +0100 #$: date of last commit
0026 //
0027 // Description:
0028 //
0029 //
0030 //
0031 ///////////////////////////////////////////////////////////////////////////
0032 
0033 
0034 #ifndef INPUTPARAMETERS_H
0035 #define INPUTPARAMETERS_H
0036 
0037 
0038 #include "starlightconstants.h"
0039 #include "inputParser.h"
0040 #include <string>
0041 #include <ostream>
0042 #include <vector>
0043 #include <sstream>
0044 
0045 class parameterbase;
0046 
0047 
0048 class parameterlist
0049 {
0050 public:
0051 
0052     parameterlist() : _parameters(0) {}
0053 
0054     void add(parameterbase* p) {
0055         _parameters.push_back(p);
0056     }
0057 
0058     // Returns a string with a key of the current state of the parameter list
0059     // only
0060     inline std::string validationKey();
0061     
0062 
0063 private:
0064 
0065     std::vector<parameterbase*> _parameters;
0066 
0067 };
0068 
0069 // Base class for parameters, needed to keep a list of parameters
0070 class parameterbase
0071 {
0072 public:
0073 
0074     // Add this to parameter list
0075     parameterbase()
0076     {
0077         _parameters.add(this);
0078     }
0079     virtual std::string validationkey() = 0;
0080 
0081     template<typename T>
0082     std::string toString(T v)
0083     {
0084         std::stringstream s;
0085         s << v;
0086         return s.str();
0087     }
0088     inline friend std::ostream& operator<<(std::ostream& os, const parameterbase& par);
0089  
0090     // List of all parameters
0091     static parameterlist _parameters;
0092 
0093 
0094    
0095 };
0096 // Need to init the static variable
0097 // parameterlist parameterbase::_parameters;
0098 
0099 
0100 // The actual parameter class
0101 // validate parameter specifies if the parameter should be a part of the validity check of the current parameters
0102 template<typename T, bool validate>
0103 class parameter : public parameterbase
0104 {
0105 public:
0106 
0107     // Constructor
0108     parameter(const std::string &name, T value, bool required = true) :parameterbase(),_name(name), _value(value), _validate(validate), _required(required) {}
0109 
0110 
0111     parameter &operator=(T v) { _value = v; return *this;}
0112     T* ptr() const {
0113         return const_cast<T*>(&_value);
0114     }
0115     
0116     T value() const { return _value; }
0117     
0118     std::string name() const { return _name;}
0119     
0120     bool required() const { return _required; }
0121     
0122     void setValue(T v) { _value = v; }
0123     
0124     void setName(std::string name) { _name = name; }
0125     
0126     void setRequired(bool r) { _required = r; }
0127     
0128     // Validation key for this parameter
0129     std::string validationkey()
0130     {
0131         return (_validate ? _name + ":" + toString(_value) + "-" : std::string(""));
0132     }
0133 
0134     template<typename S, bool v>
0135     inline friend std::ostream& operator<<(std::ostream& os, const parameter<S,v>& par);
0136 
0137 
0138 
0139 private:
0140     std::string _name;
0141 
0142     T _value; // Value
0143     bool _validate; // true if a change in the parameter invalidates x-sec tables
0144     bool _required; // true if this is required option.
0145 
0146     parameter();
0147 };
0148 
0149 template<typename S, bool v>
0150 inline std::ostream& operator<<(std::ostream& os, const parameter<S,v>& par)
0151 {
0152     os << par._value;
0153     return os;
0154 }
0155 
0156 std::ostream& operator<<(std::ostream& os, const parameterbase& par)
0157 {
0158     os << par._parameters.validationKey(); 
0159     return os;
0160 }
0161 std::string parameterlist::validationKey()
0162 {
0163     std::stringstream s;
0164     for(unsigned int i = 0; i < _parameters.size(); ++i)
0165     {
0166         s << _parameters[i]->validationkey(); // Will print names and values of validation parameters
0167     }
0168     return s.str();
0169 }
0170 
0171 class inputParameters {
0172 
0173 public:
0174     inputParameters();
0175     ~inputParameters();
0176 
0177     bool init();
0178     bool configureFromFile(const std::string &configFileName = "./config/slight.in");
0179 
0180         std::string  baseFileName          () const { return _baseFileName.value();           }
0181 
0182     int targetBeamZ                () const { return _targetBeamZ.value();                 }  ///< returns atomic number of beam particle 2
0183     unsigned int targetBeamA                () const { return _targetBeamA.value();                 }  ///< returns atomic mass number of beam particle 2
0184     double       targetLorentzGamma    () const { return _targetLorentzGamma;             }  ///< returns Lorentz gamma factor of source in target frame
0185     double       beamLorentzGamma      () const { return _beamLorentzGamma;               }  ///< returns Lorentz gamma factor of both beams in beam CMS frame
0186     double       electronBeamLorentzGamma     () const { return _electronBeamLorentzGamma.value();      }  ///< returns Lorentz gamma factor of beam 1 in collider frame
0187     double       targetBeamLorentzGamma     () const { return _targetBeamLorentzGamma.value();      }  ///< returns Lorentz gamma factor of beam 2 in collider frame
0188     double       rap_CM                () const { return _rap_CM;                         }  ///< returns center-of-mass rapidity
0189     double       targetMaxPhotonEnergy       () const { return _targetMaxPhotonEnergy;    }  ///< returns maximum photon energy 
0190     double       cmsMaxPhotonEnergy       () const { return _cmsMaxPhotonEnergy;          }  ///< returns maximum photon energy 
0191     double       targetMinPhotonEnergy       () const { return _targetMinPhotonEnergy;    }  ///< returns maximum photon energy 
0192     double       cmsMinPhotonEnergy       () const { return _cmsMinPhotonEnergy;          }  ///< returns maximum photon energy 
0193     double       maxW                  () const { return _maxW.value();                   }  ///< returns maximum mass W of produced hadronic system [GeV/c^2]
0194     double       minW                  () const { return _minW.value();                   }  ///< returns minimum mass W of produced hadronic system [GeV/c^2]
0195     double       maxW_GP               () const { return _maxW_GP.value();                }  ///< returns maximum W of produced virtual photon and nucleon system [GeV/c^2]
0196     double       minW_GP               () const { return _minW_GP.value();                }  ///< returns minimum W of produced virtual photon and nucleon system [GeV/c^2]
0197     unsigned int nmbWBins              () const { return _nmbWBins.value();               }  ///< returns number of W bins in lookup table
0198     double       maxRapidity           () const { return _maxRapidity.value();            }  ///< returns maximum absolute value of rapidity
0199     unsigned int nmbRapidityBins       () const { return _nmbRapidityBins.value();        }  ///< returns number of rapidity bins in lookup table
0200     unsigned int nmbEnergyBins         () const { return _nmbEnergyBins.value();          }  ///< return the number of Egamma bins for eSTARlight lookup
0201     bool         ptCutEnabled          () const { return _ptCutEnabled.value();           }  ///< returns cut in pt
0202     double       ptCutMin              () const { return _ptCutMin.value();               }  ///< returns minimum pt
0203     double       ptCutMax              () const { return _ptCutMax.value();               }  ///< returns maximum pt
0204     bool         etaCutEnabled         () const { return _etaCutEnabled.value();          }  ///< returns cut in eta
0205     double       etaCutMin             () const { return _etaCutMin.value();              }  ///< returns minimum eta
0206     double       etaCutMax             () const { return _etaCutMax.value();              }  ///< returns maximum eta
0207     int          productionMode        () const { return _productionMode.value();         }  ///< returns production mode
0208     unsigned int nmbEvents             () const { return _nmbEventsTot.value();           }  ///< returns total number of events to generate
0209     int          prodParticleId        () const { return _prodParticleId.value();         }  ///< returns PDG particle ID of produced particle
0210     int          randomSeed            () const { return _randomSeed.value();             }  ///< returns seed for random number generator
0211     int          beamBreakupMode       () const { return _beamBreakupMode.value();        }  ///< returns breakup mode for beam particles
0212     bool         interferenceEnabled   () const { return _interferenceEnabled.value();    }  ///< returns whether interference is taken into account
0213     double       interferenceStrength  () const { return _interferenceStrength.value();   }  ///< returns percentage of interference
0214     double       maxPtInterference     () const { return _maxPtInterference.value();      }  ///< returns maximum p_T for interference calculation [GeV/c]
0215     int          nmbPtBinsInterference () const { return _nmbPtBinsInterference.value();  }  ///< returns number of p_T bins for interference calculation
0216     double       ptBinWidthInterference() const { return _ptBinWidthInterference.value(); }  ///< returns width of p_T bins for interference calculation [GeV/c]
0217     double       minGammaEnergy        () const { return _minGammaEnergy.value();         }  ///< returns minimum gamma energy in case of photo nuclear processes [GeV]
0218     double       maxGammaEnergy        () const { return _maxGammaEnergy.value();         }  ///< returns maximum gamma energy in case of photo nuclear processes [GeV]
0219     double       minGammaQ2            () const { return _minGammaQ2.value();             }  ///< return minimum gamma virtuality 
0220     double       maxGammaQ2            () const { return _maxGammaQ2.value();             }  ///< return maximum gamma virtuality 
0221     bool         fixedQ2Range          () const { return _fixedQ2Range;                   }  ///< return state of Q2 range
0222     unsigned int nmbGammaQ2Bins        () const { return _nmbGammaQ2Bins.value();         }  ///< return number of gamma q2 bins
0223     std::string  pythiaParams          () const { return _pythiaParams.value();           }  ///< returns parameters to be passed to pythia
0224     bool         defaultFullEventRecord() const { bool a; _outputFormat.value()==0 ? a=true : a=false; return a;}  ///< returns if the full default event record should be printed
0225     bool         pythiaFullEventRecord () const { bool a; _outputFormat.value()==1 ? a=true : a=false; return a;}  ///< returns if the full pythia event record should be printed
0226     bool         hepmc3FullEventRecord () const { bool a; _outputFormat.value()==2 ? a=true : a=false; return a;}  ///< returns if the full hepmc3 event record should be printed
0227     bool         lundFullEventRecord   () const { bool a; _outputFormat.value()==3 ? a=true : a=false; return a;}  ///< returns if the full lund event record should be printed
0228     int          outputFormat          () const { return _outputFormat.value();           }  ///< returns value according to desired output format. 0 for only default, 1 for Pythia, 2 for HepMC, 3 for lund
0229     bool         backwardsProduction   () const { return _backwardsProduction.value();    }  ///< returns if backwards production
0230     int      xsecCalcMethod        () const { return _xsecCalcMethod.value();         }  ///< returns the method used for the x-sec calculation
0231         double       axionMass             () const { return _axionMass.value();              }  ///< returns axion mass //AXION HACK
0232     int          bslopeDefinition      () const { return _bslopeDefinition.value();       }  ///< returns the definition of b-slope
0233     double       bslopeValue           () const { return _bslopeValue.value();            }  ///< returns the value of b-slope
0234     int          impulseVM             () const { return _impulseVM.value();              }  ///< returns the impulseVM value
0235     int          quantumGlauber        () const { return _quantumGlauber.value();         }  ///< returns the quantum glauber value
0236     starlightConstants::particleTypeEnum    prodParticleType     () const { return _particleType;    }  ///< returns type of produced particle
0237     starlightConstants::decayTypeEnum       prodParticleDecayType() const { return _decayType;       }  ///< returns decay type of produced particle
0238     starlightConstants::interactionTypeEnum interactionType      () const { return _interactionType; }  ///< returns interaction type
0239     double protonEnergy                () const { return _protonEnergy.value(); }
0240     double electronEnergy              () const { return _electronEnergy.value(); }
0241     double inputBranchingRatio         () const { return _inputBranchingRatio; }
0242     double targetRadius                () const { return _targetR; }
0243 
0244         void setBaseFileName          (std::string v )  {  _baseFileName = v;     }
0245     void setTargetBeamZ                (unsigned int v)  {  _targetBeamZ = v;           }  ///< sets atomic number of beam particle 2
0246     void setTargetBeamA                (unsigned int v)  {  _targetBeamA = v;           }  ///< sets atomic mass number of beam particle 2
0247     void setTargetLorentzGamma    (double v)  {  _targetLorentzGamma = v;     }  ///< sets Lorentz gamma factor of both beams in beam CMS frame
0248     void setBeamLorentzGamma      (double v)  {  _beamLorentzGamma = v;       }  ///< sets Lorentz gamma factor of both beams in beam CMS frame
0249     void setElectronBeamLorentzGamma     (double v)  {  _electronBeamLorentzGamma = v;  }  
0250     void setRapCM                 (double v)  {  _rap_CM           = v;       }  ///< sets center-of-mass rapidity
0251     //void setMaxPhotonEnergy       (double v)  {  _maxPhotonEnergy = v ;       }  ///< sets maximim photon energy
0252     void setMaxW                  (double v)  {  _maxW = v;                   }  ///< sets maximum mass W of produced hadronic system [GeV/c^2]
0253     void setMinW                  (double v)  {  _minW = v;                   }  ///< sets minimum mass W of produced hadronic system [GeV/c^2]
0254     void setmaxW_GP                  (double v)  {  _maxW_GP = v;                   }  ///< sets maximum mass W of produced virtual photon and nucleon system [GeV/c^2]
0255     void setminW_GP                  (double v)  {  _minW_GP = v;                   }  ///< sets minimum mass W of produced virtual photon and nucleon system [GeV/c^2]
0256     void setNmbWBins              (unsigned int v)  {  _nmbWBins = v;         }  ///< sets number of W bins in lookup table
0257     void setMaxRapidity           (double v)  {  _maxRapidity = v;            }  ///< sets maximum absolute value of rapidity
0258     void setNmbRapidityBins       (unsigned int v)  {  _nmbRapidityBins = v;  }  ///< sets number of rapidity bins in lookup table
0259     void setNmbEgaBins            (unsigned int v)  {  _nmbEnergyBins = v;    }  ///< sets number of Ega bins for eSTARlight
0260     void setPtCutEnabled          (bool v)  {  _ptCutEnabled = v;             }  ///< sets cut in pt
0261     void setPtCutMin              (double v)  {  _ptCutMin = v;               }  ///< sets minimum pt
0262     void setPtCutMax              (double v)  {  _ptCutMax = v;               }  ///< sets maximum pt
0263     void setEtaCutEnabled         (bool v)  {  _etaCutEnabled = v;            }  ///< sets cut in eta
0264     void setEtaCutMin             (double v)  {  _etaCutMin = v;              }  ///< sets minimum eta
0265     void setEtaCutMax             (double v)  {  _etaCutMax = v;              }  ///< sets maximum eta
0266     void setProductionMode        (int v)  {  _productionMode = v;            }  ///< sets production mode
0267     void setNmbEvents             (unsigned int v)  {  _nmbEventsTot = v;     }  ///< sets total number of events to generate
0268     void setProdParticleId        (int v)  {  _prodParticleId = v;            }  ///< sets PDG particle ID of produced particle
0269     void setRandomSeed            (int v)  {  _randomSeed = v;                }  ///< sets seed for random number generator
0270     void setBeamBreakupMode       (int v)  {  _beamBreakupMode = v;           }  ///< sets breakup mode for beam particles
0271     void setInterferenceEnabled   (bool v)  {  _interferenceEnabled = v;      }  ///< sets whether interference is taken into account
0272     void setInterferenceStrength  (double v)  {  _interferenceStrength = v;   }  ///< sets percentage of interference
0273     void setMaxPtInterference     (double v)  {  _maxPtInterference = v;      }  ///< sets maximum p_T for voiderference calculation [GeV/c]
0274     void setNmbPtBinsInterference (int v)  {  _nmbPtBinsInterference = v;     }  ///< sets number of p_T bins for interference calculation
0275     void setPtBinWidthInterference(double v)  {  _ptBinWidthInterference = v; }  ///< sets width of p_T bins for voiderference calculation [GeV/c]
0276     void setMinGammaEnergy        (double v)  {  _minGammaEnergy = v;         }  ///< sets minimum gamma energy in case of photo nuclear processes [GeV]
0277     void setMaxGammaEnergy        (double v)  {  _maxGammaEnergy = v;         }  ///< sets maximum gamma energy in case of photo nuclear processes [GeV]
0278     void setMinGammaQ2            (double v)  {  _minGammaQ2 = v;             }  ///< sets minimum gamma virtuality in case of photo nuclear processes [GeV]
0279     void setMaxGammaQ2            (double v)  {  _maxGammaQ2 = v;         }  ///< sets maximum gamma virtuality in case of photo nuclear processes [GeV]
0280     void setPythiaParams          (std::string v)  {  _pythiaParams = v;      }  ///< sets parameters to be passed to pythia
0281     void setOutputFormat          (int  v)   {   _outputFormat = v;           }  ///< sets output file format
0282     void setBackwardsProduction   (bool v)  {  _backwardsProduction = v;      }  ///< sets backwards production
0283     void setXsecCalcMethod        (int v)  {  _xsecCalcMethod = v;            }  ///< sets the method used for the x-sec calculation
0284     void setAxionMass        (double v)  {  _axionMass = v;                   }  ///< sets axion mass    //AXION HACK
0285     void setbslopeDefinition      (int v)  {  _bslopeDefinition = v;          }  ///< sets the definition of b slope
0286         void setbslopeValue           (double v)  {  _bslopeValue = v;            }  ///< sets the value of b slope
0287     void setimpulseVM             (int v)  {  _impulseVM = v;                 }  ///< sets the value of _impulseVM
0288     void setquantumGlauber        (int v)  {  _quantumGlauber = v;             }  ///< sets the value of quantum_glauber
0289 
0290     void setProdParticleType      (starlightConstants::particleTypeEnum v)    { _particleType = v;    }  ///< sets type of produced particle
0291     void setProdParticleDecayType (starlightConstants::decayTypeEnum v)       { _decayType = v;       }  ///< sets decay type of produced particle
0292     void setInteractionType       (starlightConstants::interactionTypeEnum v) { _interactionType = v; }  ///< sets interaction type
0293      
0294     void setProtonEnergy        (double v)    { _protonEnergy = v;            }  ///< sets proton energy 
0295     void setElectronEnergy      (double v)    { _electronEnergy = v;          }  ///< sets electron energy
0296     template<typename T>
0297     inline bool setParameter(std::string expression);
0298     
0299     std::ostream& print(std::ostream& out) const;  ///< prints parameter summary
0300     std::ostream& write(std::ostream& out) const;  ///< writes parameters back to an ostream
0301     
0302     std::string parameterValueKey() const; ///< Generates key for the current parameters
0303 
0304   
0305 private:
0306 
0307     
0308 // To indicate if the crossection table should be re-calculated if parameter changes
0309 #define VALIDITY_CHECK true
0310 #define NO_VALIDITY_CHECK false
0311     
0312     std::string _configFileName;  ///< path to configuration file (default = ./config/slight.in)
0313 
0314     // config file parameters
0315         parameter<std::string,NO_VALIDITY_CHECK>   _baseFileName;
0316     parameter<int,VALIDITY_CHECK>              _targetBeamZ;                  ///< atomic number of beam particle 2
0317     parameter<unsigned int,VALIDITY_CHECK>     _targetBeamA;                  ///< atomic mass number of beam particle 2
0318     parameter<double, VALIDITY_CHECK>          _electronBeamLorentzGamma;       ///< Lorentz gamma factor of beam 1 in collider frame
0319     parameter<double, VALIDITY_CHECK>          _targetBeamLorentzGamma;       ///< Lorentz gamma factor of beam 2 in collider frame
0320     parameter<double, VALIDITY_CHECK>          _maxW;                    ///< maximum mass W of produced hadronic system [GeV/c^2]
0321     parameter<double, VALIDITY_CHECK>          _minW;                    ///< minimum mass W of produced hadronic system; if set to -1 default value is taken [GeV/c^2]
0322     parameter<double, VALIDITY_CHECK>          _maxW_GP;                 ///< maximum mass W of produced virtual photon and nucleon system, has no maximum limit [GeV/c^2]
0323     parameter<double, VALIDITY_CHECK>          _minW_GP;                 ///< minimum mass W of produced virtual photon and nucleon system, should be no greater than COM energy of source + traget or code will terminate [GeV/c^2]
0324     parameter<unsigned int, VALIDITY_CHECK>    _nmbWBins;                ///< number of W bins in lookup table
0325     parameter<double, VALIDITY_CHECK>          _maxRapidity;             ///< maximum absolute value of rapidity
0326     parameter<unsigned int, VALIDITY_CHECK>    _nmbRapidityBins;         ///< number of rapidity bins in lookup table
0327     parameter<unsigned int, VALIDITY_CHECK>    _nmbEnergyBins;           ///< number of Egamma bins in lookup table
0328     parameter<bool, VALIDITY_CHECK>            _ptCutEnabled;            ///< en/disables cut in pt
0329     parameter<double, VALIDITY_CHECK>          _ptCutMin;                ///< minimum pt, if cut is enabled
0330     parameter<double, VALIDITY_CHECK>          _ptCutMax;                ///< maximum pt, if cut is enabled
0331     parameter<bool, VALIDITY_CHECK>            _etaCutEnabled;           ///< en/disables cut in eta
0332     parameter<double, VALIDITY_CHECK>          _etaCutMin;               ///< minimum eta, if cut is enabled
0333     parameter<double, VALIDITY_CHECK>          _etaCutMax;               ///< maximum eta, if cut is enabled
0334     parameter<unsigned int, VALIDITY_CHECK>    _productionMode;          ///< \brief production mode
0335                                                                          ///<
0336                                                                          ///< 1 = photon-photon fusion,
0337                                                                          ///< 2 = narrow vector meson resonance in photon-Pomeron fusion,
0338                                                                          ///< 3 = Breit-Wigner vector meson resonance in photon-Pomeron fusion
0339     parameter<unsigned int, VALIDITY_CHECK>    _nmbEventsTot;            ///< total number of events to generate
0340     parameter<unsigned int, VALIDITY_CHECK>    _prodParticleId;          ///< PDG particle ID of produced particle
0341     parameter<unsigned int, VALIDITY_CHECK>    _randomSeed;              ///< seed for random number generator
0342                                                                          ///<
0343                                                                          ///< 1 = ASCII
0344                                                                          ///< 2 = GSTARtext,
0345                                                                          ///< 3 = PAW ntuple (not working)
0346     parameter<unsigned int, VALIDITY_CHECK>    _beamBreakupMode;         ///< \brief breakup mode for beam particles
0347                                                                          ///<
0348                                                                          ///< 1 = hard sphere nuclei (b > 2R),
0349                                                                          ///< 2 = both nuclei break up (XnXn),
0350                                                                          ///< 3 = a single neutron from each nucleus (1n1n),
0351                                                                          ///< 4 = neither nucleon breaks up (with b > 2R),
0352                                                                          ///< 5 = no hadronic break up (similar to option 1, but with the actual hadronic interaction)
0353     parameter<bool, VALIDITY_CHECK>            _interferenceEnabled;     ///< if VALIDITY_CHECK, interference is taken into account
0354     parameter<double, VALIDITY_CHECK>          _interferenceStrength;    ///< percentage of interference: from 0 = none to 1 = full
0355     parameter<double, VALIDITY_CHECK>          _maxPtInterference;       ///< maximum p_T for interference calculation [GeV/c]
0356     parameter<unsigned int, VALIDITY_CHECK>    _nmbPtBinsInterference;   ///< number of p_T bins for interference calculation
0357     parameter<double, VALIDITY_CHECK>          _ptBinWidthInterference;  ///< width of p_T bins for interference calculation [GeV/c]
0358     parameter<double, VALIDITY_CHECK>          _protonEnergy;
0359     parameter<double, VALIDITY_CHECK>          _electronEnergy;
0360     parameter<double, VALIDITY_CHECK>          _minGammaEnergy;          ///< minimum gamma energy in case of photo nuclear processes [GeV]
0361     parameter<double, VALIDITY_CHECK>          _maxGammaEnergy;          ///< maximum gamma energy in case of photo nuclear processes [GeV]
0362     parameter<double, VALIDITY_CHECK>          _minGammaQ2;              ///< minimum gamma Q2 in case of photo nuclear processes
0363     parameter<double, VALIDITY_CHECK>          _maxGammaQ2;              ///< maximum gamma Q2 in case of photo nuclear processes   
0364     parameter<unsigned int, VALIDITY_CHECK>     _nmbGammaQ2Bins;          ///< number of gamma q2 bins
0365     parameter<std::string,NO_VALIDITY_CHECK>   _pythiaParams;            ///< semi-colon separated parameters to pass to pythia, e.g. "mstj(1)=0;paru(13)=0.1" 
0366     //parameter<bool, NO_VALIDITY_CHECK>         _pythiaFullEventRecord;   ///< if the full pythia event record should be in the output
0367     //parameter<bool, NO_VALIDITY_CHECK>         _hepmc3FullEventRecord;   ///< if the full hepmc3 event record should be in the output
0368     //parameter<bool, NO_VALIDITY_CHECK>         _lundFullEventRecord;     ///< if the full lund event record should be in the output
0369     parameter<int, NO_VALIDITY_CHECK>         _outputFormat;              ///< identifier of output format
0370     parameter<bool, NO_VALIDITY_CHECK>         _backwardsProduction;     ///
0371     parameter<unsigned int, VALIDITY_CHECK>    _xsecCalcMethod;      ///< Select x-sec calc method. (0 is standard starlight method, 1 must be used for assym. collisions (e.g. p-A), but is slow)  
0372         parameter<double, VALIDITY_CHECK>          _axionMass;               ///Axion mass//AXION HACK
0373         parameter<unsigned int, VALIDITY_CHECK>    _bslopeDefinition;        ///< Optional parameter to set different values of slope parameter
0374         parameter<double, VALIDITY_CHECK>          _bslopeValue;             ///< Value of slope parameter when _bslopeDefinition is set to 1
0375         parameter<unsigned int, VALIDITY_CHECK>    _impulseVM;               ///< Optional parameter to use impulse approximation (no nuclear effects) for VM cross section.
0376     parameter<unsigned int, VALIDITY_CHECK>    _quantumGlauber;         ///< Optional parameter.  Set = 1 to use Quantum Glauber calculation, rather than Classical Glauber
0377 
0378     starlightConstants::particleTypeEnum       _particleType;
0379     starlightConstants::decayTypeEnum          _decayType;
0380     starlightConstants::interactionTypeEnum    _interactionType;
0381 
0382     double                         _targetLorentzGamma;       ///< Lorentz gamma factor of the source in target frame, not an input parameter
0383     double                         _beamLorentzGamma;         ///< Lorentz gamma factor of the beams in CMS frame, not an input parameter
0384     double                         _rap_CM;
0385     double                         _targetR;
0386     double                         _cmsMaxPhotonEnergy;
0387     double                         _cmsMinPhotonEnergy;
0388     double                         _targetMaxPhotonEnergy;
0389     double                         _targetMinPhotonEnergy;
0390     double                         _inputBranchingRatio;      ///< Branching ratio defined for each channel
0391     bool                           _fixedQ2Range;
0392     inputParser _ip;
0393     
0394 };
0395 
0396 
0397 template<typename T>
0398 inline 
0399 bool inputParameters::setParameter(std::string expression)
0400 {
0401    
0402     return _ip.parseString(expression);
0403    
0404    
0405 }
0406 
0407 inline
0408 std::ostream&
0409 operator <<(std::ostream&          out,
0410             const inputParameters& par)
0411 {
0412     return par.print(out);
0413 }
0414  
0415 
0416 #endif  // INPUTPARAMETERS_H