本文整理汇总了C++中Segmentation::parameter方法的典型用法代码示例。如果您正苦于以下问题:C++ Segmentation::parameter方法的具体用法?C++ Segmentation::parameter怎么用?C++ Segmentation::parameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Segmentation
的用法示例。
在下文中一共展示了Segmentation::parameter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createGearForILD
//.........这里部分代码省略.........
(l.inner_thickness+l.sensitive_thickness/2.)/dd4hep::mm ,
l.cellSize0/dd4hep::mm, l.cellSize1/dd4hep::mm,
(l.inner_thickness-l.sensitive_thickness/2.)/dd4hep::mm ) ;
}else{
gearCalo->layerLayout().addLayer( (l.inner_thickness+l.sensitive_thickness/2.+calo->layers[i-1].outer_thickness-calo->layers[i-1].sensitive_thickness/2. ) / dd4hep::mm ,
l.cellSize0/dd4hep::mm, l.cellSize1/dd4hep::mm, (l.inner_thickness-l.sensitive_thickness/2.+calo->layers[i-1].outer_thickness-calo->layers[i-1].sensitive_thickness/2.)/dd4hep::mm) ;
}
// if( i == 0 ) {
// gearCalo->layerLayout().positionLayer( l.distance/dd4hep::mm, l.thickness/dd4hep::mm ,
// l.cellSize0/dd4hep::mm, l.cellSize1/dd4hep::mm, l.absorberThickness/dd4hep::mm ) ;
// }else{
// gearCalo->layerLayout().addLayer( l.thickness/dd4hep::mm ,
// l.cellSize0/dd4hep::mm, l.cellSize1/dd4hep::mm, l.absorberThickness/dd4hep::mm ) ;
// }
}
if( it->first == "HcalBarrel" ){
// additional parameters needed by MarlinPandora
gearCalo->setIntVal("Hcal_outer_polygon_order" , calo->outer_symmetry ) ;
gearCalo->setDoubleVal("Hcal_outer_polygon_phi0" , calo->phi0 ) ;
}
if( it->first == "BeamCal" ){
try{
// additional parameters needed by BCalReco
SensitiveDetector sD = description.sensitiveDetector( it->first ) ;
Readout readOut = sD.readout() ;
Segmentation seg = readOut.segmentation() ;
// DDSegmentation::DoubleVecParameter rPar = dynamic_cast<DDSegmentation::DoubleVecParameter>( seg.parameter("grid_r_values"));
DDSegmentation::DoubleVecParameter pPar = dynamic_cast<DDSegmentation::DoubleVecParameter>( seg.parameter("grid_phi_values"));
DDSegmentation::DoubleParameter oPPar= dynamic_cast<DDSegmentation::DoubleParameter>( seg.parameter("offset_phi"));
//offset_phi="-180*degree+(360*degree-BCal_SpanningPhi)*0.5"
double offsetPhi = oPPar->typedValue() ;
double spanningPhi = 360.*dd4hep::deg - 2.*( offsetPhi + 180.*dd4hep::deg ) ;
gearCalo->setDoubleVals( "phi_segmentation" , pPar->typedValue() );
gearCalo->setDoubleVal( "cylinder_starting_phi", offsetPhi );
gearCalo->setDoubleVal( "cylinder_spanning_phi", spanningPhi );
gearCalo->setDoubleVal( "beam_crossing_angle" , crossing_angle );
//fixme: don't know how to get these parameters at this stage ...
// probably need a named parameter object at every DetElement ....
gearCalo->setDoubleVal( "dead_area_outer_r" , 0 );
gearCalo->setDoubleVal( "pairsMonitorZ" , 0. );
gearCalo->setDoubleVal( "FIXME_dead_area_outer_r" , -1. );
gearCalo->setDoubleVal( "FIXME_pairsMonitorZ" , -1. );
} catch( std::runtime_error& e ){
std::cerr << " >>>> BeamCal: " << e.what() << std::endl ;
}
}
if( it->first == "Lcal" || it->first == "LHcal" ){
gearCalo->setDoubleVal( "beam_crossing_angle" , crossing_angle );
}
caloDE.addExtension< GearHandle >( new GearHandle( gearCalo, it->second ) ) ;
} catch( std::runtime_error& e ){
std::cerr << " >>>> " << e.what() << std::endl ;