<?xml version="1.0" encoding="UTF-8"?>
<!--DOCTYPE HDDS>

  Hall D Geometry Data Base: Barrel EM calorimeter
  *************************************************

     version 1.0: Initial version  -rtj
     version 1.2: Initial SiPM subsectoring -cx,zp
 
<HDDS specification="v1.0" xmlns="http://www.gluex.org/hdds">
-->

<section name = "BarrelEMcal"
         version = "3.0"
         date = "2007-12-08"
         author = "R.T. Jones"
         top_volume = "BCAL"
         specification = "v1.0">

<!-- Origin of BarrelEMcal is center of upstream end
     of the active region, not including the light guides. -->


  <composition name="BarrelEMcal">
    <posXYZ volume="barrelEMcal" X_Y_Z="0.0 0.0 195.0" />
    <posXYZ volume="BCSU" X_Y_Z="0.0 0.0 -10.0" />
    <posXYZ volume="BCSD" X_Y_Z="0.0 0.0 400." />
  </composition>

  <composition name="barrelEMcal" envelope="BCAL">
    <mposPhi volume="barrelModule" ncopy="48" Phi0="3.75" impliedRot="true">
      <module value="1" step="1" />
    </mposPhi>
  </composition>

  <composition name="barrelModule" envelope="BCAM">
    <apply region="nullBfield"/>
    <posXYZ volume="BCL0" />
    <posXYZ volume="BCALlayer_1" />
    <posXYZ volume="BCALlayer_2" />
    <posXYZ volume="BCALlayer_3" />
<!--
    <posXYZ volume="BCALlayer_4" />
    <posXYZ volume="BCALlayer_5" />
    <posXYZ volume="BCALlayer_6" />
-->
<!-- readout option 1: uniform segmentation in depth 
    <posXYZ volume="BCALlayer_7" />
    <posXYZ volume="BCALlayer_8" />
    <posXYZ volume="BCALlayer_9" />
    <posXYZ volume="BCALlayer_10" />
    <posXYZ volume="BCALlayer_11" />
-->
<!-- readout option 2: outer 5 layers reduced to 2 -->
    <posXYZ volume="BCALfatlayer_7" />
    <posXYZ volume="BCALfatlayer_8" />
    <posXYZ volume="BCAS" />
  </composition>

  <composition name="BCALlayer_1" envelope="BCL1">
    <mposPhi volume="BCALsector_1" ncopy="3" Phi0="-2.5"  dPhi="2.5"
                                             impliedRot="true">
      <layer value="1" />
      <sector value="1" step="1" />
    </mposPhi>
  </composition> 

  <composition name="BCALlayer_2" envelope="BCL2">
    <mposPhi volume="BCALsector_2" ncopy="3" Phi0="-2.5"  dPhi="2.5"
                                             impliedRot="true">
      <layer value="2" />
      <sector value="1" step="1" />
    </mposPhi>
  </composition>

  <composition name="BCALlayer_3" envelope="BCL3">
    <mposPhi volume="BCALsector_3" ncopy="3" Phi0="-2.5"  dPhi="2.5"
                                             impliedRot="true">
      <layer value="3" />
      <sector value="1" step="1" />
    </mposPhi>
  </composition>

<!--
  <composition name="BCALlayer_4" envelope="BCL4">
    <mposPhi volume="BCALsector_4" ncopy="4" Phi0="-2.8125"  dPhi="1.875"
                                             impliedRot="true">
      <layer value="4" />
      <sector value="1" step="1" />
    </mposPhi>
  </composition> 


  <composition name="BCALlayer_5" envelope="BCL5">
    <mposPhi volume="BCALsector_5" ncopy="4" Phi0="-2.8125"  dPhi="1.875"
                                             impliedRot="true">
      <layer value="5" />
      <sector value="1" step="1" />
    </mposPhi>
  </composition>


  <composition name="BCALlayer_6" envelope="BCL6">
    <mposPhi volume="BCALsector_6" ncopy="4" Phi0="-2.8125"  dPhi="1.875"
                                             impliedRot="true">
      <layer value="6" />
      <sector value="1" step="1" />
    </mposPhi>
  </composition>


  <composition name="BCALlayer_7" envelope="BCL7">
    <mposPhi volume="BCALsector_7" ncopy="4" Phi0="-2.8125"  dPhi="1.875"
                                             impliedRot="true">
      <layer value="7" />
      <sector value="1" step="1" />
    </mposPhi>
  </composition>

  <composition name="BCALlayer_8" envelope="BCL8">
    <mposPhi volume="BCALsector_8" ncopy="4" Phi0="-2.8125"  dPhi="1.875"
                                             impliedRot="true">
      <layer value="8" />
      <sector value="1" step="1" />
    </mposPhi>
  </composition>

  <composition name="BCALlayer_9" envelope="BCL9">
    <mposPhi volume="BCALsector_9" ncopy="4" Phi0="-2.8125"  dPhi="1.875"
                                             impliedRot="true">
      <layer value="9" />
      <sector value="1" step="1" />
    </mposPhi>
  </composition>

  <composition name="BCALlayer_10" envelope="BCLA">
    <mposPhi volume="BCALsector_10" ncopy="4" Phi0="-2.8125"  dPhi="1.875"
                                             impliedRot="true">
      <layer value="10" />
      <sector value="1" step="1" />
    </mposPhi>
  </composition>

  <composition name="BCALlayer_11" envelope="BCLB">
    <mposPhi volume="BCALsector_11" ncopy="4" Phi0="-2.8125"  dPhi="1.875"
                                             impliedRot="true">
      <layer value="11" />
      <sector value="1" step="1" />
    </mposPhi>
  </composition>
-->

  <composition name="BCALfatlayer_7" envelope="BCK7">
    <mposPhi volume="BCALfatsector_7" ncopy="2" Phi0="-1.875"  dPhi="3.75"
                                             impliedRot="true">
      <layer value="4" />
      <sector value="1" step="1" />
    </mposPhi>
  </composition>

  <composition name="BCALfatlayer_8" envelope="BCK8">
    <mposPhi volume="BCALfatsector_8" ncopy="2" Phi0="-1.875"  dPhi="3.75"
                                             impliedRot="true">
      <layer value="5" />
      <sector value="1" step="1" />
    </mposPhi>
  </composition>


  <composition name="BCALsector_1" envelope="BCS1">
    <posRPhiZ volume="BM01" />
    <posRPhiZ volume="BCN1" R_Phi_Z="67.0 0.0  202.3" />
    <posRPhiZ volume="BCU1" R_Phi_Z="67.0 0.0 -220." rot="180 0 0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="67.0 0.0  210.85" />
    <posRPhiZ volume="BCPM" R_Phi_Z="67.0 0.0 -246.25" rot="180 0 0" />
  </composition>

  <composition name="BCALsector_2" envelope="BCS2">
    <posRPhiZ volume="BM02" />
    <posRPhiZ volume="BCN2" R_Phi_Z="71.0 0.0  200." />
    <posRPhiZ volume="BCU2" R_Phi_Z="71.0 0.0 -220." rot="180 0 0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="71.0 0.0  210.85" />
    <posRPhiZ volume="BCPM" R_Phi_Z="71.0 0.0 -246.25" rot="180 0 0" />
  </composition>

  <composition name="BCALsector_3" envelope="BCS3">
    <posRPhiZ volume="BM03" />
    <posRPhiZ volume="BCN3" R_Phi_Z="75.0 0.0  202.3" />
    <posRPhiZ volume="BCU3" R_Phi_Z="75.0 0.0 -220." rot="180 0 0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="75.0 0.0  210.85" />
    <posRPhiZ volume="BCPM" R_Phi_Z="75.0 0.0 -246.25" rot="180 0 0" />
  </composition>

<!--
  <composition name="BCALsector_4" envelope="BCS4">
    <posRPhiZ volume="BM04" />
    <posRPhiZ volume="BCN4" R_Phi_Z="72.0 0.0  197.5" />
    <posRPhiZ volume="BCN4" R_Phi_Z="72.0 0.0 -197.5" rot="180 0 0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="72.0 0.0  201.0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="72.0 0.0 -201.0" rot="180 0 0" />
  </composition>

  <composition name="BCALsector_5" envelope="BCS5">
    <posRPhiZ volume="BM05" />
    <posRPhiZ volume="BCN5" R_Phi_Z="74.0 0.0  197.5" />
    <posRPhiZ volume="BCN5" R_Phi_Z="74.0 0.0 -197.5" rot="180 0 0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="74.0 0.0  201.0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="74.0 0.0 -201.0" rot="180 0 0" />
  </composition>

  <composition name="BCALsector_6" envelope="BCS6">
    <posRPhiZ volume="BM06" />
    <posRPhiZ volume="BCN6" R_Phi_Z="76.0 0.0  197.5" />
    <posRPhiZ volume="BCN6" R_Phi_Z="76.0 0.0 -197.5" rot="180 0 0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="76.0 0.0  201.0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="76.0 0.0 -201.0" rot="180 0 0" />
  </composition>

  <composition name="BCALsector_7" envelope="BCS7">
    <posRPhiZ volume="BM07" />
    <posRPhiZ volume="BCN7" R_Phi_Z="78.0 0.0  197.5" />
    <posRPhiZ volume="BCN7" R_Phi_Z="78.0 0.0 -197.5" rot="180 0 0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="78.0 0.0  201.0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="78.0 0.0 -201.0" rot="180 0 0" />
  </composition>

  <composition name="BCALsector_8" envelope="BCS8">
    <posRPhiZ volume="BM08" />
    <posRPhiZ volume="BCN8" R_Phi_Z="80.0 0.0  197.5" />
    <posRPhiZ volume="BCN8" R_Phi_Z="80.0 0.0 -197.5" rot="180 0 0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="80.0 0.0  201.0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="80.0 0.0 -201.0" rot="180 0 0" />
  </composition>

  <composition name="BCALsector_9" envelope="BCS9">
    <posRPhiZ volume="BM09" />
    <posRPhiZ volume="BCN9" R_Phi_Z="82.0 0.0  197.5" />
    <posRPhiZ volume="BCN9" R_Phi_Z="82.0 0.0 -197.5" rot="180 0 0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="82.0 0.0  201.0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="82.0 0.0 -201.0" rot="180 0 0" />
  </composition>

  <composition name="BCALsector_10" envelope="BCSA">
    <posRPhiZ volume="BM10" />
    <posRPhiZ volume="BCNA" R_Phi_Z="84.0 0.0  197.5" />
    <posRPhiZ volume="BCNA" R_Phi_Z="84.0 0.0 -197.5" rot="180 0 0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="84.0 0.0  201.0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="84.0 0.0 -201.0" rot="180 0 0" />
  </composition>

  <composition name="BCALsector_11" envelope="BCSB">
    <posRPhiZ volume="BM11" />
    <posRPhiZ volume="BCNB" R_Phi_Z="86.23 0.0  197.5" />
    <posRPhiZ volume="BCNB" R_Phi_Z="86.23 0.0 -197.5" rot="180 0 0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="86.23 0.0  201.0" />
    <posRPhiZ volume="BCPM" R_Phi_Z="86.23 0.0 -201.0" rot="180 0 0" />
  </composition>
-->

  <composition name="BCALfatsector_7" envelope="BCA7">
    <posRPhiZ volume="BMF7" />
    <posRPhiZ volume="BCO7" R_Phi_Z="79.62 0.0  204.5" />
    <posRPhiZ volume="BCU7" R_Phi_Z="79.62 0.0 -220.0" rot="180 0 0" />
  </composition>

  <composition name="BCALfatsector_8" envelope="BCA8">
    <posRPhiZ volume="BMF8" />
    <posRPhiZ volume="BCO8" R_Phi_Z="84.85 0.0  204.5" />
    <posRPhiZ volume="BCU8" R_Phi_Z="84.85 0.0 -220.0" rot="180 0 0" />
  </composition>

  <tubs name="BCAL" Rio_Z="64.2 90.0 490.0" unit_length="cm" material="Air"
                                      comment="barrel EMcal mother" />
  <tubs name="BCAM" Rio_Z="64.2 90.0 490.0" profile="-3.75 7.5"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel calorimeter module" />
  <tubs name="BCAS" Rio_Z="87.46 90.0 390.0" profile="-3.75 7.5"
                    unit_length="cm" unit_angle="deg"
                    material="Aluminum" comment="bcal module support bar" />

  <tubs name="BCL0" Rio_Z="64.2 65.0 390.0" profile="-3.75 7.5"
                    unit_length="cm" unit_angle="deg"
                    material="Aluminum" comment="bcal inside support plate" />

  <tubs name="BCL1" Rio_Z="65.0 69.0 490.0" profile="-3.75 7.5"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module layer 1" />
  <tubs name="BCS1" Rio_Z="65.0 69.0 490.0" profile="-1.25 2.5"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module sector 1" />
  <tubs name="BCL2" Rio_Z="69.0 73.0 490.0" profile="-3.75 7.5"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module layer 2" />
  <tubs name="BCS2" Rio_Z="69.0 73.0 490.0" profile="-1.25 2.5"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module sector 2" />
  <tubs name="BCL3" Rio_Z="73.0 77.0 490.0" profile="-3.75 7.5"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module layer 3" />
  <tubs name="BCS3" Rio_Z="73.0 77.0 490.0" profile="-1.25 2.5"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module sector 3" />
<!--
  <tubs name="BCL4" Rio_Z="71.0 73.0 410.0" profile="-3.75 7.5"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module layer 4" />
  <tubs name="BCS4" Rio_Z="71.0 73.0 410.0" profile="-0.9375 1.875"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module sector 4" />
  <tubs name="BCL5" Rio_Z="73.0 75.0 410.0" profile="-3.75 7.5"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module layer 5" />
  <tubs name="BCS5" Rio_Z="73.0 75.0 410.0" profile="-0.9375 1.875"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module sector 5" />
  <tubs name="BCL6" Rio_Z="75.00 77.0 410.0" profile="-3.75 7.5"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module layer 6" />
  <tubs name="BCS6" Rio_Z="75.00 77.0 410.0" profile="-0.9375 1.875"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module sector 6" />
  <tubs name="BCL7" Rio_Z="77.00 79.0 410.0" profile="-3.75 7.5"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module layer 7" />
  <tubs name="BCS7" Rio_Z="77.00 79.0 410.0" profile="-0.9375 1.875"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module sector 7" />
  <tubs name="BCL8" Rio_Z="79.00 81.0 410.0" profile="-3.75 7.5"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module layer 8" />
  <tubs name="BCS8" Rio_Z="79.00 81.0 410.0" profile="-0.9375 1.875"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module sector 8" />
  <tubs name="BCL9" Rio_Z="81.00 83.0 410.0" profile="-3.75 7.5"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module layer 9" />
  <tubs name="BCS9" Rio_Z="81.00 83.0 410.0" profile="-0.9375 1.875"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module sector 9" />
  <tubs name="BCLA" Rio_Z="83.00 85.0 410.0" profile="-3.75 7.5"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module layer 10" />
  <tubs name="BCSA" Rio_Z="83.00 85.0 410.0" profile="-0.9375 1.875"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module sector 10" />
  <tubs name="BCLB" Rio_Z="85.00 87.46 410.0" profile="-3.75 7.5"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module layer 11" />
  <tubs name="BCSB" Rio_Z="85.00 87.46 410.0" profile="-0.9375 1.875"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module sector 11" />
-->

  <tubs name="BCK7" Rio_Z="77.00 82.23 490.0" profile="-3.75 7.5"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module fat layer 7" />
  <tubs name="BCA7" Rio_Z="77.00 82.23 490.0" profile="-1.875 3.75"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module fat sector 7" />
  <tubs name="BCK8" Rio_Z="82.23 87.46 490.0" profile="-3.75 7.5"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module fat layer 8" />
  <tubs name="BCA8" Rio_Z="82.23 87.46 490.0" profile="-1.875 3.75"
                    unit_length="cm" unit_angle="deg"
                    material="Air" comment="barrel EMcal module fat sector 8" />

  <tubs name="BM01" Rio_Z="65.0 69.0 390.0" profile="-1.25 2.5"
                    unit_length="cm" unit_angle="deg"
                    material="leadScint" sensitive="true"
                    comment="barrel EMcal submodule in ring 1" />
  <tubs name="BM02" Rio_Z="69.0 73.0 390.0" profile="-1.25 2.5"
                    unit_length="cm" unit_angle="deg"
                    material="leadScint" sensitive="true"
                    comment="barrel EMcal submodule in ring 2" />
  <tubs name="BM03" Rio_Z="73.0 77.0 390.0" profile="-1.25 2.5"
                    unit_length="cm" unit_angle="deg"
                    material="leadScint" sensitive="true"
                    comment="barrel EMcal submodule in ring 3" />

<!--
  <tubs name="BM04" Rio_Z="71.0 73.0 390.0" profile="-0.9375 1.875"
                    unit_length="cm" unit_angle="deg"
                    material="leadScint" sensitive="true"
                    comment="barrel EMcal submodule in ring 4" />
  <tubs name="BM05" Rio_Z="73.0 75.0 390.0" profile="-0.9375 1.875"
                    unit_length="cm" unit_angle="deg"
                    material="leadScint" sensitive="true"
                    comment="barrel EMcal submodule in ring 5" />
  <tubs name="BM06" Rio_Z="75.00 77.0 390.0" profile="-0.9375 1.875"
                    unit_length="cm" unit_angle="deg"
                    material="leadScint" sensitive="true"
                    comment="barrel EMcal submodule in ring 6" />
  <tubs name="BM07" Rio_Z="77.00 79.0 390.0" profile="-0.9375 1.875"
                    unit_length="cm" unit_angle="deg"
                    material="leadScint" sensitive="true"
                    comment="barrel EMcal submodule in ring 7" />
  <tubs name="BM08" Rio_Z="79.00 81.0 390.0" profile="-0.9375 1.875"
                    unit_length="cm" unit_angle="deg"
                    material="leadScint" sensitive="true"
                    comment="barrel EMcal submodule in ring 8" />
  <tubs name="BM09" Rio_Z="81.00 83.0 390.0" profile="-0.9375 1.875"
                    unit_length="cm" unit_angle="deg"
                    material="leadScint" sensitive="true"
                    comment="barrel EMcal submodule in ring 9" />
  <tubs name="BM10" Rio_Z="83.00 85.0 390.0" profile="-0.9375 1.875"
                    unit_length="cm" unit_angle="deg"
                    material="leadScint" sensitive="true"
                    comment="barrel EMcal submodule in ring 10" />
  <tubs name="BM11" Rio_Z="85.00 87.46 390.0" profile="-0.9375 1.875"
                    unit_length="cm" unit_angle="deg"
                    material="leadScint" sensitive="true"
                    comment="barrel EMcal submodule in ring 11" />
-->


  <tubs name="BMF7" Rio_Z="77.00 82.23 390.0" profile="-1.875 3.75"
                    unit_length="cm" unit_angle="deg"
                    material="leadScint" sensitive="true"
                    comment="barrel EMcal submodule in fat layer 7" />
  <tubs name="BMF8" Rio_Z="82.23 87.46 390.0" profile="-1.875 3.75"
                    unit_length="cm" unit_angle="deg"
                    material="leadScint" sensitive="true"
                    comment="barrel EMcal submodule in fat layer 8" />

  <trd name="BCN1" Xmp_Ymp_Z="4.0 2.5 3.2 2.5 14.6" 
       material="Plexiglas" comment="Winston cone for layer 1"/>
  <trd name="BCN2" Xmp_Ymp_Z="4.0 2.5 3.2 2.5 14.6" 
       material="Plexiglas" comment="Winston cone for layer 2"/>
  <trd name="BCN3" Xmp_Ymp_Z="4.0 2.5 3.2 2.5 14.6" 
       material="Plexiglas" comment="Winston cone for layer 3"/>

<!--
  <trd name="BCN4" Xmp_Ymp_Z="4.0 2.5 2.66 2.5 10.0" 
       material="Plexiglas" comment="Winston cone for layer 4"/>
  <trd name="BCN5" Xmp_Ymp_Z="2.0 1.3 2.0 1.3 5.0" 
       material="Plexiglas" comment="Winston cone for layer 5"/>
  <trd name="BCN6" Xmp_Ymp_Z="2.0 1.3 2.0 1.3 5.0" 
       material="Plexiglas" comment="Winston cone for layer 6"/>
  <trd name="BCN7" Xmp_Ymp_Z="2.0 1.3 2.0 1.3 5.0" 
       material="Plexiglas" comment="Winston cone for layer 7"/>
  <trd name="BCN8" Xmp_Ymp_Z="2.0 1.3 2.0 1.3 5.0" 
       material="Plexiglas" comment="Winston cone for layer 8"/>
  <trd name="BCN9" Xmp_Ymp_Z="2.0 1.3 2.0 1.3 5.0" 
       material="Plexiglas" comment="Winston cone for layer 9"/>
  <trd name="BCNA" Xmp_Ymp_Z="2.0 1.3 2.0 1.3 5.0" 
       material="Plexiglas" comment="Winston cone for layer 9"/>
  <trd name="BCNB" Xmp_Ymp_Z="2.0 1.3 2.0 1.3 5.0" 
       material="Plexiglas" comment="Winston cone for layer 9"/>
-->

  <trd name="BCO7" Xmp_Ymp_Z="5.73 3.0 5.3 3.0 19.0" 
       material="Plexiglas" comment="light collector for fat layer 7"/>
  <trd name="BCO8" Xmp_Ymp_Z="5.73 3.0 5.3 3.0 19.0" 
       material="Plexiglas" comment="light collector for fat layer 8"/>

<!-- upstream long light guides -->
  <trd name="BCU1" Xmp_Ymp_Z="4.0 2.5 3.2 2.5 50.0" 
       material="Plexiglas" comment="Winston cone for layer 1 upstream"/>
  <trd name="BCU2" Xmp_Ymp_Z="4.0 2.5 3.2 2.5 50.0" 
       material="Plexiglas" comment="Winston cone for layer 2 upstream"/>
  <trd name="BCU3" Xmp_Ymp_Z="4.0 2.5 3.2 2.5 50.0" 
       material="Plexiglas" comment="Winston cone for layer 3 upstream"/>

  <trd name="BCU7" Xmp_Ymp_Z="5.73 3.0 5.3 3.0 50.0" 
       material="Plexiglas" comment="light collector for fat layer 7 upstream"/>
  <trd name="BCU8" Xmp_Ymp_Z="5.73 3.0 5.3 3.0 50.0" 
       material="Plexiglas" comment="light collector for fat layer 8 upstream"/>



  <box name="BCPM" X_Y_Z="2.5 2.5 2.5" 
       material="Aluminum" comment="SiPM readout module with cooler"/>

  <pcon name="BCSU" material="SignalCables" comment="upstream readout cables">
    <polyplane Rio_Z="91.8 120. -61.0" />
    <polyplane Rio_Z="88.8 120. -58.0" />
    <polyplane Rio_Z="88.8 93.0 -58.0" />
    <polyplane Rio_Z="85.0 89.2 -50.2" />
    <polyplane Rio_Z="85.0 88.0 -48." />
    <polyplane Rio_Z="85.0 88.0 -48." />
    <polyplane Rio_Z="65.0 88.0 -43." />
  </pcon>
  <pcon name="BCSD" material="SignalCables" comment="downstream readout cables">
    <polyplane Rio_Z="65.0 88.0 0.0" />
    <polyplane Rio_Z="85.0 88.0 10." />
    <polyplane Rio_Z="85.0 88.0 30." />
  </pcon>

  <!-- The following elements describe an early rendition of the GlueX
       detector simulated using a fast Monte Carlo program MCFast.  They
       are retained for future reference, do not rely on their values. -->

  <parameters name="barrelEMcal_pars" type="mcfast">
    <real_array name="rmin"	comment="upstream, downstream end inner radius"
 				values="   65.0      65.0"
				unit="cm" 	/>
    <real_array name="rmax"	comment="upstream, downstream end outer radius"
                                values="   90.0      90.0"
				unit="cm" 	/>
    <real       name="z0"	value="212.0"	comment="z coord. of midplane"
				unit="cm"	/>
    <real       name="zlen"	value="390.0"	comment="length of counters"
				unit="cm"	/>
    <reference  name="material"	value="leadScint" />
    <reference  name="active"	value="leadScint" />
    <int	name="nphi"	value="48"	comment="phi segmentation" />
    <int	name="neta"	value="1"	comment="longitudinal seg" />
    <int	name="nlayers"	value="1"	comment="radial segmentation" />
    <real       name="siga_em"	value="0.06"	comment="rootE coefficient"
				unit="cm"	/>
    <real       name="sigb_em"	value="0.01"	comment="floor term"
				unit="cm"	/>
    <real       name="siga_had"	value="0.30"	comment="rootE coefficient"
				unit="cm"	/>
    <real       name="sigb_had"	value="0.03"	comment="floor term"
				unit="cm"	/>
    <real       name="em_had_ratio" value="4.0" comment="response ratio"
				unit="cm"	/>
  </parameters>

  <mcfast model="EMCal" template="db/emcal.db" parameters="barrelEMcal_pars">
    <string     name="name"	value="BCAL"	/>
    <string     name="shape"	value="TUBE"	/>
    <int	name="type"	value="1"	/>
  </mcfast>

</section>

<!-- </HDDS> -->