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

Added envelope volume

parent 1da9e11c
No related branches found
No related tags found
No related merge requests found
Pipeline #8060 failed
<lccdd>
<comment> Central Barrel Vertex Detector </comment>
<define>
</define>
<limits>
</limits>
<regions>
</regions>
<display>
</display>
<detectors>
<detector id="cb_VTX_ID" name="cb_VTX" type="cb_VTX" readout="cb_VTX_Hits" vis="cb_VTXVis" insideTrackingVloume="true">
<dimensions rmin="cb_VTX_rmin" rmax="cb_VTX_rmax" length="cb_VTX_length"/>
<position x="cb_VTX_x_pos" y="cb_VTX_y_pos" z="cb_VTX_z_pos"/>
</detector>
</detectors>
<readouts>
<readout name="cb_VTX_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>
......@@ -331,6 +331,14 @@
<constant name="VertexTrackerOuterRadius" value="90.0*mm"/>
<constant name="VertexTrackerOuterBarrelLength" value="400.0*mm"/>
<constant name="cb_VTX_rmin" value="33.0*mm"/>
<constant name="cb_VTX_rmax" value="SiliconTrackerInnerRadius - 5.0*mm"/>
<constant name="cb_VTX_length" value="SiliconTrackerInnerBarrelLength"/>
<constant name="cb_VTX_x_pos" value="0.0*mm"/>
<constant name="cb_VTX_y_pos" value="0.0*mm"/>
<constant name="cb_VTX_z_pos" value="0.0*mm"/>
<comment>
--------------------------
......
......@@ -55,6 +55,7 @@
<vis name="cb_CTD_Si_layerVis" alpha="1.0" r= "0.9" g="1.0" b="0.1" showDaughters="true" visible="true"/>
<vis name="ce_GEMVis" alpha="0.1" r= "0.1" g="0.0" b="1.0" showDaughters="true" visible="true"/>
<vis name="cb_GEM_layerVis" alpha="0.8" r= "0.8" g="0.4" b="0.3" showDaughters="true" visible="true"/>
<vis name="cb_VTXVis" alpha="0.1" r= "0.1" g="0.0" b="1.0" showDaughters="true" visible="true"/>
<comment>
Deprecated colors.
......
......@@ -121,7 +121,7 @@
<include ref="compact/ce_mrich.xml"/>
<include ref="compact/ce_GEM.xml"/>
<include ref="compact/ffi_ZDC.xml"/>
<include ref="compact/cb_VTX.xml"/>
<!--
<include ref="compact/forward_rich.xml"/>
<include ref="compact/hcal.xml"/>
......
#include <XML/Helper.h>
#include "DDRec/Surface.h"
#include "DDRec/DetectorData.h"
#include "DD4hep/OpticalSurfaces.h"
#include "DD4hep/DetFactoryHelper.h"
#include "DD4hep/Printout.h"
//////////////////////////////////
// Central Barrel Vertex Detector
//////////////////////////////////
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();
xml_dim_t pos = x_det.position();
Material Vacuum = desc.material("Vacuum");
// Create Global Volume
Tube cb_VTX_GVol_Solid(RIn, ROut, SizeZ / 2.0, 0., 360.0 * deg);
Volume detVol("cb_VTX_GVol_Logic", cb_VTX_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, pos.z()));
PlacedVolume detPV = motherVol.placeVolume(detVol, tr);
detPV.addPhysVolID("system", detID);
detPV.addPhysVolID("barrel", 1);
det.setPlacement(detPV);
return det;
}
DECLARE_DETELEMENT(cb_VTX, createDetector)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment