Skip to content
Snippets Groups Projects
Commit 052661d8 authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn
Browse files

Merge branch 'endcap_absorber' into 'master'

Add wax absorber on the endcap (by Haopeng Li)

See merge request cepc/CEPCSW!161
parents 3f5b4106 00ad676b
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,7 @@ gaudi_add_module(DetCRD ...@@ -27,6 +27,7 @@ gaudi_add_module(DetCRD
src/Tracker/SiTracker_itkbarrel_v02_geo.cpp src/Tracker/SiTracker_itkbarrel_v02_geo.cpp
src/Tracker/SiTracker_otkbarrel_v01_geo.cpp src/Tracker/SiTracker_otkbarrel_v01_geo.cpp
src/Tracker/SiTracker_otkendcap_v01_geo.cpp src/Tracker/SiTracker_otkendcap_v01_geo.cpp
src/Other/ParaffinEndcap_v01.cpp
LINK ${DD4hep_COMPONENT_LIBRARIES} LINK ${DD4hep_COMPONENT_LIBRARIES}
DetIdentifier DetIdentifier
......
<?xml version="1.0" encoding="UTF-8"?>
<lccdd>
<define>
<constant name="pos_z" value="562.5*cm"/>
<constant name="shape_rmin" value="65*cm"/>
<constant name="shape_rmax" value="520*cm"/>
<constant name="shape_hz" value="5*cm"/>
</define>
<detectors>
<detector id="DetID_WAX_ENDCAP" name="ParaffinEndcap" type="ParaffinEndcap_v01" vis="VisibleGreen" material="ParaffinWax">
<!-- Use cm as unit if you want to use Pandora for reconstruction -->
<position x="0" y="0" z="pos_z"/>
<dimensions rmin="shape_rmin" rmax="shape_rmax" dz="shape_hz"/>
</detector>
</detectors>
</lccdd>
...@@ -827,6 +827,12 @@ ...@@ -827,6 +827,12 @@
<fraction n="0.895" ref="Al"/> <fraction n="0.895" ref="Al"/>
</material> </material>
<material name="ParaffinWax">
<D value="0.9" unit="g/cm3"/>
<composite n="25" ref="C"/>
<composite n="52" ref="H"/>
</material>
</materials> </materials>
<surfaces> <surfaces>
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
<constant name="DetID_YOKE_ENDCAP" value=" 31"/> <constant name="DetID_YOKE_ENDCAP" value=" 31"/>
<constant name="DetID_MUON" value=" 10"/> <constant name="DetID_MUON" value=" 10"/>
<constant name="DetID_MUON_ENDCAP" value=" 11"/> <constant name="DetID_MUON_ENDCAP" value=" 11"/>
<constant name="DetID_WAX_ENDCAP" value=" 12"/>
<constant name="DetID_bwd" value="-1"/> <constant name="DetID_bwd" value="-1"/>
<constant name="DetID_barrel" value=" 0"/> <constant name="DetID_barrel" value=" 0"/>
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
<!--muon detector--> <!--muon detector-->
<include ref="../CRD_common_v01/Muon_Barrel_v01_03.xml"/> <include ref="../CRD_common_v01/Muon_Barrel_v01_03.xml"/>
<include ref="../CRD_common_v01/Muon_Endcap_v01_02.xml"/> <include ref="../CRD_common_v01/Muon_Endcap_v01_02.xml"/>
<include ref="../CRD_common_v01/ParaffinEndcap_v01_01.xml"/>
<fields> <fields>
<field name="InnerSolenoid" type="solenoid" <field name="InnerSolenoid" type="solenoid"
......
#include "DD4hep/DetFactoryHelper.h"
#include "XML/Layering.h"
#include "XML/Utilities.h"
#include "DDRec/DetectorData.h"
#include "DDSegmentation/Segmentation.h"
#define MYDEBUG(x) std::cout << __FILE__ << ":" << __LINE__ << ": " << x << std::endl;
#define MYDEBUGVAL(x) std::cout << __FILE__ << ":" << __LINE__ << ": " << #x << ": " << x << std::endl;
using dd4hep::rec::LayeredCalorimeterData;
static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector,
xml_h e,
dd4hep::SensitiveDetector sens) {
xml_det_t x_det = e;
std::string det_name = x_det.nameStr();
std::string det_type = x_det.typeStr();
MYDEBUGVAL(det_name);
MYDEBUGVAL(det_type);
xml_dim_t pos (x_det.child(_U(position)));
xml_dim_t dim (x_det.child(_U(dimensions)));
dd4hep::DetElement sdet("det",1770);
dd4hep::Material det_mat(theDetector.material("ParaffinWax"));
dd4hep::Volume det_vol(det_name+"_vol", dd4hep::Tube(dim.rmin(), dim.rmax(), dim.dz()), det_mat);
dd4hep::Transform3D transform(dd4hep::Rotation3D(),
dd4hep::Position(pos.x(),pos.y(),pos.z()));
dd4hep::Transform3D transform_01(dd4hep::Rotation3D(),
dd4hep::Position(pos.x(),pos.y(),-1*pos.z()));
//Create caloData object to extend driver with data required for reconstruction
dd4hep::PlacedVolume pv;
dd4hep::DetElement both_endcap(det_name, x_det.id());
dd4hep::Volume motherVol = theDetector.pickMotherVolume(both_endcap);
dd4hep::DetElement sdetA = sdet;
dd4hep::Ref_t(sdetA)->SetName((det_name+"_A").c_str());
dd4hep::DetElement sdetB = sdet.clone(det_name+"_B",1769);
dd4hep::Assembly assembly("assembly");
pv = assembly.placeVolume(det_vol,transform);
sdetA.setPlacement(pv);
pv = assembly.placeVolume(det_vol,transform_01);
sdetB.setPlacement(pv);
pv = motherVol.placeVolume(assembly);
both_endcap.setPlacement(pv);
both_endcap.add(sdetA);
both_endcap.add(sdetB);
MYDEBUG("create_detector DONE. ");
return both_endcap;
}
DECLARE_DETELEMENT(ParaffinEndcap_v01, create_detector)
...@@ -29,6 +29,7 @@ namespace CEPCConf{ ...@@ -29,6 +29,7 @@ namespace CEPCConf{
static const int YOKE_ENDCAP = 31; static const int YOKE_ENDCAP = 31;
static const int MUON = 10; static const int MUON = 10;
static const int MUON_ENDCAP = 11; static const int MUON_ENDCAP = 11;
static const int WAX_ENDCAP = 12;
static const int bwd = -1; static const int bwd = -1;
static const int barrel = 0; static const int barrel = 0;
......
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