diff --git a/compact/gem_tracker_endcap.xml b/compact/gem_tracker_endcap.xml deleted file mode 100644 index 224e20ae4ba653cfe1b240c9a41eb22e7030d599..0000000000000000000000000000000000000000 --- a/compact/gem_tracker_endcap.xml +++ /dev/null @@ -1,182 +0,0 @@ -<lccdd> - - <comment> Endcap Tracker </comment> - - <define> - <constant name="GEMTrackerEndcap_zmin" value="BarrelTracking_length/2.0"/> - <constant name="GEMTrackerEndcap_NLayers" value="1"/> - <constant name="GEMTrackerEndcapFoilOpeningAngle" value="30.1*degree"/> - <constant name="GEMTrackerEndcapFoilX1" value="43.0 * mm"/> - - <constant name="GEMTrackerEndcapLayer_thickness" value="ForwardTrackingGEMLength/GEMTrackerEndcap_NLayers"/> - <constant name="GEMTrackerEndcapFoil_rmin" value="GEMTrackerEndcapFoilX1/(tan(GEMTrackerEndcapFoilOpeningAngle/2.0)*2.0)"/> - <constant name="GEMTrackerEndcapFoilY" value="BarrelTracking_rmax- GEMTrackerEndcapFoil_rmin- 1.0*cm"/> - <constant name="GEMTrackerEndcapFoilX2" value="2*GEMTrackerEndcapFoilY*tan(GEMTrackerEndcapFoilOpeningAngle/2.0) + GEMTrackerEndcapFoilX1"/> - <constant name="GEMTrackerEndcapFoil_rmax" value="(GEMTrackerEndcapFoilY+GEMTrackerEndcapFoil_rmin)/(cos(GEMTrackerEndcapFoilOpeningAngle/2.0))"/> - - - // Frame parameters accoring to Kondo's sbsCrossSection.pdf file), - <constant name="GEMTrackerEndcapFrame_thickness" value="18.0 * mm"/> - <constant name="GEMTrackerEndcapFrameBotEdge_width" value="30.0 * mm"/> - <constant name="GEMTrackerEndcapFrameTopEdge_width" value="30.0 * mm"/> - <constant name="GEMTrackerEndcapFrameSideEdge_width" value=" 8.0 * mm"/> - - <comment> - From https://github.com/eic/EicToyModel/blob/master/source/eicroot/GemGeoParData.cxx - - // FIXME: put aluminum layer later as well), - mEntranceWindowMaterial ( "GemKapton"), - mEntranceWindowThickness ( 50.0 * etm::um), - - // Use evaristo.pdf p.10 for the foil parameters: - // - drift foil : 50um kapton + 3um copper) - // - GEM foil : 30um kapton + 3um copper (80% area fraction)) - // - readout foils : 30um kapton + 3um copper total) - mDriftFoilKaptonThickness ( 50.0 * etm::um), - mDriftFoilCopperThickness ( 3.0 * etm::um), - mGemFoilAreaFraction ( 0.80), - mGemFoilKaptonThickness ( 30.0 * etm::um), - mGemFoilCopperThickness ( 3.0 * etm::um), - - mReadoutG10Thickness ( 0.0 * etm::mm), - mReadoutKaptonThickness ( 30.0 * etm::um), - mReadoutCopperThickness ( 3.0 * etm::um), - - // 3mm thick Nomex honeycomb for SBS GEMs), - mReadoutSupportMaterial ( "GemNomex"), - mReadoutSupportThickness ( 3.0 * etm::mm), - - mEntranceRegionLength ( 3.0 * etm::mm), - mDriftRegionLength ( 3.0 * etm::mm), - // Assume triple GEM layout), - mFirstTransferRegionLength ( 2.0 * etm::mm), - mSecondTransferRegionLength ( 2.0 * etm::mm), - mInductionRegionLength ( 2.0 * etm::mm) - </comment> - </define> - - <limits> - </limits> - - <regions> - </regions> - - <display> - </display> - - <detectors> - <detector - id="GEMTrackerEndcap_ID" - name="GEMTrackerEndcap" - type="refdet_GEMTrackerEndcap" - readout="GEMTrackerEndcapHits" - vis="AnlRed" - reflect="false"> - <module name="GEMModule1" vis="AnlProcess_Blue"> - <trd x1="GEMTrackerEndcapFoilX1/2.0" x2="GEMTrackerEndcapFoilX2/2.0" z="GEMTrackerEndcapFoilY/2"/> - <comment> Going from HV side to readout side</comment> - <module_component thickness="0.127 * mm" material="Mylar"/> - <module_component thickness="50.0*um" material="Kapton" name="entrance_window"/> - <module_component thickness=" 3.0*mm" material="Ar10CO2" name="entrance region" /> - <module_component thickness="50.0*um" material="Kapton"/> - <module_component thickness=" 3.0*um" material="Copper"/> - <module_component thickness=" 3.0*mm" material="Ar10CO2" name="drift region"/> - <module_component thickness="30.0*um" material="Kapton" name="gem_foil"/> - <module_component thickness=" 3.0*um" material="Copper" name="gem_foil_Cu"/> - <module_component thickness=" 2.0*mm" material="Ar10CO2" name="transfer region I"/> - <module_component thickness="30.0*um" material="Kapton" name="gem_foil"/> - <module_component thickness=" 3.0*um" material="Copper" name="gem_foil_Cu"/> - <module_component thickness=" 2.0*mm" material="Ar10CO2" name="transfer region II"/> - <module_component thickness="30.0*um" material="Kapton" name="gem_foil"/> - <module_component thickness=" 3.0*um" material="Copper" name="gem_foil_Cu"/> - <module_component thickness=" 2.0*mm" material="Ar10CO2" name="induction region"/> - <module_component thickness="30.0*um" material="Kapton" name="readout" sensitive="true"/> - <module_component thickness=" 3.0*um" material="Copper" name="readout_Cu"/> - <module_component thickness="127.0*um" material="Mylar"/> - <module_component thickness="200.0*um" material="Epoxy" sensitive="true" vis="AnlProcess_Blue"/> - </module> - <module name="GEMSupportModule1" vis="AnlProcess_Blue"> - <trd x1="GEMTrackerEndcapFoilX2/2.0" x2="GEMTrackerEndcapFoilX1/2.0" z="GEMTrackerEndcapFrameBotEdge_width"/> - <module_component thickness="GEMTrackerEndcapFrame_thickness" material="Mylar"/> - </module> - <module name="GEMSupportModule2" vis="AnlProcess_Blue"> - <trd x1="GEMTrackerEndcapFrameSideEdge_width" x2="GEMTrackerEndcapFrameSideEdge_width" z="GEMTrackerEndcapFoilY/2"/> - <module_component thickness="4.0*mm" material="Mylar"/> - </module> - <layer id="1" > - <ring vis="AnlRed" - r="GEMTrackerEndcapFoil_rmin+GEMTrackerEndcapFoilY/2.0" - zstart="GEMTrackerEndcap_zmin + 0.5*GEMTrackerEndcapLayer_thickness" - nmodules="12" dz="10 * mm" module="GEMModule1" /> - <ring vis="AnlBlue" phi0="15.0*degree" - r="GEMTrackerEndcapFoil_rmin+GEMTrackerEndcapFoilY/2.0" - zstart="GEMTrackerEndcap_zmin + 0.5*GEMTrackerEndcapLayer_thickness" - nmodules="12" dz="0 * mm" module="GEMSupportModule2" /> - </layer> - </detector> - - <detector - id="GEMTrackerEndcapN_ID" - name="GEMTrackerEndcapN" - type="refdet_GEMTrackerEndcap" - readout="GEMTrackerEndcapHits" - vis="AnlRed" - reflect="true"> - <module name="GEMModule1" vis="AnlProcess_Blue"> - <trd x1="GEMTrackerEndcapFoilX1/2.0" x2="GEMTrackerEndcapFoilX2/2.0" z="GEMTrackerEndcapFoilY/2"/> - <comment> Going from HV side to readout side</comment> - <module_component thickness="0.127 * mm" material="Mylar"/> - <module_component thickness="50.0*um" material="Kapton" name="entrance_window"/> - <module_component thickness=" 3.0*mm" material="Ar10CO2" name="entrance region" /> - <module_component thickness="50.0*um" material="Kapton"/> - <module_component thickness=" 3.0*um" material="Copper"/> - <module_component thickness=" 3.0*mm" material="Ar10CO2" name="drift region"/> - <module_component thickness="30.0*um" material="Kapton" name="gem_foil"/> - <module_component thickness=" 3.0*um" material="Copper" name="gem_foil_Cu"/> - <module_component thickness=" 2.0*mm" material="Ar10CO2" name="transfer region I"/> - <module_component thickness="30.0*um" material="Kapton" name="gem_foil"/> - <module_component thickness=" 3.0*um" material="Copper" name="gem_foil_Cu"/> - <module_component thickness=" 2.0*mm" material="Ar10CO2" name="transfer region II"/> - <module_component thickness="30.0*um" material="Kapton" name="gem_foil"/> - <module_component thickness=" 3.0*um" material="Copper" name="gem_foil_Cu"/> - <module_component thickness=" 2.0*mm" material="Ar10CO2" name="induction region"/> - <module_component thickness="30.0*um" material="Kapton" name="readout" sensitive="true"/> - <module_component thickness=" 3.0*um" material="Copper" name="readout_Cu"/> - <module_component thickness="127.0*um" material="Mylar"/> - <module_component thickness="200.0*um" material="Epoxy" sensitive="true" vis="AnlProcess_Blue"/> - </module> - <module name="GEMSupportModule1" vis="AnlProcess_Blue"> - <trd x1="GEMTrackerEndcapFoilX2/2.0" x2="GEMTrackerEndcapFoilX1/2.0" z="GEMTrackerEndcapFrameBotEdge_width"/> - <module_component thickness="GEMTrackerEndcapFrame_thickness" material="Mylar"/> - </module> - <module name="GEMSupportModule2" vis="AnlProcess_Blue"> - <trd x1="GEMTrackerEndcapFrameSideEdge_width" x2="GEMTrackerEndcapFrameSideEdge_width" z="GEMTrackerEndcapFoilY/2"/> - <module_component thickness="4.0*mm" material="Mylar"/> - </module> - <layer id="1" > - <ring vis="AnlRed" - r="GEMTrackerEndcapFoil_rmin+GEMTrackerEndcapFoilY/2.0" - zstart="GEMTrackerEndcap_zmin + 0.5*GEMTrackerEndcapLayer_thickness" - nmodules="12" dz="10 * mm" module="GEMModule1" /> - <ring vis="AnlBlue" phi0="15.0*degree" - r="GEMTrackerEndcapFoil_rmin+GEMTrackerEndcapFoilY/2.0" - zstart="GEMTrackerEndcap_zmin + 0.5*GEMTrackerEndcapLayer_thickness" - nmodules="12" dz="0 * mm" module="GEMSupportModule2" /> - </layer> - </detector> - - </detectors> - - <readouts> - <readout name="GEMTrackerEndcapHits"> - <segmentation type="CartesianGridXY" grid_size_x="1.0*mm" grid_size_y="1.0*mm" /> - <id>system:8,barrel:2,layer:4,module:12,sensor:2,x:32:-16,y:-16</id> - </readout> - </readouts> - - <plugins> - </plugins> - - <fields> - </fields> -</lccdd> diff --git a/src/TrapEndcapTracker_geo.cpp b/src/TrapEndcapTracker_geo.cpp deleted file mode 100644 index 30251db0fba60c0b87b6d004185269027b129be9..0000000000000000000000000000000000000000 --- a/src/TrapEndcapTracker_geo.cpp +++ /dev/null @@ -1,144 +0,0 @@ -//========================================================================== -// AIDA Detector description implementation -//-------------------------------------------------------------------------- -// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) -// All rights reserved. -// -// For the licensing terms see $DD4hepINSTALL/LICENSE. -// For the list of contributors see $DD4hepINSTALL/doc/CREDITS. -// -// Author : M.Frank -// -//========================================================================== -// -// Specialized generic detector constructor -// -//========================================================================== -#include <map> -#include "DD4hep/DetFactoryHelper.h" - -using namespace std; -using namespace dd4hep; -using namespace dd4hep::detail; - -static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector sens) { - typedef vector<PlacedVolume> Placements; - xml_det_t x_det = e; - Material vacuum = description.vacuum(); - int det_id = x_det.id(); - string det_name = x_det.nameStr(); - bool reflect = x_det.reflect(false); - DetElement sdet(det_name, det_id); - Assembly assembly(det_name); - // Volume assembly (det_name,Box(10000,10000,10000),vacuum); - Volume motherVol = description.pickMotherVolume(sdet); - int m_id = 0, c_id = 0, n_sensor = 0; - map<string, Volume> modules; - map<string, Placements> sensitives; - PlacedVolume pv; - - assembly.setVisAttributes(description.invisible()); - sens.setType("tracker"); - - for (xml_coll_t mi(x_det, _U(module)); mi; ++mi, ++m_id) { - xml_comp_t x_mod = mi; - string m_nam = x_mod.nameStr(); - xml_comp_t trd = x_mod.trd(); - double posY; - double x1 = trd.x1(); - double x2 = trd.x2(); - double z = trd.z(); - double y1, y2, total_thickness = 0.; - xml_coll_t ci(x_mod, _U(module_component)); - for (ci.reset(), total_thickness = 0.0; ci; ++ci) total_thickness += xml_comp_t(ci).thickness(); - - y1 = y2 = total_thickness / 2; - Volume m_volume(m_nam, Trapezoid(x1, x2, y1, y2, z), vacuum); - m_volume.setVisAttributes(description.visAttributes(x_mod.visStr())); - - for (ci.reset(), n_sensor = 1, c_id = 0, posY = -y1; ci; ++ci, ++c_id) { - xml_comp_t c = ci; - double c_thick = c.thickness(); - auto comp_x1 = getAttrOrDefault(c, _Unicode(x1), x1); - auto comp_x2 = getAttrOrDefault(c, _Unicode(x2), x2); - auto comp_height = getAttrOrDefault(c, _Unicode(height), z); - - Material c_mat = description.material(c.materialStr()); - string c_name = _toString(c_id, "component%d"); - Volume c_vol(c_name, Trapezoid(comp_x1, comp_x2, c_thick / 2e0, c_thick / 2e0, comp_height), c_mat); - - c_vol.setVisAttributes(description.visAttributes(c.visStr())); - pv = m_volume.placeVolume(c_vol, Position(0, posY + c_thick / 2, 0)); - if (c.isSensitive()) { - sdet.check(n_sensor > 2, - "SiTrackerEndcap2::fromCompact: " + c_name + " Max of 2 modules allowed!"); - pv.addPhysVolID("sensor", n_sensor); - c_vol.setSensitiveDetector(sens); - sensitives[m_nam].push_back(pv); - ++n_sensor; - } - posY += c_thick; - } - modules[m_nam] = m_volume; - } - - for (xml_coll_t li(x_det, _U(layer)); li; ++li) { - xml_comp_t x_layer(li); - int l_id = x_layer.id(); - int mod_num = 1; - for (xml_coll_t ri(x_layer, _U(ring)); ri; ++ri) { - xml_comp_t x_ring = ri; - double r = x_ring.r(); - double phi0 = x_ring.phi0(0); - double zstart = x_ring.zstart(); - double dz = x_ring.dz(0); - int nmodules = x_ring.nmodules(); - string m_nam = x_ring.moduleStr(); - Volume m_vol = modules[m_nam]; - double iphi = 2 * M_PI / nmodules; - double phi = phi0; - Placements& sensVols = sensitives[m_nam]; - - for (int k = 0; k < nmodules; ++k) { - string m_base = _toString(l_id, "layer%d") + _toString(mod_num, "_module%d"); - double x = -r * std::cos(phi); - double y = -r * std::sin(phi); - DetElement module(sdet, m_base + "_pos", det_id); - pv = assembly.placeVolume(m_vol, Transform3D(RotationZYX(0, -M_PI / 2 - phi, -M_PI / 2), - Position(x, y, zstart + dz))); - pv.addPhysVolID("barrel", 1).addPhysVolID("layer", l_id).addPhysVolID("module", mod_num); - module.setPlacement(pv); - for (size_t ic = 0; ic < sensVols.size(); ++ic) { - PlacedVolume sens_pv = sensVols[ic]; - DetElement comp_elt(module, sens_pv.volume().name(), mod_num); - comp_elt.setPlacement(sens_pv); - } - - if (reflect) { - pv = - assembly.placeVolume(m_vol, Transform3D(RotationZYX(M_PI, -M_PI / 2 - phi, -M_PI / 2), - Position(x, y, -zstart - dz))); - pv.addPhysVolID("barrel", 2).addPhysVolID("layer", l_id).addPhysVolID("module", mod_num); - DetElement r_module(sdet, m_base + "_neg", det_id); - r_module.setPlacement(pv); - for (size_t ic = 0; ic < sensVols.size(); ++ic) { - PlacedVolume sens_pv = sensVols[ic]; - DetElement comp_elt(r_module, sens_pv.volume().name(), mod_num); - comp_elt.setPlacement(sens_pv); - } - } - dz = -dz; - phi += iphi; - ++mod_num; - } - } - } - pv = motherVol.placeVolume(assembly); - pv.addPhysVolID("system", det_id); - sdet.setPlacement(pv); - return sdet; -} - -// clang-format off -DECLARE_DETELEMENT(refdet_TrapEndcapTracker, create_detector) -DECLARE_DETELEMENT(refdet_GEMTrackerEndcap, create_detector)