diff --git a/DDRec/src/gear/createGearForCLIC.cpp b/DDRec/src/gear/createGearForCLIC.cpp index 3f79a634c296d9ce0f0e04a16cd44490ad9c17fe..8b25fed75da7da86d545e3d0c93c588edf217c77 100644 --- a/DDRec/src/gear/createGearForCLIC.cpp +++ b/DDRec/src/gear/createGearForCLIC.cpp @@ -240,7 +240,26 @@ namespace DD4hep{ } //============================================================================================ + + try { + + DetElement coilDE = lcdd.detector("Solenoid") ; + + gear::GearParametersImpl* gearCOIL = new gear::GearParametersImpl(); + + Tube coilTube = Tube( coilDE.volume().solid() ) ; + + gearCOIL->setDoubleVal("Coil_cryostat_outer_radius" , coilTube->GetRmin()/ dd4hep::mm ) ; + gearCOIL->setDoubleVal("Coil_cryostat_inner_radius" , coilTube->GetRmax()/ dd4hep::mm ) ; + gearCOIL->setDoubleVal("Coil_cryostat_half_z" , coilTube->GetDZ()/ dd4hep::mm ) ; + + coilDE.addExtension< GearHandle >( new GearHandle( gearCOIL, "CoilParameters" ) ) ; + + } catch( std::runtime_error& e ){ + std::cerr << " >>>> " << e.what() << std::endl ; + } + //============================================================================================ try { DetElement tubeDE = lcdd.detector("Tube") ; @@ -289,13 +308,13 @@ namespace DD4hep{ caloMap["HCalBarrel"] = "HcalBarrelParameters" ; caloMap["ECalBarrel"] = "EcalBarrelParameters" ; caloMap["ECalEndcap"] = "EcalEndcapParameters" ; -// caloMap["ECalPlug"] = "EcalPlugParameters" ; + caloMap["ECalPlug"] = "EcalPlugParameters" ; caloMap["YokeBarrel"] = "YokeBarrelParameters" ; caloMap["YokeEndcap"] = "YokeEndcapParameters" ; -// caloMap["YokePlug"] = "YokePlugParameters" ; + caloMap["YokePlug"] = "YokePlugParameters" ; caloMap["HCalBarrel"] = "HcalBarrelParameters" ; caloMap["HCalEndcap"] = "HcalEndcapParameters" ; -// caloMap["HCalRing"] = "HcalRingParameters" ; + caloMap["HCalRing"] = "HcalRingParameters" ; caloMap["LumiCal"] = "LcalParameters" ; // caloMap["LHCal"] = "LHcalParameters" ; caloMap["BeamCal"] = "BeamCalParameters" ; diff --git a/DDRec/src/gear/createGearForILD.cpp b/DDRec/src/gear/createGearForILD.cpp index 5b2159fdaa4df3f7d1307aac0575667a2365d2a7..a029c828bb244bb3764ad187541ef677efbce184 100644 --- a/DDRec/src/gear/createGearForILD.cpp +++ b/DDRec/src/gear/createGearForILD.cpp @@ -276,9 +276,9 @@ namespace DD4hep{ Tube coilTube = Tube( coilDE.volume().solid() ) ; - gearCOIL->setDoubleVal("Coil_cryostat_outer_radius" , coilTube->GetRmin() ) ; - gearCOIL->setDoubleVal("Coil_cryostat_inner_radius" , coilTube->GetRmax() ) ; - gearCOIL->setDoubleVal("Coil_cryostat_half_z" , coilTube->GetDZ() ) ; + gearCOIL->setDoubleVal("Coil_cryostat_outer_radius" , coilTube->GetRmin()/ dd4hep::mm ) ; + gearCOIL->setDoubleVal("Coil_cryostat_inner_radius" , coilTube->GetRmax()/ dd4hep::mm ) ; + gearCOIL->setDoubleVal("Coil_cryostat_half_z" , coilTube->GetDZ()/ dd4hep::mm ) ; coilDE.addExtension< GearHandle >( new GearHandle( gearCOIL, "CoilParameters" ) ) ;