StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
inputParameters.h
1 //
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 //
21 //
22 // File and Version Information:
23 // $Rev:: $: revision of last commit
24 // $Author: jwebb $: author of last commit
25 // $Date: 2012/11/27 22:27:32 $: date of last commit
26 //
27 // Description:
28 //
29 //
30 //
32 
33 
34 #ifndef INPUTPARAMETERS_H
35 #define INPUTPARAMETERS_H
36 
37 
38 #include "starlightconstants.h"
39 //This is where we read in our input values.
40 
41 
43 
44 public:
45 
47  ~inputParameters();
48 
49  bool init(const std::string& configFileName = "./config/slight.in");
50  bool init(std::ifstream &configStream );
51 
52  unsigned int beam1Z () const { return _beam1Z; }
53  unsigned int beam1A () const { return _beam1A; }
54  unsigned int beam2Z () const { return _beam2Z; }
55  unsigned int beam2A () const { return _beam2A; }
56  double beamLorentzGamma () const { return _beamLorentzGamma; }
57  double maxW () const { return _maxW; }
58  double minW () const { return _minW; }
59  unsigned int nmbWBins () const { return _nmbWBins; }
60  double maxRapidity () const { return _maxRapidity; }
61  unsigned int nmbRapidityBins () const { return _nmbRapidityBins; }
62  bool ptCutEnabled () const { return _ptCutEnabled; }
63  double ptCutMin () const { return _ptCutMin; }
64  double ptCutMax () const { return _ptCutMax; }
65  bool etaCutEnabled () const { return _etaCutEnabled; }
66  double etaCutMin () const { return _etaCutMin; }
67  double etaCutMax () const { return _etaCutMax; }
68  int productionMode () const { return _productionMode; }
69  unsigned int nmbEvents () const { return _nmbEventsTot; }
70  int prodParticleId () const { return _prodParticleId; }
71  int randomSeed () const { return _randomSeed; }
72  int outputFormat () const { return _outputFormat; }
73  int beamBreakupMode () const { return _beamBreakupMode; }
74  bool interferenceEnabled () const { return _interferenceEnabled; }
75  double interferenceStrength () const { return _interferenceStrength; }
76  bool coherentProduction () const { return _coherentProduction; }
77  double incoherentFactor () const { return _incoherentFactor; }
78  double deuteronSlopePar () const { return _deuteronSlopePar; }
79  double maxPtInterference () const { return _maxPtInterference; }
80  int nmbPtBinsInterference () const { return _nmbPtBinsInterference; }
81  double ptBinWidthInterference() const { return _ptBinWidthInterference; }
82 
83  starlightConstants::particleTypeEnum prodParticleType () const { return _particleType; }
84  starlightConstants::decayTypeEnum prodParticleDecayType() const { return _decayType; }
85  starlightConstants::interactionTypeEnum interactionType () const { return _interactionType; }
86  // double vmPhotonCoupling();
87  // double slopeParameter();
88  double getProtonEnergy() const { return _protonEnergy; }
89 
90  std::ostream& print(std::ostream& out) const;
91  std::ostream& write(std::ostream& out) const;
92 
93 
94 private:
95 
96  std::string _configFileName;
97 
98  // config file parameters
99  unsigned int _beam1Z;
100  unsigned int _beam1A;
101  unsigned int _beam2Z;
102  unsigned int _beam2A;
103  double _beamLorentzGamma;
104  double _maxW;
105  double _minW;
106  unsigned int _nmbWBins;
107  double _maxRapidity;
108  unsigned int _nmbRapidityBins;
109  bool _ptCutEnabled;
110  double _ptCutMin;
111  double _ptCutMax;
112  bool _etaCutEnabled;
113  double _etaCutMin;
114  double _etaCutMax;
115  int _productionMode;
116  unsigned int _nmbEventsTot;
121  int _prodParticleId;
122  int _randomSeed;
123  int _outputFormat;
124  int _beamBreakupMode;
129  bool _interferenceEnabled;
136  double _interferenceStrength;
137  bool _coherentProduction;
138  double _incoherentFactor;
139  double _deuteronSlopePar;
140  double _maxPtInterference;
141  int _nmbPtBinsInterference;
142  double _ptBinWidthInterference;
143  double _protonEnergy;
144 
145  starlightConstants::particleTypeEnum _particleType;
146  starlightConstants::decayTypeEnum _decayType;
147  starlightConstants::interactionTypeEnum _interactionType;
148 
149 };
150 
151 
152 inline
153 std::ostream&
154 operator <<(std::ostream& out,
155  const inputParameters& par)
156 {
157  return par.print(out);
158 }
159 
160 
161 #endif // INPUTPARAMETERS_H
int outputFormat() const
returns output format
std::ostream & write(std::ostream &out) const
writes parameters back to an ostream
int prodParticleId() const
returns PDG particle ID of produced particle
double minW() const
returns minimum mass W of produced hadronic system [GeV/c^2]
unsigned int nmbRapidityBins() const
returns number of rapidity bins in lookup table
double ptCutMax() const
returns maximum pt
starlightConstants::interactionTypeEnum interactionType() const
returns interaction type
double maxW() const
returns maximum mass W of produced hadronic system [GeV/c^2]
unsigned int beam1Z() const
returns atomic number of beam particle 1
double maxRapidity() const
returns maximum absolute value of rapidity
double deuteronSlopePar() const
returns slope parameter for deuteron form factor [(GeV/c)^{-2}]
double etaCutMax() const
returns maximum eta
double ptCutMin() const
returns minimum pt
unsigned int nmbEvents() const
returns total number of events to generate
std::ostream & print(std::ostream &out) const
prints parameter summary
double maxPtInterference() const
returns maximum p_T for interference calculation [GeV/c]
unsigned int beam2Z() const
returns atomic number of beam particle 2
starlightConstants::particleTypeEnum prodParticleType() const
returns type of produced particle
int randomSeed() const
returns seed for random number generator
bool coherentProduction() const
returns whether production is coherent or incoherent
bool interferenceEnabled() const
returns whether interference is taken into account
int productionMode() const
returns production mode
starlightConstants::decayTypeEnum prodParticleDecayType() const
returns decay type of produced particle
double incoherentFactor() const
returns incoherent contribution in vector meson production
unsigned int beam1A() const
returns atomic mass number of beam particle 1
double interferenceStrength() const
returns percentage of interference
unsigned int beam2A() const
returns atomic mass number of beam particle 2
double ptBinWidthInterference() const
returns width of p_T bins for interference calculation [GeV/c]
bool ptCutEnabled() const
returns cut in pt
int nmbPtBinsInterference() const
returns number of p_T bins for interference calculation
int beamBreakupMode() const
returns breakup mode for beam particles
unsigned int nmbWBins() const
returns number of W bins in lookup table
double beamLorentzGamma() const
returns Lorentz gamma factor of beams in collider frame
double etaCutMin() const
returns minimum eta
bool etaCutEnabled() const
returns cut in eta