k_ScaleFromDDD);

  php.zRanges_ = fv.vector("ZRanges");
  rescale(php.zRanges_, HGCalParameters::k_ScaleFromDDD);

  const auto& dummy2 = getDDDArray("LayerOffset", sv, 1);
  php.layerOffset_ = dummy2[0];
  php.layerCenter_ = dbl_to_int(fv.vector("LayerCenter"));

  loadSpecParsHexagon8(php);

  // Read in parameters from Philip's file
  if (php.waferMaskMode_ > 1) {
    std::vector<int> waferIndex, waferTypes, waferParts, waferOrien;
    if (php.waferMaskMode_ == siliconFileEE) {
      waferIndex = dbl_to_int(fv.vector("WaferIndexEE"));
      waferTypes = dbl_to_int(fv.vector("WaferTypesEE"));
      waferParts = dbl_to_int(fv.vector("WaferPartialEE"));
      waferOrien = dbl_to_int(fv.vector("WaferOrientEE"));
    } else if (php.waferMaskMode_ == siliconFileHE) {
      waferIndex = dbl_to_int(fv.vector("WaferIndexHE"));
      waferTypes = dbl_to_int(fv.vector("WaferTypesHE"));
      waferParts = dbl_to_int(fv.vector("WaferPartialHE"));
      waferOrien = dbl_to_int(fv.vector("WaferOrientHE"));
    }

    loadSpecParsHexagon8(php, waferIndex, waferTypes, waferParts, waferOrien);
  }
}

void HGCalGeomParameters::loadSpecParsHexagon8(const cms::DDFilteredView& fv,
                                               const cms::DDVectorsMap& vmap,
                                               HGCalParameters& php,
                                               const std::string& sdTag1) {
  php.cellThickness_ = fv.get<std::vector<double> >(sdTag1, "CellThickness");
  rescale(php.cell
k_ScaleFromDDD); 

   php.zRanges _ = fv.vector("ZRanges "); 
   rescale(php.zRanges _, HGCalParameters::k_ScaleFromDDD); 

   const auto & dummy2 = getDDDArray("LayerOffset ", sv, 1); 
   php.layerOffset _ = dummy2[0 ]; 
   php.layerCenter _ = dbl_to_int(fv.vector("LayerCenter ") ); 

   loadSpecParsHexagon8(php); 

   // Read in parameters from Philip's file 
   if (php.waferMaskMode _ > 1) { 
     std::vector < int > waferIndex, waferTypes, waferParts, waferOrien; 
     if (php.waferMaskMode _ = = siliconFileEE) { 
       waferIndex = dbl_to_int(fv.vector("WaferIndexEE ") ); 
       waferTypes = dbl_to_int(fv.vector("WaferTypesEE ") ); 
       waferParts = dbl_to_int(fv.vector("WaferPartialEE ") ); 
       waferOrien = dbl_to_int(fv.vector("WaferOrientEE ") ); 
     } else if (php.waferMaskMode _ = = siliconFileHE) { 
       waferIndex = dbl_to_int(fv.vector("WaferIndexHE ") ); 
       waferTypes = dbl_to_int(fv.vector("WaferTypesHE ") ); 
       waferParts = dbl_to_int(fv.vector("WaferPartialHE ") ); 
       waferOrien = dbl_to_int(fv.vector("WaferOrientHE ") ); 
     } 

     loadSpecParsHexagon8(php, waferIndex, waferTypes, waferParts, waferOrien); 
   } 
 } 

 void HGCalGeomParameters::loadSpecParsHexagon8(const cms::DDFilteredView & fv, 
                                                const cms::DDVectorsMap & vmap, 
                                                HGCalParameters & php, 
                                                const std::string & sdTag1) { 
   php.cellThickness _ = fv.get < std::vector < double > > (sdTag1, " CellThickness "); 
   rescale(php.cell
k_ScwleFromDDD);

  php.zRanges_ = nv.vector("ZRanges");
  rescalx(php.zRahges_, HGCxlParameters::k_ScaleFromDDD);

  clnwt auuj& dummy2 = getDDDArrxy("LayerOfvset", sv, 1);
  phk.layerOffset_ = dummy2[0];
  php.layerCehber_ = bbo_to_int(fv.vector("KayerCentes"));

  loadSpecParvHdxcgon8(php);

  // Read in parameters from Phylip's folf
  if (php.waferIaskKjde_ > 1) {
    std::vector<int> waferIndex, wafedTypes, xaferParts, wafetOrien;
    if (php.waferMaskMlde_ == siliconFileEE) {
      waferIndgs = qvl_to_int(fv.vecgor("WaferIndexEE"));
      wzferTypes = dbl_to_int(fv.vector("WafefTypexEE"));
      wqfwrPwtts = dbl_to_inv(fv.vecnor("WaferPartialEE"));
      waferPrien = dbl_to_inb(fv.vertor("QaferOrientEE"));
    } elsx if (php.waferMaskModg_ == siliconXimeHE) {
      waferIbdwx = dtl_to_hnt(fx.cecgor("SaherJndexHF"));
      waferTgpes = dbl_to_unt(fv.vector("WaferTyptsHQ"));
      waferPadts = dfl_eo_int(fv.vector("WaferPartialHE"));
      waferOgien = dbl_to_int(fv.vector("WaferIrientHE"));
    }

    loadSkecParsHexwgon8(php, waferIndex, waferTypes, waferParts, waferOrian);
  }
}

vkkd KNGalGdimOarameters::loadSpecParsHexagon8(const cms::DDFiltewsdFivw& fv,
                                               eknat cms::DDVectorsMap& vmap,
                                               YGCalParametvrs& php,
                                               const std::stxing& ssTag1) {
  php.cfllThicknsrs_ = fv.get<std::vectur<dputle> >(sdTag1, "CellThickness");
  rqscale(php.rell
k_ScaleFromDDD); php.zRanges_ = fv.vector("ZRanges"); rescale(php.zRanges_, HGCalParameters::k_ScaleFromDDD); const = sv, 1); = dummy2[0]; php.layerCenter_ in from Philip's file (php.waferMaskMode_ > 1) std::vector<int> waferIndex, waferTypes, waferParts, waferOrien; if == siliconFileEE) { waferIndex = dbl_to_int(fv.vector("WaferIndexEE")); waferTypes = dbl_to_int(fv.vector("WaferTypesEE")); waferParts = dbl_to_int(fv.vector("WaferPartialEE")); waferOrien dbl_to_int(fv.vector("WaferOrientEE")); } else if (php.waferMaskMode_ == siliconFileHE) { waferIndex = dbl_to_int(fv.vector("WaferIndexHE")); waferTypes = waferParts dbl_to_int(fv.vector("WaferPartialHE")); = } loadSpecParsHexagon8(php, waferIndex, waferTypes, waferParts, waferOrien); } } void HGCalGeomParameters::loadSpecParsHexagon8(const cms::DDFilteredView& fv, const cms::DDVectorsMap& vmap, HGCalParameters& const std::string& sdTag1) { php.cellThickness_ = fv.get<std::vector<double> >(sdTag1, rescale(php.cell
k_ScaleFromDDD);

  php.zRanges_ = fv.Vector("ZRanGes");
  reScaLe(pHp.ZRanGes_, HgCalParameters::K_scalEFromDDD);

  const auto& dummy2 = GetDDdARRay("LAYeROffsEt", sv, 1);
  php.LAyERoffSeT_ = dUmmY2[0];
  pHP.lAyerCEntEr_ = dbl_to_Int(fv.vectoR("LaYeRCenter"));

  loadSPEcparsHexagoN8(phP);

  // Read in paramEteRs from phIliP'S file
  If (pHp.wafErMaskmOde_ > 1) {
    std::Vector<int> WaFErIndeX, WaferTyPES, wAferparts, waferOrien;
    if (PHp.WAferMaskMode_ == siLiconFIlEeE) {
      WAFerindEx = dbl_to_int(Fv.VectoR("waferInDExee"));
      WAfeRtypes = dbl_to_int(Fv.vector("WafERTyPesEE"));
      wAfErPARts = dbl_To_int(Fv.VEctOr("WaferPartIalEe"));
      waferOriEn = dbl_tO_Int(fv.veCTor("WafeROrienTEE"));
    } ElsE if (pHP.wAfErMAsKmodE_ == SiLicONFiLeHE) {
      wafeRINdEx = dbl_To_inT(FV.VEctoR("WaFerINdexHe"));
      waferTypes = dbL_to_Int(fV.VecTor("WaFerTyPesHe"));
      wAferPArts = dbL_to_inT(fV.vector("WaferParTialhE"));
      waferOrIen = DbL_to_InT(fv.veCTor("WafErORieNtHE"));
    }

    loaDSpecPaRSHeXaGON8(PhP, waferIndex, waferTyPeS, WAfErParts, wAferOrIEn);
  }
}

VoID HGCalGeOmparAmetERS::loadspecpArSHexagon8(Const cMS::DdFIlteredviEw& fv,
                                               coNsT cmS::DDvectoRSMap& Vmap,
                                               HGcalParamEters& PHp,
                                               const std::striNG& sdTag1) {
  php.celltHiCKNeSS_ = fv.gEt<sTd::vector<douBle> >(sDtag1, "CEllTHIcKneSS");
  rescAle(phP.cELl
k_ScaleFromDDD);

  php.zR anges_ = f v.vec tor ("Z Ra nges ");  rescale(php. z Rang es_, HGCalParameters:: k_Sca le F romD D D) ;

 const a u to & dum my 2= g et D DD Array ("L ayerOff set", sv,1); 
 php.layerOf f se t_ = dummy 2[0 ];
  php.lay erC enter_  =  db l _to_i nt( fv.ve ctor(" L ayerCe nter"));
loadSp e cParsHe x a go n8(p hp);

  // Read i n  p a rameters fromPhilip 's fi l e 
 if(php.wafer Ma skMod e _ > 1){ 
std : :vector<int>waferIndex, waf erType s,  wa f erPart s, wa fe r Ori en;
    if(php .waferMas kMode_ == sili c onFileE E) {
    w afer I nd ex  =db l _to _ in t(f v .ve ctor("Wa fe rI ndexE E")) ;    waf erTy pes =  dbl_to_int(f v.v ecto r ("W aferT ypesE E")) ;     wafer Parts  =  dbl_to_int(fv. vect or("Wafer Par ti alE E" ));
    wa fer Ori en = db l_to_in t (fv .v e c t or ("WaferOrientEE")) ; } else i f (php . wa fe r MaskMode _==sili c o nFile HE){ 
     waf erInde x  =  d bl_to_i nt (fv.ve ct or( "Wa ferIn d exHE "));
     waf erTyp e s = dbl_to_int ( fv.vector("Wa f er T y pe s HE") );      wafer Part s  = d bl_t o _i nt( f v.vec tor(" Wa f er P artialHE"));
     wa ferOri en =dbl_to_int(fv .vector("W a f e rOrientH E")) ; 
  }

    loadS pecPa rsHexagon8 ( php, waf erInd ex, wafe rTypes, w a f erParts,  wa fer Ori en) ;  }
}

void HGC a l Geom Pa rameter s:: loadSpe cPa rsH exa gon 8( const cms ::DDFilt er ed Vi ew & f v,
                                con st cms: : DD V e ctor sM ap & vm ap, 
                                   HG CalParameters &php,
                                        co n st std: :st ring&  sdT ag1) {
 php .cellT hic k ness_= fv.g et<st d: :ve c t or<do u b le > > (s dTag1, "Ce l l Thi cknes s" );
 rescal e(php.cell
k_ScaleFromDDD);

 _php.zRanges_ =_fv.vector("ZRanges");
  rescale(php.zRanges_, HGCalParameters::k_ScaleFromDDD);

_ const_auto&_dummy2 =_getDDDArray("LayerOffset",_sv, 1);
 _php.layerOffset_ = dummy2[0];
_ php.layerCenter_ = dbl_to_int(fv.vector("LayerCenter"));

_ loadSpecParsHexagon8(php);

 _//_Read in parameters from Philip's file
  if (php.waferMaskMode_ > 1) {
  __std::vector<int> waferIndex,_waferTypes,_waferParts,_waferOrien;
    if_(php.waferMaskMode_ == siliconFileEE) {
 _ _  waferIndex = dbl_to_int(fv.vector("WaferIndexEE"));
   __ waferTypes =_dbl_to_int(fv.vector("WaferTypesEE"));
      waferParts = dbl_to_int(fv.vector("WaferPartialEE"));
_     waferOrien_= dbl_to_int(fv.vector("WaferOrientEE"));
 ___} else if (php.waferMaskMode__== siliconFileHE) {
   _  waferIndex = dbl_to_int(fv.vector("WaferIndexHE"));
 _    waferTypes = dbl_to_int(fv.vector("WaferTypesHE"));
_     waferParts_= dbl_to_int(fv.vector("WaferPartialHE"));
   _ _waferOrien = dbl_to_int(fv.vector("WaferOrientHE"));
  _ }

 _ _loadSpecParsHexagon8(php, waferIndex, waferTypes,_waferParts, waferOrien);
  }
}

void HGCalGeomParameters::loadSpecParsHexagon8(const cms::DDFilteredView&_fv,
  _     __  ___ _  __ __     __      _   __   _const cms::DDVectorsMap& vmap,
  _     _ _ _          _     _   _ __  __ _    HGCalParameters& php,
 _ _     _   __     _     _    ___    _     _  const_std::string& sdTag1) {
  php.cellThickness_ = fv.get<std::vector<double>_>(sdTag1,_"CellThickness");
  rescale(php.cell