Skip to content
Snippets Groups Projects
Commit 9264c913 authored by Jihee Kim's avatar Jihee Kim
Browse files

Added envelop volume

parent b4eccedb
No related branches found
No related tags found
1 merge request!29Draft: Resolve "Implement cb_CTD"
Pipeline #8099 passed
<lccdd>
<comment> Central Barrel Tracker Straw </comment>
<define>
</define>
<limits>
</limits>
<regions>
</regions>
<display>
</display>
<detectors>
<detector id="cb_CTD_Straw_ID" name="cb_CTD_Straw" type="cb_CTD_Straw" readout="cb_CTD_Straw_Hits" vis="cb_CTDVis" insideTrackingVloume="true">
<dimensions rmin="cb_CTD_rmin" rmax="cb_CTD_rmax" length="cb_CTD_length" zmax="cb_CTD_zmax"/>
</detector>
</detectors>
<readouts>
<readout name="cb_CTD_Straw_Hits">
<segmentation type="CartesianGridXY" grid_size_x="1.0*mm" grid_size_y="1.0*mm" />
<id>system:8,barrel:3,layer:4,x:32:-16,y:-16</id>
</readout>
</readouts>
<plugins>
</plugins>
<fields>
</fields>
</lccdd>
......@@ -123,6 +123,7 @@
<constant name="SiTrackerEndcapP_Layer5_ID" value="69"/>
<constant name="SiTrackerEndcapN_Layer5_ID" value="70"/>
<constant name="cb_CTD_Straw_ID" value="73"/>
<constant name="cb_CTD_Si_ID" value="74"/>
<comment>
......
......@@ -114,6 +114,10 @@
<include ref="reference_detector/vertex_tracker.xml"/>
<include ref="compact/silicon_tracker.xml"/>
-->
<!--
<include ref="compact/cb_CTD_Si.xml"/>
-->
<include ref="compact/cb_CTD_Straw.xml"/>
<include ref="ip6/beampipe.xml"/>
<include ref="compact/solenoid.xml"/>
<include ref="compact/ecal.xml"/>
......
#include <XML/Helper.h>
//////////////////////////////////
// Central Barrel Tracker Straw
//////////////////////////////////
using namespace std;
using namespace dd4hep;
static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens)
{
xml_det_t x_det = e;
string detName = x_det.nameStr();
int detID = x_det.id();
xml_dim_t dim = x_det.dimensions();
double RIn = dim.rmin();
double ROut = dim.rmax();
double SizeZ = dim.length();
double SizeZCut = dim.zmax();
Material Vacuum = desc.material("Vacuum");
// Create Global Volume
Tube cb_CTD_GVol_Solid(RIn, ROut, SizeZ / 2.0, 0., 360.0 * deg);
Volume detVol("cb_CTD_GVol_Logic", cb_CTD_GVol_Solid, Vacuum);
detVol.setVisAttributes(desc.visAttributes(x_det.visStr()));
DetElement det(detName, detID);
Volume motherVol = desc.pickMotherVolume(det);
Transform3D tr(RotationZYX(0.0, 0.0, 0.0), Position(0.0, 0.0, 0.0));
PlacedVolume detPV = motherVol.placeVolume(detVol, tr);
detPV.addPhysVolID("system", detID);
det.setPlacement(detPV);
return det;
}
DECLARE_DETELEMENT(cb_CTD_Straw, createDetector)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment