File indexing completed on 2024-09-27 07:03:40
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 #include <iostream>
0033 #include <fstream>
0034
0035 #include "reportingUtils.h"
0036 #include "starlightconstants.h"
0037 #include "inputParameters.h"
0038 #include "inputParser.h"
0039 #include "starlightconfig.h"
0040 #include <cmath>
0041 #include <cstring>
0042 #include "randomgenerator.h"
0043
0044 using namespace std;
0045 using namespace starlightConstants;
0046
0047 parameterlist parameterbase::_parameters;
0048
0049 #define REQUIRED true
0050 #define NOT_REQUIRED false
0051
0052
0053 inputParameters::inputParameters()
0054 : _baseFileName ("baseFileName","slight"),
0055 _targetBeamZ ("TARGET_BEAM_Z",0),
0056 _targetBeamA ("TARGET_BEAM_A",0),
0057 _electronBeamLorentzGamma ("ELECTRON_BEAM_GAMMA",0),
0058 _targetBeamLorentzGamma ("TARGET_BEAM_GAMMA",0),
0059 _maxW ("W_MAX",0),
0060 _minW ("W_MIN",0),
0061 _maxW_GP ("W_GP_MAX", 0,NOT_REQUIRED),
0062 _minW_GP ("W_GP_MIN", 0,NOT_REQUIRED),
0063 _nmbWBins ("W_N_BINS",0),
0064 _maxRapidity ("RAP_MAX",9,NOT_REQUIRED),
0065 _nmbRapidityBins ("RAP_N_BINS",100,NOT_REQUIRED),
0066 _nmbEnergyBins ("EGA_N_BINS",0),
0067 _ptCutEnabled ("CUT_PT",false, NOT_REQUIRED),
0068 _ptCutMin ("PT_MIN",0, NOT_REQUIRED),
0069 _ptCutMax ("PT_MAX",0, NOT_REQUIRED),
0070 _etaCutEnabled ("CUT_ETA",false, NOT_REQUIRED),
0071 _etaCutMin ("ETA_MIN",0, NOT_REQUIRED),
0072 _etaCutMax ("ETA_MAX",0, NOT_REQUIRED),
0073 _productionMode ("PROD_MODE",0),
0074 _nmbEventsTot ("N_EVENTS",0),
0075 _prodParticleId ("PROD_PID",0),
0076 _randomSeed ("RND_SEED",0),
0077 _beamBreakupMode ("BREAKUP_MODE",0),
0078 _interferenceEnabled ("INTERFERENCE",false,NOT_REQUIRED),
0079 _interferenceStrength ("IF_STRENGTH",0,NOT_REQUIRED),
0080 _maxPtInterference ("INT_PT_MAX",0,NOT_REQUIRED),
0081 _nmbPtBinsInterference ("INT_PT_N_BINS",0),
0082 _ptBinWidthInterference("INT_PT_WIDTH",0),
0083 _protonEnergy ("PROTON_ENERGY",0, NOT_REQUIRED),
0084 _electronEnergy ("ELECTRON_ENERGY",0, NOT_REQUIRED),
0085 _minGammaEnergy ("MIN_GAMMA_ENERGY",6.0, NOT_REQUIRED),
0086 _maxGammaEnergy ("MAX_GAMMA_ENERGY",600000.0, NOT_REQUIRED),
0087 _minGammaQ2 ("MIN_GAMMA_Q2",0,NOT_REQUIRED),
0088 _maxGammaQ2 ("MAX_GAMMA_Q2",0,NOT_REQUIRED),
0089 _nmbGammaQ2Bins ("INT_GAMMA_Q2_BINS",400,NOT_REQUIRED),
0090 _pythiaParams ("PYTHIA_PARAMS","", NOT_REQUIRED),
0091 _outputFormat ("OUTPUT_FORMAT",0, NOT_REQUIRED),
0092 _backwardsProduction ("BACKWARDS_PRODUCTION",false, NOT_REQUIRED),
0093
0094 _xsecCalcMethod ("XSEC_METHOD",0, NOT_REQUIRED),
0095 _axionMass ("AXION_MASS",50, NOT_REQUIRED),
0096 _bslopeDefinition ("BSLOPE_DEFINITION",0, NOT_REQUIRED),
0097 _bslopeValue ("BSLOPE_VALUE",4.0,NOT_REQUIRED),
0098 _impulseVM ("SELECT_IMPULSE_VM",0,NOT_REQUIRED),
0099 _quantumGlauber ("QUANTUM_GLAUBER",0,NOT_REQUIRED)
0100 {
0101
0102
0103
0104
0105 _ip.addParameter(_baseFileName);
0106
0107 _ip.addParameter(_targetBeamZ);
0108 _ip.addParameter(_targetBeamA);
0109
0110 _ip.addParameter(_targetBeamLorentzGamma);
0111 _ip.addParameter(_electronBeamLorentzGamma);
0112
0113 _ip.addParameter(_maxW);
0114 _ip.addParameter(_minW);
0115
0116 _ip.addParameter(_maxW_GP);
0117 _ip.addParameter(_minW_GP);
0118
0119 _ip.addParameter(_nmbWBins);
0120
0121 _ip.addParameter(_maxRapidity);
0122 _ip.addParameter(_nmbRapidityBins);
0123
0124 _ip.addParameter(_nmbEnergyBins);
0125
0126 _ip.addParameter(_ptCutEnabled);
0127 _ip.addParameter(_ptCutMin);
0128 _ip.addParameter(_ptCutMax);
0129
0130 _ip.addParameter(_etaCutEnabled);
0131 _ip.addParameter(_etaCutMax);
0132 _ip.addParameter(_etaCutMin);
0133
0134 _ip.addParameter(_productionMode);
0135 _ip.addParameter(_nmbEventsTot);
0136 _ip.addParameter(_prodParticleId);
0137 _ip.addParameter(_randomSeed);
0138 _ip.addParameter(_beamBreakupMode);
0139 _ip.addParameter(_interferenceEnabled);
0140 _ip.addParameter(_interferenceStrength);
0141 _ip.addParameter(_maxPtInterference);
0142 _ip.addParameter(_nmbPtBinsInterference);
0143 _ip.addParameter(_minGammaEnergy);
0144 _ip.addParameter(_maxGammaEnergy);
0145 _ip.addParameter(_minGammaQ2);
0146 _ip.addParameter(_maxGammaQ2);
0147 _ip.addParameter(_nmbGammaQ2Bins);
0148 _ip.addParameter(_pythiaParams);
0149 _ip.addParameter(_outputFormat);
0150 _ip.addParameter(_backwardsProduction);
0151 _ip.addParameter(_xsecCalcMethod);
0152 _ip.addParameter(_axionMass);
0153 _ip.addParameter(_bslopeDefinition);
0154 _ip.addParameter(_bslopeValue);
0155 _ip.addParameter(_impulseVM);
0156 _ip.addParameter(_quantumGlauber);
0157 }
0158
0159
0160
0161 inputParameters::~inputParameters()
0162 { }
0163
0164
0165
0166 bool
0167 inputParameters::configureFromFile(const std::string &_configFileName)
0168 {
0169
0170 int nParameters = _ip.parseFile(_configFileName);
0171
0172 if(nParameters == -1)
0173 {
0174 printWarn << "could not open file '" << _configFileName << "'" << endl;
0175 return false;
0176 }
0177
0178
0179 if(_ip.validateParameters(cerr))
0180 printInfo << "successfully read input parameters from '" << _configFileName << "'" << endl;
0181 else {
0182 printWarn << "problems reading input parameters from '" << _configFileName << "'" << endl
0183 << *this;
0184 return false;
0185 }
0186 return true;
0187 }
0188 bool inputParameters::init()
0189 {
0190
0191
0192 double rap1 = acosh(electronBeamLorentzGamma());
0193 double rap2 = -acosh(targetBeamLorentzGamma());
0194
0195 double _electronEnergy_lab = (electronBeamLorentzGamma())*(starlightConstants::mel);
0196 double _ionEnergy_lab = targetBeamLorentzGamma()*(targetBeamA())*protonMass;
0197 double _ionPz_lab = -1.0*sqrt(_ionEnergy_lab*_ionEnergy_lab - (targetBeamA()*targetBeamA())*protonMass*protonMass);
0198 double _electronPz_lab = 1.0*sqrt(_electronEnergy_lab*_electronEnergy_lab - starlightConstants::mel*(starlightConstants::mel));
0199 double _totalEnergy_lab = 1.0*_electronEnergy_lab + _ionEnergy_lab;
0200 double _totalPz_lab = _ionPz_lab + _electronPz_lab;
0201 _rap_CM = (1.0/2.0)*log((_totalEnergy_lab + _totalPz_lab)/(_totalEnergy_lab - _totalPz_lab));
0202 double _totalEnergy_COM;
0203 _totalEnergy_COM = sqrt((_totalEnergy_lab) * (_totalEnergy_lab) - (_totalPz_lab) * (_totalPz_lab));
0204
0205 _beamLorentzGamma = cosh(_rap_CM-rap2);
0206 _targetLorentzGamma = cosh(rap1-rap2);
0207
0208 if( targetBeamA() == 1)
0209 _targetR = 4.4;
0210 else
0211 _targetR = 6.1 * pow(targetBeamA(), 1./3.);
0212
0213
0214 _fixedQ2Range = false;
0215 std::cout << "Rapidity electron beam: " << rap1 << ", rapidity target beam: " << rap2 << ", rapidity CMS system: " << _rap_CM << ", beam gamma in CMS: " << _beamLorentzGamma<< std::endl;
0216 std::cout << "Rapidity beam 1 in beam 2 frame: " << rap1-rap2 << ", beam 1 gamma in beam 2 frame: " << _targetLorentzGamma<< std::endl;
0217 _ptBinWidthInterference = maxPtInterference() / nmbPtBinsInterference();
0218 _protonEnergy = _beamLorentzGamma * protonMass;
0219
0220 _electronEnergy = _targetLorentzGamma * starlightConstants::mel;
0221
0222 if( (targetBeamZ()==1) && (targetBeamA()==3) ){
0223 printWarn << "tritium is not currently supported" << endl;
0224 return false;}
0225
0226 if(_prodParticleId.value()==113 && _productionMode.value()==2){
0227 printWarn << endl<< "For rho meson production, you should choose the wide resonance option (production mode = 3)" << endl;
0228 return false;}
0229
0230
0231 switch (productionMode()) {
0232 case 1:
0233 _interactionType = PHOTONPHOTON;
0234 break;
0235 case 2:
0236 _interactionType = PHOTONPOMERONNARROW;
0237 break;
0238 case 3:
0239 _interactionType = PHOTONPOMERONWIDE;
0240 break;
0241 case 4:
0242 _interactionType = PHOTONPOMERONINCOHERENT;
0243 break;
0244 case 5:
0245 _interactionType = PHOTONUCLEARSINGLE;
0246 break;
0247 case 6:
0248 _interactionType = PHOTONUCLEARDOUBLE;
0249 break;
0250 case 7:
0251 _interactionType = PHOTONUCLEARSINGLEPA;
0252 break;
0253 case 8:
0254 _interactionType = PHOTONUCLEARSINGLEPAPY;
0255 break;
0256
0257
0258
0259
0260
0261
0262 case 12:
0263 _interactionType = E_PHOTONPOMERONNARROW;
0264 break;
0265 case 13:
0266 _interactionType = E_PHOTONPOMERONWIDE;
0267 break;
0268
0269 default:
0270 printWarn << "unknown production mode '" << _productionMode << "'" << endl;
0271 return false;
0272 }
0273 if( (_productionMode.value() ==4) && (_interferenceEnabled.value())) {
0274 printWarn << " cannot enable interference for incoherent production " << endl;
0275 return false;
0276 }
0277
0278 double mass = 0;
0279 double width = 0;
0280 double defaultMinW = 0;
0281 double defaultMaxW = 0;
0282 switch (prodParticleId()) {
0283
0284
0285
0286
0287
0288
0289 case 115:
0290 _particleType = A2;
0291 _decayType = SINGLEMESON;
0292 mass = starlightConstants::a2Mass;
0293 width = starlightConstants::a2Width;
0294 defaultMinW = mass - 5*width;
0295 defaultMaxW = mass + 5*width;
0296 _inputBranchingRatio = 1.0;
0297 break;
0298 case 221:
0299 _particleType = ETA;
0300 _decayType = SINGLEMESON;
0301 mass = starlightConstants::etaMass;
0302 width = starlightConstants::etaWidth;
0303 defaultMinW = mass - 5*width;
0304 defaultMaxW = mass + 5*width;
0305 _inputBranchingRatio = 1.0;
0306 break;
0307 case 225:
0308 _particleType = F2;
0309 _decayType = SINGLEMESON;
0310 mass = starlightConstants::f2Mass;
0311 width = starlightConstants::f2Width;
0312 defaultMinW = mass - 5*width;
0313 defaultMaxW = mass + 5*width;
0314 _inputBranchingRatio = starlightConstants::f2BrPiPi;
0315 break;
0316 case 331:
0317 _particleType = ETAPRIME;
0318 _decayType = SINGLEMESON;
0319 mass = starlightConstants::etaPrimeMass;
0320 width = starlightConstants::etaPrimeWidth;
0321 defaultMinW = mass - 5*width;
0322 defaultMaxW = mass + 5*width;
0323 _inputBranchingRatio = 1.0;
0324 break;
0325 case 335:
0326 _particleType = F2PRIME;
0327 _decayType = SINGLEMESON;
0328 mass = starlightConstants::f2PrimeMass;
0329 width = starlightConstants::f2PrimeWidth;
0330 defaultMinW = mass - 5*width;
0331 defaultMaxW = mass + 5*width;
0332 _inputBranchingRatio = starlightConstants::f2PrimeBrKK;
0333 break;
0334 case 441:
0335 _particleType = ETAC;
0336 _decayType = SINGLEMESON;
0337 mass = starlightConstants::etaCMass;
0338 width = starlightConstants::etaCWidth;
0339 defaultMinW = mass - 5*width;
0340 defaultMaxW = mass + 5*width;
0341 _inputBranchingRatio = 1.0;
0342 break;
0343 case 9010221:
0344 _particleType = F0;
0345 _decayType = SINGLEMESON;
0346 mass = starlightConstants::f0Mass;
0347 width = starlightConstants::f0Width;
0348 defaultMinW = mass - 5*width;
0349 defaultMaxW = mass + 5*width;
0350 _inputBranchingRatio = starlightConstants::f0BrPiPi;
0351 break;
0352 case 33:
0353 _particleType = ZOVERZ03;
0354 _decayType = SINGLEMESON;
0355 defaultMinW = 4*pionChargedMass;
0356 defaultMaxW = 1.6;
0357 _inputBranchingRatio = 1.0;
0358 break;
0359 case 88:
0360 _particleType = AXION;
0361 _decayType = SINGLEMESON;
0362 mass = _axionMass.value();
0363 width = 1/(64*starlightConstants::pi)*mass*mass*mass/(1000*1000);
0364 defaultMinW = mass - 5*width;
0365 defaultMaxW = mass + 5*width;
0366 break;
0367
0368
0369
0370
0371 case 113:
0372 _particleType = RHO;
0373 _decayType = WIDEVMDEFAULT;
0374 mass = starlightConstants::rho0Mass;
0375 width = starlightConstants::rho0Width;
0376 defaultMinW = 2 * pionChargedMass;
0377 defaultMaxW = mass + 5 * width;
0378 _inputBranchingRatio = starlightConstants::rho0BrPiPi;
0379 break;
0380 case 913:
0381 _particleType = RHOZEUS;
0382 _decayType = WIDEVMDEFAULT;
0383 mass = starlightConstants::rho0Mass;
0384 width = starlightConstants::rho0Width;
0385 defaultMinW = 2 * pionChargedMass;
0386 defaultMaxW = mass + 5 * width;
0387 _inputBranchingRatio = starlightConstants::rho0BrPiPi;
0388 break;
0389
0390
0391
0392
0393
0394
0395
0396
0397
0398 case 223:
0399 _particleType = OMEGA;
0400 _decayType = NARROWVMDEFAULT;
0401 mass = starlightConstants::OmegaMass;
0402 width = starlightConstants::OmegaWidth;
0403 defaultMinW = mass - 5 * width;
0404 defaultMaxW = mass + 5 * width;
0405 _inputBranchingRatio = starlightConstants::OmegaBrPiPi;
0406 break;
0407 case 223022:
0408 _particleType = OMEGA_pi0gamma;
0409 _decayType = NARROWVMDEFAULT;
0410 mass = starlightConstants::OmegaMass;
0411 width = starlightConstants::OmegaWidth;
0412 defaultMinW = mass - 5 * width;
0413 defaultMaxW = mass + 5 * width;
0414 _inputBranchingRatio = starlightConstants::OmegaBrPi0Gamma;
0415 break;
0416 case 333:
0417 _particleType = PHI;
0418 _decayType = NARROWVMDEFAULT;
0419 mass = starlightConstants::PhiMass;
0420 width = starlightConstants::PhiWidth;
0421 defaultMinW = 2 * kaonChargedMass;
0422 defaultMaxW = mass + 5 * width;
0423 _inputBranchingRatio = starlightConstants::PhiBrKK;
0424 break;
0425 case 443:
0426 _particleType = JPSI;
0427 _decayType = NARROWVMDEFAULT;
0428 mass = starlightConstants::JpsiMass;
0429 width = starlightConstants::JpsiWidth;
0430 defaultMinW = mass - 5 * width;
0431 defaultMaxW = mass + 5 * width;
0432 _inputBranchingRatio = (starlightConstants::JpsiBree + starlightConstants::JpsiBrmumu)/2.;
0433 break;
0434 case 443011:
0435 _particleType = JPSI_ee;
0436 _decayType = NARROWVMDEFAULT;
0437 mass = starlightConstants::JpsiMass;
0438 width = starlightConstants::JpsiWidth;
0439 defaultMinW = mass - 5 * width;
0440 defaultMaxW = mass + 5 * width;
0441 _inputBranchingRatio = starlightConstants::JpsiBree;
0442 break;
0443 case 443013:
0444 cout<<"In inputParameters setting J/psi mass!"<<endl;
0445 _particleType = JPSI_mumu;
0446 _decayType = NARROWVMDEFAULT;
0447 mass = starlightConstants::JpsiMass;
0448 width = starlightConstants::JpsiWidth;
0449 defaultMinW = mass - 5 * width;
0450 defaultMaxW = mass + 5 * width;
0451 _inputBranchingRatio = starlightConstants::JpsiBrmumu;
0452 break;
0453 case 444:
0454 _particleType = JPSI2S;
0455 _decayType = NARROWVMDEFAULT;
0456 mass = starlightConstants::Psi2SMass;
0457 width = starlightConstants::Psi2SWidth;
0458 defaultMinW = mass - 5 * width;
0459 defaultMaxW = mass + 5 * width;
0460 _inputBranchingRatio = (starlightConstants::Psi2SBree + starlightConstants::Psi2SBrmumu)/2.;
0461 break;
0462 case 444011:
0463 _particleType = JPSI2S_ee;
0464 _decayType = NARROWVMDEFAULT;
0465 mass = starlightConstants::Psi2SMass;
0466 width = starlightConstants::Psi2SWidth;
0467 defaultMinW = mass - 5 * width;
0468 defaultMaxW = mass + 5 * width;
0469 _inputBranchingRatio = starlightConstants::Psi2SBree;
0470 break;
0471 case 444013:
0472 _particleType = JPSI2S_mumu;
0473 _decayType = NARROWVMDEFAULT;
0474 mass = starlightConstants::Psi2SMass;
0475 width = starlightConstants::Psi2SWidth;
0476 defaultMinW = mass - 5 * width;
0477 defaultMaxW = mass + 5 * width;
0478 _inputBranchingRatio = starlightConstants::Psi2SBrmumu;
0479 break;
0480 case 553:
0481 _particleType = UPSILON;
0482 _decayType = NARROWVMDEFAULT;
0483 mass = starlightConstants::Upsilon1SMass;
0484 width = starlightConstants::Upsilon1SWidth;
0485 defaultMinW = mass - 5 * width;
0486 defaultMaxW = mass + 5 * width;
0487 _inputBranchingRatio = (starlightConstants::Upsilon1SBree + starlightConstants::Upsilon1SBrmumu)/2.;
0488 break;
0489 case 553011:
0490 _particleType = UPSILON_ee;
0491 _decayType = NARROWVMDEFAULT;
0492 mass = starlightConstants::Upsilon1SMass;
0493 width = starlightConstants::Upsilon1SWidth;
0494 defaultMinW = mass - 5 * width;
0495 defaultMaxW = mass + 5 * width;
0496 _inputBranchingRatio = starlightConstants::Upsilon1SBree;
0497 break;
0498 case 553013:
0499 _particleType = UPSILON_mumu;
0500 _decayType = NARROWVMDEFAULT;
0501 mass = starlightConstants::Upsilon1SMass;
0502 width = starlightConstants::Upsilon1SWidth;
0503 defaultMinW = mass - 5 * width;
0504 defaultMaxW = mass + 5 * width;
0505 _inputBranchingRatio = starlightConstants::Upsilon1SBrmumu;
0506 break;
0507 case 554:
0508 _particleType = UPSILON2S;
0509 _decayType = NARROWVMDEFAULT;
0510 mass = starlightConstants::Upsilon2SMass;
0511 width = starlightConstants::Upsilon2SWidth;
0512 defaultMinW = mass - 5 * width;
0513 defaultMaxW = mass + 5 * width;
0514 _inputBranchingRatio = (starlightConstants::Upsilon2SBree + starlightConstants::Upsilon2SBrmumu)/2.;
0515 break;
0516 case 554011:
0517 _particleType = UPSILON2S_ee;
0518 _decayType = NARROWVMDEFAULT;
0519 mass = starlightConstants::Upsilon2SMass;
0520 width = starlightConstants::Upsilon2SWidth;
0521 defaultMinW = mass - 5 * width;
0522 defaultMaxW = mass + 5 * width;
0523 _inputBranchingRatio = starlightConstants::Upsilon2SBree;
0524 break;
0525 case 554013:
0526 _particleType = UPSILON2S_mumu;
0527 _decayType = NARROWVMDEFAULT;
0528 mass = starlightConstants::Upsilon2SMass;
0529 width = starlightConstants::Upsilon2SWidth;
0530 defaultMinW = mass - 5 * width;
0531 defaultMaxW = mass + 5 * width;
0532 _inputBranchingRatio = starlightConstants::Upsilon2SBrmumu;
0533 break;
0534 case 555:
0535 _particleType = UPSILON3S;
0536 _decayType = NARROWVMDEFAULT;
0537 mass = starlightConstants::Upsilon3SMass;
0538 width = starlightConstants::Upsilon3SWidth;
0539 defaultMinW = mass - 5 * width;
0540 defaultMaxW = mass + 5 * width;
0541 _inputBranchingRatio = (starlightConstants::Upsilon3SBree + starlightConstants::Upsilon3SBrmumu)/2.;
0542 break;
0543 case 555011:
0544 _particleType = UPSILON3S_ee;
0545 _decayType = NARROWVMDEFAULT;
0546 mass = starlightConstants::Upsilon3SMass;
0547 width = starlightConstants::Upsilon3SWidth;
0548 defaultMinW = mass - 5 * width;
0549 defaultMaxW = mass + 5 * width;
0550 _inputBranchingRatio = starlightConstants::Upsilon3SBree;
0551 break;
0552 case 555013:
0553 _particleType = UPSILON3S_mumu;
0554 _decayType = NARROWVMDEFAULT;
0555 mass = starlightConstants::Upsilon3SMass;
0556 width = starlightConstants::Upsilon3SWidth;
0557 defaultMinW = mass - 5 * width;
0558 defaultMaxW = mass + 5 * width;
0559 _inputBranchingRatio = starlightConstants::Upsilon3SBrmumu;
0560 break;
0561 default:
0562 printWarn << "unknown particle ID " << _prodParticleId << endl;
0563 return false;
0564 }
0565
0566 if (_minW.value() == -1)
0567 _minW = defaultMinW;
0568 if (_maxW.value() == -1)
0569 _maxW = defaultMaxW;
0570 if ( _maxW.value() <= _minW.value() ) {
0571 printWarn << "maxW must be greater than minW" << endl;
0572 return false;
0573 }
0574
0575 if (_minW_GP.value() == -1)
0576 _minW_GP = 0;
0577 if (_maxW_GP.value() == -1)
0578 _maxW_GP = 1e7;
0579 if ( _maxW_GP.value() <= _minW_GP.value() ) {
0580 printWarn << "maxW_GA must be greater than minW_GP" << endl;
0581 printWarn <<"The value of minW_GP is " << _minW_GP << endl;
0582 printWarn <<"The value of maxW_GP is " << _maxW_GP << endl;
0583 return false;
0584 }
0585 if(_minW_GP.value() > _totalEnergy_COM) {
0586
0587
0588 printWarn << "ERROR: The current input minimum CoM energy (_minW_GP) is: "<< _minW_GP
0589 << " which is larger than the total center-of-mass energy of the electron-ion system: "
0590 <<_totalEnergy_COM << endl;
0591 cout<<"Exiting now..." << endl;
0592 return false;
0593 }
0594
0595
0596 if( _minGammaQ2.value() != 0 || _maxGammaQ2.value() != 0){
0597 if( _minGammaQ2.value() <0 || _maxGammaQ2.value() <=_minGammaQ2.value() )
0598 printWarn << "Input values for min and max Q2 are inconsistent: "<<_minGammaQ2.value()<<","<<_maxGammaQ2.value()
0599 <<". Continuing with default "<<endl;
0600 else
0601 _fixedQ2Range = true;
0602 }
0603
0604 _cmsMinPhotonEnergy = 0.5*(((mass+protonMass)*(mass+protonMass)-
0605 protonMass*protonMass)/(_protonEnergy.value()+sqrt(_protonEnergy.value()*_protonEnergy.value()-protonMass*protonMass)));
0606 _cmsMaxPhotonEnergy = 0.5*mass*exp(9);
0607
0608 _targetMaxPhotonEnergy = (_targetLorentzGamma - 10. ) *starlightConstants::mel;
0609 _targetMinPhotonEnergy = mass;
0610 printInfo << "using the following " << *this;
0611
0612 return true;
0613 }
0614
0615
0616
0617 ostream&
0618 inputParameters::print(ostream& out) const
0619 {
0620 out << "starlight parameters:" << endl
0621 << " base file name ...................... '" << _baseFileName.value() << "'" << endl
0622 << " target beam atomic number .............. " << _targetBeamZ.value() << endl
0623 << " target beam atomic mass number ......... " << _targetBeamA.value() << endl
0624 << " Lorentz gamma of beams in CM frame ..... " << _beamLorentzGamma << endl
0625 << " mass W of produced hadronic system ..... " << _minW.value() << " < W < " << _maxW.value() << " GeV/c^2" << endl
0626 << " # of W bins ............................ " << _nmbWBins.value() << endl
0627 << " maximum absolute value for rapidity .... " << _maxRapidity.value() << endl
0628 << " # of rapidity bins ..................... " << _nmbRapidityBins.value() << endl
0629 << " # of Egamma bins ....................... " << _nmbEnergyBins.value() << endl
0630 << " cut in pT............................... " << yesNo(_ptCutEnabled.value()) << endl;
0631 if (_ptCutEnabled.value()) {
0632 out << " minumum pT.......................... " << _ptCutMin.value() << " GeV/c" << endl
0633 << " maximum pT.......................... " << _ptCutMax.value() << " GeV/c" << endl;}
0634 out << " cut in eta.............................. " << yesNo(_etaCutEnabled.value()) << endl;
0635 if (_etaCutEnabled.value()) {
0636 out << " minumum eta......................... " << _etaCutMin.value() << endl
0637 << " maximum eta......................... " << _etaCutMax.value() << endl;}
0638 out << " production mode ........................ " << _productionMode.value() << endl
0639 << " number of events to generate ........... " << _nmbEventsTot.value() << endl
0640 << " PDG ID of produced particle ............ " << _prodParticleId.value() << endl
0641 << " seed for random generator .............. " << _randomSeed.value() << endl
0642 << " breakup mode for beam particles ........ " << _beamBreakupMode.value() << endl
0643 << " interference enabled ................... " << yesNo(_interferenceEnabled.value()) << endl;
0644 if (_interferenceEnabled.value()) {
0645 out << " interference strength .................. " << _interferenceStrength.value() << endl
0646 << " maximum p_T for interference calc. ..... " << _maxPtInterference.value() << " GeV/c" << endl
0647 << " # of p_T bins for interference calc. ... " << _nmbPtBinsInterference.value() << endl;}
0648 if (_productionMode.value()!=1) {
0649 if (_productionMode.value()==4) {
0650 out << " coherent scattering off nucleus ........ no" << endl;}
0651 else {
0652 out << " coherent scattering off nucleus ........ yes" << endl;
0653 }
0654 }
0655 if (_fixedQ2Range == true ){
0656 out << " fixed photon Q2 range .................. " << _minGammaQ2.value() << " < Q2 < "
0657 <<_maxGammaQ2.value() << " GeV/c^2 "<<endl;
0658 }
0659 out<< " Q2_BINS" <<nmbGammaQ2Bins () <<endl;
0660 out <<" Quantum Glauber parameter............... "<<_quantumGlauber.value()<<endl;
0661 out <<" Impulse VM parameter.................... "<<_impulseVM.value()<<endl;
0662 return out;
0663 }
0664
0665
0666
0667 ostream&
0668 inputParameters::write(ostream& out) const
0669 {
0670
0671 out << "baseFileName" << baseFileName () <<endl
0672 << "TARGET_BEAM_Z" << targetBeamZ () <<endl
0673 << "TARGET_BEAM_A" << targetBeamA () <<endl
0674 << "BEAM_GAMMA" << beamLorentzGamma () <<endl
0675 << "W_MAX" << maxW () <<endl
0676 << "W_MIN" << minW () <<endl
0677 << "W_GP_MAX" << maxW_GP () <<endl
0678 << "W_GP_MIN" << minW_GP () <<endl
0679 << "W_N_BINS" << nmbWBins () <<endl
0680 << "RAP_MAX" << maxRapidity () <<endl
0681 << "RAP_N_BINS" << nmbRapidityBins () <<endl
0682 << "CUT_PT" << ptCutEnabled () <<endl
0683 << "PT_MIN" << ptCutMin () <<endl
0684 << "PT_MAX" << ptCutMax () <<endl
0685 << "CUT_ETA" << etaCutEnabled () <<endl
0686 << "ETA_MIN" << etaCutMin () <<endl
0687 << "ETA_MAX" << etaCutMax () <<endl
0688 << "PROD_MODE" << productionMode () <<endl
0689 << "N_EVENTS" << nmbEvents () <<endl
0690 << "PROD_PID" << prodParticleId () <<endl
0691 << "RND_SEED" << randomSeed () <<endl
0692 << "BREAKUP_MODE" << beamBreakupMode () <<endl
0693 << "INTERFERENCE" << interferenceEnabled () <<endl
0694 << "IF_STRENGTH" << interferenceStrength () <<endl
0695 << "INT_PT_MAX" << maxPtInterference () <<endl
0696 << "INT_PT_N_BINS" << nmbPtBinsInterference() <<endl;
0697 out<< "USING FIXED RANGE"<<_fixedQ2Range<<endl;
0698 if( _fixedQ2Range == true ){
0699 out << "Q2_MIN" << minGammaQ2 () <<endl
0700 << "Q2_MAX" << maxGammaQ2 () <<endl;
0701 }
0702 out<< " Q2_BINS" <<nmbGammaQ2Bins () <<endl;
0703 return out;
0704 }
0705
0706 std::string
0707 inputParameters::parameterValueKey() const
0708 {
0709 return parameterbase::_parameters.validationKey();
0710 }