Skip to content
Snippets Groups Projects
Commit ba691f32 authored by FU Chengdong's avatar FU Chengdong
Browse files

change hardcode sensitive type to optional

parent 96e1d0da
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<detectors> <detectors>
<detector id="DetID_ECAL" name="CaloDetector" type="CRDEcalBarrel_v01" readout="EcalBarrelCollection" vis="Invisible" sensitive="true" region="EcalBarrelRegion"> <detector id="DetID_ECAL" name="CaloDetector" type="CRDEcalBarrel_v01" readout="EcalBarrelCollection" vis="Invisible" sensitive="true" region="EcalBarrelRegion">
<sensitive type="scintillator"/>
<!-- Use cm as unit if you want to use Pandora for reconstruction --> <!-- Use cm as unit if you want to use Pandora for reconstruction -->
</detector> </detector>
</detectors> </detectors>
......
...@@ -128,7 +128,8 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, ...@@ -128,7 +128,8 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector,
sd.setPlacement(plv); sd.setPlacement(plv);
} }
sens.setType("calorimeter"); xml_dim_t sd_typ = x_det.child(_U(sensitive));
sens.setType(sd_typ.typeStr());
MYDEBUG("create_detector DONE. "); MYDEBUG("create_detector DONE. ");
return ECAL; return ECAL;
......
...@@ -182,8 +182,9 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, ...@@ -182,8 +182,9 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector,
DetElement sd(ECAL, _toString(i,"trap%3d"), detid); DetElement sd(ECAL, _toString(i,"trap%3d"), detid);
sd.setPlacement(plv); sd.setPlacement(plv);
} }
sens.setType("calorimeter"); xml_dim_t sd_typ = x_det.child(_U(sensitive));
sens.setType(sd_typ.typeStr());
ECAL.addExtension< LayeredCalorimeterData >( caloData ) ; ECAL.addExtension< LayeredCalorimeterData >( caloData ) ;
MYDEBUG("create_detector DONE. "); MYDEBUG("create_detector DONE. ");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment