Skip to content
Snippets Groups Projects
Select Git revision
  • a8547b93ce93c1c90dc5871da8e2e28189ed912e
  • master default
  • yezhenyu-btof-20210520
  • 41-detailed-zero-degree-calorimeter-hcal
  • testBranchRobin
  • 73-pion-rejection-yr-benchmark
  • default_visibilities
  • view_update
  • wdconinc-ecal-testing
  • 65-trigger-detector-benchmarks
  • upstream_trigger
  • 14-implement-cb_vtx_endcaps
  • 28-implement-ffi_offm_trk-2
  • 32-implement-ffi_rpot_d2
  • 27-implement-fi_b0_emcal
  • 15-implement-cb_sidiscs
  • 24-implement-ci_hcal
  • fix_ci_GEM
  • 8-implement-cb_ctd
  • Implement_AMEGOX_layers
  • yezhenyu_work_master
  • v0.2.0
  • v0.1.0
23 results

cb_CTD_Si.cpp

Blame
  • jihee.kim's avatar
    Jihee Kim authored
    a8547b93
    History
    cb_CTD_Si.cpp 1.20 KiB
    #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.zmax();
      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(cb_CTD_Si, createDetector)