From 9cecc2b540571bdad4552ff3e415d0be70116847 Mon Sep 17 00:00:00 2001 From: Markus Frank <markus.frank@cern.ch> Date: Thu, 21 Feb 2013 17:04:20 +0000 Subject: [PATCH] Small simplification of the factory method for plugins --- DDExamples/AlignDet/src/BoxDetector_geo.cpp | 2 +- .../CLICSiD/src/CylindricalBarrelCalorimeter_geo.cpp | 2 +- .../CLICSiD/src/CylindricalEndcapCalorimeter_geo.cpp | 2 +- DDExamples/CLICSiD/src/DiskTracker_geo.cpp | 2 +- DDExamples/CLICSiD/src/DiskTracker_no_shortcuts_geo.cpp | 2 +- DDExamples/CLICSiD/src/EcalBarrel_geo.cpp | 2 +- DDExamples/CLICSiD/src/ForwardDetector_geo.cpp | 2 +- DDExamples/CLICSiD/src/MultiLayerTracker_geo.cpp | 2 +- DDExamples/CLICSiD/src/PolyconeSupport_geo.cpp | 2 +- .../CLICSiD/src/PolyhedraBarrelCalorimeter2_geo.cpp | 2 +- .../CLICSiD/src/PolyhedraEndcapCalorimeter2_geo.cpp | 2 +- DDExamples/CLICSiD/src/SiTrackerBarrel_geo.cpp | 2 +- DDExamples/CLICSiD/src/SiTrackerEndcap2_geo.cpp | 2 +- DDExamples/CLICSiD/src/TubeSegment_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/ILDExSIT_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/ILDExTPC_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/ILDExVXD_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/LP1_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/TPCPrototype_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/Template.cpp | 2 +- DDExamples/ILDExDet/src/compact/Tesla_BeamCal01_geo.cpp | 6 +++--- DDExamples/ILDExDet/src/compact/Tesla_ClicYoke01_geo.cpp | 8 ++++---- DDExamples/ILDExDet/src/compact/Tesla_LumiCalX_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/Tesla_SEcal03_geo.cpp | 8 ++++---- DDExamples/ILDExDet/src/compact/Tesla_SEtd02_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/Tesla_SFtd05_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/Tesla_SHcalSc02_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/Tesla_SSet02_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/Tesla_SSit03_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/Tesla_VXD03_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/Tesla_coil00_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/Tesla_ftd01_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/Tesla_hcal04_geo.cpp | 8 ++++---- DDExamples/ILDExDet/src/compact/Tesla_mask04_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/Tesla_maskX01_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/Tesla_sit00_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/Tesla_tpc02_geo.cpp | 6 +++--- DDExamples/ILDExDet/src/compact/Tesla_tpc06_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/Tesla_tube01_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/Tesla_tubeX01_geo.cpp | 2 +- DDExamples/ILDExDet/src/compact/Tesla_yoke02_geo.cpp | 2 +- 41 files changed, 54 insertions(+), 54 deletions(-) diff --git a/DDExamples/AlignDet/src/BoxDetector_geo.cpp b/DDExamples/AlignDet/src/BoxDetector_geo.cpp index eadd759ad..1da515fd6 100644 --- a/DDExamples/AlignDet/src/BoxDetector_geo.cpp +++ b/DDExamples/AlignDet/src/BoxDetector_geo.cpp @@ -12,7 +12,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector&) { +static Ref_t create_element(LCDD& lcdd, xml_h e, Ref_t) { xml_det_t x_det = e; string name = x_det.nameStr(); xml_comp_t box (x_det.child(_X(box))); diff --git a/DDExamples/CLICSiD/src/CylindricalBarrelCalorimeter_geo.cpp b/DDExamples/CLICSiD/src/CylindricalBarrelCalorimeter_geo.cpp index 9f6bf3b5b..1e2badf2c 100644 --- a/DDExamples/CLICSiD/src/CylindricalBarrelCalorimeter_geo.cpp +++ b/DDExamples/CLICSiD/src/CylindricalBarrelCalorimeter_geo.cpp @@ -12,7 +12,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_detector(LCDD& lcdd, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; xml_dim_t dim = x_det.dimensions(); Material air = lcdd.air(); diff --git a/DDExamples/CLICSiD/src/CylindricalEndcapCalorimeter_geo.cpp b/DDExamples/CLICSiD/src/CylindricalEndcapCalorimeter_geo.cpp index 5d7fff3b0..2e32eae10 100644 --- a/DDExamples/CLICSiD/src/CylindricalEndcapCalorimeter_geo.cpp +++ b/DDExamples/CLICSiD/src/CylindricalEndcapCalorimeter_geo.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_detector(LCDD& lcdd, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; xml_dim_t dim = x_det.dimensions(); Material air = lcdd.air(); diff --git a/DDExamples/CLICSiD/src/DiskTracker_geo.cpp b/DDExamples/CLICSiD/src/DiskTracker_geo.cpp index c75e004af..fb1d3b0f7 100644 --- a/DDExamples/CLICSiD/src/DiskTracker_geo.cpp +++ b/DDExamples/CLICSiD/src/DiskTracker_geo.cpp @@ -12,7 +12,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_detector(LCDD& lcdd, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; Material air = lcdd.air(); string det_name = x_det.nameStr(); diff --git a/DDExamples/CLICSiD/src/DiskTracker_no_shortcuts_geo.cpp b/DDExamples/CLICSiD/src/DiskTracker_no_shortcuts_geo.cpp index d0e28abbf..4b9495c75 100644 --- a/DDExamples/CLICSiD/src/DiskTracker_no_shortcuts_geo.cpp +++ b/DDExamples/CLICSiD/src/DiskTracker_no_shortcuts_geo.cpp @@ -12,7 +12,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_detector(LCDD& lcdd, const XML::Element& x_det, SensitiveDetector& sens) { +static Ref_t create_detector(LCDD& lcdd, XML::Element x_det, SensitiveDetector sens) { Material air = lcdd.air(); string det_name = x_det.attr<string>("name"); int det_id = x_det.attr<int>("id"); diff --git a/DDExamples/CLICSiD/src/EcalBarrel_geo.cpp b/DDExamples/CLICSiD/src/EcalBarrel_geo.cpp index fe1a2f23e..488bc871e 100644 --- a/DDExamples/CLICSiD/src/EcalBarrel_geo.cpp +++ b/DDExamples/CLICSiD/src/EcalBarrel_geo.cpp @@ -14,7 +14,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_detector(LCDD& lcdd, xml_h e, SensitiveDetector sens) { static double tolerance = 0e0; Layering layering (e); xml_det_t x_det = e; diff --git a/DDExamples/CLICSiD/src/ForwardDetector_geo.cpp b/DDExamples/CLICSiD/src/ForwardDetector_geo.cpp index 4d2652b10..cd118c50a 100644 --- a/DDExamples/CLICSiD/src/ForwardDetector_geo.cpp +++ b/DDExamples/CLICSiD/src/ForwardDetector_geo.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_detector(LCDD& lcdd, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; xml_dim_t dim = x_det.dimensions(); bool reflect = x_det.reflect(); diff --git a/DDExamples/CLICSiD/src/MultiLayerTracker_geo.cpp b/DDExamples/CLICSiD/src/MultiLayerTracker_geo.cpp index b0de7e053..2acb3ae3e 100644 --- a/DDExamples/CLICSiD/src/MultiLayerTracker_geo.cpp +++ b/DDExamples/CLICSiD/src/MultiLayerTracker_geo.cpp @@ -12,7 +12,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_detector(LCDD& lcdd, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; string det_name = x_det.nameStr(); string det_type = x_det.typeStr(); diff --git a/DDExamples/CLICSiD/src/PolyconeSupport_geo.cpp b/DDExamples/CLICSiD/src/PolyconeSupport_geo.cpp index 63cb37000..7e795bef1 100644 --- a/DDExamples/CLICSiD/src/PolyconeSupport_geo.cpp +++ b/DDExamples/CLICSiD/src/PolyconeSupport_geo.cpp @@ -12,7 +12,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector&) { +static Ref_t create_detector(LCDD& lcdd, xml_h e, Ref_t) { xml_det_t x_det = e; string name = x_det.nameStr(); DetElement sdet (name,x_det.id()); diff --git a/DDExamples/CLICSiD/src/PolyhedraBarrelCalorimeter2_geo.cpp b/DDExamples/CLICSiD/src/PolyhedraBarrelCalorimeter2_geo.cpp index f9df0ac95..cc7cc0953 100644 --- a/DDExamples/CLICSiD/src/PolyhedraBarrelCalorimeter2_geo.cpp +++ b/DDExamples/CLICSiD/src/PolyhedraBarrelCalorimeter2_geo.cpp @@ -42,7 +42,7 @@ static void placeStaves(DetElement& parent, } } -static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_detector(LCDD& lcdd, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; Layering layering(x_det); xml_comp_t staves = x_det.staves(); diff --git a/DDExamples/CLICSiD/src/PolyhedraEndcapCalorimeter2_geo.cpp b/DDExamples/CLICSiD/src/PolyhedraEndcapCalorimeter2_geo.cpp index 92b05c089..392d38070 100644 --- a/DDExamples/CLICSiD/src/PolyhedraEndcapCalorimeter2_geo.cpp +++ b/DDExamples/CLICSiD/src/PolyhedraEndcapCalorimeter2_geo.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_detector(LCDD& lcdd, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; xml_dim_t dim = x_det.dimensions(); int det_id = x_det.id(); diff --git a/DDExamples/CLICSiD/src/SiTrackerBarrel_geo.cpp b/DDExamples/CLICSiD/src/SiTrackerBarrel_geo.cpp index 33ea5747e..3503c0024 100644 --- a/DDExamples/CLICSiD/src/SiTrackerBarrel_geo.cpp +++ b/DDExamples/CLICSiD/src/SiTrackerBarrel_geo.cpp @@ -12,7 +12,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_detector(LCDD& lcdd, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; Material air = lcdd.air(); int det_id = x_det.id(); diff --git a/DDExamples/CLICSiD/src/SiTrackerEndcap2_geo.cpp b/DDExamples/CLICSiD/src/SiTrackerEndcap2_geo.cpp index 5d5a72210..2397cdb44 100644 --- a/DDExamples/CLICSiD/src/SiTrackerEndcap2_geo.cpp +++ b/DDExamples/CLICSiD/src/SiTrackerEndcap2_geo.cpp @@ -14,7 +14,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_detector(LCDD& lcdd, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; Material air = lcdd.air(); Material vacuum = lcdd.vacuum(); diff --git a/DDExamples/CLICSiD/src/TubeSegment_geo.cpp b/DDExamples/CLICSiD/src/TubeSegment_geo.cpp index c48e498e0..b3e5bf8be 100644 --- a/DDExamples/CLICSiD/src/TubeSegment_geo.cpp +++ b/DDExamples/CLICSiD/src/TubeSegment_geo.cpp @@ -12,7 +12,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector&) { +static Ref_t create_element(LCDD& lcdd, xml_h e, Ref_t) { xml_det_t x_det (e); xml_comp_t x_tube = x_det.tubs(); xml_dim_t pos = x_det.position(); diff --git a/DDExamples/ILDExDet/src/compact/ILDExSIT_geo.cpp b/DDExamples/ILDExDet/src/compact/ILDExSIT_geo.cpp index cb114472b..e23254ad1 100644 --- a/DDExamples/ILDExDet/src/compact/ILDExSIT_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/ILDExSIT_geo.cpp @@ -12,7 +12,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; string name = x_det.nameStr(); DetElement sit(name,x_det.id()); diff --git a/DDExamples/ILDExDet/src/compact/ILDExTPC_geo.cpp b/DDExamples/ILDExDet/src/compact/ILDExTPC_geo.cpp index 8ff048af0..974694e83 100644 --- a/DDExamples/ILDExDet/src/compact/ILDExTPC_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/ILDExTPC_geo.cpp @@ -18,7 +18,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; xml_comp_t x_tube (x_det.child(_X(tubs))); string name = x_det.nameStr(); diff --git a/DDExamples/ILDExDet/src/compact/ILDExVXD_geo.cpp b/DDExamples/ILDExDet/src/compact/ILDExVXD_geo.cpp index 060a4bc1d..27317e774 100644 --- a/DDExamples/ILDExDet/src/compact/ILDExVXD_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/ILDExVXD_geo.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { DetElement vxd; xml_det_t x_det = e; string name = x_det.nameStr(); diff --git a/DDExamples/ILDExDet/src/compact/LP1_geo.cpp b/DDExamples/ILDExDet/src/compact/LP1_geo.cpp index d20be7a4b..b88f0af80 100644 --- a/DDExamples/ILDExDet/src/compact/LP1_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/LP1_geo.cpp @@ -18,7 +18,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; xml_comp_t x_tube (x_det.child(_X(tubs))); string name = x_det.nameStr(); diff --git a/DDExamples/ILDExDet/src/compact/TPCPrototype_geo.cpp b/DDExamples/ILDExDet/src/compact/TPCPrototype_geo.cpp index 25700f71b..46deea699 100644 --- a/DDExamples/ILDExDet/src/compact/TPCPrototype_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/TPCPrototype_geo.cpp @@ -18,7 +18,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; xml_comp_t x_tube (x_det.child(_X(tubs))); string name = x_det.nameStr(); diff --git a/DDExamples/ILDExDet/src/compact/Template.cpp b/DDExamples/ILDExDet/src/compact/Template.cpp index 0aca9d685..44847b15b 100644 --- a/DDExamples/ILDExDet/src/compact/Template.cpp +++ b/DDExamples/ILDExDet/src/compact/Template.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { struct param_t { double inner, outer, zhalf; }; xml_det_t x_det = e; string name = x_det.nameStr(); diff --git a/DDExamples/ILDExDet/src/compact/Tesla_BeamCal01_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_BeamCal01_geo.cpp index 463519d88..1c1857b25 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_BeamCal01_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_BeamCal01_geo.cpp @@ -58,7 +58,7 @@ namespace DD4hep { namespace Geometry { /// Standard constructor BeamCal01() : BeamCal01Data() {} /// Detector construction function - DetElement construct(LCDD& lcdd, xml_det_t e, SensitiveDetector& sens_det); + DetElement construct(LCDD& lcdd, xml_det_t e, SensitiveDetector sens_det); }; }} @@ -73,7 +73,7 @@ inline int split_n(double totLength, double initSegm) { return int(ceil(totLength/initSegm)); } /// Detector construction function -DetElement BeamCal01::construct(LCDD& l, xml_det_t x_det, SensitiveDetector& sens_det) { +DetElement BeamCal01::construct(LCDD& l, xml_det_t x_det, SensitiveDetector sens_det) { lcdd = &l; name = x_det.nameStr(); self.assign(dynamic_cast<Value<TNamed,BeamCal01>*>(this),name,x_det.typeStr()); @@ -296,7 +296,7 @@ DetElement BeamCal01::construct(LCDD& l, xml_det_t x_det, SensitiveDetector& sen return self; } -static Ref_t create_detector(LCDD& lcdd, const xml_h& element, SensitiveDetector& sens) { +static Ref_t create_detector(LCDD& lcdd, xml_h element, SensitiveDetector sens) { return (new Value<TNamed,BeamCal01>())->construct(lcdd,element,sens); } DECLARE_DETELEMENT(Tesla_BeamCal01,create_detector); diff --git a/DDExamples/ILDExDet/src/compact/Tesla_ClicYoke01_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_ClicYoke01_geo.cpp index e369e49e4..0583e1a51 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_ClicYoke01_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_ClicYoke01_geo.cpp @@ -91,20 +91,20 @@ void ClicYoke01::collectSensitiveDetectors(xml_det_t e) { xml_comp_t c = e.child(_U(barrel)); // Setup the sensitive detectors for barrel, endcap+ and endcap- - m_barrel.sensDet = SensitiveDetector("YokeBarrel"); + m_barrel.sensDet = SensitiveDetector("YokeBarrel","yoke"); Readout ro = lcdd->readout(c.readoutStr()); m_barrel.sensDet.setHitsCollection(ro.name()); m_barrel = DetElement(self,name+"_barrel",e.id()); c = e.child(_U(endcap)); - m_endcapMinus.sensDet = m_endcapPlus.sensDet = SensitiveDetector("YokeEndcap"); + m_endcapMinus.sensDet = m_endcapPlus.sensDet = SensitiveDetector("YokeEndcap","yoke"); ro = lcdd->readout(c.readoutStr()); m_endcapPlus.sensDet.setHitsCollection(ro.name()); m_endcapPlus = DetElement(self,name+"_endcap_plus",e.id()); if ( m_hasPlug ) { c = e.child(_U(endcap)); - m_plugMinus.sensDet = m_plugPlus.sensDet = SensitiveDetector("YokePlug"); + m_plugMinus.sensDet = m_plugPlus.sensDet = SensitiveDetector("YokePlug","yoke"); ro = lcdd->readout("YokePlugHits"); m_plugPlus.sensDet.setHitsCollection(ro.name()); m_plugPlus = DetElement(self,name+"_plug_plus",e.id()); @@ -448,7 +448,7 @@ DetElement ClicYoke01::construct(LCDD& l, xml_det_t x_det) { return self; } -static Ref_t create_detector(LCDD& lcdd, const xml_h& element) { +static Ref_t create_detector(LCDD& lcdd, xml_h element, Ref_t) { return (new Value<TNamed,ClicYoke01>())->construct(lcdd,element); } DECLARE_SUBDETECTOR(Tesla_ClicYoke01,create_detector); diff --git a/DDExamples/ILDExDet/src/compact/Tesla_LumiCalX_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_LumiCalX_geo.cpp index 786e75fa9..f16b9823b 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_LumiCalX_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_LumiCalX_geo.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; xml_comp_t x_layer= e.child(_X(layer)); string name = x_det.nameStr(); diff --git a/DDExamples/ILDExDet/src/compact/Tesla_SEcal03_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_SEcal03_geo.cpp index 9b3757c97..a5b4da764 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_SEcal03_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_SEcal03_geo.cpp @@ -301,19 +301,19 @@ DetElement SEcal03::construct(LCDD& l, xml_det_t x_det) { } // Setup the sensitive detectors for barrel, endcap+ and endcap- - SensitiveDetector sd = m_barrel.sensDet = SensitiveDetector("EcalBarrel"); + SensitiveDetector sd = m_barrel.sensDet = SensitiveDetector("EcalBarrel","calorimeter"); Readout ro = lcdd->readout(x_barrel.readoutStr()); sd.setHitsCollection(ro.name()); sd.setReadout(ro); lcdd->addSensitiveDetector(sd); - sd = m_endcap.sensDet = SensitiveDetector("EcalEndcapRings"); + sd = m_endcap.sensDet = SensitiveDetector("EcalEndcapRings","calorimeter"); ro = lcdd->readout(x_endcap.attr<string>(_U(ring_readout))); sd.setHitsCollection(ro.name()); sd.setReadout(ro); lcdd->addSensitiveDetector(sd); - sd = m_endcap.ringSD = SensitiveDetector("EcalEndcap"); + sd = m_endcap.ringSD = SensitiveDetector("EcalEndcap","calorimeter"); ro = lcdd->readout(x_endcap.readoutStr()); sd.setHitsCollection(ro.name()); sd.setReadout(ro); @@ -828,7 +828,7 @@ pair<DetElement,Volume> SEcal03::buildBarrelStave(const Barrel& barrel) { return make_pair(staveDet,staveVol); } -static Ref_t create_detector(LCDD& lcdd, const xml_det_t& x_det) { +static Ref_t create_detector(LCDD& lcdd, xml_det_t x_det, Ref_t) { DetElement e = DetElement::create<SEcal03>(x_det.nameStr(),x_det.typeStr(),x_det.id()); return DetElement::createObject<SEcal03>(x_det.nameStr(),x_det.typeStr(),x_det.id())->construct(lcdd,x_det); } diff --git a/DDExamples/ILDExDet/src/compact/Tesla_SEtd02_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_SEtd02_geo.cpp index 88afc8036..36fef1cf4 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_SEtd02_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_SEtd02_geo.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens_det) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens_det) { xml_det_t x_det = e; string name = x_det.nameStr(); DetElement sdet(name,x_det.id()); diff --git a/DDExamples/ILDExDet/src/compact/Tesla_SFtd05_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_SFtd05_geo.cpp index 7eacbf4dc..4054d5802 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_SFtd05_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_SFtd05_geo.cpp @@ -19,7 +19,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens_det) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens_det) { xml_det_t x_det = e; string name = x_det.nameStr(); Rotation reflect_rot(0,M_PI,0); diff --git a/DDExamples/ILDExDet/src/compact/Tesla_SHcalSc02_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_SHcalSc02_geo.cpp index a9d4296c3..64ffb5aa4 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_SHcalSc02_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_SHcalSc02_geo.cpp @@ -975,7 +975,7 @@ bool SHcalSc02::PostConstructAction(CGAGeometryEnvironment& ) { #endif -static Ref_t create_detector(LCDD& lcdd, const xml_h& element) { +static Ref_t create_detector(LCDD& lcdd, xml_h element, Ref_t) { return (new Value<TNamed,SHcalSc02>())->construct(lcdd,element); } diff --git a/DDExamples/ILDExDet/src/compact/Tesla_SSet02_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_SSet02_geo.cpp index 2e8d491cb..9f2c36bc8 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_SSet02_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_SSet02_geo.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens_det) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens_det) { xml_det_t x_det = e; string name = x_det.nameStr(); DetElement sdet(name,x_det.id()); diff --git a/DDExamples/ILDExDet/src/compact/Tesla_SSit03_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_SSit03_geo.cpp index 335579721..7a85ac1da 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_SSit03_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_SSit03_geo.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { struct Layer { double thickness, radius; Material mat; VisAttr vis; }; xml_det_t x_det = e; string name = x_det.nameStr(); diff --git a/DDExamples/ILDExDet/src/compact/Tesla_VXD03_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_VXD03_geo.cpp index b8a1f4acc..57dc9982e 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_VXD03_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_VXD03_geo.cpp @@ -41,7 +41,7 @@ namespace { }; } -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { DetElement vxd; xml_det_t x_det = e; string name = x_det.nameStr(); diff --git a/DDExamples/ILDExDet/src/compact/Tesla_coil00_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_coil00_geo.cpp index ccd74b981..2e85eb98f 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_coil00_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_coil00_geo.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; string name = x_det.nameStr(); DetElement sdet(name,x_det.id()); diff --git a/DDExamples/ILDExDet/src/compact/Tesla_ftd01_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_ftd01_geo.cpp index d9d0f5c0e..cec223c7b 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_ftd01_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_ftd01_geo.cpp @@ -45,7 +45,7 @@ namespace Tesla { }; } -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; string name = x_det.nameStr(); Rotation reflect_rot(0,M_PI,0); diff --git a/DDExamples/ILDExDet/src/compact/Tesla_hcal04_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_hcal04_geo.cpp index b3a186c81..952bbaf4c 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_hcal04_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_hcal04_geo.cpp @@ -272,19 +272,19 @@ DetElement Hcal04::construct(LCDD& l, xml_det_t x_det) { m_barrel = DetElement(self,"barrel",HCALBARREL); // Setup the sensitive detectors for barrel, endcap+ and endcap- - SensitiveDetector& sd = m_barrel.sensRegular = SensitiveDetector("HcalBarrelRegular"); + SensitiveDetector& sd = m_barrel.sensRegular = SensitiveDetector("HcalBarrelRegular","calorimeter"); Readout ro = lcdd->readout(x_module.readoutStr()); sd.setHitsCollection(ro.name()); sd.setReadout(ro); lcdd->addSensitiveDetector(sd); - sd = m_barrel.sensEndModule = SensitiveDetector("HcalBarrelEndModule"); + sd = m_barrel.sensEndModule = SensitiveDetector("HcalBarrelEndModule","calorimeter"); ro = lcdd->readout(x_end_module.readoutStr()); sd.setHitsCollection(ro.name()); sd.setReadout(ro); lcdd->addSensitiveDetector(sd); - sd = m_endcap.sensDet = SensitiveDetector("HcalEndcap"); + sd = m_endcap.sensDet = SensitiveDetector("HcalEndcap","calorimeter"); ro = lcdd->readout(x_endcap_module.readoutStr()); sd.setHitsCollection(ro.name()); sd.setReadout(ro); @@ -617,7 +617,7 @@ Volume Hcal04::buildRPC1Box(const string& nam, Box box, const Layer& layer, Sens return chamberVol; } -static Ref_t create_detector(LCDD& lcdd, const xml_h& element) { +static Ref_t create_detector(LCDD& lcdd, xml_h element, Ref_t) { return (new Value<TNamed,Hcal04>())->construct(lcdd,element); } DECLARE_SUBDETECTOR(Tesla_hcal04,create_detector); diff --git a/DDExamples/ILDExDet/src/compact/Tesla_mask04_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_mask04_geo.cpp index 9d76987fe..4754ee5f0 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_mask04_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_mask04_geo.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector&) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector) { xml_det_t x_det = e; string name = x_det.nameStr(); Rotation reflect_rot(M_PI,0,0); diff --git a/DDExamples/ILDExDet/src/compact/Tesla_maskX01_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_maskX01_geo.cpp index ece94e1b4..7acd6cd9d 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_maskX01_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_maskX01_geo.cpp @@ -24,7 +24,7 @@ namespace { } ECrossType; } -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector&) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector) { xml_det_t x_det = e; string name = x_det.nameStr(); DetElement sdet(name,x_det.id()); diff --git a/DDExamples/ILDExDet/src/compact/Tesla_sit00_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_sit00_geo.cpp index a7f4f6e35..192364c7b 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_sit00_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_sit00_geo.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; string name = x_det.nameStr(); DetElement sdet(name,x_det.id()); diff --git a/DDExamples/ILDExDet/src/compact/Tesla_tpc02_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_tpc02_geo.cpp index 55347be4d..bcfdc1f63 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_tpc02_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_tpc02_geo.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e) { +static Ref_t create_element(LCDD& lcdd, xml_h e, Ref_t) { xml_det_t x_det = e; string name = x_det.nameStr(); DetElement sdet(name,x_det.id()); @@ -34,7 +34,7 @@ static Ref_t create_element(LCDD& lcdd, const xml_h& e) { cylinder_t sens = { x_sens.inner_r(), x_sens.outer_r(), 0.0 }; // TPC sensitive detector - SensitiveDetector sens_det("TPC"); + SensitiveDetector sens_det("TPC","tracker"); Readout ro = lcdd.readout(x_sens.readoutStr()); sens_det.setHitsCollection(ro.name()); sens_det.setReadout(ro); @@ -90,7 +90,7 @@ static Ref_t create_element(LCDD& lcdd, const xml_h& e) { // FCH = two sensitive twin Si plates, just to register the particle step inside it. // Threshold is 20% of a MIP. For Si we have 0.34 KeV/micron as MIP. - SensitiveDetector fchSD("TPCfch"); + SensitiveDetector fchSD("TPCfch","tracker"); ro = lcdd.readout(x_fch.readoutStr()); fchSD.setHitsCollection(ro.name()); fchSD.setReadout(ro); diff --git a/DDExamples/ILDExDet/src/compact/Tesla_tpc06_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_tpc06_geo.cpp index dac6384fe..9825ace59 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_tpc06_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_tpc06_geo.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens_det) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens_det) { struct cylinder_t { double inner_r, outer_r, z; }; PlacedVolume pv; xml_det_t x_det = e; diff --git a/DDExamples/ILDExDet/src/compact/Tesla_tube01_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_tube01_geo.cpp index f45198a6f..a25b9e584 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_tube01_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_tube01_geo.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector&) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector) { struct Tube_Desc { double zhalf, thickness, radius; }; struct Cone_Desc { double z, rmin, rmax; }; diff --git a/DDExamples/ILDExDet/src/compact/Tesla_tubeX01_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_tubeX01_geo.cpp index 748efc4fc..923faa454 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_tubeX01_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_tubeX01_geo.cpp @@ -39,7 +39,7 @@ namespace { } ECrossType; } -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector&) { +static Ref_t create_element(LCDD& lcdd, xml_h e, Ref_t) { xml_det_t x_det = e; string name = x_det.nameStr(); DetElement sdet(name,x_det.id()); diff --git a/DDExamples/ILDExDet/src/compact/Tesla_yoke02_geo.cpp b/DDExamples/ILDExDet/src/compact/Tesla_yoke02_geo.cpp index 88365203e..afd02eea8 100644 --- a/DDExamples/ILDExDet/src/compact/Tesla_yoke02_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/Tesla_yoke02_geo.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace DD4hep; using namespace DD4hep::Geometry; -static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens) { +static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { struct param_t { double inner, outer, zhalf; }; xml_det_t x_det = e; string name = x_det.nameStr(); -- GitLab