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

Added envelop volume

parent d3450678
No related branches found
No related tags found
1 merge request!32Resolve "Implement ce_GEM"
Pipeline #7959 passed with stages
in 2 minutes and 22 seconds
<lccdd>
<comment> Electron endcap GEM tracking </comment>
<define>
</define>
<limits>
</limits>
<regions>
</regions>
<display>
</display>
<detectors>
<detector id="ce_GEM_ID" name="ce_GEM" type="ce_GEM" readout="ce_GEM_Hits" vis="ce_GEMVis" insideTrackingVloume="true">
<dimensions rmin="ce_GEM_rmin" rmax="ce_GEM_rmax" length="ce_GEM_length"/>
<position x="ce_GEM_x_pos" y="ce_GEM_y_pos" z="ce_GEM_z_pos"/>
<layer repeat="ce_GEM_layer" vis="ce_GEM_layerVis">
<slice name="Ar10C02_slice" material="Ar10CO2" sensitive="true"/>
</layer>
</detector>
</detectors>
<readouts>
<readout name="ce_GEM_Hits">
<segmentation type="CartesianGridXY" grid_size_x="1.0*mm" grid_size_y="1.0*mm" />
<id>system:8,layer:8,x:32:-16,y:-16</id>
</readout>
</readouts>
<plugins>
</plugins>
<fields>
</fields>
</lccdd>
......@@ -130,7 +130,7 @@
===================
Unused IDs: 75-99
TBD
TBD
</comment>
<comment>
......@@ -189,10 +189,12 @@
=====================================
Modular RICH ID: 130
Unused IDs: 131-139
Electron Endcap GEM tracking ID: 131
Unused IDs: 132-139
</comment>
<constant name="ce_MRICH_ID" value="130"/>
<constant name="ce_GEM_ID" value="131"/>
<comment>
=====================================
......@@ -531,8 +533,18 @@
<constant name="ce_MRICHLength" value="15*cm"/>
<constant name="ce_MRICHZMin" value="-EcalEndcap_zmin+10.*cm"/>
<comment>
------------------
ce_GEM Parameters
------------------
</comment>
<constant name="ce_GEM_rmin" value="0.0 * cm"/>
<constant name="ce_GEM_rmax" value="45.0 * cm + 50.0 * cm"/>
<constant name="ce_GEM_length" value="30.0 * cm"/>
<constant name="ce_GEM_x_pos" value="0.0 * cm"/>
<constant name="ce_GEM_y_pos" value="0.0 * cm"/>
<constant name="ce_GEM_z_pos" value="-SolenoidLength/2.0 + ce_GEM_length/2.0"/>
<constant name="ce_GEM_layer" value="8"/>
</define>
......@@ -53,6 +53,7 @@
<vis name="ffi_ZDCmoduleVis" alpha="1.0" r= "0.1" g="1.0" b="0.9" showDaughters="true" visible="true"/>
<vis name="cb_CTDVis" 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"/>
<vis name="ce_GEMVis" alpha="0.1" r= "0.1" g="0.0" b="1.0" showDaughters="true" visible="true"/>
<comment>
Deprecated colors.
......
......@@ -186,4 +186,12 @@
<composite n="4" ref="O"/>
</material>
<material name="Ar10CO2">
<D type="density" value="1.802" unit="mg / cm3"/>
<composite n="0.891" ref="Argon"/>
<!--<composite n="0.109" ref="CarbonDioxide"/>-->
<composite n="0.036" ref="C"/>
<composite n="0.073" ref="O"/>
</material>
</materials>
......@@ -114,6 +114,7 @@
<include ref="reference_detector/vertex_tracker.xml"/>
<include ref="compact/silicon_tracker.xml"/>
-->
<!--
<include ref="compact/cb_CTD_Si.xml"/>
<include ref="ip6/beampipe.xml"/>
<include ref="compact/ffi_ZDC.xml"/>
......@@ -122,11 +123,15 @@
<include ref="compact/hcal.xml"/>
<include ref="compact/forward_rich.xml"/>
<include ref="compact/ce_mrich.xml"/>
<!--
<include ref="compact/roman_pots.xml"/>
-->
<include ref="eic/forward_ion_beamline.xml"/>
<include ref="compact/ce_GEM.xml"/>
<!--
<include ref="compact/roman_pots.xml"/>
-->
<!--
<include ref="eic/forward_ion_beamline.xml"/>
-->
<!--
-->
<detectors>
......
#include <XML/Helper.h>
//////////////////////////////////
// Electron Endcap GEM Tracking
//////////////////////////////////
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 ce_GEM_GVol_Solid(RIn, ROut, SizeZ / 2.0, 0., 360.0 * deg);
Volume detVol("ce_GEM_GVol_Logic", ce_GEM_GVol_Solid, Vacuum);
detVol.setVisAttributes(desc.visAttributes(x_det.visStr()));
// Construct Layers
xml_comp_t x_layer = x_det.child(_U(layer));
const int repeat = x_layer.repeat();
xml_comp_t x_slice = x_layer.child(_U(slice));
Material slice_mat = desc.material(x_slice.materialStr());
// Loop over layers
//for(int i = 0; i < repeat; i++) {
// layerRIn[i] = RIn + (SiLayerGap * i);
// layerROut[i] = RIn + (0.01 + SiLayerGap * i);
// if (layerROut[i] > ROut)
// continue;
// string logic_layer_name = detName + _toString(i, "_Logic_lay_%d");
// Volume layerVol(logic_layer_name,Tube(layerRIn[i], layerROut[i], SizeZ / 2.0, 0.0, 360.0 * deg), slice_mat);
// layerVol.setVisAttributes(desc,x_layer.visStr());
// sens.setType("tracker");
// layerVol.setSensitiveDetector(sens);
// Position layer_pos = Position(0.0, 0.0, 0.0);
// PlacedVolume layerPV = detVol.placeVolume(layerVol, layer_pos);
// layerPV.addPhysVolID("layer", i+1);
//}
DetElement det(detName, detID);
Volume motherVol = desc.pickMotherVolume(det);
Transform3D tr(RotationZYX(0.0, 0.0, 0.0), Position(pos.x(), pos.y(), pos.z()));
PlacedVolume detPV = motherVol.placeVolume(detVol, tr);
detPV.addPhysVolID("system", detID);
det.setPlacement(detPV);
return det;
}
DECLARE_DETELEMENT(ce_GEM, createDetector)
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