Skip to content
Snippets Groups Projects
Commit 57cf00b9 authored by Marshall Scott's avatar Marshall Scott
Browse files

Changed .xml files and ci_GEM.cpp

parent 86aba630
No related branches found
No related tags found
No related merge requests found
Pipeline #7947 failed
This commit is part of merge request !12. Comments created here will be created in the context of that merge request.
<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd">
>
<!-- Some information about detector -->
<info name="Central Ion GEM" title="Central Ion GEM"
author="Marshall Scott"
url="https://eicweb.phy.anl.gov/EIC/detectors/reference_detector.git"
status="development"
version="v1 2021-03-23">
<comment>Central Ion GEM</comment>
</info>
<!-- Use DD4hep elements and materials definitions -->
<includes>
</includes>
<!-- Define the dimensions of the world volume
<define>
<constant name="ci_GEM_id" value="1">
<constant name="ci_GEM_rin" value="10 * cm">
<constant name="ci_GEM_rout" value="95 * cm">
<constant name="ci_GEM_sizez" value="30 * cm">
<constant name="ci_GEM_shiftz" value="0 * cm">
<constant name="ci_GEM_posz" value="0 * cm">
<constant name="ci_GEM_posx" value="0 * cm">
<constant name="ci_GEM_nlayers" value="8">
</define>
-->
<limits>
</limits>
<regions>
</regions>
<display>
</display>
<!-- Define detector -->
<detectors>
<comment>
Central Ion GEM
</comment>
<detector id="ci_GEM_id" name="ci_GEM" type="ci_GEM" insideTrackingVolume="false" vis="ci_GEMVis">
<material name="Ar10CO2"/>
<dimensions rmin="ci_GEM_rin" rmax="ci_GEM_rout" sizez="ci_GEM_sizez" delta="ci_GEM_shiftz" z="ci_GEM_posz" x="ci_GEM_posx" nlayers="ci_GEM_nlayers"/>
<layer id="0" z="-sizez * 0.5 + (5 + 3. * id) * cm" inner_r="rmin + (1. + 0.5 * id) * cm" outer_r="rmax + (-25. + 2. * id) * cm" dz="1 * cm" />
<layer id="1" z="-sizez * 0.5 + (5 + 3. * id) * cm" inner_r="rmin + (1. + 0.5 * id) * cm" outer_r="rmax + (-25. + 2. * id) * cm" dz="1 * cm" />
<layer id="2" z="-sizez * 0.5 + (5 + 3. * id) * cm" inner_r="rmin + (1. + 0.5 * id) * cm" outer_r="rmax + (-25. + 2. * id) * cm" dz="1 * cm" />
<layer id="3" z="-sizez * 0.5 + (5 + 3. * id) * cm" inner_r="rmin + (1. + 0.5 * id) * cm" outer_r="rmax + (-25. + 2. * id) * cm" dz="1 * cm" />
<layer id="4" z="-sizez * 0.5 + (5 + 3. * id) * cm" inner_r="rmin + (1. + 0.5 * id) * cm" outer_r="rmax + (-25. + 2. * id) * cm" dz="1 * cm" />
<layer id="5" z="-sizez * 0.5 + (5 + 3. * id) * cm" inner_r="rmin + (1. + 0.5 * id) * cm" outer_r="rmax + (-25. + 2. * id) * cm" dz="1 * cm" />
<layer id="6" z="-sizez * 0.5 + (5 + 3. * id) * cm" inner_r="rmin + (1. + 0.5 * id) * cm" outer_r="rmax + (-25. + 2. * id) * cm" dz="1 * cm" />
<layer id="7" z="-sizez * 0.5 + (5 + 3. * id) * cm" inner_r="rmin + (1. + 0.5 * id) * cm" outer_r="rmax + (-25. + 2. * id) * cm" dz="1 * cm" />
</detector>
</detectors>
<plugins>
</plugins>
\ No newline at end of file
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
<comment> <comment>
=================== ===================
(75-99 Reserved IDs (75-99) Reserved IDs
=================== ===================
Unused IDs: 75-99 Unused IDs: 75-99
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
<comment> <comment>
===================================== =====================================
(110-119Hadronic Calorimeter (110-119) Hadronic Calorimeter
===================================== =====================================
HCal subsystem ID: 110 HCal subsystem ID: 110
...@@ -467,6 +467,38 @@ ...@@ -467,6 +467,38 @@
<constant name="ce_MRICHLength" value="15*cm"/> <constant name="ce_MRICHLength" value="15*cm"/>
<constant name="ce_MRICHZMin" value="-EcalEndcap_zmin+10.*cm"/> <constant name="ce_MRICHZMin" value="-EcalEndcap_zmin+10.*cm"/>
<comment>
--------------------------
Central Ion HCal Parameters
--------------------------
</comment>
<constant name="ci_HCAL_id" value="1"/>
<constant name="ci_HCAL_rin" value="0 * cm"/>
<constant name="ci_HCAL_rout" value="300 * cm"/>
<constant name="ci_HCAL_sizez" value="160 * cm"/>
<constant name="ci_HCAL_shiftz" value="5 * cm"/>
<constant name="ci_HCAL_posz" value="0 * cm"/>
<constant name="ci_HCAL_nlayers" value="20"/>
<constant name="ci_HCAL_lay_rin" value="80 * cm"/>
<constant name="ci_HCAL_lay_rout" value="ci_HCAL_rout - 1 * cm"/>
<constant name="ci_HCAL_lay_thickness" value="2* cm"/>
<constant name="ci_HCAL_lay_gapz" value="2* cm"/>
<comment>
--------------------------
Central Ion GEM Parameters
--------------------------
</comment>
<constant name="ci_GEM_id" value="1">
<constant name="ci_GEM_rin" value="10 * cm">
<constant name="ci_GEM_rout" value="95 * cm">
<constant name="ci_GEM_sizez" value="30 * cm">
<constant name="ci_GEM_shiftz" value="0 * cm">
<constant name="ci_GEM_posz" value="0 * cm">
<constant name="ci_GEM_posx" value="0 * cm">
<constant name="ci_GEM_nlayers" value="8">
......
...@@ -50,6 +50,9 @@ ...@@ -50,6 +50,9 @@
<vis name="cb_SolenoidVis" alpha="0.4" r= "0.1" g="0.0" b="0.1" showDaughters="true" visible="true"/> <vis name="cb_SolenoidVis" alpha="0.4" r= "0.1" g="0.0" b="0.1" showDaughters="true" visible="true"/>
<vis name="ci_GEMVis" r= "0.8" g="0.4" b="0.3" alpha="0.8" showDaughters="true" visible="true"/>
<vis name="ci_HCALVis" r= "0.6" g="0" b="0.6" alpha="1.0" showDaughters="true" visible="true"/>
<comment> <comment>
Deprecated colors. Deprecated colors.
</comment> </comment>
......
...@@ -75,24 +75,22 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens ...@@ -75,24 +75,22 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens
//Adding layers to placed volume //Adding layers to placed volume
xml_comp_t x_layer = detElem.child(_U(layer)); xml_comp_t x_layer = detElem.child(_U(layer));
for (int layerNum = 0; layerNum < Nlayers; layerNum++){ for (int lNum = 0; lNum < Nlayers; lNum++){
std::string layer_name = detName + _toString(layerNum, "_layer%d"); std::string layer_name = detName + _toString(lNum, "_layer%d");
double lrmin, lrmax, lz; double lrmin, lrmax, lz;
lrmin = RIn + (1.0 + 0.5 * layerNum) * dd4hep::cm; lrmin = RIn + (1.0 + 0.5 * lNum) * dd4hep::cm;
lrmax = ROut + (-25.0 + 2.0 * layerNum) * dd4hep::cm; lrmax = ROut + (-25.0 + 2.0 * lNum) * dd4hep::cm;
lz = SizeZ * 0.5 + (5.0 + 3. * layerNum) * dd4hep::cm; lz = SizeZ * 0.5 + (5.0 + 3. * lNum) * dd4hep::cm;
Volume layer_vol(layer_name, Tube(lrmin, lrmax, 1.0 * dd4hep::cm), mat); Volume layer_vol(layer_name, Tube(lrmin, lrmax, 1.0 * dd4hep::cm), mat);
Position layer_pos(0, 0, lz); Position layer_pos(0, 0, lz);
DetElement layer(det, layer_name, detID); DetElement layer(det, layer_name, detID);
layer.setVisAttributes(desc.visAttributes(detElem.visStr())); layer_vol.setVisAttributes(desc.visAttributes(detElem.visStr()));
//layer.setAttributes(desc, layer_vol, desc.region(), desc.limits(), );//(region, limits, visable). //layer.setAttributes(desc, layer_vol, desc.region(), desc.limits(), );//(region, limits, visable).
PlacedVolume layer_phv = detVol.placeVolume(layer_vol, layer_pos); PlacedVolume layer_phv = detVol.placeVolume(layer_vol, layer_pos);
layer_phv.addPhysVolID("layer", layerNum); layer_phv.addPhysVolID("layer", lNum);
layer.setPlacement(layer_phv); layer.setPlacement(layer_phv);
layerNum++;
} }
DetElement det(detName, detID);
return det; return det;
} }
// clang-format off // clang-format off
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment