Skip to content
Snippets Groups Projects
Commit 845c6a42 authored by Marshall Scott's avatar Marshall Scott Committed by Jihee Kim
Browse files

Resolve "Cleanup DIRC construction"

parent 5d5bedaa
No related branches found
No related tags found
No related merge requests found
...@@ -268,10 +268,9 @@ ...@@ -268,10 +268,9 @@
<include ref="compact/tof_barrel.xml"/> <include ref="compact/tof_barrel.xml"/>
<!-- <!--include ref="compact/rwell_tracker_barrel.xml"-->
<include ref="compact/rwell_tracker_barrel.xml"/>
-->
<include ref="compact/cb_DIRC.xml"/> <include ref="compact/cb_DIRC.xml"/>
<!-- When changing magnet, also select dimensions in definitions.xml. --> <!-- When changing magnet, also select dimensions in definitions.xml. -->
<include ref="compact/solenoid.xml"/> <include ref="compact/solenoid.xml"/>
......
...@@ -23,8 +23,20 @@ ...@@ -23,8 +23,20 @@
<detectors> <detectors>
<detector id="BarrelDIRC_ID" name="cb_DIRC" type="cb_DIRC" readout="DIRCHits" vis="AnlTeal"> <detector id="BarrelDIRC_ID" name="cb_DIRC" type="cb_DIRC" readout="DIRCHits" vis="AnlTeal">
<dimensions rmin="cb_DIRC_rmin" rmax="cb_DIRC_rmax" length="cb_DIRC_length"/> <dimensions rmin="cb_DIRC_rmin" rmax="cb_DIRC_rmax" length="cb_DIRC_length" radius="DIRCRadius" dx="DIRCBars_DX" dy="DIRCBars_DY" number="DIRCNum" deltaphi="DIRCDPhi"/>
<position x="0" y="0" z="DIRCOffset"/> <position x="0" y="0" z="DIRCOffset"/>
<module name="Module0" R="DIRCRadius" phi="0*DIRCDPhi" />
<module name="Module1" R="DIRCRadius" phi="1*DIRCDPhi" />
<module name="Module2" R="DIRCRadius" phi="2*DIRCDPhi" />
<module name="Module3" R="DIRCRadius" phi="3*DIRCDPhi" />
<module name="Module4" R="DIRCRadius" phi="4*DIRCDPhi" />
<module name="Module5" R="DIRCRadius" phi="5*DIRCDPhi" />
<module name="Module6" R="DIRCRadius" phi="6*DIRCDPhi" />
<module name="Module7" R="DIRCRadius" phi="7*DIRCDPhi" />
<module name="Module8" R="DIRCRadius" phi="8*DIRCDPhi" />
<module name="Module9" R="DIRCRadius" phi="9*DIRCDPhi" />
<module name="Module10" R="DIRCRadius" phi="10*DIRCDPhi" />
<module name="Module11" R="DIRCRadius" phi="11*DIRCDPhi" />
</detector> </detector>
</detectors> </detectors>
......
...@@ -632,6 +632,54 @@ ...@@ -632,6 +632,54 @@
</comment> </comment>
<constant name="DIRCLength" value="CentralTracking_length + BackwardPIDLength"/> <constant name="DIRCLength" value="CentralTracking_length + BackwardPIDLength"/>
<constant name="DIRCOffset" value="(CentralTracking_length - DIRCLength)/2.0"/> <constant name="DIRCOffset" value="(CentralTracking_length - DIRCLength)/2.0"/>
<constant name="DIRCRadius" value="83.65*cm"/>
<constant name="DIRCBars_DX" value="1.7*cm"/>
<constant name="DIRCBars_DY" value="42.*cm"/>
<constant name="DIRCNum" value="2*Pi*DIRCRadius/DIRCBars_DY"/>
<constant name="DIRCDPhi" value="DIRCBars_DY/DIRCRadius"/>
<comment>
----------------------
Zero Degree Parameters
----------------------
</comment>
<comment> BeamLines: IP6 </comment>
<constant name="ffi_ZDC_z_pos" value="3800.0 * cm"/>
<constant name="ffi_ZDC_x_pos" value="ffi_ZDC_z_pos * ionCrossingAngle"/> <comment> original value="90.0 * cm" </comment>
<constant name="ffi_ZDC_y_pos" value="0.0 * cm"/>
<constant name="ffi_ZDC_rotateX_angle" value="0.0 * rad"/>
<constant name="ffi_ZDC_rotateY_angle" value="-0.0125 * rad"/>
<constant name="ffi_ZDC_rotateZ_angle" value="0.0 * rad"/>
<comment> BeamLines: IP8 </comment>
<!--
<constant name="ffi_ZDC_x_pos" value="127.0 * cm"/>
<constant name="ffi_ZDC_y_pos" value="0.0 * cm"/>
<constant name="ffi_ZDC_z_pos" value="3600.0 * cm"/>
<constant name="ffi_ZDC_rotateX_angle" value="0.0 * rad"/>
<constant name="ffi_ZDC_rotateY_angle" value="-0.025 * rad"/>
<constant name="ffi_ZDC_rotateZ_angle" value="0.0 * rad"/>
-->
<comment> Global parameters </comment>
<constant name="ffi_ZDC_width" value="60.0 * cm"/>
<constant name="ffi_ZDC_thickness" value="200.0 * cm"/>
<comment> Original Global parameters </comment>
<!--
<constant name="ffi_ZDC_thickness" value="250.0 * cm"/>
-->
<constant name="ffi_ZDC_ECAL_thickness" value="30.0 * cm"/>
<constant name="ffi_ZDC_ECAL_inner_radius" value="0.0 * cm"/>
<constant name="ffi_ZDC_ECAL_outer_radius" value="60.0 * cm"/>
<constant name="ffi_ZDC_ECAL_width" value="5.0 * cm"/>
<constant name="ffi_ZDC_ECAL_gap" value="5.0 * mm"/>
<constant name="ffi_ZDC_ECAL_ntower" value="10"/>
<comment> Original number of towers parameter </comment>
<!--
<constant name="ffi_ZDC_ECAL_ntower" value="20"/>
-->
>>>>>>> 8c0ea6ff318b7d28c2c1554f70fe003a2949c34b
<comment> <comment>
----------------------- -----------------------
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "DDRec/DetectorData.h" #include "DDRec/DetectorData.h"
#include "DDRec/Surface.h" #include "DDRec/Surface.h"
#include <XML/Helper.h> #include <XML/Helper.h>
#include "XML/Layering.h"
////////////////////////////////// //////////////////////////////////
// Central Barrel DIRC // Central Barrel DIRC
////////////////////////////////// //////////////////////////////////
...@@ -24,6 +25,7 @@ static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens) ...@@ -24,6 +25,7 @@ static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens)
double SizeZ = dim.length(); double SizeZ = dim.length();
Material Vacuum = desc.material("Vacuum"); Material Vacuum = desc.material("Vacuum");
Material mat = desc.material("Quartz");
Tube cb_DIRC_Barrel_GVol_Solid(RIn, ROut, SizeZ / 2.0, 0., 360.0 * deg); Tube cb_DIRC_Barrel_GVol_Solid(RIn, ROut, SizeZ / 2.0, 0., 360.0 * deg);
Volume detVol("cb_DIRC_GVol_Solid_Logic", cb_DIRC_Barrel_GVol_Solid, Vacuum); Volume detVol("cb_DIRC_GVol_Solid_Logic", cb_DIRC_Barrel_GVol_Solid, Vacuum);
detVol.setVisAttributes(desc.invisible()); detVol.setVisAttributes(desc.invisible());
...@@ -40,15 +42,12 @@ static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens) ...@@ -40,15 +42,12 @@ static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens)
// DIRC Bars // DIRC Bars
////////////////// //////////////////
double dR = 83.65 * cm; double dR = dim.radius();
double cb_DIRC_bars_DZ = SizeZ;
double cb_DIRC_bars_DZ = SizeZ; double cb_DIRC_bars_DY = dim.dy();
double cb_DIRC_bars_DY = 42. * cm; double cb_DIRC_bars_DX = dim.dx();
double cb_DIRC_bars_DX = 1.7 * cm; int NUM = dim.number();
double myL = 2 * M_PI * dR; double cb_DIRC_bars_DPhi = dim.deltaphi();
int NUM = myL / cb_DIRC_bars_DY;
double cb_DIRC_bars_deltaphi = 2 * 3.1415926 / NUM;
Material cb_DIRC_bars_Material = desc.material("Quartz"); Material cb_DIRC_bars_Material = desc.material("Quartz");
...@@ -58,15 +57,14 @@ static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens) ...@@ -58,15 +57,14 @@ static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens)
sens.setType("photoncounter"); sens.setType("photoncounter");
cb_DIRC_bars_Logic.setSensitiveDetector(sens); cb_DIRC_bars_Logic.setSensitiveDetector(sens);
for (int ia = 0; ia < NUM; ia++) { int count = 0;
double phi = (ia * (cb_DIRC_bars_deltaphi)); for (xml_coll_t mod(x_det, _U(module)); mod; ++mod) {
double x = -dR * cos(phi); xml_comp_t x_mod = mod;
double y = -dR * sin(phi); Transform3D tr(RotationZ(x_mod.phi()), Position(-x_mod.R() * cos(x_mod.phi()), -x_mod.R() * sin(x_mod.phi()), 0));
Transform3D tr(RotationZ(cb_DIRC_bars_deltaphi * ia), Position(x, y, 0));
PlacedVolume barPV = detVol.placeVolume(cb_DIRC_bars_Logic, tr); PlacedVolume barPV = detVol.placeVolume(cb_DIRC_bars_Logic, tr);
barPV.addPhysVolID("module", ia); barPV.addPhysVolID("module", count++);
} }
return det; return det;
} }
......
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