]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STARLIGHT/starlight/include/inputParameters.h
nbins added as data member + axes renamed
[u/mrichter/AliRoot.git] / STARLIGHT / starlight / include / inputParameters.h
1 ///////////////////////////////////////////////////////////////////////////
2 //
3 //    Copyright 2010
4 //
5 //    This file is part of starlight.
6 //
7 //    starlight is free software: you can redistribute it and/or modify
8 //    it under the terms of the GNU General Public License as published by
9 //    the Free Software Foundation, either version 3 of the License, or
10 //    (at your option) any later version.
11 //
12 //    starlight is distributed in the hope that it will be useful,
13 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
14 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 //    GNU General Public License for more details.
16 //
17 //    You should have received a copy of the GNU General Public License
18 //    along with starlight. If not, see <http://www.gnu.org/licenses/>.
19 //
20 ///////////////////////////////////////////////////////////////////////////
21 //
22 // File and Version Information:
23 // $Rev:: 163                         $: revision of last commit
24 // $Author:: odjuvsla                 $: author of last commit
25 // $Date:: 2013-10-06 16:18:06 +0200 #$: date of last commit
26 //
27 // Description:
28 //
29 //
30 //
31 ///////////////////////////////////////////////////////////////////////////
32
33
34 #ifndef INPUTPARAMETERS_H
35 #define INPUTPARAMETERS_H
36
37
38 #include "starlightconstants.h"
39 #include "inputParser.h"
40 #include "singleton.h"
41 #include <string>
42 #include <ostream>
43 #include <vector>
44 #include <sstream>
45
46 class parameterbase;
47
48
49 class parameterlist
50 {
51 public:
52
53     parameterlist() : _parameters(0) {}
54
55     void add(parameterbase* p) {
56         _parameters.push_back(p);
57     }
58
59     // Returns a string with a key of the current state of the parameter list
60     // only
61     inline std::string validationKey();
62     
63
64 private:
65
66     std::vector<parameterbase*> _parameters;
67
68 };
69
70 // Base class for parameters, needed to keep a list of parameters
71 class parameterbase
72 {
73 public:
74
75     // Add this to parameter list
76     parameterbase()
77     {
78         _parameters.add(this);
79     }
80     virtual ~parameterbase() {}
81
82     virtual std::string validationkey() = 0;
83
84     template<typename T>
85     std::string toString(T v)
86     {
87         std::stringstream s;
88         s << v;
89         return s.str();
90     }
91     inline friend std::ostream& operator<<(std::ostream& os, const parameterbase& par);
92  
93     // List of all parameters
94     static parameterlist _parameters;
95
96
97    
98 };
99 // Need to init the static variable
100 // parameterlist parameterbase::_parameters;
101
102
103 // The actual parameter class
104 // validate parameter specifies if the parameter should be a part of the validity check of the current parameters
105 template<typename T, bool validate>
106 class parameter : public parameterbase
107 {
108 public:
109
110   // Constructor
111   parameter(const std::string &name_,
112             T                  value_,
113             bool               required_ = true)
114     : parameterbase()
115     , _name(name_)
116     , _value(value_)
117     , _validate(validate)
118     , _required(required_) {}
119
120     virtual ~parameter() {}
121 //     T operator()() const {
122 //         return _value;
123 //     }
124
125     parameter &operator=(T v) { _value = v; return *this;}
126     T* ptr() const {
127         return const_cast<T*>(&_value);
128     }
129     
130     T value() const { return _value; }
131     
132     std::string name() const { return _name;}
133     
134     bool required() const { return _required; }
135     
136     void setValue(T v) { _value = v; }
137     
138     void setName(std::string name_) { _name = name_; }
139     
140     void setRequired(bool r) { _required = r; }
141     
142     // Validation key for this parameter
143     std::string validationkey()
144     {
145         return (_validate ? _name + ":" + toString(_value) + "-" : std::string(""));
146     }
147
148     template<typename S, bool v>
149     inline friend std::ostream& operator<<(std::ostream& os, const parameter<S,v>& par);
150
151
152
153 private:
154     std::string _name;
155
156     T _value; // Value
157     bool _validate; // true if a change in the parameter invalidates x-sec tables
158     bool _required; // true if this is required option.
159
160     parameter();
161 };
162
163 template<typename S, bool v>
164 std::ostream& operator<<(std::ostream& os, const parameter<S,v>& par)
165 {
166     os << par._value;
167     return os;
168 }
169
170 std::ostream& operator<<(std::ostream& os, const parameterbase& par)
171 {
172     os << par._parameters.validationKey(); 
173     return os;
174 }
175 std::string parameterlist::validationKey()
176 {
177     std::stringstream s;
178     for(unsigned int i = 0; i < _parameters.size(); ++i)
179     {
180         s << _parameters[i]->validationkey(); // Will print names and values of validation parameters
181     }
182     return s.str();
183 }
184
185 class inputParameters {
186
187 private:
188         // inputParameters is now a singleton
189         friend class Singleton<inputParameters>;
190         inputParameters();
191 public:
192
193         ~inputParameters();
194
195         bool init();
196         bool configureFromFile(const std::string &configFileName = "./config/slight.in");
197
198         unsigned int beam1Z                () const { return _beam1Z.value();                 }  ///< returns atomic number of beam particle 1
199         unsigned int beam1A                () const { return _beam1A.value();                 }  ///< returns atomic mass number of beam particle 1
200         unsigned int beam2Z                () const { return _beam2Z.value();                 }  ///< returns atomic number of beam particle 2
201         unsigned int beam2A                () const { return _beam2A.value();                 }  ///< returns atomic mass number of beam particle 2
202         double       beamLorentzGamma      () const { return _beamLorentzGamma;               }  ///< returns Lorentz gamma factor of both beams in beam CMS frame
203         double       beam1LorentzGamma     () const { return _beam1LorentzGamma.value();      }  ///< returns Lorentz gamma factor of beam 1 in collider frame
204         double       beam2LorentzGamma     () const { return _beam2LorentzGamma.value();      }  ///< returns Lorentz gamma factor of beam 2 in collider frame
205         double       maxW                  () const { return _maxW.value();                   }  ///< returns maximum mass W of produced hadronic system [GeV/c^2]
206         double       minW                  () const { return _minW.value();                   }  ///< returns minimum mass W of produced hadronic system [GeV/c^2]
207         unsigned int nmbWBins              () const { return _nmbWBins.value();               }  ///< returns number of W bins in lookup table
208         double       maxRapidity           () const { return _maxRapidity.value();            }  ///< returns maximum absolute value of rapidity
209         unsigned int nmbRapidityBins       () const { return _nmbRapidityBins.value();        }  ///< returns number of rapidity bins in lookup table
210         bool         ptCutEnabled          () const { return _ptCutEnabled.value();           }  ///< returns cut in pt
211         double       ptCutMin              () const { return _ptCutMin.value();               }  ///< returns minimum pt
212         double       ptCutMax              () const { return _ptCutMax.value();               }  ///< returns maximum pt
213         bool         etaCutEnabled         () const { return _etaCutEnabled.value();          }  ///< returns cut in eta
214         double       etaCutMin             () const { return _etaCutMin.value();              }  ///< returns minimum eta
215         double       etaCutMax             () const { return _etaCutMax.value();              }  ///< returns maximum eta
216         int          productionMode        () const { return _productionMode.value();         }  ///< returns production mode
217         unsigned int nmbEvents             () const { return _nmbEventsTot.value();           }  ///< returns total number of events to generate
218         int          prodParticleId        () const { return _prodParticleId.value();         }  ///< returns PDG particle ID of produced particle
219         int          randomSeed            () const { return _randomSeed.value();             }  ///< returns seed for random number generator
220         int          outputFormat          () const { return _outputFormat.value();           }  ///< returns output format
221         int          beamBreakupMode       () const { return _beamBreakupMode.value();        }  ///< returns breakup mode for beam particles
222         bool         interferenceEnabled   () const { return _interferenceEnabled.value();    }  ///< returns whether interference is taken into account
223         double       interferenceStrength  () const { return _interferenceStrength.value();   }  ///< returns percentage of interference
224         bool         coherentProduction    () const { return _coherentProduction.value();     }  ///< returns whether production is coherent or incoherent
225         double       incoherentFactor      () const { return _incoherentFactor.value();       }  ///< returns incoherent contribution in vector meson production
226         double       deuteronSlopePar      () const { return _deuteronSlopePar.value();       }  ///< returns slope parameter for deuteron form factor [(GeV/c)^{-2}]
227         double       maxPtInterference     () const { return _maxPtInterference.value();      }  ///< returns maximum p_T for interference calculation [GeV/c]
228         int          nmbPtBinsInterference () const { return _nmbPtBinsInterference.value();  }  ///< returns number of p_T bins for interference calculation
229         double       ptBinWidthInterference() const { return _ptBinWidthInterference.value(); }  ///< returns width of p_T bins for interference calculation [GeV/c]
230         double       minGammaEnergy        () const { return _minGammaEnergy.value();         }  ///< returns minimum gamma energy in case of photo nuclear processes [GeV]
231         double       maxGammaEnergy        () const { return _maxGammaEnergy.value();         }  ///< returns maximum gamma energy in case of photo nuclear processes [GeV]
232         std::string  pythiaParams          () const { return _pythiaParams.value();           }  ///< returns parameters to be passed to pythia
233         bool         pythiaFullEventRecord () const { return _pythiaFullEventRecord.value();  }  ///< returns if the full pythia event record should be printed
234         int          xsecCalcMethod        () const { return _xsecCalcMethod.value();         }  ///< returns the method used for the x-sec calculation
235         int          nThreads              () const { return _nThreads.value();               }  ///< returns the number of threads in case method 1 is used for the x-sec calc
236         unsigned int nBinsQKniehl          () const { return _nBinsQKniehl.value();           }  ///< Number of bins in Q used for the transformation to the impact paramter space of the Kniehl function
237         unsigned int nBinsEKniehl          () const { return _nBinsEKniehl.value();           }  ///< Number of bins in photon energy used for the Kniehl function
238         unsigned int nBinsBKniehl          () const { return _nBinsBKniehl.value();           }  ///< Number of bins in impact parameter used for the Kniehl function
239         double       qMaxKniehl            () const { return _qMaxKniehl.value();             }  ///< Max value of Q used for the Kniehl funcion
240         double       eGammaMinKniehl       () const { return _eGammaMinKniehl.value();        }  ///< Min value of gamma energy used for the Kniehl funcion
241         double       eGammaMaxKniehl       () const { return _eGammaMaxKniehl.value();        }  ///< Max value of gamma energy used for the Kniehl funcion
242         double       bMinKniehl            () const { return _bMinKniehl.value();             }  ///< Min value of impact parameter used for the Kniehl funcion
243         double       bMaxKniehl            () const { return _bMaxKniehl.value();             }  ///< Max value of impact parameter used for the Kniehl funcion
244         
245         starlightConstants::particleTypeEnum    prodParticleType     () const { return _particleType;    }  ///< returns type of produced particle
246         starlightConstants::decayTypeEnum       prodParticleDecayType() const { return _decayType;       }  ///< returns decay type of produced particle
247         starlightConstants::interactionTypeEnum interactionType      () const { return _interactionType; }  ///< returns interaction type
248         // double vmPhotonCoupling();
249         // double slopeParameter();
250         double protonEnergy                () const { return _protonEnergy.value(); }
251
252         void setBeam1Z                (unsigned int v)  {  _beam1Z = v;                 }  ///< returns atomic number of beam particle 1
253         void setBeam1A                (unsigned int v)  {  _beam1A = v;                 }  ///< returns atomic mass number of beam particle 1
254         void setBeam2Z                (unsigned int v)  {  _beam2Z = v;                 }  ///< returns atomic number of beam particle 2
255         void setBeam2A                (unsigned int v)  {  _beam2A = v;                 }  ///< returns atomic mass number of beam particle 2
256         void setBeamLorentzGamma      (double v)  {  _beamLorentzGamma = v;       }  ///< returns Lorentz gamma factor of both beams in beam CMS frame
257         void setBeam1LorentzGamma     (double v)  {  _beam1LorentzGamma = v;      }  ///< returns Lorentz gamma factor of beam 1 in collider frame
258         void setBeam2LorentzGamma     (double v)  {  _beam2LorentzGamma = v;      }  ///< returns Lorentz gamma factor of beam 2 in collider frame
259         void setMaxW                  (double v)  {  _maxW = v;                   }  ///< returns maximum mass W of produced hadronic system [GeV/c^2]
260         void setMinW                  (double v)  {  _minW = v;                   }  ///< returns minimum mass W of produced hadronic system [GeV/c^2]
261         void setNmbWBins              (unsigned int v)  {  _nmbWBins = v;               }  ///< returns number of W bins in lookup table
262         void setMaxRapidity           (double v)  {  _maxRapidity = v;            }  ///< returns maximum absolute value of rapidity
263         void setNmbRapidityBins       (unsigned int v)  {  _nmbRapidityBins = v;        }  ///< returns number of rapidity bins in lookup table
264         void setPtCutEnabled          (bool v)  {  _ptCutEnabled = v;           }  ///< returns cut in pt
265         void setPtCutMin              (double v)  {  _ptCutMin = v;               }  ///< returns minimum pt
266         void setPtCutMax              (double v)  {  _ptCutMax = v;               }  ///< returns maximum pt
267         void setEtaCutEnabled         (bool v)  {  _etaCutEnabled = v;          }  ///< returns cut in eta
268         void setEtaCutMin             (double v)  {  _etaCutMin = v;              }  ///< returns minimum eta
269         void setEtaCutMax             (double v)  {  _etaCutMax = v;              }  ///< returns maximum eta
270         void setProductionMode        (int v)  {  _productionMode = v;         }  ///< returns production mode
271         void setNmbEvents             (unsigned int v)  {  _nmbEventsTot = v;           }  ///< returns total number of events to generate
272         void setProdParticleId        (int v)  {  _prodParticleId = v;         }  ///< returns PDG particle ID of produced particle
273         void setRandomSeed            (int v)  {  _randomSeed = v;             }  ///< returns seed for random number generator
274         void setOutputFormat          (int v)  {  _outputFormat = v;           }  ///< returns output format
275         void setBeamBreakupMode       (int v)  {  _beamBreakupMode = v;        }  ///< returns breakup mode for beam particles
276         void setInterferenceEnabled   (bool v)  {  _interferenceEnabled = v;    }  ///< returns whether interference is taken into account
277         void setInterferenceStrength  (double v)  {  _interferenceStrength = v;   }  ///< returns percentage of interference
278         void setCoherentProduction    (bool v)  {  _coherentProduction = v;     }  ///< returns whether production is coherent or incoherent
279         void setIncoherentFactor      (double v)  {  _incoherentFactor = v;       }  ///< returns incoherent contribution in vector meson production
280         void setDeuteronSlopePar      (double v)  {  _deuteronSlopePar = v;       }  ///< returns slope parameter for deuteron form factor [(GeV/c)^{-2}]
281         void setMaxPtInterference     (double v)  {  _maxPtInterference = v;      }  ///< returns maximum p_T for voiderference calculation [GeV/c]
282         void setNmbPtBinsInterference (int v)  {  _nmbPtBinsInterference = v;  }  ///< returns number of p_T bins for interference calculation
283         void setPtBinWidthInterference(double v)  {  _ptBinWidthInterference = v; }  ///< returns width of p_T bins for voiderference calculation [GeV/c]
284         void setMinGammaEnergy        (double v)  {  _minGammaEnergy = v;         }  ///< returns minimum gamma energy in case of photo nuclear processes [GeV]
285         void setMaxGammaEnergy        (double v)  {  _maxGammaEnergy = v;         }  ///< returns maximum gamma energy in case of photo nuclear processes [GeV]
286         void setPythiaParams          (std::string v)  {  _pythiaParams = v;           }  ///< returns parameters to be passed to pythia
287         void setPythiaFullEventRecord (bool v)  {  _pythiaFullEventRecord = v;  }  ///< returns if the full pythia event record should be prvoided
288         void setXsecCalcMethod        (int v)  {  _xsecCalcMethod = v;         }  ///< returns the method used for the x-sec calculation
289         void setNThreads              (int v)  {  _nThreads = v;               }  ///< returns the number of threads in case method 1 is used for the x-sec calc
290         void setNBinsQKniehl          (unsigned int v)  {  _nBinsQKniehl = v;           }  ///< Number of bins in Q used for the transformation to the impact paramter space of the Kniehl function
291         void setNBinsEKniehl          (unsigned int v)  {  _nBinsEKniehl = v;           }  ///< Number of bins in photon energy used for the Kniehl function
292         void setNBinsBKniehl          (unsigned int v)  {  _nBinsBKniehl = v;           }  ///< Number of bins in impact parameter used for the Kniehl function
293         void setQMaxKniehl            (double v)  {  _qMaxKniehl = v;             }  ///< Max value of Q used for the Kniehl funcion
294         void setEGammaMinKniehl       (double v)  {  _eGammaMinKniehl = v;        }  ///< Min value of gamma energy used for the Kniehl funcion
295         void setEGammaMaxKniehl       (double v)  {  _eGammaMaxKniehl = v;        }  ///< Max value of gamma energy used for the Kniehl funcion
296         void setBMinKniehl            (double v)  {  _bMinKniehl = v;             }  ///< Min value of impact parameter used for the Kniehl funcion
297         void setBMaxKniehl            (double v)  {  _bMaxKniehl = v;             }  ///< Max value of impact parameter used for the Kniehl funcion
298         
299         void setProdParticleType      (starlightConstants::particleTypeEnum v)   { _particleType = v;    }  ///< returns type of produced particle
300         void setProdParticleDecayType (starlightConstants::decayTypeEnum v)        { _decayType = v;       }  ///< returns decay type of produced particle
301         void setInteractionType       (starlightConstants::interactionTypeEnum v)  { _interactionType = v; }  ///< returns interaction type
302          
303         // double vmPhotonCoupling();
304         // double slopeParameter();
305         void setProtonEnergy        (double v)  { _protonEnergy = v; }
306         
307 //      template<typename T>
308         inline bool setParameter(std::string expression);
309         
310         std::ostream& print(std::ostream& out) const;  ///< prints parameter summary
311         std::ostream& write(std::ostream& out) const;  ///< writes parameters back to an ostream
312         
313         std::string parameterValueKey() const; ///< Generates key for the current parameters
314
315   
316 private:
317
318     
319 // To indicate if the crossection table should be re-calculated if parameter changes
320 #define VALIDITY_CHECK true
321 #define NO_VALIDITY_CHECK false
322         
323         std::string _configFileName;  ///< path to configuration file (default = ./config/slight.in)
324
325         // config file parameters
326         parameter<unsigned int,VALIDITY_CHECK>     _beam1Z;                  ///< atomic number of beam particle 1
327         parameter<unsigned int,VALIDITY_CHECK>     _beam1A;                  ///< atomic mass number of beam particle 1
328         parameter<unsigned int,VALIDITY_CHECK>     _beam2Z;                  ///< atomic number of beam particle 2
329         parameter<unsigned int,VALIDITY_CHECK>     _beam2A;                  ///< atomic mass number of beam particle 2
330         parameter<double, VALIDITY_CHECK>          _beam1LorentzGamma;       ///< Lorentz gamma factor of beam 1 in collider frame
331         parameter<double, VALIDITY_CHECK>          _beam2LorentzGamma;       ///< Lorentz gamma factor of beam 2 in collider frame
332         parameter<double, VALIDITY_CHECK>          _maxW;                    ///< maximum mass W of produced hadronic system [GeV/c^2]
333         parameter<double, VALIDITY_CHECK>          _minW;                    ///< minimum mass W of produced hadronic system; if set to -1 default value is taken [GeV/c^2]
334         parameter<unsigned int, VALIDITY_CHECK>    _nmbWBins;                ///< number of W bins in lookup table
335         parameter<double, VALIDITY_CHECK>          _maxRapidity;             ///< maximum absolute value of rapidity
336         parameter<unsigned int, VALIDITY_CHECK>    _nmbRapidityBins;         ///< number of rapidity bins in lookup table
337         parameter<bool, VALIDITY_CHECK>            _ptCutEnabled;            ///< en/disables cut in pt
338         parameter<double, VALIDITY_CHECK>          _ptCutMin;                ///< minimum pt, if cut is enabled
339         parameter<double, VALIDITY_CHECK>          _ptCutMax;                ///< maximum pt, if cut is enabled
340         parameter<bool, VALIDITY_CHECK>            _etaCutEnabled;           ///< en/disables cut in eta
341         parameter<double, VALIDITY_CHECK>          _etaCutMin;               ///< minimum eta, if cut is enabled
342         parameter<double, VALIDITY_CHECK>          _etaCutMax;               ///< maximum eta, if cut is enabled
343         parameter<unsigned int, VALIDITY_CHECK>    _productionMode;          ///< \brief production mode
344                                                                              ///<
345                                                                              ///< 1 = photon-photon fusion,
346                                                                              ///< 2 = narrow vector meson resonance in photon-Pomeron fusion,
347                                                                              ///< 3 = Breit-Wigner vector meson resonance in photon-Pomeron fusion
348         parameter<unsigned int, VALIDITY_CHECK>    _nmbEventsTot;            ///< total number of events to generate
349         parameter<unsigned int, VALIDITY_CHECK>    _prodParticleId;          ///< PDG particle ID of produced particle
350         parameter<unsigned int, VALIDITY_CHECK>    _randomSeed;              ///< seed for random number generator
351         parameter<unsigned int, NO_VALIDITY_CHECK> _outputFormat;            ///< \brief output format
352                                                                              ///<
353                                                                              ///< 1 = ASCII
354                                                                              ///< 2 = GSTARtext,
355                                                                              ///< 3 = PAW ntuple (not working)
356         parameter<unsigned int, VALIDITY_CHECK>    _beamBreakupMode;         ///< \brief breakup mode for beam particles
357                                                                              ///<
358                                                                              ///< 1 = hard sphere nuclei (b > 2R),
359                                                                              ///< 2 = both nuclei break up (XnXn),
360                                                                              ///< 3 = a single neutron from each nucleus (1n1n),
361                                                                              ///< 4 = neither nucleon breaks up (with b > 2R),
362                                                                              ///< 5 = no hadronic break up (similar to option 1, but with the actual hadronic interaction)
363         parameter<bool, VALIDITY_CHECK>            _interferenceEnabled;     ///< if VALIDITY_CHECK, interference is taken into account
364         parameter<double, VALIDITY_CHECK>          _interferenceStrength;    ///< percentage of interference: from 0 = none to 1 = full
365         parameter<bool, VALIDITY_CHECK>            _coherentProduction;      ///< if VALIDITY_CHECK, production is coherent, else incoherent
366         parameter<double, VALIDITY_CHECK>          _incoherentFactor;        ///< allows to scale the incoherent contribution in vector meson production
367         parameter<double, VALIDITY_CHECK>          _deuteronSlopePar;        ///< slope parameter for deuteron form factor [(GeV/c)^{-2}]
368         parameter<double, VALIDITY_CHECK>          _maxPtInterference;       ///< maximum p_T for interference calculation [GeV/c]
369         parameter<unsigned int, VALIDITY_CHECK>    _nmbPtBinsInterference;   ///< number of p_T bins for interference calculation
370         parameter<double, VALIDITY_CHECK>          _ptBinWidthInterference;  ///< width of p_T bins for interference calculation [GeV/c]
371         parameter<double, VALIDITY_CHECK>          _protonEnergy;
372         parameter<double, VALIDITY_CHECK>          _minGammaEnergy;          ///< minimum gamma energy in case of photo nuclear processes [GeV]
373         parameter<double, VALIDITY_CHECK>          _maxGammaEnergy;          ///< maximum gamma energy in case of photo nuclear processes [GeV]
374         parameter<std::string,NO_VALIDITY_CHECK>   _pythiaParams;            ///< semi-colon separated parameters to pass to pythia, e.g. "mstj(1)=0;paru(13)=0.1" 
375         parameter<bool, NO_VALIDITY_CHECK>         _pythiaFullEventRecord;   ///< if the full pythia event record should be in the outputu
376         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)
377         parameter<unsigned int, NO_VALIDITY_CHECK> _nThreads;                ///< Number of threads used in the case of using method 1 for calculating the x-sections
378         parameter<unsigned int, VALIDITY_CHECK>    _nBinsQKniehl;            ///< Number of bins in Q used for the transformation to the impact paramter space of the Kniehl function
379         parameter<unsigned int, VALIDITY_CHECK>    _nBinsEKniehl;            ///< Number of bins in photon energy used for the Kniehl function
380         parameter<unsigned int, VALIDITY_CHECK>    _nBinsBKniehl;            ///< Number of bins in impact parameter used for the Kniehl function
381         parameter<double, VALIDITY_CHECK>          _qMaxKniehl;              ///< Max value of Q used for the Kniehl funcion
382         parameter<double, VALIDITY_CHECK>          _eGammaMinKniehl;         ///< Min value of gamma energy used for the Kniehl funcion
383         parameter<double, VALIDITY_CHECK>          _eGammaMaxKniehl;         ///< Max value of gamma energy used for the Kniehl funcion
384         parameter<double, VALIDITY_CHECK>          _bMinKniehl;              ///< Min value of impact parameter used for the Kniehl funcion
385         parameter<double, VALIDITY_CHECK>          _bMaxKniehl;              ///< Max value of impact parameter used for the Kniehl funcion
386         
387         
388         starlightConstants::particleTypeEnum       _particleType;
389         starlightConstants::decayTypeEnum          _decayType;
390         starlightConstants::interactionTypeEnum    _interactionType;
391
392         double                         _beamLorentzGamma;                    ///< Lorentz gamma factor of the beams in CMS frame, not an input parameter
393         
394         inputParser _ip;
395         
396 };
397
398 #define inputParametersInstance Singleton<inputParameters>::instance()
399
400 // template<typename T>
401 inline 
402 bool inputParameters::setParameter(std::string expression)
403 {
404    
405     return _ip.parseString(expression);
406    
407    
408 }
409
410 inline
411 std::ostream&
412 operator <<(std::ostream&          out,
413             const inputParameters& par)
414 {
415         return par.print(out);
416 }
417  
418
419 #endif  // INPUTPARAMETERS_H