Page MenuHomeHEPForge

No OneTemporary

Index: trunk/include/eventfilewriter.h
===================================================================
--- trunk/include/eventfilewriter.h (revision 307)
+++ trunk/include/eventfilewriter.h (revision 308)
@@ -1,66 +1,69 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright 2010
//
// This file is part of starlight.
//
// starlight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// starlight is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with starlight. If not, see <http://www.gnu.org/licenses/>.
//
///////////////////////////////////////////////////////////////////////////
//
// File and Version Information:
// $Rev:: $: revision of last commit
// $Author:: $: author of last commit
// $Date:: $: date of last commit
//
// Description:
//
//
//
///////////////////////////////////////////////////////////////////////////
#ifndef EVENTFILEWRITER_H
#define EVENTFILEWRITER_H
#include <string>
#include "filewriter.h"
-
+#include "inputParameters.h"
class eventFileWriter : public fileWriter
{
public:
/** Default constructor */
eventFileWriter();
/** Constructor with name */
eventFileWriter(std::string filename);
+ /** Write out simulation set up */
+ int writeInit(inputParameters &param );
+
/** Write an UPC event to file */
int writeEvent(upcEvent &event, int eventnumber);
/** Set if we want to write full pythia information */
void writeFullPythiaInfo(bool v) { _writeFullPythia = v; }
private:
bool _writeFullPythia;
};
#endif // EVENTFILEWRITER_H
Index: trunk/include/inputParameters.h
===================================================================
--- trunk/include/inputParameters.h (revision 307)
+++ trunk/include/inputParameters.h (revision 308)
@@ -1,536 +1,539 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright 2010
//
// This file is part of starlight.
//
// starlight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// starlight is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with starlight. If not, see <http://www.gnu.org/licenses/>.
//
///////////////////////////////////////////////////////////////////////////
//
// File and Version Information:
// $Rev:: $: revision of last commit
// $Author:: $: author of last commit
// $Date:: $: date of last commit
//
// Description:
//
//
//
///////////////////////////////////////////////////////////////////////////
#ifndef INPUTPARAMETERS_H
#define INPUTPARAMETERS_H
#include "starlightconstants.h"
#include "inputParser.h"
#include <string>
#include <ostream>
#include <vector>
#include <sstream>
#include <cstdlib>
class parameterbase;
class parameterlist
{
public:
parameterlist() : _parameters(0) {}
void add(parameterbase* p) {
_parameters.push_back(p);
}
// Returns a string with a key of the current state of the parameter list
// only
inline std::string validationKey();
private:
std::vector<parameterbase*> _parameters;
};
// Base class for parameters, needed to keep a list of parameters
class parameterbase
{
public:
// Add this to parameter list
parameterbase()
{
_parameters.add(this);
}
virtual std::string validationkey() = 0;
template<typename T>
std::string toString(T v)
{
std::stringstream s;
s << v;
return s.str();
}
inline friend std::ostream& operator<<(std::ostream& os, const parameterbase& par);
// List of all parameters
static parameterlist _parameters;
};
// Need to init the static variable
// parameterlist parameterbase::_parameters;
// The actual parameter class
// validate parameter specifies if the parameter should be a part of the validity check of the current parameters
template<typename T, bool validate>
class parameter : public parameterbase
{
public:
// Constructor
parameter(const std::string &name, T value, bool required = true) :parameterbase(),_name(name), _value(value), _validate(validate), _required(required) {}
parameter &operator=(T v) { _value = v; return *this;}
T* ptr() const {
return const_cast<T*>(&_value);
}
T value() const { return _value; }
std::string name() const { return _name;}
bool required() const { return _required; }
void setValue(T v) { _value = v; }
void setName(std::string name) { _name = name; }
void setRequired(bool r) { _required = r; }
// Validation key for this parameter
std::string validationkey()
{
return (_validate ? _name + ":" + toString(_value) + "-" : std::string(""));
}
template<typename S, bool v>
inline friend std::ostream& operator<<(std::ostream& os, const parameter<S,v>& par);
private:
std::string _name;
T _value; // Value
bool _validate; // true if a change in the parameter invalidates x-sec tables
bool _required; // true if this is required option.
parameter();
};
template<typename S, bool v>
inline std::ostream& operator<<(std::ostream& os, const parameter<S,v>& par)
{
os << par._value;
return os;
}
std::ostream& operator<<(std::ostream& os, const parameterbase& par)
{
os << par._parameters.validationKey();
return os;
}
std::string parameterlist::validationKey()
{
std::stringstream s;
for(unsigned int i = 0; i < _parameters.size(); ++i)
{
s << _parameters[i]->validationkey(); // Will print names and values of validation parameters
}
return s.str();
}
class inputParameters {
public:
inputParameters();
~inputParameters();
bool init();
bool configureFromFile(const std::string &configFileName = "./config/slight.in");
std::string baseFileName () const { return _baseFileName.value(); }
unsigned int beam1Z () const { return _beam1Z.value(); } ///< returns atomic number of beam particle 1
unsigned int beam1A () const { return _beam1A.value(); } ///< returns atomic mass number of beam particle 1
unsigned int beam2Z () const { return _beam2Z.value(); } ///< returns atomic number of beam particle 2
unsigned int beam2A () const { return _beam2A.value(); } ///< returns atomic mass number of beam particle 2
double beamLorentzGamma () const { return _beamLorentzGamma; } ///< returns Lorentz gamma factor of both beams in beam CMS frame
double beam1LorentzGamma () const { return _beam1LorentzGamma.value(); } ///< returns Lorentz gamma factor of beam 1 in collider frame
double beam2LorentzGamma () const { return _beam2LorentzGamma.value(); } ///< returns Lorentz gamma factor of beam 2 in collider frame
double maxW () const { return _maxW.value(); } ///< returns maximum mass W of produced hadronic system [GeV/c^2]
double minW () const { return _minW.value(); } ///< returns minimum mass W of produced hadronic system [GeV/c^2]
unsigned int nmbWBins () const { return _nmbWBins.value(); } ///< returns number of W bins in lookup table
double maxRapidity () const { return _maxRapidity.value(); } ///< returns maximum absolute value of rapidity
unsigned int nmbRapidityBins () const { return _nmbRapidityBins.value(); } ///< returns number of rapidity bins in lookup table
bool ptCutEnabled () const { return _ptCutEnabled.value(); } ///< returns cut in pt
double ptCutMin () const { return _ptCutMin.value(); } ///< returns minimum pt
double ptCutMax () const { return _ptCutMax.value(); } ///< returns maximum pt
bool etaCutEnabled () const { return _etaCutEnabled.value(); } ///< returns cut in eta
double etaCutMin () const { return _etaCutMin.value(); } ///< returns minimum eta
double etaCutMax () const { return _etaCutMax.value(); } ///< returns maximum eta
int productionMode () const { return _productionMode.value(); } ///< returns production mode
unsigned int nmbEvents () const { return _nmbEventsTot.value(); } ///< returns total number of events to generate
int prodParticleId () const { return _prodParticleId.value(); } ///< returns PDG particle ID of produced particle
int randomSeed () const { return _randomSeed.value(); } ///< returns seed for random number generator
int beamBreakupMode () const { return _beamBreakupMode.value(); } ///< returns breakup mode for beam particles
bool interferenceEnabled () const { return _interferenceEnabled.value(); } ///< returns whether interference is taken into account
double interferenceStrength () const { return _interferenceStrength.value(); } ///< returns percentage of interference
double maxPtInterference () const { return _maxPtInterference.value(); } ///< returns maximum p_T for interference calculation [GeV/c]
int nmbPtBinsInterference () const { return _nmbPtBinsInterference.value(); } ///< returns number of p_T bins for interference calculation
double ptBinWidthInterference() const { return _ptBinWidthInterference.value(); } ///< returns width of p_T bins for interference calculation [GeV/c]
double minGammaEnergy () const { return _minGammaEnergy.value(); } ///< returns minimum gamma energy in case of photo nuclear processes [GeV]
double maxGammaEnergy () const { return _maxGammaEnergy.value(); } ///< returns maximum gamma energy in case of photo nuclear processes [GeV]
std::string pythiaParams () const { return _pythiaParams.value(); } ///< returns parameters to be passed to pythia
bool pythiaFullEventRecord () const { return _pythiaFullEventRecord.value(); } ///< returns if the full pythia event record should be printed
int xsecCalcMethod () const { return _xsecCalcMethod.value(); } ///< returns the method used for the x-sec calculation
double axionMass () const { return _axionMass.value(); } ///< returns axion mass //AXION HACK
int bslopeDefinition () const { return _bslopeDefinition.value(); } ///< returns the definition of b-slope
double bslopeValue () const { return _bslopeValue.value(); } ///< returns the value of b-slope
int printVM () const { return _printVM.value(); } ///< returns the printVM value
int impulseVM () const { return _impulseVM.value(); } ///< returns the impulseVM value
int quantumGlauber () const { return _quantumGlauber.value(); } ///< returns the quantum glauber value
double bmin () const { return _bmin.value(); } // returns the minimum impact parameter for BREAKUP_MODE==6
double bmax () const { return _bmax.value(); } // returns the maximum impact parameter for BREAKUP_MODE==6
+ bool outputHeader () const { return _outputHeader.value(); } // returns whether the output should have parameters at the start
starlightConstants::particleTypeEnum prodParticleType () const { return _particleType; } ///< returns type of produced particle
starlightConstants::decayTypeEnum prodParticleDecayType() const { return _decayType; } ///< returns decay type of produced particle
starlightConstants::interactionTypeEnum interactionType () const { return _interactionType; } ///< returns interaction type
double protonEnergy () const { return _protonEnergy.value(); }
double inputBranchingRatio () const { return _inputBranchingRatio; }
double deuteronSlopePar () const {return _deuteronSlopePar .value();}
double protonMass () const {return _protonMass .value();}
double pionChargedMass () const {return _pionChargedMass .value();}
double pionNeutralMass () const {return _pionNeutralMass .value();}
double kaonChargedMass () const {return _kaonChargedMass .value();}
double mel () const {return _mel .value();}
double muonMass () const {return _muonMass .value();}
double tauMass () const {return _tauMass .value();}
double f0Mass () const {return _f0Mass .value();}
double f0Width () const {return _f0Width .value();}
double f0BrPiPi () const {return _f0BrPiPi .value();}
double etaMass () const {return _etaMass .value();}
double etaWidth () const {return _etaWidth .value();}
double etaPrimeMass () const {return _etaPrimeMass .value();}
double etaPrimeWidth () const {return _etaPrimeWidth .value();}
double etaCMass () const {return _etaCMass .value();}
double etaCWidth () const {return _etaCWidth .value();}
double f2Mass () const {return _f2Mass .value();}
double f2Width () const {return _f2Width .value();}
double f2BrPiPi () const {return _f2BrPiPi .value();}
double a2Mass () const {return _a2Mass .value();}
double a2Width () const {return _a2Width .value();}
double f2PrimeMass () const {return _f2PrimeMass .value();}
double f2PrimeWidth () const {return _f2PrimeWidth .value();}
double f2PrimeBrKK () const {return _f2PrimeBrKK .value();}
double zoverz03Mass () const {return _zoverz03Mass .value();}
double f0PartialggWidth () const {return _f0PartialggWidth .value();}
double etaPartialggWidth () const {return _etaPartialggWidth .value();}
double etaPrimePartialggWidth() const {return _etaPrimePartialggWidth.value();}
double etaCPartialggWidth () const {return _etaCPartialggWidth .value();}
double f2PartialggWidth () const {return _f2PartialggWidth .value();}
double a2PartialggWidth () const {return _a2PartialggWidth .value();}
double f2PrimePartialggWidth () const {return _f2PrimePartialggWidth .value();}
double zoverz03PartialggWidth() const {return _zoverz03PartialggWidth.value();}
double f0Spin () const {return _f0Spin .value();}
double etaSpin () const {return _etaSpin .value();}
double etaPrimeSpin () const {return _etaPrimeSpin .value();}
double etaCSpin () const {return _etaCSpin .value();}
double f2Spin () const {return _f2Spin .value();}
double a2Spin () const {return _a2Spin .value();}
double f2PrimeSpin () const {return _f2PrimeSpin .value();}
double zoverz03Spin () const {return _zoverz03Spin .value();}
double axionSpin () const {return _axionSpin .value();}
double rho0Mass () const {return _rho0Mass .value();}
double rho0Width () const {return _rho0Width .value();}
double rho0BrPiPi () const {return _rho0BrPiPi .value();}
double rho0PrimeMass () const {return _rho0PrimeMass .value();}
double rho0PrimeWidth () const {return _rho0PrimeWidth .value();}
double rho0PrimeBrPiPi () const {return _rho0PrimeBrPiPi .value();}
double OmegaMass () const {return _OmegaMass .value();}
double OmegaWidth () const {return _OmegaWidth .value();}
double OmegaBrPiPi () const {return _OmegaBrPiPi .value();}
double PhiMass () const {return _PhiMass .value();}
double PhiWidth () const {return _PhiWidth .value();}
double PhiBrKK () const {return _PhiBrKK .value();}
double JpsiMass () const {return _JpsiMass .value();}
double JpsiWidth () const {return _JpsiWidth .value();}
double JpsiBree () const {return _JpsiBree .value();}
double JpsiBrmumu () const {return _JpsiBrmumu .value();}
double JpsiBrppbar () const {return _JpsiBrppbar .value();}
double Psi2SMass () const {return _Psi2SMass .value();}
double Psi2SWidth () const {return _Psi2SWidth .value();}
double Psi2SBree () const {return _Psi2SBree .value();}
double Psi2SBrmumu () const {return _Psi2SBrmumu .value();}
double Upsilon1SMass () const {return _Upsilon1SMass .value();}
double Upsilon1SWidth () const {return _Upsilon1SWidth .value();}
double Upsilon1SBree () const {return _Upsilon1SBree .value();}
double Upsilon1SBrmumu () const {return _Upsilon1SBrmumu .value();}
double Upsilon2SMass () const {return _Upsilon2SMass .value();}
double Upsilon2SWidth () const {return _Upsilon2SWidth .value();}
double Upsilon2SBree () const {return _Upsilon2SBree .value();}
double Upsilon2SBrmumu () const {return _Upsilon2SBrmumu .value();}
double Upsilon3SMass () const {return _Upsilon3SMass .value();}
double Upsilon3SWidth () const {return _Upsilon3SWidth .value();}
double Upsilon3SBree () const {return _Upsilon3SBree .value();}
double Upsilon3SBrmumu () const {return _Upsilon3SBrmumu .value();}
void setBaseFileName (std::string v ) { _baseFileName = v; }
void setBeam1Z (unsigned int v) { _beam1Z = v; } ///< sets atomic number of beam particle 1
void setBeam1A (unsigned int v) { _beam1A = v; } ///< sets atomic mass number of beam particle 1
void setBeam2Z (unsigned int v) { _beam2Z = v; } ///< sets atomic number of beam particle 2
void setBeam2A (unsigned int v) { _beam2A = v; } ///< sets atomic mass number of beam particle 2
void setBeamLorentzGamma (double v) { _beamLorentzGamma = v; } ///< sets Lorentz gamma factor of both beams in beam CMS frame
void setBeam1LorentzGamma (double v) { _beam1LorentzGamma = v; } ///< sets Lorentz gamma factor of beam 1 in collider frame
void setBeam2LorentzGamma (double v) { _beam2LorentzGamma = v; } ///< sets Lorentz gamma factor of beam 2 in collider frame
void setMaxW (double v) { _maxW = v; } ///< sets maximum mass W of produced hadronic system [GeV/c^2]
void setMinW (double v) { _minW = v; } ///< sets minimum mass W of produced hadronic system [GeV/c^2]
void setNmbWBins (unsigned int v) { _nmbWBins = v; } ///< sets number of W bins in lookup table
void setMaxRapidity (double v) { _maxRapidity = v; } ///< sets maximum absolute value of rapidity
void setNmbRapidityBins (unsigned int v) { _nmbRapidityBins = v; } ///< sets number of rapidity bins in lookup table
void setPtCutEnabled (bool v) { _ptCutEnabled = v; } ///< sets cut in pt
void setPtCutMin (double v) { _ptCutMin = v; } ///< sets minimum pt
void setPtCutMax (double v) { _ptCutMax = v; } ///< sets maximum pt
void setEtaCutEnabled (bool v) { _etaCutEnabled = v; } ///< sets cut in eta
void setEtaCutMin (double v) { _etaCutMin = v; } ///< sets minimum eta
void setEtaCutMax (double v) { _etaCutMax = v; } ///< sets maximum eta
void setProductionMode (int v) { _productionMode = v; } ///< sets production mode
void setNmbEvents (unsigned int v) { _nmbEventsTot = v; } ///< sets total number of events to generate
void setProdParticleId (int v) { _prodParticleId = v; } ///< sets PDG particle ID of produced particle
void setRandomSeed (int v) { _randomSeed = v; } ///< sets seed for random number generator
void setBeamBreakupMode (int v) { _beamBreakupMode = v; } ///< sets breakup mode for beam particles
void setInterferenceEnabled (bool v) { _interferenceEnabled = v; } ///< sets whether interference is taken into account
void setInterferenceStrength (double v) { _interferenceStrength = v; } ///< sets percentage of interference
void setMaxPtInterference (double v) { _maxPtInterference = v; } ///< sets maximum p_T for voiderference calculation [GeV/c]
void setNmbPtBinsInterference (int v) { _nmbPtBinsInterference = v; } ///< sets number of p_T bins for interference calculation
void setPtBinWidthInterference(double v) { _ptBinWidthInterference = v; } ///< sets width of p_T bins for voiderference calculation [GeV/c]
void setMinGammaEnergy (double v) { _minGammaEnergy = v; } ///< sets minimum gamma energy in case of photo nuclear processes [GeV]
void setMaxGammaEnergy (double v) { _maxGammaEnergy = v; } ///< sets maximum gamma energy in case of photo nuclear processes [GeV]
void setPythiaParams (std::string v) { _pythiaParams = v; } ///< sets parameters to be passed to pythia
void setPythiaFullEventRecord (bool v) { _pythiaFullEventRecord = v; } ///< sets if the full pythia event record should be prvoided
void setXsecCalcMethod (int v) { _xsecCalcMethod = v; } ///< sets the method used for the x-sec calculation
void setAxionMass (double v) { _axionMass = v; } ///< sets axion mass //AXION HACK
void setbslopeDefinition (int v) { _bslopeDefinition = v; } ///< sets the definition of b slope
void setbslopeValue (double v) { _bslopeValue = v; } ///< sets the value of b slope
void setprintVM (int v) { _printVM = v; } ///< sets the value of _printVM
void setimpulseVM (int v) { _impulseVM = v; } ///< sets the value of _impulseVM
void setquantumGlauber (int v) { _quantumGlauber = v; } ///< sets the value of quantum_glauber
void setbmin (double v) { _bmin=v; } ///< sets the minimum impact parameter (for BREAKUP_MODE==6
void setbmax (double v) { _bmax=v; } ///< sets the minimum impact parameter (for BREAKUP_MODE==6
+ void setoutputHeader (bool v) { _outputHeader = v; } ///< sets whether the output should have parameters at the start
void setProdParticleType (starlightConstants::particleTypeEnum v) { _particleType = v; } ///< sets type of produced particle
void setProdParticleDecayType (starlightConstants::decayTypeEnum v) { _decayType = v; } ///< sets decay type of produced particle
void setInteractionType (starlightConstants::interactionTypeEnum v) { _interactionType = v; } ///< sets interaction type
void setProtonEnergy (double v) { _protonEnergy = v; } ///< sets proton energy
inline bool setParameter(std::string expression);
std::ostream& print(std::ostream& out) const; ///< prints parameter summary
std::ostream& write(std::ostream& out) const; ///< writes parameters back to an ostream
std::string parameterValueKey() const; ///< Generates key for the current parameters
private:
// To indicate if the crossection table should be re-calculated if parameter changes
#define VALIDITY_CHECK true
#define NO_VALIDITY_CHECK false
std::string _configFileName; ///< path to configuration file (default = ./config/slight.in)
// config file parameters
parameter<std::string,NO_VALIDITY_CHECK> _baseFileName;
parameter<unsigned int,VALIDITY_CHECK> _beam1Z; ///< atomic number of beam particle 1
parameter<unsigned int,VALIDITY_CHECK> _beam1A; ///< atomic mass number of beam particle 1
parameter<unsigned int,VALIDITY_CHECK> _beam2Z; ///< atomic number of beam particle 2
parameter<unsigned int,VALIDITY_CHECK> _beam2A; ///< atomic mass number of beam particle 2
parameter<double, VALIDITY_CHECK> _beam1LorentzGamma; ///< Lorentz gamma factor of beam 1 in collider frame
parameter<double, VALIDITY_CHECK> _beam2LorentzGamma; ///< Lorentz gamma factor of beam 2 in collider frame
parameter<double, VALIDITY_CHECK> _maxW; ///< maximum mass W of produced hadronic system [GeV/c^2]
parameter<double, VALIDITY_CHECK> _minW; ///< minimum mass W of produced hadronic system; if set to -1 default value is taken [GeV/c^2]
parameter<unsigned int, VALIDITY_CHECK> _nmbWBins; ///< number of W bins in lookup table
parameter<double, VALIDITY_CHECK> _maxRapidity; ///< maximum absolute value of rapidity
parameter<unsigned int, VALIDITY_CHECK> _nmbRapidityBins; ///< number of rapidity bins in lookup table
parameter<bool, VALIDITY_CHECK> _ptCutEnabled; ///< en/disables cut in pt
parameter<double, VALIDITY_CHECK> _ptCutMin; ///< minimum pt, if cut is enabled
parameter<double, VALIDITY_CHECK> _ptCutMax; ///< maximum pt, if cut is enabled
parameter<bool, VALIDITY_CHECK> _etaCutEnabled; ///< en/disables cut in eta
parameter<double, VALIDITY_CHECK> _etaCutMin; ///< minimum eta, if cut is enabled
parameter<double, VALIDITY_CHECK> _etaCutMax; ///< maximum eta, if cut is enabled
parameter<unsigned int, VALIDITY_CHECK> _productionMode; ///< \brief production mode
///<
///< 1 = photon-photon fusion,
///< 2 = narrow vector meson resonance in photon-Pomeron fusion,
///< 3 = Breit-Wigner vector meson resonance in photon-Pomeron fusion
parameter<unsigned int, VALIDITY_CHECK> _nmbEventsTot; ///< total number of events to generate
parameter<unsigned int, VALIDITY_CHECK> _prodParticleId; ///< PDG particle ID of produced particle
parameter<unsigned int, VALIDITY_CHECK> _randomSeed; ///< seed for random number generator
///<
///< 1 = ASCII
///< 2 = GSTARtext,
///< 3 = PAW ntuple (not working)
parameter<unsigned int, VALIDITY_CHECK> _beamBreakupMode; ///< \brief breakup mode for beam particles
///<
///< 1 = hard sphere nuclei (b > 2R),
///< 2 = both nuclei break up (XnXn),
///< 3 = a single neutron from each nucleus (1n1n),
///< 4 = neither nucleon breaks up (with b > 2R),
///< 5 = no hadronic break up (similar to option 1, but with the actual hadronic interaction)
/// 6 = set impact parameter range via bmax and bmin
parameter<bool, VALIDITY_CHECK> _interferenceEnabled; ///< if VALIDITY_CHECK, interference is taken into account
parameter<double, VALIDITY_CHECK> _interferenceStrength; ///< percentage of interference: from 0 = none to 1 = full
parameter<double, VALIDITY_CHECK> _maxPtInterference; ///< maximum p_T for interference calculation [GeV/c]
parameter<unsigned int, VALIDITY_CHECK> _nmbPtBinsInterference; ///< number of p_T bins for interference calculation
parameter<double, VALIDITY_CHECK> _ptBinWidthInterference; ///< width of p_T bins for interference calculation [GeV/c]
parameter<double, VALIDITY_CHECK> _protonEnergy;
parameter<double, VALIDITY_CHECK> _minGammaEnergy; ///< minimum gamma energy in case of photo nuclear processes [GeV]
parameter<double, VALIDITY_CHECK> _maxGammaEnergy; ///< maximum gamma energy in case of photo nuclear processes [GeV]
parameter<std::string,NO_VALIDITY_CHECK> _pythiaParams; ///< semi-colon separated parameters to pass to pythia, e.g. "mstj(1)=0;paru(13)=0.1"
parameter<bool, NO_VALIDITY_CHECK> _pythiaFullEventRecord; ///< if the full pythia event record should be in the output
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)
parameter<double, VALIDITY_CHECK> _axionMass; ///Axion mass//AXION HACK
parameter<unsigned int, VALIDITY_CHECK> _bslopeDefinition; ///< Optional parameter to set different values of slope parameter
parameter<double, VALIDITY_CHECK> _bslopeValue; ///< Value of slope parameter when _bslopeDefinition is set to 1
parameter<unsigned int, VALIDITY_CHECK> _printVM; ///< Optional parameter to set printing options for VM cross section
parameter<unsigned int, VALIDITY_CHECK> _impulseVM; ///< Optional parameter to use impulse approximation (no nuclear effects) for VM cross section.
parameter<unsigned int, VALIDITY_CHECK> _quantumGlauber; ///< Optional parameter. Set = 1 to use Quantum Glauber calculation, rather than Classical Glauber
parameter<double, VALIDITY_CHECK> _bmin; ///< Optional parameter minimum impact parameter for b-range calculation
parameter<double, VALIDITY_CHECK> _bmax; /// < Optional parameter maximum impact parameter for b-range calculation
+ parameter<bool, NO_VALIDITY_CHECK> _outputHeader; /// < Optional parameter puts parameter information at the top of the output file
parameter<double, VALIDITY_CHECK> _deuteronSlopePar ; ///< deuteron slope parameter (effective temperature) [(GeV/c)^-2]
parameter<double, VALIDITY_CHECK> _protonMass ; ///< mass of the proton [GeV/c^2]
parameter<double, VALIDITY_CHECK> _pionChargedMass ; ///< mass of the pi^+/- [GeV/c^2]
parameter<double, VALIDITY_CHECK> _pionNeutralMass ; ///< mass of the pi^0 [GeV/c^2]
parameter<double, VALIDITY_CHECK> _kaonChargedMass ; ///< mass of the K^+/- [GeV/c^2]
parameter<double, VALIDITY_CHECK> _mel ; ///< mass of the e^+/- [GeV/c^2]
parameter<double, VALIDITY_CHECK> _muonMass ; ///< mass of the mu^+/- [GeV/c^2]
parameter<double, VALIDITY_CHECK> _tauMass ; ///< mass of the tau^+/- [GeV/c^2]
parameter<double, VALIDITY_CHECK> _f0Mass ; ///< mass of the f_0(980) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _f0Width ; ///< width of the f_0(980) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _f0BrPiPi ; ///< branching ratio f_0(980) -> pi^+ pi^- and pi^0 pi^0
parameter<double, VALIDITY_CHECK> _etaMass ; ///< mass of the eta [GeV/c^2]
parameter<double, VALIDITY_CHECK> _etaWidth ; ///< width of the eta [GeV/c^2]
parameter<double, VALIDITY_CHECK> _etaPrimeMass ; ///< mass of the eta' [GeV/c^2]
parameter<double, VALIDITY_CHECK> _etaPrimeWidth ; ///< width of the eta' [GeV/c^2]
parameter<double, VALIDITY_CHECK> _etaCMass ; ///< mass of the eta_c [GeV/c^2]
parameter<double, VALIDITY_CHECK> _etaCWidth ; ///< width of the eta_c [GeV/c^2]
parameter<double, VALIDITY_CHECK> _f2Mass ; ///< mass of the f_2(1270) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _f2Width ; ///< width of the f_2(1270) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _f2BrPiPi ; ///< branching ratio f_2(1270) -> pi^+ pi^-
parameter<double, VALIDITY_CHECK> _a2Mass ; ///< mass of the a_2(1320) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _a2Width ; ///< width of the a_2(1320) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _f2PrimeMass ; ///< mass of the f'_2(1525) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _f2PrimeWidth ; ///< width of the f'_2(1525) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _f2PrimeBrKK ; ///< branching ratio f'_2(1525) -> K^+ K^- and K^0 K^0bar
parameter<double, VALIDITY_CHECK> _zoverz03Mass ; ///< mass of four-quark resonance (rho^0 pair production) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _f0PartialggWidth ; ///< partial width f_0(980) -> g g [GeV/c^2]
parameter<double, VALIDITY_CHECK> _etaPartialggWidth ; ///< partial width eta -> g g [GeV/c^2]
parameter<double, VALIDITY_CHECK> _etaPrimePartialggWidth; ///< partial width eta' -> g g [GeV/c^2]
parameter<double, VALIDITY_CHECK> _etaCPartialggWidth ; ///< partial width eta_c -> g g [GeV/c^2]
parameter<double, VALIDITY_CHECK> _f2PartialggWidth ; ///< partial width f_2(1270) -> g g [GeV/c^2]
parameter<double, VALIDITY_CHECK> _a2PartialggWidth ; ///< partial width a_2(1320) -> g g [GeV/c^2]
parameter<double, VALIDITY_CHECK> _f2PrimePartialggWidth ; ///< partial width f'_2(1525) -> g g [GeV/c^2]
parameter<double, VALIDITY_CHECK> _zoverz03PartialggWidth; ///< partial width four-quark resonance -> g g (rho^0 pair production) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _f0Spin ; ///< spin of the f_0(980)
parameter<double, VALIDITY_CHECK> _etaSpin ; ///< spin of the eta
parameter<double, VALIDITY_CHECK> _etaPrimeSpin ; ///< spin of the eta'
parameter<double, VALIDITY_CHECK> _etaCSpin ; ///< spin of the eta_c
parameter<double, VALIDITY_CHECK> _f2Spin ; ///< spin of the f_2(1270)
parameter<double, VALIDITY_CHECK> _a2Spin ; ///< spin of the a_2(1320)
parameter<double, VALIDITY_CHECK> _f2PrimeSpin ; ///< spin of the f'_2(1525)
parameter<double, VALIDITY_CHECK> _zoverz03Spin ; ///< spin of the four-quark resonance -> g g (rho^0 pair production)
parameter<double, VALIDITY_CHECK> _axionSpin ; ///< spin of the axion
parameter<double, VALIDITY_CHECK> _rho0Mass ; ///< mass of the rho^0 [GeV/c^2]
parameter<double, VALIDITY_CHECK> _rho0Width ; ///< width of the rho^0 [GeV/c^2]
parameter<double, VALIDITY_CHECK> _rho0BrPiPi ; ///< branching ratio rho^0 -> pi^+ pi^-
parameter<double, VALIDITY_CHECK> _rho0PrimeMass ; ///< mass of the rho'^0 (4 pi^+/- final state) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _rho0PrimeWidth ; ///< width of the rho'^0 (4 pi^+/- final state) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _rho0PrimeBrPiPi ; ///< branching ratio rho'^0 -> pi^+ pi^-
parameter<double, VALIDITY_CHECK> _OmegaMass ; ///< mass of the omega [GeV/c^2]
parameter<double, VALIDITY_CHECK> _OmegaWidth ; ///< width of the omega [GeV/c^2]
parameter<double, VALIDITY_CHECK> _OmegaBrPiPi ; ///< branching ratio omega -> pi^+ pi^-
parameter<double, VALIDITY_CHECK> _PhiMass ; ///< mass of the phi [GeV/c^2]
parameter<double, VALIDITY_CHECK> _PhiWidth ; ///< width of the phi [GeV/c^2]
parameter<double, VALIDITY_CHECK> _PhiBrKK ; ///< branching ratio phi -> K^+ K^-
parameter<double, VALIDITY_CHECK> _JpsiMass ; ///< mass of the J/psi [GeV/c^2]
parameter<double, VALIDITY_CHECK> _JpsiWidth ; ///< width of the J/psi [GeV/c^2]
parameter<double, VALIDITY_CHECK> _JpsiBree ; ///< branching ratio J/psi -> e^+ e^-
parameter<double, VALIDITY_CHECK> _JpsiBrmumu ; ///< branching ratio J/psi -> mu^+ mu^-
parameter<double, VALIDITY_CHECK> _JpsiBrppbar ; ///< branching ratio J/psi -> p pbar
parameter<double, VALIDITY_CHECK> _Psi2SMass ; ///< mass of the psi(2S) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _Psi2SWidth ; ///< width of the psi(2S) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _Psi2SBree ; ///< branching ratio psi(2S) -> e^+ e^-
parameter<double, VALIDITY_CHECK> _Psi2SBrmumu ; ///< branching ratio psi(2S) -> mu^+ mu^-
parameter<double, VALIDITY_CHECK> _Upsilon1SMass ; ///< mass of the Upsilon(1S) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _Upsilon1SWidth ; ///< width of the Upsilon(1S) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _Upsilon1SBree ; ///< branching ratio Upsilon(1S) -> e^+ e^-
parameter<double, VALIDITY_CHECK> _Upsilon1SBrmumu ; ///< branching ratio Upsilon(1S) -> mu^+ mu^-
parameter<double, VALIDITY_CHECK> _Upsilon2SMass ; ///< mass of the Upsilon(2S) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _Upsilon2SWidth ; ///< width of the Upsilon(2S) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _Upsilon2SBree ; ///< branching ratio Upsilon(2S) -> e^+ e^-
parameter<double, VALIDITY_CHECK> _Upsilon2SBrmumu ; ///< branching ratio Upsilon(2S) -> mu^+ mu^-
parameter<double, VALIDITY_CHECK> _Upsilon3SMass ; ///< mass of the Upsilon(3S) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _Upsilon3SWidth ; ///< width of the Upsilon(3S) [GeV/c^2]
parameter<double, VALIDITY_CHECK> _Upsilon3SBree ; ///< branching ratio Upsilon(3S) -> e^+ e^-
parameter<double, VALIDITY_CHECK> _Upsilon3SBrmumu ; ///< branching ratio Upsilon(3S) -> mu^+ mu^-
starlightConstants::particleTypeEnum _particleType;
starlightConstants::decayTypeEnum _decayType;
starlightConstants::interactionTypeEnum _interactionType;
double _beamLorentzGamma; ///< Lorentz gamma factor of the beams in CMS frame, not an input parameter
double _inputBranchingRatio; ///< Branching ratio defined for each channel
inputParser _ip;
};
inline
bool inputParameters::setParameter(std::string expression)
{
return _ip.parseString(expression);
}
inline
std::ostream&
operator <<(std::ostream& out,
const inputParameters& par)
{
return par.print(out);
}
#endif // INPUTPARAMETERS_H
Index: trunk/Readme.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/src/starlightStandalone.cpp
===================================================================
--- trunk/src/starlightStandalone.cpp (revision 307)
+++ trunk/src/starlightStandalone.cpp (revision 308)
@@ -1,176 +1,181 @@
//////////////////////////////////////////////////////////////////////////
//
// Copyright 2010
//
// This file is part of starlight.
//
// starlight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// starlight is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with starlight. If not, see <http://www.gnu.org/licenses/>.
//
///////////////////////////////////////////////////////////////////////////
//
// File and Version Information:
// $Rev:: $: revision of last commit
// $Author:: $: author of last commit
// $Date:: $: date of last commit
//
// Description:
//
//
//
///////////////////////////////////////////////////////////////////////////
#include <iostream>
#include "reportingUtils.h"
#include "starlight.h"
#include "inputParameters.h"
#include "eventfilewriter.h"
#include "starlightStandalone.h"
using namespace std;
starlightStandalone::starlightStandalone()
: _configFileName ("slight.in"),
_starlight (0),
_nmbEventsTot (1),
_nmbEventsPerFile (_nmbEventsTot)
{ }
starlightStandalone::~starlightStandalone()
{ }
bool
starlightStandalone::init()
{
_inputParameters = new inputParameters();
_randomGenerator = new randomGenerator();
// read input parameters from config file
_inputParameters->configureFromFile(_configFileName);
if (!_inputParameters->init()) {
printWarn << "problems initializing input parameters. cannot initialize starlight." << endl;
return false;
}
// copy input file to one with baseFileName naming scheme
std::string inputCopyName, _baseFileName;
_baseFileName = _inputParameters->baseFileName();
if (_baseFileName != "slight") {
inputCopyName = _baseFileName +".in";
ofstream inputCopyFile;
inputCopyFile.open(inputCopyName.c_str());
std::ifstream infile(_configFileName.c_str());
if ((!infile) || (!infile.good()))
{
return -1;
}
int lineSize = 256;
char tmp[lineSize];
while (!infile.getline(tmp, lineSize).eof())
{
cout << tmp << endl;
inputCopyFile << tmp << endl;
}
inputCopyFile.close();
}
// get the number of events
// for now we write everything to one file
_nmbEventsTot = _inputParameters->nmbEvents();
_nmbEventsPerFile = _nmbEventsTot;
// create the starlight object
_starlight = new starlight();
// give starlight the input parameters
_randomGenerator->SetSeed(_inputParameters->randomSeed());
_starlight->setInputParameters(_inputParameters);
_starlight->setRandomGenerator(_randomGenerator);
// initialize starlight
return _starlight->init();
}
bool
starlightStandalone::run()
{
if (!_starlight) {
printWarn << "null pointer to starlight object. make sure that init() was called. "
<< "cannot generate events." << endl;
return false;
}
// open output file
eventFileWriter fileWriter;
fileWriter.writeFullPythiaInfo(_inputParameters->pythiaFullEventRecord());
_baseFileName = _inputParameters->baseFileName();
_eventDataFileName = _baseFileName +".out";
fileWriter.open(_eventDataFileName);
-
+ //
+ // add a header if the user requests a header
+ if (_inputParameters->outputHeader()) {
+ fileWriter.writeInit(*_inputParameters);
+ }
+ //
printInfo << "generating events:" << endl;
unsigned int nmbEvents = 0;
while (nmbEvents < _nmbEventsTot) {
for (unsigned int iEvent = 0; (iEvent < _nmbEventsPerFile) && (nmbEvents < _nmbEventsTot);
++iEvent, ++nmbEvents) {
progressIndicator(iEvent, _nmbEventsTot, true, 4);
upcEvent event = _starlight->produceEvent();
// Boost event from CMS system to lab system
boostEvent(event);
fileWriter.writeEvent(event, iEvent);
}
}
fileWriter.close();
if( _starlight->nmbAttempts() == 0 )return true;
double _branchingRatio = _inputParameters->inputBranchingRatio();
printInfo << "number of attempts = " << _starlight->nmbAttempts() << ", "
<< "number of accepted events = " << _starlight->nmbAccepted() << endl;
double selectedCrossSection =
((double)_starlight->nmbAccepted()/_starlight->nmbAttempts())*_branchingRatio*_starlight->getTotalCrossSection();
if (selectedCrossSection > 1.){
cout<< " The cross section of the generated sample is "<<selectedCrossSection<<" barn."<<endl;
} else if (1.E3*selectedCrossSection > 1.){
cout<< " The cross section of the generated sample is "<<1.E3*selectedCrossSection<<" mb."<<endl;
} else if (1.E6*selectedCrossSection > 1.){
cout<< " The cross section of the generated sample is "<<1.E6*selectedCrossSection<<" microbarn."<<endl;
} else if (1.E9*selectedCrossSection > 1.){
cout<< " The cross section of the generated sample is "<<1.E9*selectedCrossSection<<" nanobarn."<<endl;
} else if (1.E12*selectedCrossSection > 1.){
cout<< " The cross section of the generated sample is "<<1.E12*selectedCrossSection<<" picobarn."<<endl;
} else {
cout<< " The cross section of the generated sample is " <<1.E15*selectedCrossSection<<" femtob."<<endl;
}
return true;
}
void starlightStandalone::boostEvent(upcEvent &event)
{
// Calculate CMS boost
double rap1 = acosh(_inputParameters->beam1LorentzGamma());
double rap2 = -acosh(_inputParameters->beam2LorentzGamma());
double boost = (rap1+rap2)/2.;
event.boost(boost);
}
Index: trunk/src/eventfilewriter.cpp
===================================================================
--- trunk/src/eventfilewriter.cpp (revision 307)
+++ trunk/src/eventfilewriter.cpp (revision 308)
@@ -1,108 +1,120 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright 2010
//
// This file is part of starlight.
//
// starlight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// starlight is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with starlight. If not, see <http://www.gnu.org/licenses/>.
//
///////////////////////////////////////////////////////////////////////////
//
// File and Version Information:
// $Rev:: $: revision of last commit
// $Author:: $: author of last commit
// $Date:: $: date of last commit
//
// Description:
//
//
//
///////////////////////////////////////////////////////////////////////////
#include "eventfilewriter.h"
#include "starlightparticlecodes.h"
//______________________________________________________________________________
eventFileWriter::eventFileWriter()
: fileWriter()
,_writeFullPythia(false)
{ }
//______________________________________________________________________________
eventFileWriter::eventFileWriter(std::string filename)
: fileWriter(filename)
{ }
+//______________________________________________________________________________
+int eventFileWriter::writeInit(inputParameters &_p)
+{
+ // creates a header at the beginning of the output file
+ // copied from eSTARlight on 21 June 2019 by Aaron Stanek
+ _fileStream<<"CONFIG_OPT: "<<_p.productionMode()<<" "<<_p.prodParticleId()<<" "<<_p.nmbEvents()
+ <<" "<<_p.quantumGlauber()<<" "<<_p.impulseVM()<<" "<<_p.randomSeed()<<std::endl;
+ _fileStream<<"BEAM_1: "<<_p.beam1Z()<<" "<<_p.beam1A()<<" "<<_p.beam1LorentzGamma()<<std::endl;
+ _fileStream<<"BEAM_2: "<<_p.beam2Z()<<" "<<_p.beam2A()<<" "<<_p.beam2LorentzGamma()<<std::endl;
+
+ return 0;
+}
//______________________________________________________________________________
int eventFileWriter::writeEvent(upcEvent &event, int eventnumber)
{
int numberoftracks = 0;
if(_writeFullPythia)
{
numberoftracks = event.getParticles()->size();
}
else
{
for(unsigned int i = 0; i<event.getParticles()->size(); ++i)
{
if(event.getParticles()->at(i).getStatus() >= 0) numberoftracks++;
}
}
// sometimes we don't have tracks due to wrongly picked W , check it
if(numberoftracks){
eventnumber++;
_fileStream << "EVENT: " << eventnumber << " " << numberoftracks << " " << 1 << std::endl;
if(event.getGammaEnergies()->size()) _fileStream << "GAMMAENERGIES:";
for(unsigned int n = 0; n < event.getGammaEnergies()->size(); n++)
{
_fileStream << " " << event.getGammaEnergies()->at(n);
}
if(event.getGammaEnergies()->size()) _fileStream<< std::endl;
_fileStream <<"VERTEX: "<<0.<<" "<<0.<<" "<<0.<<" "<<0.<<" "<<1<<" "<<0<<" "<<0<<" "<<numberoftracks<<std::endl;
int ipart = 0;
std::vector<starlightParticle>::const_iterator part = (event.getParticles())->begin();
for (part = event.getParticles()->begin(); part != event.getParticles()->end(); part++, ipart++)
{
if(!_writeFullPythia)
{
if((*part).getStatus() < 0) continue;
}
_fileStream << "TRACK: " << " " << starlightParticleCodes::jetsetToGeant((*part).getPdgCode()) <<" "<< (*part).GetPx() << " " << (*part).GetPy()
<< " "<< (*part).GetPz() << " " << eventnumber << " " << ipart << " " << 0 << " "
<< (*part).getPdgCode();
if(_writeFullPythia)
{
lorentzVector vtx = (*part).getVertex();
_fileStream << " " << vtx.GetPx() << " " << vtx.GetPy() << " " << vtx.GetPz() << " " << vtx.GetE();
_fileStream << " " << (*part).getFirstParent() << " " << (*part).getLastParent() << " " << (*part).getFirstDaughter() << " " << (*part).getLastDaughter() << " " << (*part).getStatus();
}
_fileStream <<std::endl;
}
}
return 0;
}
Index: trunk/src/inputParameters.cpp
===================================================================
--- trunk/src/inputParameters.cpp (revision 307)
+++ trunk/src/inputParameters.cpp (revision 308)
@@ -1,842 +1,844 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright 2010
//
// This file is part of starlight.
//
// starlight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// starlight is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with starlight. If not, see <http://www.gnu.org/licenses/>.
//
///////////////////////////////////////////////////////////////////////////
//
// File and Version Information:
// $Rev:: $: revision of last commit // $Author:: $: author of last commit
// $Date:: $: date of last commit //
// Description:
//
///////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <fstream>
#include "reportingUtils.h"
#include "starlightconstants.h"
#include "inputParameters.h"
#include "inputParser.h"
#include "starlightconfig.h"
#include <cmath>
#include <cstring>
#include "randomgenerator.h"
using namespace std;
using namespace starlightConstants;
parameterlist parameterbase::_parameters;
#define REQUIRED true
#define NOT_REQUIRED false
//______________________________________________________________________________
inputParameters::inputParameters()
: _baseFileName ("baseFileName","slight"),
_beam1Z ("BEAM_1_Z",0),
_beam1A ("BEAM_1_A",0),
_beam2Z ("BEAM_2_Z",0),
_beam2A ("BEAM_2_A",0),
_beam1LorentzGamma ("BEAM_1_GAMMA",0),
_beam2LorentzGamma ("BEAM_2_GAMMA",0),
_maxW ("W_MAX",0),
_minW ("W_MIN",0),
_nmbWBins ("W_N_BINS",0),
_maxRapidity ("RAP_MAX",0),
_nmbRapidityBins ("RAP_N_BINS",0),
_ptCutEnabled ("CUT_PT",false, NOT_REQUIRED),
_ptCutMin ("PT_MIN",0, NOT_REQUIRED),
_ptCutMax ("PT_MAX",0, NOT_REQUIRED),
_etaCutEnabled ("CUT_ETA",false, NOT_REQUIRED),
_etaCutMin ("ETA_MIN",0, NOT_REQUIRED),
_etaCutMax ("ETA_MAX",0, NOT_REQUIRED),
_productionMode ("PROD_MODE",0),
_nmbEventsTot ("N_EVENTS",0),
_prodParticleId ("PROD_PID",0),
_randomSeed ("RND_SEED",0),
_beamBreakupMode ("BREAKUP_MODE",0),
_interferenceEnabled ("INTERFERENCE",false),
_interferenceStrength ("IF_STRENGTH",0),
_maxPtInterference ("INT_PT_MAX",0),
_nmbPtBinsInterference ("INT_PT_N_BINS",0),
_ptBinWidthInterference("INT_PT_WIDTH",0),
_protonEnergy ("PROTON_ENERGY",0, NOT_REQUIRED),
_minGammaEnergy ("MIN_GAMMA_ENERGY",6.0, NOT_REQUIRED),
_maxGammaEnergy ("MAX_GAMMA_ENERGY",600000.0, NOT_REQUIRED),
_pythiaParams ("PYTHIA_PARAMS","", NOT_REQUIRED),
_pythiaFullEventRecord ("PYTHIA_FULL_EVENTRECORD",false, NOT_REQUIRED),
_xsecCalcMethod ("XSEC_METHOD",0, NOT_REQUIRED),
_axionMass ("AXION_MASS",50, NOT_REQUIRED), // AXION HACK
_bslopeDefinition ("BSLOPE_DEFINITION",0, NOT_REQUIRED),
_bslopeValue ("BSLOPE_VALUE",4.0,NOT_REQUIRED),
_printVM ("PRINT_VM",0,NOT_REQUIRED),
_impulseVM ("SELECT_IMPULSE_VM",0,NOT_REQUIRED),
_quantumGlauber ("QUANTUM_GLAUBER",0,NOT_REQUIRED),
_bmin ("BMIN",0,NOT_REQUIRED),
- _bmax ("BMAX",0,NOT_REQUIRED),
+ _bmax ("BMAX",0,NOT_REQUIRED),
+ _outputHeader ("OUTPUT_HEADER", false, NOT_REQUIRED),
_deuteronSlopePar ("deuteronSlopePar" , 9.5 , NOT_REQUIRED),
_protonMass ("protonMass" , 0.938272046 , NOT_REQUIRED),
_pionChargedMass ("pionChargedMass" , 0.13957018 , NOT_REQUIRED),
_pionNeutralMass ("pionNeutralMass" , 0.1349766 , NOT_REQUIRED),
_kaonChargedMass ("kaonChargedMass" , 0.493677 , NOT_REQUIRED),
_mel ("mel" , 0.000510998928, NOT_REQUIRED),
_muonMass ("muonMass" , 0.1056583715 , NOT_REQUIRED),
_tauMass ("tauMass" , 1.77682 , NOT_REQUIRED),
_f0Mass ("f0Mass" , 0.990 , NOT_REQUIRED),
_f0Width ("f0Width" , 0.100 , NOT_REQUIRED),
_f0BrPiPi ("f0BrPiPi" , 1.0 , NOT_REQUIRED),
_etaMass ("etaMass" , 0.547862 , NOT_REQUIRED),
_etaWidth ("etaWidth" , 0.00000131 , NOT_REQUIRED),
_etaPrimeMass ("etaPrimeMass" , 0.95778 , NOT_REQUIRED),
_etaPrimeWidth ("etaPrimeWidth" , 0.000198 , NOT_REQUIRED),
_etaCMass ("etaCMass" , 2.9836 , NOT_REQUIRED),
_etaCWidth ("etaCWidth" , 0.0322 , NOT_REQUIRED),
_f2Mass ("f2Mass" , 1.2751 , NOT_REQUIRED),
_f2Width ("f2Width" , 0.1851 , NOT_REQUIRED),
_f2BrPiPi ("f2BrPiPi" , 0.561 , NOT_REQUIRED),
_a2Mass ("a2Mass" , 1.3183 , NOT_REQUIRED),
_a2Width ("a2Width" , 0.105 , NOT_REQUIRED),
_f2PrimeMass ("f2PrimeMass" , 1.525 , NOT_REQUIRED),
_f2PrimeWidth ("f2PrimeWidth" , 0.073 , NOT_REQUIRED),
_f2PrimeBrKK ("f2PrimeBrKK" , 0.887 , NOT_REQUIRED),
_zoverz03Mass ("zoverz03Mass" , 1.540 , NOT_REQUIRED),
_f0PartialggWidth ("f0PartialggWidth" , 0.29E-6 , NOT_REQUIRED),
_etaPartialggWidth ("etaPartialggWidth" , 0.516E-6 , NOT_REQUIRED),
_etaPrimePartialggWidth("etaPrimePartialggWidth", 4.35E-6 , NOT_REQUIRED),
_etaCPartialggWidth ("etaCPartialggWidth" , 5.0E-6 , NOT_REQUIRED),
_f2PartialggWidth ("f2PartialggWidth" , 3.03E-6 , NOT_REQUIRED),
_a2PartialggWidth ("a2PartialggWidth" , 1.0E-6 , NOT_REQUIRED),
_f2PrimePartialggWidth ("f2PrimePartialggWidth" , 0.081E-6 , NOT_REQUIRED),
_zoverz03PartialggWidth("zoverz03PartialggWidth", 0.1E-6 , NOT_REQUIRED),
_f0Spin ("f0Spin" , 0.0 , NOT_REQUIRED),
_etaSpin ("etaSpin" , 0.0 , NOT_REQUIRED),
_etaPrimeSpin ("etaPrimeSpin" , 0.0 , NOT_REQUIRED),
_etaCSpin ("etaCSpin" , 0.0 , NOT_REQUIRED),
_f2Spin ("f2Spin" , 2.0 , NOT_REQUIRED),
_a2Spin ("a2Spin" , 2.0 , NOT_REQUIRED),
_f2PrimeSpin ("f2PrimeSpin" , 2.0 , NOT_REQUIRED),
_zoverz03Spin ("zoverz03Spin" , 2.0 , NOT_REQUIRED),
_axionSpin ("axionSpin" , 0.0 , NOT_REQUIRED),
_rho0Mass ("rho0Mass" , 0.769 , NOT_REQUIRED),
_rho0Width ("rho0Width" , 0.1517 , NOT_REQUIRED),
_rho0BrPiPi ("rho0BrPiPi" , 1.0 , NOT_REQUIRED),
_rho0PrimeMass ("rho0PrimeMass" , 1.540 , NOT_REQUIRED),
_rho0PrimeWidth ("rho0PrimeWidth" , 0.570 , NOT_REQUIRED),
_rho0PrimeBrPiPi ("rho0PrimeBrPiPi" , 1.0 , NOT_REQUIRED),
_OmegaMass ("OmegaMass" , 0.78265 , NOT_REQUIRED),
_OmegaWidth ("OmegaWidth" , 0.00849 , NOT_REQUIRED),
_OmegaBrPiPi ("OmegaBrPiPi" , 0.0153 , NOT_REQUIRED),
_PhiMass ("PhiMass" , 1.019461 , NOT_REQUIRED),
_PhiWidth ("PhiWidth" , 0.004266 , NOT_REQUIRED),
_PhiBrKK ("PhiBrKK" , 0.489 , NOT_REQUIRED),
_JpsiMass ("JpsiMass" , 3.096916 , NOT_REQUIRED),
_JpsiWidth ("JpsiWidth" , 0.0000929 , NOT_REQUIRED),
_JpsiBree ("JpsiBree" , 0.05971 , NOT_REQUIRED),
_JpsiBrmumu ("JpsiBrmumu" , 0.05961 , NOT_REQUIRED),
_JpsiBrppbar ("JpsiBrppbar" , 0.002120 , NOT_REQUIRED),
_Psi2SMass ("Psi2SMass" , 3.686109 , NOT_REQUIRED),
_Psi2SWidth ("Psi2SWidth" , 0.000299 , NOT_REQUIRED),
_Psi2SBree ("Psi2SBree" , 0.00789 , NOT_REQUIRED),
_Psi2SBrmumu ("Psi2SBrmumu" , 0.0079 , NOT_REQUIRED),
_Upsilon1SMass ("Upsilon1SMass" , 9.46030 , NOT_REQUIRED),
_Upsilon1SWidth ("Upsilon1SWidth" , 0.00005402 , NOT_REQUIRED),
_Upsilon1SBree ("Upsilon1SBree" , 0.0238 , NOT_REQUIRED),
_Upsilon1SBrmumu ("Upsilon1SBrmumu" , 0.0248 , NOT_REQUIRED),
_Upsilon2SMass ("Upsilon2SMass" , 10.02326 , NOT_REQUIRED),
_Upsilon2SWidth ("Upsilon2SWidth" , 0.00003198 , NOT_REQUIRED),
_Upsilon2SBree ("Upsilon2SBree" , 0.0191 , NOT_REQUIRED),
_Upsilon2SBrmumu ("Upsilon2SBrmumu" , 0.0193 , NOT_REQUIRED),
_Upsilon3SMass ("Upsilon3SMass" , 10.3552 , NOT_REQUIRED),
_Upsilon3SWidth ("Upsilon3SWidth" , 0.00002032 , NOT_REQUIRED),
_Upsilon3SBree ("Upsilon3SBree" , 0.0218 , NOT_REQUIRED),
_Upsilon3SBrmumu ("Upsilon3SBrmumu" , 0.0218 , NOT_REQUIRED)
{
// All parameters must be initialised in initialisation list!
// If not: error: 'parameter<T, validate>::parameter() [with T = unsigned int, bool validate = true]' is private
// or similar
_ip.addParameter(_baseFileName);
_ip.addParameter(_beam1Z);
_ip.addParameter(_beam2Z);
_ip.addParameter(_beam1A);
_ip.addParameter(_beam2A);
_ip.addParameter(_beam1LorentzGamma);
_ip.addParameter(_beam2LorentzGamma);
_ip.addParameter(_maxW);
_ip.addParameter(_minW);
_ip.addParameter(_nmbWBins);
_ip.addParameter(_maxRapidity);
_ip.addParameter(_nmbRapidityBins);
_ip.addParameter(_ptCutEnabled);
_ip.addParameter(_ptCutMin);
_ip.addParameter(_ptCutMax);
_ip.addParameter(_etaCutEnabled);
_ip.addParameter(_etaCutMax);
_ip.addParameter(_etaCutMin);
_ip.addParameter(_productionMode);
_ip.addParameter(_nmbEventsTot);
_ip.addParameter(_prodParticleId);
_ip.addParameter(_randomSeed);
_ip.addParameter(_beamBreakupMode);
_ip.addParameter(_interferenceEnabled);
_ip.addParameter(_interferenceStrength);
_ip.addParameter(_maxPtInterference);
_ip.addParameter(_nmbPtBinsInterference);
_ip.addParameter(_minGammaEnergy);
_ip.addParameter(_maxGammaEnergy);
_ip.addParameter(_pythiaParams);
_ip.addParameter(_pythiaFullEventRecord);
_ip.addParameter(_xsecCalcMethod);
_ip.addParameter(_axionMass); // AXION HACK
_ip.addParameter(_bslopeDefinition);
_ip.addParameter(_bslopeValue);
_ip.addParameter(_printVM);
_ip.addParameter(_impulseVM);
_ip.addParameter(_quantumGlauber);
_ip.addParameter(_bmin);
_ip.addParameter(_bmax);
+ _ip.addParameter(_outputHeader);
_ip.addParameter(_deuteronSlopePar );
_ip.addParameter(_protonMass );
_ip.addParameter(_pionChargedMass );
_ip.addParameter(_pionNeutralMass );
_ip.addParameter(_kaonChargedMass );
_ip.addParameter(_mel );
_ip.addParameter(_muonMass );
_ip.addParameter(_tauMass );
_ip.addParameter(_f0Mass );
_ip.addParameter(_f0Width );
_ip.addParameter(_f0BrPiPi );
_ip.addParameter(_etaMass );
_ip.addParameter(_etaWidth );
_ip.addParameter(_etaPrimeMass );
_ip.addParameter(_etaPrimeWidth );
_ip.addParameter(_etaCMass );
_ip.addParameter(_etaCWidth );
_ip.addParameter(_f2Mass );
_ip.addParameter(_f2Width );
_ip.addParameter(_f2BrPiPi );
_ip.addParameter(_a2Mass );
_ip.addParameter(_a2Width );
_ip.addParameter(_f2PrimeMass );
_ip.addParameter(_f2PrimeWidth );
_ip.addParameter(_f2PrimeBrKK );
_ip.addParameter(_zoverz03Mass );
_ip.addParameter(_f0PartialggWidth );
_ip.addParameter(_etaPartialggWidth );
_ip.addParameter(_etaPrimePartialggWidth);
_ip.addParameter(_etaCPartialggWidth );
_ip.addParameter(_f2PartialggWidth );
_ip.addParameter(_a2PartialggWidth );
_ip.addParameter(_f2PrimePartialggWidth );
_ip.addParameter(_zoverz03PartialggWidth);
_ip.addParameter(_f0Spin );
_ip.addParameter(_etaSpin );
_ip.addParameter(_etaPrimeSpin );
_ip.addParameter(_etaCSpin );
_ip.addParameter(_f2Spin );
_ip.addParameter(_a2Spin );
_ip.addParameter(_f2PrimeSpin );
_ip.addParameter(_zoverz03Spin );
_ip.addParameter(_axionSpin );
_ip.addParameter(_rho0Mass );
_ip.addParameter(_rho0Width );
_ip.addParameter(_rho0BrPiPi );
_ip.addParameter(_rho0PrimeMass );
_ip.addParameter(_rho0PrimeWidth );
_ip.addParameter(_rho0PrimeBrPiPi );
_ip.addParameter(_OmegaMass );
_ip.addParameter(_OmegaWidth );
_ip.addParameter(_OmegaBrPiPi );
_ip.addParameter(_PhiMass );
_ip.addParameter(_PhiWidth );
_ip.addParameter(_PhiBrKK );
_ip.addParameter(_JpsiMass );
_ip.addParameter(_JpsiWidth );
_ip.addParameter(_JpsiBree );
_ip.addParameter(_JpsiBrmumu );
_ip.addParameter(_JpsiBrppbar );
_ip.addParameter(_Psi2SMass );
_ip.addParameter(_Psi2SWidth );
_ip.addParameter(_Psi2SBree );
_ip.addParameter(_Psi2SBrmumu );
_ip.addParameter(_Upsilon1SMass );
_ip.addParameter(_Upsilon1SWidth );
_ip.addParameter(_Upsilon1SBree );
_ip.addParameter(_Upsilon1SBrmumu );
_ip.addParameter(_Upsilon2SMass );
_ip.addParameter(_Upsilon2SWidth );
_ip.addParameter(_Upsilon2SBree );
_ip.addParameter(_Upsilon2SBrmumu );
_ip.addParameter(_Upsilon3SMass );
_ip.addParameter(_Upsilon3SWidth );
_ip.addParameter(_Upsilon3SBree );
_ip.addParameter(_Upsilon3SBrmumu );
}
//______________________________________________________________________________
inputParameters::~inputParameters()
{ }
//______________________________________________________________________________
bool
inputParameters::configureFromFile(const std::string &_configFileName)
{
int nParameters = _ip.parseFile(_configFileName);
if(nParameters == -1)
{
printWarn << "could not open file '" << _configFileName << "'" << endl;
return false;
}
if(_ip.validateParameters(cerr))
printInfo << "successfully read input parameters from '" << _configFileName << "'" << endl;
else {
printWarn << "problems reading input parameters from '" << _configFileName << "'" << endl
<< *this;
return false;
}
/// temporary output test
printWarn<< * this<<endl;
return true;
}
bool inputParameters::init()
{
// Calculate beam gamma in CMS frame
double rap1 = acosh(beam1LorentzGamma());
double rap2 = -acosh(beam2LorentzGamma());
_beamLorentzGamma = cosh((rap1-rap2)/2);
std::cout << "Rapidity beam 1: " << rap1 << ", rapidity beam 2: " << rap2 << ", rapidity CMS system: " << (rap1+rap2)/2 << ", beam gamma in CMS: " << _beamLorentzGamma<< std::endl;
_ptBinWidthInterference = maxPtInterference() / nmbPtBinsInterference();
_protonEnergy = _beamLorentzGamma * protonMass();
// check for deuteron or tritium - these must be the second beam
if((beam1Z()==1) && (beam1A()==2)){
if((beam2Z()==1) && (beam2A()==2)){
printWarn << "deuteron-deuteron collisions are not supported" << endl;
return false;}
printWarn << "deuterium must be listed as the second nucleus" << endl;
return false;}
if( ((beam1Z()==1) && (beam1A()==3)) || ((beam2Z()==1) && (beam2A()==3)) ){
printWarn << "tritium is not currently supported" << endl;
return false;}
// check that rho production uses wide resonance option
if(_prodParticleId.value()==113 && _productionMode.value()==2){
printWarn << endl<< "For rho meson production, you should choose the wide resonance option (production mode = 3)" << endl;
return false;}
// define interaction type
switch (productionMode()) {
case 1:
_interactionType = PHOTONPHOTON;
break;
case 2:
_interactionType = PHOTONPOMERONNARROW;
break;
case 3:
_interactionType = PHOTONPOMERONWIDE;
break;
case 4:
_interactionType = PHOTONPOMERONINCOHERENT;
break;
case 5:
_interactionType = PHOTONUCLEARSINGLE;
break;
case 6:
_interactionType = PHOTONUCLEARDOUBLE;
break;
case 7:
_interactionType = PHOTONUCLEARSINGLEPA;
break;
case 8:
_interactionType = PHOTONUCLEARSINGLEPAPY;
break;
// case 9:
// _interactionType = PHOTONPHOTONKNIEHL;
// break;
// case 10:
// _interactionType = PHOTONPHOTONKNIEHLMODIFIED;
// break;
default:
printWarn << "unknown production mode '" << _productionMode << "'" << endl;
return false;
}
if( (_productionMode.value() ==4) && (_interferenceEnabled.value())) {
printWarn << " cannot enable interference for incoherent production " << endl;
return false;
}
double mass = 0;
double width = 0;
double defaultMinW = 0; // default for _minW, unless it is defined later [GeV/c^2]
double defaultMaxW = 0; // default for _maxW, unless it is defined later [GeV/c^2]
switch (prodParticleId()) {
case 11: // e+e- pair
_particleType = ELECTRON;
_decayType = LEPTONPAIR;
mass = mel();
defaultMinW = 2*mass; // default is 0.01; up to 0.15 is safe for Summer 2000 triggering for e+e- pairs
defaultMaxW = sqrt(beam1LorentzGamma()*beam2LorentzGamma())*2*(starlightConstants::hbarc)/(1.2*pow(float(beam1A()),1./6.)*pow(float(beam2A()),1./6.)); // JES 6.17.2015 to avoid problems with no default
_inputBranchingRatio = 1.0;
break;
case 13: // mu+mu- pair
_particleType = MUON;
_decayType = LEPTONPAIR;
defaultMinW = 2 * muonMass();
defaultMaxW = sqrt(beam1LorentzGamma()*beam2LorentzGamma())*2*(starlightConstants::hbarc)/(1.2*pow(float(beam1A()),1./6.)*pow(float(beam2A()),1./6.)); // JES 6.17.2015 to avoid problems with no default
_inputBranchingRatio = 1.0;
break;
case 15: // tau+tau- pair
_particleType = TAUON;
_decayType = LEPTONPAIR;
defaultMinW = 2 * tauMass();
defaultMaxW = sqrt(beam1LorentzGamma()*beam2LorentzGamma())*2*(starlightConstants::hbarc)/(1.2*pow(float(beam1A()),1./6.)*pow(float(beam2A()),1./6.)); // JES 6.17.2015 to avoid problems with no default
_inputBranchingRatio = 1.0;
break;
case 10015: // tau+tau- pair
_particleType = TAUONDECAY;
_decayType = LEPTONPAIR;
defaultMinW = 2 * tauMass();
defaultMaxW = sqrt(beam1LorentzGamma()*beam2LorentzGamma())*2*(starlightConstants::hbarc)/(1.2*pow(float(beam1A()),1./6.)*pow(float(beam2A()),1./6.)); // JES 6.17.2015 to avoid problems with no default
_inputBranchingRatio = 1.0;
break;
// case 24: // W+W- pair
// _particleType = W;
// _decayType = WW;
// defaultMinW = 2 * muonMass();
// break;
case 115: // a_2(1320)
_particleType = A2;
_decayType = SINGLEMESON;
mass = a2Mass();
width = a2Width();
defaultMinW = mass - 5*width; // JES 6.17.2015 to avoid problems with default of 0
defaultMaxW = mass + 5*width; // JES 6.17.2015 to avoid problems with no default
_inputBranchingRatio = 1.0;
break;
case 221: // eta
_particleType = ETA;
_decayType = SINGLEMESON;
mass = etaMass();
width = etaWidth();
defaultMinW = mass - 5*width; // JES 6.17.2015 to avoid problems with default of 0
defaultMaxW = mass + 5*width; // JES 6.17.2015 to avoid problems with no default
_inputBranchingRatio = 1.0;
break;
case 225: // f_2(1270)
_particleType = F2;
_decayType = SINGLEMESON;
mass = f2Mass();
width = f2Width();
defaultMinW = mass - 5*width; // JES 6.17.2015 to avoid problems with default of 0
defaultMaxW = mass + 5*width; // JES 6.17.2015 to avoid problems with no default
_inputBranchingRatio = f2BrPiPi();
break;
case 331: // eta'(958)
_particleType = ETAPRIME;
_decayType = SINGLEMESON;
mass = etaPrimeMass();
width = etaPrimeWidth();
defaultMinW = mass - 5*width; // JES 6.17.2015 to avoid problems with default of 0
defaultMaxW = mass + 5*width; // JES 6.17.2015 to avoid problems with no default
_inputBranchingRatio = 1.0;
break;
case 335: // f_2'(1525)
_particleType = F2PRIME;
_decayType = SINGLEMESON;
mass = f2PrimeMass();
width = f2PrimeWidth();
defaultMinW = mass - 5*width; // JES 6.17.2015 to avoid problems with default of 0
defaultMaxW = mass + 5*width; // JES 6.17.2015 to avoid problems with no default
_inputBranchingRatio = f2PrimeBrKK();
break;
case 441: // eta_c(1s)
_particleType = ETAC;
_decayType = SINGLEMESON;
mass = etaCMass();
width = etaCWidth();
defaultMinW = mass - 5*width; // JES 6.17.2015 to avoid problems with default of 0
defaultMaxW = mass + 5*width; // JES 6.17.2015 to avoid problems with no default
_inputBranchingRatio = 1.0;
break;
case 9010221: // f_0(980), was orginally called 10221? updated to standard number
_particleType = F0;
_decayType = SINGLEMESON;
mass = f0Mass();
width = f0Width();
defaultMinW = mass - 5*width; // JES 6.17.2015 to avoid problems with default of 0
defaultMaxW = mass + 5*width; // JES 6.17.2015 to avoid problems with no default
_inputBranchingRatio = f0BrPiPi();
break;
case 33: // Z"/Z0 This is the rho^0 rho^0 final state SRK
_particleType = ZOVERZ03;
_decayType = SINGLEMESON;
defaultMinW = 4*pionChargedMass();
defaultMaxW = 1.6; // JES 6.17.2015 to avoid problems with no default
_inputBranchingRatio = 1.0;
break;
case 88: // axion// AXION HACK, till break statement
_particleType = AXION;
_decayType = SINGLEMESON;
mass = _axionMass.value();
width = 1/(64*starlightConstants::pi)*mass*mass*mass/(1000*1000);//Fix Lambda=1000 GeV, rescaling is trivial.
defaultMinW = mass - 5*width; // JES 6.17.2015 to avoid problems with default of 0
defaultMaxW = mass + 5*width; // JES 6.17.2015 to avoid problems with no default
break; // AXION HACK, end
// case 25: // Higgs
// _particleType = HIGGS;
// _decayType = SINGLEMESON;
// break;
case 113: // rho(770)
_particleType = RHO;
_decayType = WIDEVMDEFAULT;
mass = rho0Mass();
width = rho0Width();
defaultMinW = 2 * pionChargedMass();
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = rho0BrPiPi();
break;
case 913: // rho(770) with direct pi+pi- decay, interference given by ZEUS data
_particleType = RHOZEUS;
_decayType = WIDEVMDEFAULT;
mass = rho0Mass();
width = rho0Width();
defaultMinW = 2 * pionChargedMass();
defaultMaxW = mass + 5 * width; // use the same 1.5GeV max mass as ZEUS
_inputBranchingRatio = rho0BrPiPi();
break;
case 999: // pi+pi-pi+pi- phase space decay
_particleType = FOURPRONG;
_decayType = WIDEVMDEFAULT;
mass = rho0PrimeMass();
width = rho0PrimeWidth();
defaultMinW = 4 * pionChargedMass();
defaultMaxW = sqrt(beam1LorentzGamma()*beam2LorentzGamma())*2*(starlightConstants::hbarc)/(1.2*pow(float(beam1A()),1./6.)*pow(float(beam2A()),1./6.)); // JES 6.17.2015 to avoid problems with no default
if (defaultMaxW>10.){defaultMaxW=10.;} //SRK May 29, 2019, to avoid an unduly high defaultMaxW
_inputBranchingRatio = 1.0;
break;
case 223: // omega(782)
_particleType = OMEGA;
_decayType = NARROWVMDEFAULT;
mass = OmegaMass();
width = OmegaWidth();
defaultMinW = mass - 5 * width;
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = OmegaBrPiPi();
break;
case 333: // phi(1020)
_particleType = PHI;
_decayType = NARROWVMDEFAULT;
mass = PhiMass();
width = PhiWidth();
defaultMinW = 2 * kaonChargedMass();
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = PhiBrKK();
break;
case 443: // J/psi
_particleType = JPSI;
_decayType = NARROWVMDEFAULT;
mass = JpsiMass();
width = JpsiWidth();
defaultMinW = mass - 5 * width;
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = (JpsiBree() + JpsiBrmumu())/2.;
break;
case 443011: // J/psi
_particleType = JPSI_ee;
_decayType = NARROWVMDEFAULT;
mass = JpsiMass();
width = JpsiWidth();
defaultMinW = mass - 5 * width;
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = JpsiBree();
break;
case 443013: // J/psi
cout<<"In inputParameters setting J/psi mass!"<<endl;
_particleType = JPSI_mumu;
_decayType = NARROWVMDEFAULT;
mass = JpsiMass();
width = JpsiWidth();
defaultMinW = mass - 5 * width;
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = JpsiBrmumu();
break;
case 4432212: // J/psi
cout<<"In inputParameters setting J/psi mass!"<<endl;
_particleType = JPSI_ppbar;
_decayType = NARROWVMDEFAULT;
mass = JpsiMass();
width = JpsiWidth();
defaultMinW = mass - 5 * width;
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = JpsiBrppbar();
break;
case 444: // psi(2S)
_particleType = JPSI2S;
_decayType = NARROWVMDEFAULT;
mass = Psi2SMass();
width = Psi2SWidth();
defaultMinW = mass - 5 * width;
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = (Psi2SBree() + Psi2SBrmumu())/2.;
break;
case 444011: // psi(2S)
_particleType = JPSI2S_ee;
_decayType = NARROWVMDEFAULT;
mass = Psi2SMass();
width = Psi2SWidth();
defaultMinW = mass - 5 * width;
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = Psi2SBree();
break;
case 444013: // psi(2S)
_particleType = JPSI2S_mumu;
_decayType = NARROWVMDEFAULT;
mass = Psi2SMass();
width = Psi2SWidth();
defaultMinW = mass - 5 * width;
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = Psi2SBrmumu();
break;
case 553: // Upsilon(1S)
_particleType = UPSILON;
_decayType = NARROWVMDEFAULT;
mass = Upsilon1SMass();
width = Upsilon1SWidth();
defaultMinW = mass - 5 * width;
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = (Upsilon1SBree() + Upsilon1SBrmumu())/2.;
break;
case 553011: // Upsilon
_particleType = UPSILON_ee;
_decayType = NARROWVMDEFAULT;
mass = Upsilon1SMass();
width = Upsilon1SWidth();
defaultMinW = mass - 5 * width;
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = Upsilon1SBree();
break;
case 553013: // Upsilon
_particleType = UPSILON_mumu;
_decayType = NARROWVMDEFAULT;
mass = Upsilon1SMass();
width = Upsilon1SWidth();
defaultMinW = mass - 5 * width;
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = Upsilon1SBrmumu();
break;
case 554: // Upsilon(2S)
_particleType = UPSILON2S;
_decayType = NARROWVMDEFAULT;
mass = Upsilon2SMass();
width = Upsilon2SWidth();
defaultMinW = mass - 5 * width;
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = (Upsilon2SBree() + Upsilon2SBrmumu())/2.;
break;
case 554011: // Upsilon(2S)
_particleType = UPSILON2S_ee;
_decayType = NARROWVMDEFAULT;
mass = Upsilon2SMass();
width = Upsilon2SWidth();
defaultMinW = mass - 5 * width;
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = Upsilon2SBree();
break;
case 554013: // Upsilon(2S)
_particleType = UPSILON2S_mumu;
_decayType = NARROWVMDEFAULT;
mass = Upsilon2SMass();
width = Upsilon2SWidth();
defaultMinW = mass - 5 * width;
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = Upsilon2SBrmumu();
break;
case 555: // Upsilon(3S)
_particleType = UPSILON3S;
_decayType = NARROWVMDEFAULT;
mass = Upsilon3SMass();
width = Upsilon3SWidth();
defaultMinW = mass - 5 * width;
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = (Upsilon3SBree() + Upsilon3SBrmumu())/2.;
break;
case 555011: // Upsilon(3S)
_particleType = UPSILON3S_ee;
_decayType = NARROWVMDEFAULT;
mass = Upsilon3SMass();
width = Upsilon3SWidth();
defaultMinW = mass - 5 * width;
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = Upsilon3SBree();
break;
case 555013: // Upsilon(3S)
_particleType = UPSILON3S_mumu;
_decayType = NARROWVMDEFAULT;
mass = Upsilon3SMass();
width = Upsilon3SWidth();
defaultMinW = mass - 5 * width;
defaultMaxW = mass + 5 * width;
_inputBranchingRatio = Upsilon3SBrmumu();
break;
default:
printWarn << "unknown particle ID " << _prodParticleId << endl;
return false;
} // _prodParticleId
if (_minW.value() == -1)
_minW = defaultMinW;
if (_maxW.value() == -1)
_maxW = defaultMaxW;
if ( _maxW.value() <= _minW.value() ) {
printWarn << "maxW must be greater than minW" << endl;
return false;
}
printInfo << "using the following " << *this;
return true;
}
//______________________________________________________________________________
ostream&
inputParameters::print(ostream& out) const
{
out << "starlight parameters:" << endl
<< " base file name ...................... '" << _baseFileName.value() << "'" << endl
<< " beam 1 atomic number ................... " << _beam1Z.value() << endl
<< " beam 1 atomic mass number .............. " << _beam1A.value() << endl
<< " beam 2 atomic number ................... " << _beam2Z.value() << endl
<< " beam 2 atomic mass number .............. " << _beam2A.value() << endl
<< " Lorentz gamma of beams in CM frame ..... " << _beamLorentzGamma << endl
<< " mass W of produced hadronic system ..... " << _minW.value() << " < W < " << _maxW.value() << " GeV/c^2" << endl
<< " # of W bins ............................ " << _nmbWBins.value() << endl
<< " maximum absolute value for rapidity .... " << _maxRapidity.value() << endl
<< " # of rapidity bins ..................... " << _nmbRapidityBins.value() << endl
<< " cut in pT............................... " << yesNo(_ptCutEnabled.value()) << endl;
if (_ptCutEnabled.value()) {
out << " minumum pT.......................... " << _ptCutMin.value() << " GeV/c" << endl
<< " maximum pT.......................... " << _ptCutMax.value() << " GeV/c" << endl;}
out << " cut in eta.............................. " << yesNo(_etaCutEnabled.value()) << endl;
if (_etaCutEnabled.value()) {
out << " minumum eta......................... " << _etaCutMin.value() << endl
<< " maximum eta......................... " << _etaCutMax.value() << endl;}
out << " production mode ........................ " << _productionMode.value() << endl
<< " number of events to generate ........... " << _nmbEventsTot.value() << endl
<< " PDG ID of produced particle ............ " << _prodParticleId.value() << endl
<< " seed for random generator .............. " << _randomSeed.value() << endl
<< " breakup mode for beam particles ........ " << _beamBreakupMode.value() << endl
<< " interference enabled ................... " << yesNo(_interferenceEnabled.value()) << endl;
if (_interferenceEnabled.value()) {
out << " interference strength .................. " << _interferenceStrength.value() << endl
<< " maximum p_T for interference calc. ..... " << _maxPtInterference.value() << " GeV/c" << endl
<< " # of p_T bins for interference calc. ... " << _nmbPtBinsInterference.value() << endl;}
if (_productionMode.value()!=1) {
if (_productionMode.value()==4) {
out << " coherent scattering off nucleus ........ no" << endl;}
else {
out << " coherent scattering off nucleus ........ yes" << endl;
}
}
out <<" Quantum Glauber parameter............... "<<_quantumGlauber.value()<<endl;
out <<" Impulse VM parameter.................... "<<_impulseVM.value()<<endl;
// if (_quantumGlauber.value()==1) {out << " Quantum Glauber calculation being used"<< endl;}
//if (_quantumGlauber.value()!=1) {out << " Classical Glauber calculation being used"<< endl;}
if (_beamBreakupMode.value()==8) {
out <<" Minimum impact parameter.................."<<_bmin.value()<<" fm"<<endl;
out <<" Maximum impact parameter.................."<<_bmax.value()<<" fm"<<endl;
}
// Add some checks here SRK September, 2017
if (_beamBreakupMode.value()==8 && _bmin.value() > _bmax.value()) {
out <<"****Error bmin > bmax"<<endl;
exit(-1);
}
if (_beamBreakupMode.value() == 8 && _productionMode.value() !=1) {
out <<"****Error. Cannot use beam breakup mode 8 (with bmin and bmax) with photonuclear interactions"<<endl;
exit(-1);
}
return out;
}
//______________________________________________________________________________
ostream&
inputParameters::write(ostream& out) const
{
out << "baseFileName" << baseFileName () <<endl
<< "BEAM_1_Z" << beam1Z () <<endl
<< "BEAM_2_Z" << beam1A () <<endl
<< "BEAM_1_A" << beam2Z () <<endl
<< "BEAM_2_A" << beam2A () <<endl
<< "BEAM_GAMMA" << beamLorentzGamma () <<endl
<< "W_MAX" << maxW () <<endl
<< "W_MIN" << minW () <<endl
<< "W_N_BINS" << nmbWBins () <<endl
<< "RAP_MAX" << maxRapidity () <<endl
<< "RAP_N_BINS" << nmbRapidityBins () <<endl
<< "CUT_PT" << ptCutEnabled () <<endl
<< "PT_MIN" << ptCutMin () <<endl
<< "PT_MAX" << ptCutMax () <<endl
<< "CUT_ETA" << etaCutEnabled () <<endl
<< "ETA_MIN" << etaCutMin () <<endl
<< "ETA_MAX" << etaCutMax () <<endl
<< "PROD_MODE" << productionMode () <<endl
<< "N_EVENTS" << nmbEvents () <<endl
<< "PROD_PID" << prodParticleId () <<endl
<< "RND_SEED" << randomSeed () <<endl
<< "BREAKUP_MODE" << beamBreakupMode () <<endl
<< "INTERFERENCE" << interferenceEnabled () <<endl
<< "IF_STRENGTH" << interferenceStrength () <<endl
<< "INT_PT_MAX" << maxPtInterference () <<endl
<< "INT_PT_N_BINS" << nmbPtBinsInterference() <<endl
<< "QUANTUM_GLAUBER"<<quantumGlauber () <<endl
<< "BMIN" <<bmin ()<<endl
<< "BMAX" <<bmax ()<<endl;
return out;
}
std::string
inputParameters::parameterValueKey() const
{
return parameterbase::_parameters.validationKey();
}
Index: trunk/Readme.docx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

File Metadata

Mime Type
text/x-diff
Expires
Sat, Dec 21, 4:55 PM (14 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4023542
Default Alt Text
(92 KB)

Event Timeline