Skip to content
Snippets Groups Projects
Commit 8436048d authored by myliu@ihep.ac.cn's avatar myliu@ihep.ac.cn
Browse files

Fixed a small error.

parent 7dc2c6d5
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ using namespace dd4hep::rec ; ...@@ -25,7 +25,7 @@ using namespace dd4hep::rec ;
static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector,
xml_h e, xml_h e,
dd4hep::SensitiveDetector Sens) { dd4hep::SensitiveDetector sens) {
// ------- Lambda functions ---- // // ------- Lambda functions ---- //
auto delta_a_func = [](auto x, auto y) { return 0.5 * ( x + y ); }; auto delta_a_func = [](auto x, auto y) { return 0.5 * ( x + y ); };
...@@ -38,9 +38,7 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, ...@@ -38,9 +38,7 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector,
std::string det_name = x_det.nameStr(); std::string det_name = x_det.nameStr();
std::string det_type = x_det.typeStr(); std::string det_type = x_det.typeStr();
dd4hep::SensitiveDetector sens = Sens; dd4hep::SensitiveDetector sd = sens;
dd4hep::xml::Dimension sdType = x_det.child(_U(sensitive));
sens.setType(sdType.typeStr());
// - global // - global
double chamber_radius_min = theDetector.constant<double>("SDT_radius_min"); double chamber_radius_min = theDetector.constant<double>("SDT_radius_min");
...@@ -87,7 +85,7 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, ...@@ -87,7 +85,7 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector,
dd4hep::Volume det_outer_chamber_vol(det_name+"_outer_chamber_vol", det_outer_chamber_solid, det_mat); dd4hep::Volume det_outer_chamber_vol(det_name+"_outer_chamber_vol", det_outer_chamber_solid, det_mat);
//Initialize the segmentation //Initialize the segmentation
dd4hep::Readout readout = sens.readout(); dd4hep::Readout readout = sd.readout();
dd4hep::Segmentation geomseg = readout.segmentation(); dd4hep::Segmentation geomseg = readout.segmentation();
dd4hep::Segmentation* _geoSeg = &geomseg; dd4hep::Segmentation* _geoSeg = &geomseg;
...@@ -130,7 +128,6 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, ...@@ -130,7 +128,6 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector,
layer_phy.addPhysVolID("layer",layer_id); layer_phy.addPhysVolID("layer",layer_id);
//Set drift chamber layers to sensitive detector //Set drift chamber layers to sensitive detector
dd4hep::SensitiveDetector sd = sens;
layer_vol.setSensitiveDetector(sens); layer_vol.setSensitiveDetector(sens);
sd.setType("tracker"); sd.setType("tracker");
} }
......
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