Esempio n. 1
0
void Store2D::SetParameters( Parameters& MyParameters )
{
  std::vector<double> ReturnedParamsDouble1, ReturnedParamsDouble2;
  std::list<std::string> ReturnedParamsString;  

  // First, get the details from the parameters object
  double min1, max1, min2, max2;
  long size1, size2;
  ReturnedParamsDouble1 = MyParameters.GetParametersDouble( "@storedim1" );
  if ( ReturnedParamsDouble1.size() < 3 )
    std::cerr << "Error with @storedim1" << std::endl;
  ReturnedParamsDouble2 = MyParameters.GetParametersDouble( "@storedim2" );
  if ( ReturnedParamsDouble2.size() < 3 )
    std::cerr << "Error with @storedim2" << std::endl;
  size1 = long(ReturnedParamsDouble1.at(2)+0.5);
  size2 = long(ReturnedParamsDouble2[2]+0.5);
  min1 = ReturnedParamsDouble1[0];
  min2 = ReturnedParamsDouble2[0];
  max1 = ReturnedParamsDouble1[1];
  max2 = ReturnedParamsDouble2[1];

  SetSize( size1, size2, 1 );
  SetLimitsDim1( ReturnedParamsDouble1[0], ReturnedParamsDouble1[1] );
  SetLimitsDim2( ReturnedParamsDouble2[0], ReturnedParamsDouble2[1] );
}
Esempio n. 2
0
ZposGenerator::ZposGenerator( Parameters& params_, long opacity_ )
  : mSize( opacity_ ), mPositions( opacity_+1 )
{
  std::vector<double> ReturnedParamsDouble;
  std::vector<long> ReturnedParamsLong;
  std::list<std::string> ReturnedParamsString;

  // First, we get the parameters of the medium
  // This is: 1st = mu, 2nd = temperature, 3rd = gluon mass, 4th = gluon mean free path
  // Here, we only need the gluon mass
  // the zDist will need the others
  ReturnedParamsDouble = params_.GetParametersDouble( "@mediumParams" );
  _mu = ReturnedParamsDouble[0];
  _temp = ReturnedParamsDouble[1];
  double _gluonlambda = ReturnedParamsDouble[3];

  // The jet path length in the medium
  ReturnedParamsDouble = params_.GetParametersDouble( "@pathLength" );
  double _length = ReturnedParamsDouble[0];

  double _maxlen;
  _maxlen = _length * 5.;
  _loverlambda = _length / _gluonlambda;

  MyArray zmin(1), zmax(1), param(1);

  // Reference function => the function under the integral
  // Sample function => the function from which to sample our Monte Carlo points

  // For uniform reference function
//  UniformFunction refFn1( 1 );
//  param[0] = 0.; zmin[0] = 0.; zmax[0] = _length;
//  refFn1.SetLimits( zmin, zmax); refFn1.SetParams( param );

  // For exponential decay reference function
  ExpDecayFunction refFn1( 1 );
  param[0] = _length / static_cast<double>(mSize+1); zmin[0] = 0.; zmax[0] = _maxlen;
  refFn1.SetLimits( zmin, zmax ); refFn1.SetParams( param );

  // For uniform sample function
//  UniformFunction sampFn1( 1 );
//  param[0] = 0.; 
//  sampFn1.SetParams( param );

  // For exponential decay sample function
  ExpDecayFunction sampFn1( 1 );
  param[0] = _length / static_cast<double>(mSize+1);
  sampFn1.SetParams( param );


  refFn = refFn1;
  sampleFn = sampFn1;

  mPositions[0] = 0.;
}
Esempio n. 3
0
RadCalcer::RadCalcer( Parameters& params_, long opacity_, bool correlated_ )
  : zDist( params_, opacity_ ), qperps( opacity_, correlated_ ), n( opacity_ )
{
  std::vector<double> ReturnedParamsDouble;
  std::vector<long> ReturnedParamsLong;
  std::list<std::string> ReturnedParamsString;
  std::list<std::string>::iterator it;

  // First, we get the parameters of the medium
  // This is: 1st = mu, 2nd = temperature, 3rd = gluon mass, 4th = gluon mean free path
  // Here, we only need the gluon mass
  // the zDist will need the others
  ReturnedParamsDouble = params_.GetParametersDouble( "@mediumParams" );
  _mg = ReturnedParamsDouble[2];

  // Next, get the jet flavour
  ReturnedParamsString = params_.GetParametersString( "@jetFlavour" );
  std::string jetFlavour = ReturnedParamsString.front();
  if ( jetFlavour == "Gluon" )
  {
    _cr = 3.; _mass = _mg;
  }
  else if ( jetFlavour == "Light" )
  {
    _cr = 4./3.; _mass = _mg / sqrt(2);
  }
  else if ( jetFlavour == "Charm" )
  {
    _cr = 4./3.; _mass = 1.2;
  }
  else if ( jetFlavour == "Bottom" )
  {
    _cr = 4./3.; _mass = 4.75;
  }
  else
  {
    std::cerr << "@jetFlavour not understood" << std::endl;
    exit(0);
  }

  // Now, check whether also specifying a jet mass
  ReturnedParamsDouble = params_.GetParametersDouble( "@jetMassDirect" );
  if ( ReturnedParamsDouble.size() > 0 )
    _mass = ReturnedParamsDouble[0];
  
  // Now, the momentum, to give the jet energy
  ReturnedParamsDouble = params_.GetParametersDouble( "@jetMomentum" );
  double jetMomentum = ReturnedParamsDouble[0];
  // Now calculate and set energy, and mass
  _en = sqrt( _mass*_mass + jetMomentum*jetMomentum );

  // The jet path length in the medium
  ReturnedParamsDouble = params_.GetParametersDouble( "@pathLength" );
  _length = ReturnedParamsDouble[0];

  // The setting on the k max
  ReturnedParamsLong = params_.GetParametersLong( "@limitSet" );
  _switchkmax = ReturnedParamsLong[0];

  // The strong coupling, alpha_s
  ReturnedParamsString = params_.GetParametersString( "@alpha" );
  it = ReturnedParamsString.begin();
  if ( *it == "fixed" )
  {
    ++it;
    _alphas = boost::lexical_cast<double>( *it );
  }
  else
  {
    std::cerr << "Radcalcer, @alpha not understood";
    std::cerr << std::endl;
    exit(0);
  }

  ReturnedParamsString = params_.GetParametersString( "@incClassicalDiffusion" );
  if ( ReturnedParamsString.front() == "yes" )
    _diffexclude = false;
  else if ( ReturnedParamsString.front() == "no" )
    _diffexclude = true;
  else
  {
    std::cerr << "Radcalcer, @incClassicalDiffusion not understood as yes or no";
    std::cerr << std::endl;
    exit(0);
  }


  _correlated = correlated_;
}