diff --git a/DDRec/src/gear/createGearForILD.cpp b/DDRec/src/gear/createGearForILD.cpp index 0b06802d98354d5e4500b53fbaa46758250b6fd7..c82bbf6d17a0c6875d7d15dd03b567d483f7025f 100644 --- a/DDRec/src/gear/createGearForILD.cpp +++ b/DDRec/src/gear/createGearForILD.cpp @@ -158,8 +158,12 @@ namespace DD4hep{ bool isDoubleSided = l.typeFlags[ DDRec::ZDiskPetalsStruct::SensorType::DoubleSided ] ; - int sensorType = ( l.typeFlags[ DDRec::ZDiskPetalsStruct::SensorType::Pixel ] ? - gear::FTDParameters::PIXEL : gear::FTDParameters::STRIP ) ; + + // avoid 'undefined reference' at link time ( if built w/o optimization ): + static const int PIXEL = gear::FTDParameters::PIXEL ; + static const int STRIP = gear::FTDParameters::STRIP ; + int sensorType = ( l.typeFlags[ DDRec::ZDiskPetalsStruct::SensorType::Pixel ] ? PIXEL : STRIP ) ; +// gear::FTDParameters::PIXEL : gear::FTDParameters::STRIP ) ; double zoffset = fabs( l.zOffsetSupport ) ; double signoffset = l.zOffsetSupport > 0 ? 1. : -1 ;