]>
Commit | Line | Data |
---|---|---|
da32329d AM |
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: | |
45d54d9a | 23 | // $Rev:: 176 $: revision of last commit |
24 | // $Author:: jseger $: author of last commit | |
25 | // $Date:: 2014-06-20 22:15:20 +0200 #$: date of last commit | |
da32329d AM |
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() {} | |
da32329d AM |
81 | virtual std::string validationkey() = 0; |
82 | ||
83 | template<typename T> | |
84 | std::string toString(T v) | |
85 | { | |
86 | std::stringstream s; | |
87 | s << v; | |
88 | return s.str(); | |
89 | } | |
90 | inline friend std::ostream& operator<<(std::ostream& os, const parameterbase& par); | |
91 | ||
92 | // List of all parameters | |
93 | static parameterlist _parameters; | |
94 | ||
95 | ||
96 | ||
97 | }; | |
98 | // Need to init the static variable | |
99 | // parameterlist parameterbase::_parameters; | |
100 | ||
101 | ||
102 | // The actual parameter class | |
103 | // validate parameter specifies if the parameter should be a part of the validity check of the current parameters | |
104 | template<typename T, bool validate> | |
105 | class parameter : public parameterbase | |
106 | { | |
107 | public: | |
108 | ||
45d54d9a | 109 | // Constructor |
110 | parameter(const std::string& name_, | |
111 | T value_, | |
112 | bool required_ = true) | |
113 | :parameterbase() | |
114 | ,_name(name_) | |
115 | , _value(value_) | |
116 | , _validate(validate) | |
117 | , _required(required_) {} | |
118 | ||
119 | virtual ~parameter() {} | |
120 | ||
da32329d AM |
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> | |
3fa398e0 | 149 | friend std::ostream& operator<<(std::ostream& os, const parameter<S,v>& par); |
da32329d AM |
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>; | |
da32329d | 190 | public: |
a2de4243 | 191 | inputParameters(); |
192 | private: | |
da32329d | 193 | ~inputParameters(); |
a2de4243 | 194 | public: |
da32329d AM |
195 | |
196 | bool init(); | |
197 | bool configureFromFile(const std::string &configFileName = "./config/slight.in"); | |
198 | ||
199 | unsigned int beam1Z () const { return _beam1Z.value(); } ///< returns atomic number of beam particle 1 | |
200 | unsigned int beam1A () const { return _beam1A.value(); } ///< returns atomic mass number of beam particle 1 | |
201 | unsigned int beam2Z () const { return _beam2Z.value(); } ///< returns atomic number of beam particle 2 | |
202 | unsigned int beam2A () const { return _beam2A.value(); } ///< returns atomic mass number of beam particle 2 | |
45d54d9a | 203 | double beamLorentzGamma () const { return _beamLorentzGamma; } ///< returns Lorentz gamma factor of both beams in beam CMS frame |
da32329d AM |
204 | double beam1LorentzGamma () const { return _beam1LorentzGamma.value(); } ///< returns Lorentz gamma factor of beam 1 in collider frame |
205 | double beam2LorentzGamma () const { return _beam2LorentzGamma.value(); } ///< returns Lorentz gamma factor of beam 2 in collider frame | |
206 | double maxW () const { return _maxW.value(); } ///< returns maximum mass W of produced hadronic system [GeV/c^2] | |
207 | double minW () const { return _minW.value(); } ///< returns minimum mass W of produced hadronic system [GeV/c^2] | |
208 | unsigned int nmbWBins () const { return _nmbWBins.value(); } ///< returns number of W bins in lookup table | |
209 | double maxRapidity () const { return _maxRapidity.value(); } ///< returns maximum absolute value of rapidity | |
210 | unsigned int nmbRapidityBins () const { return _nmbRapidityBins.value(); } ///< returns number of rapidity bins in lookup table | |
211 | bool ptCutEnabled () const { return _ptCutEnabled.value(); } ///< returns cut in pt | |
212 | double ptCutMin () const { return _ptCutMin.value(); } ///< returns minimum pt | |
213 | double ptCutMax () const { return _ptCutMax.value(); } ///< returns maximum pt | |
214 | bool etaCutEnabled () const { return _etaCutEnabled.value(); } ///< returns cut in eta | |
215 | double etaCutMin () const { return _etaCutMin.value(); } ///< returns minimum eta | |
216 | double etaCutMax () const { return _etaCutMax.value(); } ///< returns maximum eta | |
217 | int productionMode () const { return _productionMode.value(); } ///< returns production mode | |
218 | unsigned int nmbEvents () const { return _nmbEventsTot.value(); } ///< returns total number of events to generate | |
219 | int prodParticleId () const { return _prodParticleId.value(); } ///< returns PDG particle ID of produced particle | |
220 | int randomSeed () const { return _randomSeed.value(); } ///< returns seed for random number generator | |
da32329d AM |
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 | |
da32329d AM |
224 | double maxPtInterference () const { return _maxPtInterference.value(); } ///< returns maximum p_T for interference calculation [GeV/c] |
225 | int nmbPtBinsInterference () const { return _nmbPtBinsInterference.value(); } ///< returns number of p_T bins for interference calculation | |
226 | double ptBinWidthInterference() const { return _ptBinWidthInterference.value(); } ///< returns width of p_T bins for interference calculation [GeV/c] | |
45d54d9a | 227 | bool coherentProduction () const { return _coherentProduction.value(); } ///< returns whether production is coherent or incoherent |
228 | double incoherentFactor () const { return _incoherentFactor.value(); } ///< returns incoherent contribution in vector meson production | |
da32329d AM |
229 | double minGammaEnergy () const { return _minGammaEnergy.value(); } ///< returns minimum gamma energy in case of photo nuclear processes [GeV] |
230 | double maxGammaEnergy () const { return _maxGammaEnergy.value(); } ///< returns maximum gamma energy in case of photo nuclear processes [GeV] | |
231 | std::string pythiaParams () const { return _pythiaParams.value(); } ///< returns parameters to be passed to pythia | |
232 | bool pythiaFullEventRecord () const { return _pythiaFullEventRecord.value(); } ///< returns if the full pythia event record should be printed | |
233 | int xsecCalcMethod () const { return _xsecCalcMethod.value(); } ///< returns the method used for the x-sec calculation | |
234 | int nThreads () const { return _nThreads.value(); } ///< returns the number of threads in case method 1 is used for the x-sec calc | |
235 | 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 | |
236 | unsigned int nBinsEKniehl () const { return _nBinsEKniehl.value(); } ///< Number of bins in photon energy used for the Kniehl function | |
237 | unsigned int nBinsBKniehl () const { return _nBinsBKniehl.value(); } ///< Number of bins in impact parameter used for the Kniehl function | |
238 | double qMaxKniehl () const { return _qMaxKniehl.value(); } ///< Max value of Q used for the Kniehl funcion | |
239 | double eGammaMinKniehl () const { return _eGammaMinKniehl.value(); } ///< Min value of gamma energy used for the Kniehl funcion | |
240 | double eGammaMaxKniehl () const { return _eGammaMaxKniehl.value(); } ///< Max value of gamma energy used for the Kniehl funcion | |
241 | double bMinKniehl () const { return _bMinKniehl.value(); } ///< Min value of impact parameter used for the Kniehl funcion | |
242 | double bMaxKniehl () const { return _bMaxKniehl.value(); } ///< Max value of impact parameter used for the Kniehl funcion | |
243 | ||
244 | starlightConstants::particleTypeEnum prodParticleType () const { return _particleType; } ///< returns type of produced particle | |
245 | starlightConstants::decayTypeEnum prodParticleDecayType() const { return _decayType; } ///< returns decay type of produced particle | |
246 | starlightConstants::interactionTypeEnum interactionType () const { return _interactionType; } ///< returns interaction type | |
247 | // double vmPhotonCoupling(); | |
248 | // double slopeParameter(); | |
249 | double protonEnergy () const { return _protonEnergy.value(); } | |
250 | ||
251 | void setBeam1Z (unsigned int v) { _beam1Z = v; } ///< returns atomic number of beam particle 1 | |
252 | void setBeam1A (unsigned int v) { _beam1A = v; } ///< returns atomic mass number of beam particle 1 | |
253 | void setBeam2Z (unsigned int v) { _beam2Z = v; } ///< returns atomic number of beam particle 2 | |
254 | void setBeam2A (unsigned int v) { _beam2A = v; } ///< returns atomic mass number of beam particle 2 | |
255 | void setBeamLorentzGamma (double v) { _beamLorentzGamma = v; } ///< returns Lorentz gamma factor of both beams in beam CMS frame | |
256 | void setBeam1LorentzGamma (double v) { _beam1LorentzGamma = v; } ///< returns Lorentz gamma factor of beam 1 in collider frame | |
257 | void setBeam2LorentzGamma (double v) { _beam2LorentzGamma = v; } ///< returns Lorentz gamma factor of beam 2 in collider frame | |
258 | void setMaxW (double v) { _maxW = v; } ///< returns maximum mass W of produced hadronic system [GeV/c^2] | |
259 | void setMinW (double v) { _minW = v; } ///< returns minimum mass W of produced hadronic system [GeV/c^2] | |
260 | void setNmbWBins (unsigned int v) { _nmbWBins = v; } ///< returns number of W bins in lookup table | |
261 | void setMaxRapidity (double v) { _maxRapidity = v; } ///< returns maximum absolute value of rapidity | |
262 | void setNmbRapidityBins (unsigned int v) { _nmbRapidityBins = v; } ///< returns number of rapidity bins in lookup table | |
263 | void setPtCutEnabled (bool v) { _ptCutEnabled = v; } ///< returns cut in pt | |
264 | void setPtCutMin (double v) { _ptCutMin = v; } ///< returns minimum pt | |
265 | void setPtCutMax (double v) { _ptCutMax = v; } ///< returns maximum pt | |
266 | void setEtaCutEnabled (bool v) { _etaCutEnabled = v; } ///< returns cut in eta | |
267 | void setEtaCutMin (double v) { _etaCutMin = v; } ///< returns minimum eta | |
268 | void setEtaCutMax (double v) { _etaCutMax = v; } ///< returns maximum eta | |
269 | void setProductionMode (int v) { _productionMode = v; } ///< returns production mode | |
270 | void setNmbEvents (unsigned int v) { _nmbEventsTot = v; } ///< returns total number of events to generate | |
271 | void setProdParticleId (int v) { _prodParticleId = v; } ///< returns PDG particle ID of produced particle | |
272 | void setRandomSeed (int v) { _randomSeed = v; } ///< returns seed for random number generator | |
da32329d AM |
273 | void setBeamBreakupMode (int v) { _beamBreakupMode = v; } ///< returns breakup mode for beam particles |
274 | void setInterferenceEnabled (bool v) { _interferenceEnabled = v; } ///< returns whether interference is taken into account | |
275 | void setInterferenceStrength (double v) { _interferenceStrength = v; } ///< returns percentage of interference | |
da32329d AM |
276 | void setMaxPtInterference (double v) { _maxPtInterference = v; } ///< returns maximum p_T for voiderference calculation [GeV/c] |
277 | void setNmbPtBinsInterference (int v) { _nmbPtBinsInterference = v; } ///< returns number of p_T bins for interference calculation | |
278 | void setPtBinWidthInterference(double v) { _ptBinWidthInterference = v; } ///< returns width of p_T bins for voiderference calculation [GeV/c] | |
45d54d9a | 279 | void setCoherentProduction (bool v) { _coherentProduction = v; } ///< returns whether production is coherent or incoherent |
280 | void setIncoherentFactor (double v) { _incoherentFactor = v; } ///< returns incoherent contribution in vector meson production | |
da32329d AM |
281 | void setMinGammaEnergy (double v) { _minGammaEnergy = v; } ///< returns minimum gamma energy in case of photo nuclear processes [GeV] |
282 | void setMaxGammaEnergy (double v) { _maxGammaEnergy = v; } ///< returns maximum gamma energy in case of photo nuclear processes [GeV] | |
283 | void setPythiaParams (std::string v) { _pythiaParams = v; } ///< returns parameters to be passed to pythia | |
284 | void setPythiaFullEventRecord (bool v) { _pythiaFullEventRecord = v; } ///< returns if the full pythia event record should be prvoided | |
285 | void setXsecCalcMethod (int v) { _xsecCalcMethod = v; } ///< returns the method used for the x-sec calculation | |
286 | void setNThreads (int v) { _nThreads = v; } ///< returns the number of threads in case method 1 is used for the x-sec calc | |
287 | 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 | |
288 | void setNBinsEKniehl (unsigned int v) { _nBinsEKniehl = v; } ///< Number of bins in photon energy used for the Kniehl function | |
289 | void setNBinsBKniehl (unsigned int v) { _nBinsBKniehl = v; } ///< Number of bins in impact parameter used for the Kniehl function | |
290 | void setQMaxKniehl (double v) { _qMaxKniehl = v; } ///< Max value of Q used for the Kniehl funcion | |
291 | void setEGammaMinKniehl (double v) { _eGammaMinKniehl = v; } ///< Min value of gamma energy used for the Kniehl funcion | |
292 | void setEGammaMaxKniehl (double v) { _eGammaMaxKniehl = v; } ///< Max value of gamma energy used for the Kniehl funcion | |
293 | void setBMinKniehl (double v) { _bMinKniehl = v; } ///< Min value of impact parameter used for the Kniehl funcion | |
294 | void setBMaxKniehl (double v) { _bMaxKniehl = v; } ///< Max value of impact parameter used for the Kniehl funcion | |
295 | ||
296 | void setProdParticleType (starlightConstants::particleTypeEnum v) { _particleType = v; } ///< returns type of produced particle | |
297 | void setProdParticleDecayType (starlightConstants::decayTypeEnum v) { _decayType = v; } ///< returns decay type of produced particle | |
298 | void setInteractionType (starlightConstants::interactionTypeEnum v) { _interactionType = v; } ///< returns interaction type | |
299 | ||
300 | // double vmPhotonCoupling(); | |
301 | // double slopeParameter(); | |
302 | void setProtonEnergy (double v) { _protonEnergy = v; } | |
303 | ||
45d54d9a | 304 | /* template<typename T> */ |
da32329d AM |
305 | inline bool setParameter(std::string expression); |
306 | ||
307 | std::ostream& print(std::ostream& out) const; ///< prints parameter summary | |
308 | std::ostream& write(std::ostream& out) const; ///< writes parameters back to an ostream | |
309 | ||
310 | std::string parameterValueKey() const; ///< Generates key for the current parameters | |
311 | ||
312 | ||
313 | private: | |
314 | ||
315 | ||
316 | // To indicate if the crossection table should be re-calculated if parameter changes | |
317 | #define VALIDITY_CHECK true | |
318 | #define NO_VALIDITY_CHECK false | |
319 | ||
320 | std::string _configFileName; ///< path to configuration file (default = ./config/slight.in) | |
321 | ||
322 | // config file parameters | |
323 | parameter<unsigned int,VALIDITY_CHECK> _beam1Z; ///< atomic number of beam particle 1 | |
324 | parameter<unsigned int,VALIDITY_CHECK> _beam1A; ///< atomic mass number of beam particle 1 | |
325 | parameter<unsigned int,VALIDITY_CHECK> _beam2Z; ///< atomic number of beam particle 2 | |
326 | parameter<unsigned int,VALIDITY_CHECK> _beam2A; ///< atomic mass number of beam particle 2 | |
327 | parameter<double, VALIDITY_CHECK> _beam1LorentzGamma; ///< Lorentz gamma factor of beam 1 in collider frame | |
328 | parameter<double, VALIDITY_CHECK> _beam2LorentzGamma; ///< Lorentz gamma factor of beam 2 in collider frame | |
329 | parameter<double, VALIDITY_CHECK> _maxW; ///< maximum mass W of produced hadronic system [GeV/c^2] | |
330 | parameter<double, VALIDITY_CHECK> _minW; ///< minimum mass W of produced hadronic system; if set to -1 default value is taken [GeV/c^2] | |
331 | parameter<unsigned int, VALIDITY_CHECK> _nmbWBins; ///< number of W bins in lookup table | |
332 | parameter<double, VALIDITY_CHECK> _maxRapidity; ///< maximum absolute value of rapidity | |
333 | parameter<unsigned int, VALIDITY_CHECK> _nmbRapidityBins; ///< number of rapidity bins in lookup table | |
334 | parameter<bool, VALIDITY_CHECK> _ptCutEnabled; ///< en/disables cut in pt | |
335 | parameter<double, VALIDITY_CHECK> _ptCutMin; ///< minimum pt, if cut is enabled | |
336 | parameter<double, VALIDITY_CHECK> _ptCutMax; ///< maximum pt, if cut is enabled | |
337 | parameter<bool, VALIDITY_CHECK> _etaCutEnabled; ///< en/disables cut in eta | |
338 | parameter<double, VALIDITY_CHECK> _etaCutMin; ///< minimum eta, if cut is enabled | |
339 | parameter<double, VALIDITY_CHECK> _etaCutMax; ///< maximum eta, if cut is enabled | |
340 | parameter<unsigned int, VALIDITY_CHECK> _productionMode; ///< \brief production mode | |
341 | ///< | |
342 | ///< 1 = photon-photon fusion, | |
343 | ///< 2 = narrow vector meson resonance in photon-Pomeron fusion, | |
344 | ///< 3 = Breit-Wigner vector meson resonance in photon-Pomeron fusion | |
345 | parameter<unsigned int, VALIDITY_CHECK> _nmbEventsTot; ///< total number of events to generate | |
346 | parameter<unsigned int, VALIDITY_CHECK> _prodParticleId; ///< PDG particle ID of produced particle | |
347 | parameter<unsigned int, VALIDITY_CHECK> _randomSeed; ///< seed for random number generator | |
da32329d AM |
348 | ///< |
349 | ///< 1 = ASCII | |
350 | ///< 2 = GSTARtext, | |
351 | ///< 3 = PAW ntuple (not working) | |
352 | parameter<unsigned int, VALIDITY_CHECK> _beamBreakupMode; ///< \brief breakup mode for beam particles | |
353 | ///< | |
354 | ///< 1 = hard sphere nuclei (b > 2R), | |
355 | ///< 2 = both nuclei break up (XnXn), | |
356 | ///< 3 = a single neutron from each nucleus (1n1n), | |
357 | ///< 4 = neither nucleon breaks up (with b > 2R), | |
358 | ///< 5 = no hadronic break up (similar to option 1, but with the actual hadronic interaction) | |
359 | parameter<bool, VALIDITY_CHECK> _interferenceEnabled; ///< if VALIDITY_CHECK, interference is taken into account | |
360 | parameter<double, VALIDITY_CHECK> _interferenceStrength; ///< percentage of interference: from 0 = none to 1 = full | |
da32329d AM |
361 | parameter<double, VALIDITY_CHECK> _maxPtInterference; ///< maximum p_T for interference calculation [GeV/c] |
362 | parameter<unsigned int, VALIDITY_CHECK> _nmbPtBinsInterference; ///< number of p_T bins for interference calculation | |
363 | parameter<double, VALIDITY_CHECK> _ptBinWidthInterference; ///< width of p_T bins for interference calculation [GeV/c] | |
45d54d9a | 364 | parameter<bool, VALIDITY_CHECK> _coherentProduction; ///< if VALIDITY_CHECK, production is coherent, else incoherent |
365 | parameter<double, VALIDITY_CHECK> _incoherentFactor; ///< allows to scale the incoherent contribution in vector meson production | |
da32329d AM |
366 | parameter<double, VALIDITY_CHECK> _protonEnergy; |
367 | parameter<double, VALIDITY_CHECK> _minGammaEnergy; ///< minimum gamma energy in case of photo nuclear processes [GeV] | |
368 | parameter<double, VALIDITY_CHECK> _maxGammaEnergy; ///< maximum gamma energy in case of photo nuclear processes [GeV] | |
369 | parameter<std::string,NO_VALIDITY_CHECK> _pythiaParams; ///< semi-colon separated parameters to pass to pythia, e.g. "mstj(1)=0;paru(13)=0.1" | |
45d54d9a | 370 | parameter<bool, NO_VALIDITY_CHECK> _pythiaFullEventRecord; ///< if the full pythia event record should be in the output |
da32329d AM |
371 | 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) |
372 | parameter<unsigned int, NO_VALIDITY_CHECK> _nThreads; ///< Number of threads used in the case of using method 1 for calculating the x-sections | |
373 | parameter<unsigned int, VALIDITY_CHECK> _nBinsQKniehl; ///< Number of bins in Q used for the transformation to the impact paramter space of the Kniehl function | |
374 | parameter<unsigned int, VALIDITY_CHECK> _nBinsEKniehl; ///< Number of bins in photon energy used for the Kniehl function | |
375 | parameter<unsigned int, VALIDITY_CHECK> _nBinsBKniehl; ///< Number of bins in impact parameter used for the Kniehl function | |
376 | parameter<double, VALIDITY_CHECK> _qMaxKniehl; ///< Max value of Q used for the Kniehl funcion | |
377 | parameter<double, VALIDITY_CHECK> _eGammaMinKniehl; ///< Min value of gamma energy used for the Kniehl funcion | |
378 | parameter<double, VALIDITY_CHECK> _eGammaMaxKniehl; ///< Max value of gamma energy used for the Kniehl funcion | |
379 | parameter<double, VALIDITY_CHECK> _bMinKniehl; ///< Min value of impact parameter used for the Kniehl funcion | |
380 | parameter<double, VALIDITY_CHECK> _bMaxKniehl; ///< Max value of impact parameter used for the Kniehl funcion | |
381 | ||
382 | ||
383 | starlightConstants::particleTypeEnum _particleType; | |
384 | starlightConstants::decayTypeEnum _decayType; | |
385 | starlightConstants::interactionTypeEnum _interactionType; | |
386 | ||
387 | double _beamLorentzGamma; ///< Lorentz gamma factor of the beams in CMS frame, not an input parameter | |
388 | ||
45d54d9a | 389 | inputParser _ip; //! |
da32329d AM |
390 | |
391 | }; | |
392 | ||
393 | #define inputParametersInstance Singleton<inputParameters>::instance() | |
394 | ||
45d54d9a | 395 | /* template<typename T> */ |
da32329d AM |
396 | inline |
397 | bool inputParameters::setParameter(std::string expression) | |
398 | { | |
399 | ||
400 | return _ip.parseString(expression); | |
401 | ||
402 | ||
403 | } | |
404 | ||
405 | inline | |
406 | std::ostream& | |
407 | operator <<(std::ostream& out, | |
408 | const inputParameters& par) | |
409 | { | |
410 | return par.print(out); | |
411 | } | |
412 | ||
413 | ||
414 | #endif // INPUTPARAMETERS_H |