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

Created envelope volume

parent 10e66bf1
No related branches found
No related tags found
1 merge request!30Resolve "Implement cb_CTD_SI"
Pipeline #7878 failed
This commit is part of merge request !30. Comments created here will be created in the context of that merge request.
<lccdd>
<comment> Central Barrel Tracker Silicon </comment>
<define>
</define>
<limits>
</limits>
<regions>
</regions>
<display>
</display>
<detectors>
<detector id="cb_CTD_Si_ID" name="cb_CTD_Si" type="cb_CTD_Si" readout="cb_CTD_Si_Hits" vis="cb_CTD_SiVis" insideTrackingVloume="true">
<dimensions rmin="cb_CTD_Si_rmin" rmax="cb_CTD_Si_rmax" length="cb_CTD_Si_length" limit="cb_CTD_Si_limitZ" gap="cb_CTD_Si_gap"/>
<layer repeat="cb_CTD_Si_layer" vis="cb_CTD_Si_layerVis">
<slice name="Silicon_slice" material="Si" sensitive="true"/>
</layer>
</detector>
</detectors>
<readouts>
<readout name="cb_CTD_Si_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>
......@@ -243,8 +243,8 @@
</comment>
<constant name="cb_Solenoid_rmin" value="0.0 * cm"/> <comment> Central Barrel Solenoid Inner diameter </comment>
<constant name="cb_Solenoid_rmax" value="137.0 * cm"/> <comment> Central Barrel Solenoid Outer diameter </comment>
<constant name="cb_Solenoid_z" value="400.0 * cm"/>
<constant name="cb_Solenoid_shift" value="0.0 * cm"/> <comment> Central Barrel Solenoid Size in Z direction </comment>
<constant name="cb_Solenoid_z" value="400.0 * cm"/> <comment> Central Barrel Solenoid Size in Z direction </comment>
<constant name="cb_Solenoid_shift" value="0.0 * cm"/>
<constant name="Solenoid_thickness" value="400*mm"/>
<constant name="Solenoid_rmin" value="2000.0*mm"/>
......@@ -318,6 +318,22 @@
<constant name="SiliconTrackerOuterRadius" value="Solenoid_rmax/2.0"/>
<constant name="SiliconTrackerOuterBarrelLength" value="SolenoidLength/2.0"/>
<comment>
----------------------------
Central Barrel Tracker - Si
----------------------------
</comment>
<constant name="cb_CTD_Si_rmin" value="21.0 * cm"/>
<constant name="cb_CTD_Si_rmax" value="80.0 * cm"/>
<constant name="cb_CTD_Si_limitZ" value="120.0 * cm"/>
<constant name="cb_CTD_Si_length" value="SolenoidLength - cb_CTD_Si_limitZ"/>
<comment> After fix cb_Solenoid parameters </comment>
<!--
<constant name="cb_CTD_Si_length" value="cb_Solenoid_z - cb_CTD_Si_limitZ"/>
-->
<constant name="cb_CTD_Si_gap" value="5.0 * cm"/>
<constant name="cb_CTD_Si_layer" value="15"/>
<comment>
------------
Calorimeters
......
......@@ -51,6 +51,8 @@
<vis name="cb_SolenoidVis" alpha="0.4" r= "0.1" g="0.0" b="0.1" showDaughters="true" visible="true"/>
<vis name="ffi_ZDCVis" alpha="0.1" r= "0.1" g="0.0" b="1.0" showDaughters="true" visible="true"/>
<vis name="ffi_ZDCmoduleVis" alpha="1.0" r= "0.1" g="1.0" b="0.9" showDaughters="true" visible="true"/>
<vis name="cb_CTD_SiVis" alpha="0.1" r= "0.1" g="0.0" b="1.0" showDaughters="true" visible="true"/>
<vis name="cb_CTD_Si_layerVis" alpha="1.0" r= "0.9" g="1.0" b="0.1" showDaughters="true" visible="true"/>
<comment>
Deprecated colors.
......
#include <XML/Helper.h>
//////////////////////////////////
// Central Barrel Tracker Silicon
//////////////////////////////////
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.limit();
double SiLayerGap = dim.gap();
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(ffi_ZDC, createDetector)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment