diff --git a/Detector/DetCRD/CMakeLists.txt b/Detector/DetCRD/CMakeLists.txt index 4a1558a9527aefda9ec5b0ce23cc9a95796fc516..d3f0b06954b5d3a547cb13495dfb52201ebf0818 100644 --- a/Detector/DetCRD/CMakeLists.txt +++ b/Detector/DetCRD/CMakeLists.txt @@ -17,8 +17,8 @@ find_package(ROOT COMPONENTS MathCore GenVector Geom REQUIRED) gaudi_add_module(DetCRD SOURCES src/Calorimeter/CRDEcal_v01.cpp - src/Calorimeter/RotatedPolyhedraBarrelCalorimeter_v01_geo.cpp - src/Calorimeter/RotatedCrystalCalorimeter_v01_geo.cpp + src/Calorimeter/RotatedPolyhedraBarrelCalorimeter_v01_geo.cpp + src/Calorimeter/RotatedCrystalCalorimeter_v01_geo.cpp src/Other/CRDBeamPipe_v01_geo.cpp src/Tracker/SiTrackerSkewRing_v01_geo.cpp diff --git a/Detector/DetCRD/compact/Standalone/Standalone-EcalRotCrystal.xml b/Detector/DetCRD/compact/Standalone/Standalone-EcalRotCrystal.xml index 3d63b9f0de9d92c3272176861fdd63738aa2451f..771de36ea41e8279ed0f38d7a51818c1bded9f19 100644 --- a/Detector/DetCRD/compact/Standalone/Standalone-EcalRotCrystal.xml +++ b/Detector/DetCRD/compact/Standalone/Standalone-EcalRotCrystal.xml @@ -2,13 +2,13 @@ <lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> - <info name="Standalone" - title="CepC reference detctor with coil inside Hcal, pixel SIT/SET" + <info name="StandaloneEcalRotCrystal" + title="CepC standalone calorimeter with rotated crystal" author="C.D.Fu" url="http://cepc.ihep.ac.cn" status="developing" version="v01"> - <comment>CepC reference detector simulation models used for detector study </comment> + <comment>CepC detector simulation models used for detector study </comment> </info> <includes> diff --git a/Detector/DetCRD/src/Calorimeter/RotatedCrystalCalorimeter_v01_geo.cpp b/Detector/DetCRD/src/Calorimeter/RotatedCrystalCalorimeter_v01_geo.cpp index bbca6bfb9d9aedfcfd182c167b98669530d114b9..ec6e9fa5c229c348edccc36089d8cb59e24b7c1d 100644 --- a/Detector/DetCRD/src/Calorimeter/RotatedCrystalCalorimeter_v01_geo.cpp +++ b/Detector/DetCRD/src/Calorimeter/RotatedCrystalCalorimeter_v01_geo.cpp @@ -108,7 +108,6 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s for(int crystal_id=1; crystal_id<=nphi; crystal_id++){ double angleRot = -alpha + dphi/2 + (crystal_id-1)*dphi; double phiCenter = phi0Center + (crystal_id-1)*dphi; - //Translation3D tran(center2O*cos(phiCenter), center2O*sin(phiCenter), 0); Transform3D trafo(RotationZYX(0, angleRot+M_PI/2, M_PI/2), Translation3D(center2O*cos(phiCenter), center2O*sin(phiCenter), 0)); PlacedVolume pv = moduleVol.placeVolume(crystalVol, trafo); pv.addPhysVolID("crystal", crystal_id); @@ -127,4 +126,3 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s } DECLARE_DETELEMENT(DD4hep_RotatedCrystalCalorimeter_v01, create_detector) -DECLARE_DEPRECATED_DETELEMENT(RotatedCrystalCalorimeter_v01, create_detector) diff --git a/Detector/DetCRD/src/Calorimeter/RotatedPolyhedraBarrelCalorimeter_v01_geo.cpp b/Detector/DetCRD/src/Calorimeter/RotatedPolyhedraBarrelCalorimeter_v01_geo.cpp index e049c3b2ab74b30696f7eb092aa1eb4523e01c8d..723766ef891efba33ddd4bc357a81de5ea73760d 100644 --- a/Detector/DetCRD/src/Calorimeter/RotatedPolyhedraBarrelCalorimeter_v01_geo.cpp +++ b/Detector/DetCRD/src/Calorimeter/RotatedPolyhedraBarrelCalorimeter_v01_geo.cpp @@ -42,11 +42,6 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s if( description.buildType() == BUILD_ENVELOPE ) return cal ; envelope.setVisAttributes(description, "SeeThrough"); - //Volume motherVol = description.pickMotherVolume(sdet); - //PolyhedraRegular polyhedra(numSides, rmin, rmin + totalThickness, zhalf*2); - //Volume wholeVol(det_name+"_Whole", polyhedra, air); - //wholeVol.setAttributes(description, x_det.regionStr(), x_det.limitsStr(), x_det.visStr()); - // Add the subdetector envelope to the structure. DetElement stave0(cal, "stave1", x_det.id()); Material matStave = air; @@ -78,9 +73,6 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s double layer_dim_x = innerFaceLen/2 - gap/2; int layer_num = 1; - //#### LayeringExtensionImpl* layeringExtension = new LayeringExtensionImpl(); - //#### Position layerNormal(0,0,1); - for (xml_coll_t xc(x_det, _U(layer)); xc; ++xc) { xml_comp_t x_layer = xc; int repeat = x_layer.repeat(); // Get number of times to repeat this layer. @@ -153,43 +145,25 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s } // Place the staves. double innerRotation = innerAngle; - double offsetRotation = phi0 - M_PI;//-innerRotation/2; + double offsetRotation = phi0 - M_PI; double sectCenterRadius = rmin + totalThickness/2; double offset = totalThickness/std::sin(innerAngle)/2; double rotX = M_PI / 2; - //double rotY = -offsetRotation; - //double posX = -sectCenterRadius * std::sin(rotY); - //double posY = sectCenterRadius * std::cos(rotY); for (int istave = 1; istave <= numSides; istave++){ - //for (int istave = 1; istave <= 3; istave++) { DetElement stave = istave > 1 ? stave0.clone(_toString(istave,"stave%d")) : stave0; double rotY = offsetRotation - (istave-1)*innerRotation; double posX = sectCenterRadius*std::sin(rotY) + offset*std::cos(rotY); double posY = -sectCenterRadius*std::cos(rotY) + offset*std::sin(rotY); Transform3D trafo(RotationZYX(0, rotY, rotX), Translation3D(posX, posY, zpos)); PlacedVolume pv = envelope.placeVolume(staveOuterVol, trafo); - // Not a valid volID: pv.addPhysVolID("stave", 0); pv.addPhysVolID("stave", istave); + pv.addPhysVolID("system", cal.id()); + pv.addPhysVolID("barrel", 0); stave.setPlacement(pv); - //cal.add(stave); } - - //placeStaves(cal, stave, rmin, numSides, totalThickness, envelopeVol, innerAngle, staveOuterVol); - // Set envelope volume attributes. - //envelope.setAttributes(description, x_det.regionStr(), x_det.limitsStr(), x_det.visStr()); - - //double z_offset = dim.hasAttr(_U(z_offset)) ? dim.z_offset() : 0.0; - //Transform3D transform(RotationZ(M_PI / numSides), Translation3D(0, 0, z_offset)); - //PlacedVolume pv_whole = envelope.placeVolume(wholeVol, transform); - //pv_whole.addPhysVolID("system", cal.id()); - //pv_whole.addPhysVolID("barrel", 0); - //cal.setPlacement(pv_whole); - - //#### cal.addExtension<SubdetectorExtension>(new SubdetectorExtensionImpl(cal)); - //#### cal.addExtension<LayeringExtension>(layeringExtension); + return cal; } DECLARE_DETELEMENT(DD4hep_RotatedPolyhedraBarrelCalorimeter_v01, create_detector) -DECLARE_DEPRECATED_DETELEMENT(RotatedPolyhedraBarrelCalorimeter_v01, create_detector)