Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • EIC/detectors/athena
  • zwzhao/athena
  • FernandoTA/athena
  • palspeic/athena
4 results
Show changes
Showing
with 1132 additions and 228 deletions
<lccdd>
<comment> MRICH (alternative design) </comment>
<define>
<constant name="MRICH_rmin" value="10*cm"/>
<constant name="MRICH_rmax" value="BackwardPIDRegion_rmax"/>
<constant name="MRICH_length" value="BackwardPIDRegion_length"/>
<constant name="MRICH_zmin" value="BackwardPIDRegion_zmin"/>
<constant name="MRICHAerogel_thickness" value="30.0*mm"/>
<constant name="MRICHAerogel_width" value="126.5*mm"/>
<constant name="MRICHFoam_thickness" value="2*mm"/>
<constant name="MRICHFresnelLens_thickness" value="0.06*inch"/>
<constant name="MRICHAerogelLensGap_thickness" value="2*mm"/>
<constant name="MRICHPhotoDet_thickness" value="1.5*mm"/>
<constant name="MRICHPhotoDet_length" value="48.5*mm"/>
<constant name="MRICHGlassWindow_width" value="103.5*mm"/>
<constant name="MRICHGlassPhotoDet_thickness" value="5.0*mm"/>
<constant name="MRICHPhotoDetMCPlate_thickness" value="0.3*mm"/> <!-- FIXME: should be 1.2*mm with PyrexGlass25 -->
<constant name="MRICHPhotoDetAnode_thickness" value="3.8*mm"/>
<constant name="MRICHPhotoDetPCB_thickness" value="2.0*mm"/>
<constant name="MRICHPhotoDetCopper_thickness" value="0.1*mm"/>
<constant name="MRICHPhotoDetKapton_thickness" value="0.2*mm"/>
<constant name="MRICHRearExtraSpace_thickness" value="0.3*mm"/>
<constant name="MRICHLensPhotoDet_length" value="136.4*mm"/>
<constant name="MRICHFresnelLensEffectiveDiameter" value="6.0*inch"/>
<constant name="MRICHFresnelLensGroove_pitch" value="inch/125"/>
<constant name="MRICHCarbonFrame_thickness" value="1.0*mm"/>
<constant name="MRICHCarbonFrame_width" value="MRICHAerogel_width+2.0*MRICHFoam_thickness + 2.0*MRICHCarbonFrame_thickness"/>
<constant name="MRICHModules_nx" value="floor((MRICH_rmax-MRICH_rmin)/MRICHCarbonFrame_width)"/>
<constant name="MRICHModules_ny" value="floor((MRICH_rmax-MRICH_rmin)/MRICHCarbonFrame_width)"/>
<constant name="MRICHCarbonFrame_length"
value="MRICHAerogel_thickness
+ 2.0*MRICHCarbonFrame_thickness
+ 2.0*MRICHFoam_thickness
+ MRICHAerogelLensGap_thickness
+ MRICHFresnelLens_thickness
+ MRICHLensPhotoDet_length
+ MRICHGlassPhotoDet_thickness
+ 2.0*MRICHPhotoDetMCPlate_thickness
+ MRICHPhotoDetAnode_thickness
+ MRICHPhotoDetPCB_thickness
+ MRICHPhotoDetCopper_thickness
+ MRICHPhotoDetKapton_thickness
+ MRICHRearExtraSpace_thickness "/>
</define>
<limits>
</limits>
<regions>
</regions>
<display>
</display>
<detectors>
<detector id="MRICH_ID" name="MRICH" type="athena_MRICH"
readout="MRICHHits"
reflect="true"
projective="false"
vis="InvisibleWithDaughters"
material="Air">
<dimensions rmin="MRICH_rmin" rmax="MRICH_rmax" length="abs(MRICH_length)" zmin="MRICH_zmin"/>
<envelope thickness="MRICHCarbonFrame_thickness" material="CarbonFiber"/>
<module name="MRICH_module1"
vis="InvisibleWithDaughters"
width="MRICHCarbonFrame_width"
height="MRICHCarbonFrame_width"
length="MRICHCarbonFrame_length">
<aerogel vis="MRICH_aerogel_vis"
length="MRICHAerogel_thickness"
width="MRICHAerogel_width"
material="AerogelOptical">
<frame vis="MRICH_frame_vis" thickness="MRICHFoam_thickness" material="PolystyreneFoam" />
</aerogel>
<lens vis="MRICH_lens_vis" thickness="MRICHFresnelLens_thickness"
pitch="MRICHFresnelLensGroove_pitch" focal_length="6.0*inch"
effective_diameter="MRICHFresnelLensEffectiveDiameter"
width="MRICHAerogel_width"
material="AcrylicOptical"/>
<space thickness="MRICHLensPhotoDet_length"/>
<photodet width="MRICHGlassWindow_width" thickness="MRICHGlassPhotoDet_thickness" material="PyrexGlassOptical">
<sensor nx="2" ny="2" thickness="MRICHPhotoDet_thickness" width="MRICHPhotoDet_length" material="SiliconOxide"/>
<layer thickness="MRICHPhotoDetMCPlate_thickness" material="PyrexGlass"/> <!-- FIXME: should be PyrexGlass25 with 1.2*mm thickness -->
<layer thickness="MRICHPhotoDetMCPlate_thickness" material="PyrexGlass"/> <!-- FIXME: should be PyrexGlass25 with 1.2*mm thickness -->
<layer thickness="MRICHPhotoDetAnode_thickness" material="AluminumOxide"/>
<layer thickness="MRICHPhotoDetPCB_thickness" material="Fr4"/>
<layer thickness="MRICHPhotoDetCopper_thickness" material="Copper"/>
<layer thickness="MRICHPhotoDetKapton_thickness" material="Kapton"/>
</photodet>
</module>
</detector>
</detectors>
<readouts>
<readout name="MRICHHits">
<segmentation type="CartesianGridXY" grid_size_x="3*mm" grid_size_y="3*mm" />
<id>system:8,module:14,sensor:8,x:32:-16,y:-16</id>
</readout>
</readouts>
<!--Globals>
<Parameter Name="mrichInfo" Value="mrichmod/mrich_1_geoparams-0-0-4294967295-1527211159.xml"/>
</Globals-->
</lccdd>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</display> </display>
<detectors> <detectors>
<detector id="RWellTrackerBarrel_ID" name="RWellTrackerBarrel" type="refdet_RWellTrackerBarrel" readout="RWellTrackerBarrelHits"> <detector id="RWellTrackerBarrel_ID" name="RWellTrackerBarrel" type="athena_RWellTrackerBarrel" readout="RWellTrackerBarrelHits">
<module name="Module1" vis="GreenVis"> <module name="Module1" vis="GreenVis">
<module_envelope <module_envelope
......
<lccdd>
<display>
</display>
<define>
</define>
<documentation level="10">
### Mixed tracking configuration
This configuration needs attention!
</documentation>
<include ref="rwell_tracker_barrel.xml">
<!--include ref="compact/ce_GEM.xml"/-->
<!--include ref="compact/mm_tracker_barrel.xml"/-->
<!--include ref="compact/cb_VTX_Barrel.xml"/-->
<!--include ref="compact/gem_tracker_endcap.xml"/-->
</lccdd>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<lccdd> <lccdd>
<define> <define>
<comment>
THis value probably can live in the file that includes this one.
</comment>
<constant name="ITS3Thickness" value="40*um"/>
<constant name="VertexCarbon_thickness" value="0.12*mm"/>
<constant name="VertexEndcapAluminumThickness" value="0.15*mm"/>
<constant name="ITS3Thickness" value="30*um"/> <documentation>
<constant name="VertexBarrel_rmin1" value="3.3*cm"/> #### Vertex Tracker Barrel Parameters
<constant name="VertexBarrel_rmin2" value="5.7*cm"/>
<constant name="VertexBarrelModule_maxThickness" value="VertexBarrel_rmin2 - VertexBarrel_rmin1"/> - The sensor modules are 2 half-cylinders.
<constant name="VertexBarrel_length" value="VertexTrackerBarrel_length"/> - There are 2 sensitive layers
<constant name="VertexBarrel_thickness" value="0.05/100*9.37*cm"/> - Each sensor has a thickness is 40um
<constant name="VertexBarrelService_thickness" value="VertexBarrel_thickness-ITS3Thickness"/> - There is an outer shell for structural support 300um thick.
<constant name="VertexBarrel_rmin" value="VertexBarrel_rmin1"/> - The ID of this shell is set (arbitrarily) to 10 cm.
<constant name="VertexBarrel_rmax" value="VertexBarrel_rmin2+VertexBarrelModule_maxThickness"/>
<constant name="VertexBarrelLayer_rOffset" value="4.0*mm"/> ##### Sensor layers
<comment> TODO: These should be computed </comment> Currently there are 2 sensor layers. Each is composed of 2 half-cylinders modules with only 40um of silicon thickness.
<constant name="VertexBarrel_NModules1" value="14"/>
<constant name="VertexBarrel_NModules2" value="24"/> ##### Support shell
<!-- Simple carbon fiber support shell.
<constant name="VertexTrackerEndcapP_rmin" value="VertexTrackerInnerRadius"/>
<constant name="VertexTrackerEndcapP_rmax" value="VertexTrackerOuterRadius"/> </documentation>
<constant name="VertexTrackerEndcapP_zmin" value="VertexTrackerBarrel_length + 5*mm"/>
<constant name="VertexBarrel_length" value="300.0*mm"/>
<constant name="VertexTrackerEndcapN_rmin" value="VertexTrackerInnerRadius"/> <constant name="VertexTrackerEndcapP_rmin" value="VertexTrackingRegion_rmin"/>
<constant name="VertexTrackerEndcapN_rmax" value="VertexTrackerOuterRadius"/> <constant name="VertexTrackerEndcapN_rmin" value="VertexTrackingRegion_rmin"/>
<constant name="VertexTrackerEndcapN_zmin" value="VertexTrackerBarrelLength + 5*mm"/> <constant name="VertexTrackerEndcapP_rmax" value="VertexTrackingRegion_rmax"/>
--> <constant name="VertexTrackerEndcapN_rmax" value="VertexTrackingRegion_rmax"/>
<constant name="VertexTrackerEndcapN_zmin" value="VertexTrackerBarrel_zmax"/> <constant name="VertexTrackerEndcapP_zmax" value="VertexTrackingRegionP_zmax"/>
<constant name="VertexTrackerEndcapP_zmin" value="VertexTrackerBarrel_zmax"/> <constant name="VertexTrackerEndcapN_zmax" value="VertexTrackingRegionN_zmax"/>
<constant name="VertexEndcap_NLayers" value="1"/> <constant name="VertexBarrelLayer_length" value="VertexBarrel_length - 1*mm"/>
<constant name="VertexTrackerEndcap_delta" value="(VertexTrackerEndcapP_zmax - VertexTrackerEndcapP_zmin)/VertexEndcap_NLayers"/> <constant name="VertexBarrelMod_length" value="VertexBarrel_length - 2*mm"/>
<constant name="VertexEndcapLayer_dz" value="(VertexTrackerEndcapP_zmax - VertexTrackerEndcapP_zmin)/VertexEndcap_NLayers"/>
<constant name="VertexBarrelSensor_thickness" value="ITS3Thickness"/>
<constant name="VertexEndcapModOpeningAngle" value="30.0*degree"/> <constant name="VertexBarrelLayer_thickness" value="0.2*cm"/>
<constant name="VertexBarrelMod_thickness" value="0.1*cm"/>
<constant name="VertexBarrelMod1_rmin" value="3.4*cm"/>
<constant name="VertexBarrelMod2_rmin" value="5.7*cm"/>
<constant name="VertexBarrelLayer_rmin1" value="VertexBarrelMod1_rmin - VertexBarrelLayer_thickness/2.0"/>
<constant name="VertexBarrelLayer_rmin2" value="VertexBarrelMod2_rmin - VertexBarrelLayer_thickness/2.0"/>
<constant name="VertexBarrelLayer_rmax1" value="VertexBarrelLayer_rmin1 + VertexBarrelLayer_thickness"/>
<constant name="VertexBarrelLayer_rmax2" value="VertexBarrelLayer_rmin2 + VertexBarrelLayer_thickness"/>
<comment>
"Support" is to "shell" like "layer" is to "module", and is need for the flat stave barrel implementation.
</comment>
<constant name="VertexBarrelShell_rmin" value="10.0*cm"/>
<constant name="VertexBarrelShell_thickness" value="300*um"/>
<constant name="VertexBarrelShell_rmax" value="VertexBarrelShell_rmin + VertexBarrelShell_thickness"/>
<constant name="VertexBarrelShell_length" value="VertexBarrelLayer_length-VertexBarrelShell_thickness"/>
<constant name="VertexBarrelSupport_thickness" value="1.0*cm"/>
<constant name="VertexBarrelSupport_rmin" value="VertexBarrelShell_rmin-VertexBarrelSupport_thickness/2.0"/>
<constant name="VertexBarrelSupport_rmax" value="VertexBarrelSupport_rmin + VertexBarrelSupport_thickness"/>
<constant name="VertexBarrelSupport_length" value="VertexBarrelLayer_length"/>
<constant name="VertexTrackerEndcapN_zmin" value="25*cm"/>
<constant name="VertexTrackerEndcapP_zmin" value="25*cm"/>
<constant name="VertexEndcap_NLayers" value="1"/>
<constant name="VertexTrackerEndcap_delta" value="(VertexTrackerEndcapP_zmax - VertexTrackerEndcapP_zmin)/VertexEndcap_NLayers"/>
<constant name="VertexEndcapLayer_dz" value="2*cm"/>
<constant name="VertexEndcapLayer_thickness" value="min(3*cm,VertexEndcapLayer_dz-0.5*cm)"/>
<constant name="VertexEndcap_NModules" value="12"/>
<constant name="VertexEndcapMod_dz" value="2.5*mm"/>
<constant name="VertexEndcapModOpeningAngle" value="360.0/VertexEndcap_NModules*degree + 0.5*degree"/>
<constant name="VertexEndcapMod1_x1" value="2.0*VertexTrackerEndcapP_rmin*sin(VertexEndcapModOpeningAngle/2.0)"/> <constant name="VertexEndcapMod1_x1" value="2.0*VertexTrackerEndcapP_rmin*sin(VertexEndcapModOpeningAngle/2.0)"/>
<constant name="VertexEndcapMod1_x2" value="2.0*VertexTrackerEndcapP_rmax*sin(VertexEndcapModOpeningAngle/2.0)"/> <constant name="VertexEndcapMod1_x2" value="2.0*VertexTrackerEndcapP_rmax*sin(VertexEndcapModOpeningAngle/2.0)"/>
<constant name="VertexEndcapMod1_y" value="VertexTrackerEndcapP_rmax*cos(VertexEndcapModOpeningAngle/2.0) - VertexTrackerEndcapP_rmin"/> <constant name="VertexEndcapMod1_y" value="VertexTrackerEndcapP_rmax*cos(VertexEndcapModOpeningAngle/2.0) - VertexTrackerEndcapP_rmin"/>
</define> <comment> cone connecting vertex barrel to endcap </comment>
<!-- <constant name="VertexEndcapCone_zmax" value="VertexEndcapShell_zmin-0.2*cm"/> -->
<constant name="VertexSupportCarbon_thickness" value="2*mm"/>
<constant name="VertexEndcapCone_zmin" value="VertexBarrelLayer_length/2.0 + 0.1*cm"/>
<constant name="VertexEndcapCone_zmax" value="VertexTrackerEndcapN_zmin - 0.1*cm"/>
<constant name="VertexEndcapCone_rmin1" value="VertexEndcapCone_zmin * 36.26/49"/>
<!-- <constant name="VertexEndcapCone_rmin1" value="TrackerEndcapInner_rmax1"/> -->
<constant name="VertexEndcapCone_rmin2" value="VertexTrackerEndcapP_rmax"/>
<constant name="VertexEndcapConeService_rmin1" value="VertexEndcapCone_rmin1+VertexSupportCarbon_thickness+0.1*mm"/>
<constant name="VertexEndcapConeService_rmin2" value="VertexEndcapCone_rmin2+VertexSupportCarbon_thickness+0.1*mm"/>
<constant name="VertexEndcapConeService_thickness" value="0.6*mm"/>
<constant name="VertexEndcapCone_length" value="VertexEndcapCone_zmax - VertexEndcapCone_zmin"/>
<comment>
Extra parameters to approximate a cylinder as a set of skinny staves
due to ACTS limitations.
</comment>
<constant name="VertexBarrelStave_count" value="128"/>
<constant name="VertexBarrelStave1_width" value="2*VertexBarrelMod1_rmin * tan(180*degree/VertexBarrelStave_count)"/>
<constant name="VertexBarrelStave2_width" value="2*VertexBarrelMod2_rmin * tan(180*degree/VertexBarrelStave_count)"/>
<constant name="VertexBarrelShellStave_width" value="2*VertexBarrelShell_rmin * tan(180*degree/VertexBarrelStave_count)"/>
</define>
<display> <display>
</display> </display>
<detectors> <detectors>
<documentation level="5">
<!-- ### Actual detectors
<detector id="VertexBarrelSubAssembly_ID" </documentation>
name="VertexBarrelSubAssembly"
type="DD4hep_SubdetectorAssembly"
vis="TrackerSubAssemblyVis">
<composite name="VertexBarrel" />
</detector>
<detector id="VertexEndcapSubAssembly_ID"
name="VertexEndcapSubAssembly"
type="DD4hep_SubdetectorAssembly"
vis="TrackerSubAssemblyVis">
<composite name="VertexEndcapN" />
<composite name="VertexEndcapP" />
</detector>
-->
<detector <detector
id="VertexBarrel_ID" id="VertexBarrel_0_ID"
name="VertexBarrel" name="VertexBarrel"
type="athena_VertexBarrel" type="athena_VertexBarrel"
readout="VertexBarrelHits" readout="VertexBarrelHits"
insideTrackingVolume="true"> insideTrackingVolume="true">
<dimensions <dimensions
rmin="VertexBarrel_rmin-VertexBarrelLayer_rOffset" rmin="VertexBarrelLayer_rmin1"
rmax="VertexBarrel_rmax-VertexBarrelLayer_rOffset" rmax="VertexBarrelSupport_rmax"
length="VertexBarrel_length"/> length="VertexBarrel_length" />
<comment>Barrel Modules</comment> <comment>Vertex Barrel Modules</comment>
<module name="Module1" vis="PurpleVis"> <module name="Module1" vis="VertexLayerVis">
<frame material="CarbonFiber_25percent" vis="BlueGreenVis" <module_component name="ITS3"
width="15*mm" material="Silicon"
height="10.0*mm" sensitive="true"
length="VertexBarrel_length-1.0*mm" width="VertexBarrelStave1_width"
thickness="0.1 * mm"/> length="VertexBarrelMod_length"
<module_component name="peek1" material="PEEK" sensitive="false" thickness="VertexBarrelSensor_thickness"
width="14.0*mm" length="VertexBarrel_length-0.1*mm" thickness="2.0*mm" /> vis="VertexLayerVis" />
<module_component name="silicon" material="Silicon" sensitive="true" </module>
width="14.0*mm" length="VertexBarrel_length-0.1*mm" thickness="1.0*mm"> <module name="Module2" vis="VertexLayerVis">
<!--position x="0" y="0*mm" z="-0.025*mm" --> /> <module_component name="ITS3"
</module_component> material="Silicon"
<module_component name="peek2" material="PEEK" sensitive="false" sensitive="true"
width="14.0*mm" length="VertexBarrel_length-0.1*mm" thickness="2.0*mm" /> width="VertexBarrelStave2_width"
length="VertexBarrelMod_length"
thickness="VertexBarrelSensor_thickness"
vis="VertexLayerVis" />
</module> </module>
<module name="Module2"> <module name="SupportShell" vis="VertexSupportVis">
<frame material="CarbonFiber_25percent" vis="BlueGreenVis" <module_component name="CF Shell"
width="15*mm" material="CarbonFiber"
height="10.0*mm" sensitive="false"
length="VertexBarrel_length-1.0*mm" width="VertexBarrelShellStave_width"
thickness="0.1 * mm"/> length="VertexBarrelShell_length"
<module_component name="peek1" material="PEEK" sensitive="false" thickness="VertexBarrelShell_thickness"
width="14.0*mm" length="VertexBarrel_length-0.1*mm" thickness="2.0*mm" /> vis="VertexSupportVis" />
<module_component name="silicon" material="Silicon" sensitive="true"
width="14.0*mm" length="VertexBarrel_length-0.1*mm" thickness="1.0*mm">
<!--position x="0" y="0*mm" z="-0.025*mm"/-->
</module_component>
<module_component name="peek2" material="PEEK" sensitive="false"
width="14.0*mm" length="VertexBarrel_length-0.1*mm" thickness="2.0*mm" />
</module> </module>
<comment> Layers composed of many arrayed modules </comment> <comment> Layers composed of many arrayed modules </comment>
<layer module="Module1" id="1" vis="VertexVis"> <layer module="Module1" id="1" vis="VertexLayerVis">
<barrel_envelope
inner_r="VertexBarrelLayer_rmin1"
outer_r="VertexBarrelLayer_rmax1"
z_length="VertexBarrelLayer_length" />
<layer_material surface="outer" binning="binPhi,binZ" bins0="VertexBarrelStave_count" bins1="100" />
<comment>
phi0 : Starting phi of first module.
phi_tilt : Phi tilt of a module.
rc : Radius of the module center.
nphi : Number of modules in phi.
rphi_dr : The delta radius of every other module.
z0 : Z position of first module in phi.
nz : Number of modules to place in z.
dr : Radial displacement parameter, of every other module.
</comment>
<rphi_layout phi_tilt="0.0*degree" nphi="VertexBarrelStave_count" phi0="0.0" rc="VertexBarrelMod1_rmin" dr="0.0 * mm"/>
<z_layout dr="0.0 * mm" z0="0.0 * mm" nz="1"/>
</layer>
<layer module="Module2" id="2" vis="VertexLayerVis">
<barrel_envelope <barrel_envelope
inner_r="VertexBarrel_rmin1-VertexBarrelLayer_rOffset" inner_r="VertexBarrelLayer_rmin2"
outer_r="VertexBarrel_rmin2-VertexBarrelLayer_rOffset-1.0*mm" outer_r="VertexBarrelLayer_rmax2"
z_length="VertexBarrel_length"/> z_length="VertexBarrelLayer_length" />
<rphi_layout phi_tilt="10.0*degree" nphi="VertexBarrel_NModules1" phi0="0.0" rc="VertexBarrel_rmin1" dr="0.0 * mm"/> <layer_material surface="outer" binning="binPhi,binZ" bins0="VertexBarrelStave_count" bins1="100" />
<rphi_layout phi_tilt="0.0*degree" nphi="VertexBarrelStave_count" phi0="0.0" rc="VertexBarrelMod2_rmin" dr="0.0 * mm"/>
<z_layout dr="0.0 * mm" z0="0.0 * mm" nz="1"/> <z_layout dr="0.0 * mm" z0="0.0 * mm" nz="1"/>
</layer> </layer>
<layer module="Module2" id="2" vis="VertexVis"> <layer module="SupportShell" id="3" vis="VertexSupportVis">
<barrel_envelope <barrel_envelope
inner_r="VertexBarrel_rmin2-VertexBarrelLayer_rOffset" inner_r="VertexBarrelSupport_rmin"
outer_r="VertexBarrel_rmax-VertexBarrelLayer_rOffset" outer_r="VertexBarrelSupport_rmax"
z_length="VertexBarrel_length"/> z_length="VertexBarrelSupport_length" />
<rphi_layout phi_tilt="10.0*degree" nphi="VertexBarrel_NModules2" phi0="0.0" rc="VertexBarrel_rmin2" dr="0.0 * mm"/> <layer_material surface="outer" binning="binPhi,binZ" bins0="VertexBarrelStave_count" bins1="100" />
<rphi_layout phi_tilt="0.0*degree" nphi="VertexBarrelStave_count" phi0="0.0" rc="VertexBarrelShell_rmin" dr="0.0 * mm"/>
<z_layout dr="0.0 * mm" z0="0.0 * mm" nz="1"/> <z_layout dr="0.0 * mm" z0="0.0 * mm" nz="1"/>
</layer> </layer>
</detector> </detector>
<detector <detector
id="VertexEndcapP_ID" id="VertexEndcapP_0_ID"
name="VertexEndcapP" name="VertexEndcapP"
type="refdet_TrapEndcapTracker" type="athena_TrapEndcapTracker"
readout="VertexEndcapHits" readout="VertexEndcapHits"
vis="AnlRed" vis="TrackerVis"
reflect="false"> reflect="false">
<support material="CarbonFiber" name="sup_cone" vis="TrackerSupportVis">
<shape type="Cone"
rmin1="VertexEndcapCone_rmin1" rmax1="VertexEndcapCone_rmin1+VertexSupportCarbon_thickness"
rmin2="VertexEndcapCone_rmin2" rmax2="VertexEndcapCone_rmin2+VertexSupportCarbon_thickness" z="VertexEndcapCone_length/2.0"/>
<position x="0*cm" y="0*cm" z="(VertexEndcapCone_zmin+VertexEndcapCone_zmax)/2.0"/>
</support>
<support material="Aluminum" name="sup_cone_service" vis="TrackerSupportVis">
<shape type="Cone"
rmin1="VertexEndcapConeService_rmin1" rmax1="VertexEndcapConeService_rmin1+VertexEndcapConeService_thickness"
rmin2="VertexEndcapConeService_rmin2" rmax2="VertexEndcapConeService_rmin2+VertexEndcapConeService_thickness" z="VertexEndcapCone_length/2.0"/>
<position x="0*cm" y="0*cm" z="(VertexEndcapCone_zmin+VertexEndcapCone_zmax)/2.0"/>
</support>
<module name="Module1" vis="AnlProcess_Blue"> <module name="Module1" vis="AnlProcess_Blue">
<trd x1="VertexEndcapMod1_x1/2.0" x2="VertexEndcapMod1_x2/2.0" z="VertexEndcapMod1_y/2"/> <trd x1="VertexEndcapMod1_x1/2.0" x2="VertexEndcapMod1_x2/2.0" z="VertexEndcapMod1_y/2"/>
<module_component thickness="ITS3Thickness" material="Silicon" sensitive="true"/> <module_component thickness="ITS3Thickness" material="Silicon" sensitive="true"/>
<module_component thickness="0.25/100*9.37*cm-ITS3Thickness" material="Silicon"/> <module_component thickness="VertexEndcapAluminumThickness" material="Aluminum"/>
<module_component thickness="VertexCarbon_thickness" material="CarbonFiber"/>
</module> </module>
<layer id="1"> <layer id="1">
<envelope vis="AnlRed" <envelope vis="TrackerVis"
rmin="VertexTrackerEndcapP_rmin" rmin="VertexTrackerEndcapP_rmin"
rmax="VertexTrackerEndcapP_rmax" rmax="VertexTrackerEndcapP_rmax"
length="VertexEndcapLayer_dz" length="VertexEndcapLayer_thickness"
zstart="VertexTrackerEndcapP_zmin" /> zstart="VertexTrackerEndcapP_zmin + VertexEndcapLayer_dz/2.0" />
<ring vis="AnlRed" <layer_material surface="representing" binning="binPhi,binR" bins0="20*VertexEndcap_NModules" bins1="256"/>
<ring vis="TrackerVis"
r="VertexTrackerEndcapP_rmin+VertexEndcapMod1_y/2.0" r="VertexTrackerEndcapP_rmin+VertexEndcapMod1_y/2.0"
zstart="25.0*mm" zstart="0.0"
nmodules="12" dz="2.5 * mm" module="Module1" /> nmodules="VertexEndcap_NModules" dz="VertexEndcapMod_dz" module="Module1" />
</layer> </layer>
</detector> </detector>
<detector <detector
id="VertexEndcapN_ID" id="VertexEndcapN_0_ID"
name="VertexEndcapN" name="VertexEndcapN"
type="refdet_TrapEndcapTracker" type="athena_TrapEndcapTracker"
readout="VertexEndcapHits" readout="VertexEndcapHits"
vis="AnlRed" vis="TrackerVis"
reflect="true"> reflect="true">
<support material="CarbonFiber" name="sup_cone" vis="TrackerSupportVis">
<shape type="Cone"
rmin2="VertexEndcapCone_rmin1" rmax2="VertexEndcapCone_rmin1+VertexSupportCarbon_thickness"
rmin1="VertexEndcapCone_rmin2" rmax1="VertexEndcapCone_rmin2+VertexSupportCarbon_thickness" z="VertexEndcapCone_length/2.0"/>
<position x="0*cm" y="0*cm" z="-1.0*(VertexEndcapCone_zmin+VertexEndcapCone_zmax)/2.0"/>
</support>
<support material="Aluminum" name="sup_cone_service" vis="TrackerSupportVis">
<shape type="Cone"
rmin2="VertexEndcapConeService_rmin1" rmax2="VertexEndcapConeService_rmin1+VertexEndcapConeService_thickness"
rmin1="VertexEndcapConeService_rmin2" rmax1="VertexEndcapConeService_rmin2+VertexEndcapConeService_thickness" z="VertexEndcapCone_length/2.0"/>
<position x="0*cm" y="0*cm" z="-1.0*(VertexEndcapCone_zmin+VertexEndcapCone_zmax)/2.0"/>
</support>
<module name="Module1" vis="AnlProcess_Blue"> <module name="Module1" vis="AnlProcess_Blue">
<trd x1="VertexEndcapMod1_x1/2.0" x2="VertexEndcapMod1_x2/2.0" z="VertexEndcapMod1_y/2"/> <trd x1="VertexEndcapMod1_x1/2.0" x2="VertexEndcapMod1_x2/2.0" z="VertexEndcapMod1_y/2"/>
<module_component thickness="ITS3Thickness" material="Silicon" sensitive="true"/> <module_component thickness="ITS3Thickness" material="Silicon" sensitive="true"/>
<module_component thickness="0.25/100*9.37*cm-ITS3Thickness" material="Silicon"/> <module_component thickness="VertexEndcapAluminumThickness" material="Aluminum"/>
<module_component thickness="VertexCarbon_thickness" material="CarbonFiber"/>
</module> </module>
<layer id="1"> <layer id="1">
<envelope vis="AnlRed" <envelope vis="TrackerVis"
rmin="VertexTrackerEndcapN_rmin" rmin="VertexTrackerEndcapN_rmin"
rmax="VertexTrackerEndcapN_rmax" rmax="VertexTrackerEndcapN_rmax"
length="VertexEndcapLayer_dz" length="VertexEndcapLayer_thickness"
zstart="VertexTrackerEndcapN_zmin" /> zstart="VertexTrackerEndcapN_zmin + VertexEndcapLayer_dz/2.0" />
<ring vis="AnlRed" <layer_material surface="representing" binning="binPhi,binR" bins0="20*VertexEndcap_NModules" bins1="256"/>
<ring vis="TrackerVis"
r="VertexTrackerEndcapN_rmin+VertexEndcapMod1_y/2.0" r="VertexTrackerEndcapN_rmin+VertexEndcapMod1_y/2.0"
zstart="-25.0*mm" zstart="0.0"
nmodules="12" dz="2.5 * mm" module="Module1" /> nmodules="VertexEndcap_NModules" dz="VertexEndcapMod_dz" module="Module1" />
</layer> </layer>
</detector> </detector>
<!--
<detector id="VertexEndcapP_ID"
name="VertexEndcapP"
type="athena_SimpleDiskTracker"
readout="VertexEndcapHits"
insideTrackingVolume="true"
reflect="false" vis="AnlRed">
<position x="0" y="0" z="0.0*mm"/>
<layer id="1" vis="AnlOrange"
inner_z="VertexTrackerEndcapP_zmin + 0.5*VertexTrackerEndcap_delta"
inner_r="VertexTrackerEndcapP_rmin-3*mm"
outer_r="VertexTrackerEndcapP_rmax">
<slice material="Air" thickness="1.0*mm" vis="AnlOrange" />
<slice material="Silicon" thickness="1.0*mm" vis="AnlOrange" sensitive="true"/>
<slice material="Air" thickness="1.0*mm" vis="AnlOrange" />
</layer>
<layer id="2" vis="AnlOrange"
inner_z="VertexTrackerEndcapP_zmin + 1.5*VertexTrackerEndcap_delta"
inner_r="VertexTrackerEndcapP_rmin"
outer_r="VertexTrackerEndcapP_rmax">
<slice material="Air" thickness="1.0*mm" vis="AnlOrange" />
<slice material="Silicon" thickness="1.0*mm" vis="AnlOrange" sensitive="true"/>
<slice material="Air" thickness="1.0*mm" vis="AnlOrange" />
</layer>
</detector>
<detector id="VertexEndcapN_ID"
name="VertexEndcapN"
type="athena_SimpleDiskTracker"
readout="VertexEndcapHits"
insideTrackingVolume="true"
reflect="true" vis="AnlRed">
<position x="0" y="0" z="-0.0*mm-1.0e-9*mm"/>
<layer id="1" vis="AnlOrange"
inner_z="VertexTrackerEndcapN_zmin + 0.5*VertexTrackerEndcap_delta"
inner_r="VertexTrackerEndcapN_rmin"
outer_r="VertexTrackerEndcapN_rmax">
<slice material="Air" thickness="1.0*mm" vis="AnlOrange" />
<slice material="Silicon" thickness="1.0*mm" vis="AnlOrange" sensitive="true"/>
<slice material="Air" thickness="1.0*mm" vis="AnlOrange" />
</layer>
<layer id="2" vis="AnlOrange"
inner_z="VertexTrackerEndcapN_zmin + 1.5*VertexTrackerEndcap_delta"
inner_r="VertexTrackerEndcapN_rmin"
outer_r="VertexTrackerEndcapN_rmax">
<slice material="Air" thickness="1.0*mm" vis="AnlOrange" />
<slice material="Silicon" thickness="1.0*mm" vis="AnlOrange" sensitive="true"/>
<slice material="Air" thickness="1.0*mm" vis="AnlOrange" />
</layer>
</detector>
-->
</detectors> </detectors>
<readouts> <readouts>
<readout name="VertexBarrelHits"> <readout name="VertexBarrelHits">
<segmentation type="CartesianGridXY" grid_size_x="0.050*mm" grid_size_y="0.050*mm" /> <segmentation type="CartesianGridXY" grid_size_x="0.010*mm" grid_size_y="0.010*mm" />
<id>system:8,barrel:2,layer:4,module:12,sensor:2,x:32:-16,y:-16</id> <id>system:8,layer:4,module:12,sensor:2,x:32:-16,y:-16</id>
</readout> </readout>
<readout name="VertexEndcapHits"> <readout name="VertexEndcapHits">
<segmentation type="CartesianGridXY" grid_size_x="0.20*mm" grid_size_y="0.20*mm" /> <segmentation type="CartesianGridXZ" grid_size_x="0.010*mm" grid_size_z="0.010*mm" />
<id>system:8,barrel:2,layer:4,module:12,sensor:2,x:32:-16,y:-16</id> <id>system:8,layer:4,module:12,sensor:2,x:32:-16,z:-16</id>
</readout> </readout>
</readouts> </readouts>
......
<?xml version="1.0" encoding="UTF-8"?>
<lccdd>
<define>
<comment>
Main parameters
</comment>
<constant name="SiVertexSensor_thickness" value="40*um"/>
<constant name="VertexBarrelMod_length" value="280.0*mm"/>
<constant name="VertexBarrelMod_rmin" value="3.3*cm"/>
<constant name="VertexBarrelMod_offset" value="1.05*cm"/>
<constant name="VertexBarrelMod_count" value="3"/>
<constant name="VertexBarrelShell_thickness" value="300.0*um"/>
<documentation>
#### Vertex Tracker Barrel Parameters
- The sensor modules are 2 half-cylinders.
- There are 2 sensitive layers
- Each sensor has a thickness is 40um
- There is an outer shell for structural support 300um thick.
- The ID of this shell is set (arbitrarily) to 10 cm.
##### Sensor layers
Currently there are 2 sensor layers. Each is composed of 2 half-cylinders modules with only 40um of silicon thickness.
##### Support shell
Simple carbon fiber support shell.
</documentation>
<constant name="VertexBarrelEnvelope_length" value="VertexTrackingRegion_length"/>
<constant name="VertexBarrelLayer_length" value="VertexBarrelMod_length + 1*um"/>
<constant name="VertexBarrelLayer_thickness" value="0.2*cm"/>
<constant name="VertexBarrelMod_thickness" value="0.1*cm"/>
<constant name="VertexBarrelMod1_rmin" value="VertexBarrelMod_rmin"/>
<constant name="VertexBarrelMod2_rmin" value="VertexBarrelMod_rmin + 1 * VertexBarrelMod_offset"/>
<constant name="VertexBarrelMod3_rmin" value="VertexBarrelMod_rmin + 2 * VertexBarrelMod_offset"/>
<constant name="VertexBarrelLayer1_rmin" value="VertexBarrelMod_rmin - VertexBarrelLayer_thickness/2.0"/>
<constant name="VertexBarrelLayer1_rmax" value="VertexBarrelLayer1_rmin + VertexBarrelLayer_thickness"/>
<constant name="VertexBarrelLayer2_rmin" value="VertexBarrelLayer1_rmin + 1 * VertexBarrelMod_offset"/>
<constant name="VertexBarrelLayer2_rmax" value="VertexBarrelLayer2_rmin + VertexBarrelLayer_thickness"/>
<constant name="VertexBarrelLayer3_rmin" value="VertexBarrelLayer1_rmin + 2 * VertexBarrelMod_offset"/>
<constant name="VertexBarrelLayer3_rmax" value="VertexBarrelLayer3_rmin + VertexBarrelLayer_thickness"/>
<comment>
"Support" is to "shell" like "layer" is to "module", and is need for the flat stave barrel implementation.
</comment>
<constant name="VertexBarrelShell_rmin" value="VertexBarrelMod_rmin + VertexBarrelMod_count * VertexBarrelMod_offset"/>
<constant name="VertexBarrelShell_rmax" value="VertexBarrelShell_rmin + VertexBarrelShell_thickness"/>
<constant name="VertexBarrelShell_length" value="VertexBarrelMod_length"/>
<constant name="VertexBarrelSupport_thickness" value="0.1*cm"/>
<constant name="VertexBarrelSupport_rmin" value="VertexBarrelShell_rmin-VertexBarrelSupport_thickness/2.0"/>
<constant name="VertexBarrelSupport_rmax" value="VertexBarrelSupport_rmin + VertexBarrelSupport_thickness"/>
<constant name="VertexBarrelSupport_length" value="VertexBarrelLayer_length"/>
<comment>
Extra parameters to approximate a cylinder as a set of skinny staves
due to ACTS limitations.
</comment>
<constant name="VertexBarrelStave_count" value="128"/>
<constant name="VertexBarrelStave1_width" value="2*VertexBarrelMod1_rmin * tan(180*degree/VertexBarrelStave_count)"/>
<constant name="VertexBarrelStave2_width" value="2*VertexBarrelMod2_rmin * tan(180*degree/VertexBarrelStave_count)"/>
<constant name="VertexBarrelStave3_width" value="2*VertexBarrelMod3_rmin * tan(180*degree/VertexBarrelStave_count)"/>
<constant name="VertexBarrelShellStave_width" value="2*VertexBarrelShell_rmin * tan(180*degree/VertexBarrelStave_count)"/>
</define>
<display>
</display>
<detectors>
<documentation level="5">
### Actual detectors
</documentation>
<detector
id="VertexBarrel_0_ID"
name="VertexBarrel"
type="athena_VertexBarrel"
readout="VertexBarrelHits"
insideTrackingVolume="true">
<dimensions
rmin="VertexBarrelLayer1_rmin"
rmax="VertexBarrelSupport_rmax"
length="VertexBarrelEnvelope_length" />
<comment>Vertex Barrel Modules</comment>
<module name="Module1" vis="VertexLayerVis">
<module_component name="ITS3"
material="Silicon"
sensitive="true"
width="VertexBarrelStave1_width"
length="VertexBarrelMod_length"
thickness="SiVertexSensor_thickness"
vis="VertexLayerVis" />
</module>
<module name="Module2" vis="VertexLayerVis">
<module_component name="ITS3"
material="Silicon"
sensitive="true"
width="VertexBarrelStave2_width"
length="VertexBarrelMod_length"
thickness="SiVertexSensor_thickness"
vis="VertexLayerVis" />
</module>
<module name="Module3" vis="VertexLayerVis">
<module_component name="ITS3"
material="Silicon"
sensitive="true"
width="VertexBarrelStave3_width"
length="VertexBarrelMod_length"
thickness="SiVertexSensor_thickness"
vis="VertexLayerVis" />
</module>
<module name="SupportShell" vis="VertexSupportVis">
<module_component name="CF Shell"
material="CarbonFiber"
sensitive="false"
width="VertexBarrelShellStave_width"
length="VertexBarrelShell_length"
thickness="VertexBarrelShell_thickness"
vis="VertexSupportVis" />
</module>
<comment> Layers composed of many arrayed modules </comment>
<layer module="Module1" id="1" vis="VertexLayerVis">
<barrel_envelope
inner_r="VertexBarrelLayer1_rmin"
outer_r="VertexBarrelLayer1_rmax"
z_length="VertexBarrelLayer_length" />
<layer_material surface="outer" binning="binPhi,binZ" bins0="VertexBarrelStave_count" bins1="100" />
<comment>
phi0 : Starting phi of first module.
phi_tilt : Phi tilt of a module.
rc : Radius of the module center.
nphi : Number of modules in phi.
rphi_dr : The delta radius of every other module.
z0 : Z position of first module in phi.
nz : Number of modules to place in z.
dr : Radial displacement parameter, of every other module.
</comment>
<rphi_layout phi_tilt="0.0*degree" nphi="VertexBarrelStave_count" phi0="0.0" rc="VertexBarrelMod1_rmin" dr="0.0 * mm"/>
<z_layout dr="0.0 * mm" z0="0.0 * mm" nz="1"/>
</layer>
<layer module="Module2" id="2" vis="VertexLayerVis">
<barrel_envelope
inner_r="VertexBarrelLayer2_rmin"
outer_r="VertexBarrelLayer2_rmax"
z_length="VertexBarrelLayer_length" />
<layer_material surface="outer" binning="binPhi,binZ" bins0="VertexBarrelStave_count" bins1="100" />
<rphi_layout phi_tilt="0.0*degree" nphi="VertexBarrelStave_count" phi0="0.0" rc="VertexBarrelMod2_rmin" dr="0.0 * mm"/>
<z_layout dr="0.0 * mm" z0="0.0 * mm" nz="1"/>
</layer>
<layer module="Module3" id="3" vis="VertexLayerVis">
<barrel_envelope
inner_r="VertexBarrelLayer3_rmin"
outer_r="VertexBarrelLayer3_rmax"
z_length="VertexBarrelLayer_length" />
<layer_material surface="outer" binning="binPhi,binZ" bins0="VertexBarrelStave_count" bins1="100" />
<rphi_layout phi_tilt="0.0*degree" nphi="VertexBarrelStave_count" phi0="0.0" rc="VertexBarrelMod3_rmin" dr="0.0 * mm"/>
<z_layout dr="0.0 * mm" z0="0.0 * mm" nz="1"/>
</layer>
<layer module="SupportShell" id="VertexBarrelMod_count + 1" vis="VertexSupportLayerVis">
<barrel_envelope
inner_r="VertexBarrelSupport_rmin"
outer_r="VertexBarrelSupport_rmax"
z_length="VertexBarrelSupport_length" />
<layer_material surface="outer" binning="binPhi,binZ" bins0="VertexBarrelStave_count" bins1="100" />
<rphi_layout phi_tilt="0.0*degree" nphi="VertexBarrelStave_count" phi0="0.0" rc="VertexBarrelShell_rmin" dr="0.0 * mm"/>
<z_layout dr="0.0 * mm" z0="0.0 * mm" nz="1"/>
</layer>
</detector>
</detectors>
<readouts>
<readout name="VertexBarrelHits">
<segmentation type="CartesianGridXY" grid_size_x="0.010*mm" grid_size_y="0.010*mm" />
<id>system:8,layer:4,module:12,sensor:2,x:32:-16,y:-16</id>
</readout>
</readouts>
</lccdd>
# npsim --runType vis --compactFile athena.xml --random.seed 1 --enableGun --gun.energy 2*GeV --gun.thetaMin 90*deg --gun.thetaMax 90*deg --gun.distribution uniform --macro macro/dirc_vis.mac --outputFile dirc_vis.root
/vis/list
# Use this open statement to create an OpenGL view:
/vis/open OGL 600x600-0+0
#
# Use this open statement to create a .prim file suitable for
# viewing in DAWN:
#/vis/open DAWNFILE
#
# Use this open statement to create a .heprep file suitable for
# viewing in HepRApp:
#/vis/open HepRepFile
#
# Use this open statement to create a .wrl file suitable for
# viewing in a VRML viewer:
#/vis/open VRML2FILE
#
# Disable auto refresh and quieten vis messages whilst scene and
# trajectories are established:
/vis/viewer/set/autoRefresh false
/vis/viewer/set/rotationStyle freeRotation
/vis/verbose errors
#
# Draw geometry:
/vis/drawVolume
# Specify zoom value:
/vis/viewer/zoom 1.4
# Specify style (surface or wireframe):
#/vis/viewer/set/style wireframe
#top
# /vis/viewer/set/viewpointThetaPhi -90. 0.
# /vis/viewer/set/viewpointVector 0 1 0.00000001
# /vis/viewer/set/upVector 1 0 0
#mcp
#/vis/viewer/set/viewpointVector -1 0 0.00000001
#/vis/viewer/set/upVector 0 1 0
#side
# /vis/viewer/set/viewpointVector 0 1 0.00000001
# /vis/viewer/set/upVector 0 -1 0
#lenses
#/vis/viewer/set/viewpointThetaPhi 30 30
#
#/vis/viewer/set/projection orthogonal
#/vis/viewer/zoomTo 4.5
#/vis/viewer/set/targetPoint -110 20 -10 cm
#/vis/viewer/set/background white
# Draw coordinate axes:
/vis/scene/add/axes 0 0 0 1 m
#
# Draw smooth trajectories at end of event, showing trajectory points
# as markers 2 pixels wide:
/vis/scene/add/trajectories smooth
#/vis/modeling/trajectories/create/drawByCharge
#/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
#/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
/vis/modeling/trajectories/create/drawByParticleID
/vis/modeling/trajectories/drawByParticleID-0/set opticalphoton yellow
/vis/modeling/trajectories/drawByParticleID-0/setRGBA opticalphoton 1 0.8 0 0.3
/vis/modeling/trajectories/drawByParticleID-0/setRGBA e+ 1 0 1 1
/vis/modeling/trajectories/drawByParticleID-0/default/setDrawStepPts true
/vis/modeling/trajectories/drawByParticleID-0/default/setStepPtsSize 2
# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
#
# Draw hits at end of event:
#/vis/scene/add/hits
#
# To draw only gammas:
#/vis/filtering/trajectories/create/particleFilter
#/vis/filtering/trajectories/particleFilter-0/add gamma
#
# To invert the above, drawing all particles except gammas,
# keep the above two lines but also add:
#/vis/filtering/trajectories/particleFilter-0/invert true
#
# Many other options are available with /vis/modeling and /vis/filtering.
# For example, to select colour by particle ID:
#/vis/modeling/trajectories/create/drawByParticleID
#/vis/modeling/trajectories/drawByParticleID-0/set e- blue
#
# To superimpose all of the events from a given run:
/vis/scene/endOfEventAction accumulate
# Re-establish auto refreshing and verbosity:
/vis/viewer/set/autoRefresh true
/vis/verbose warnings
#
# For file-based drivers, use this to create an empty detector view:
#/vis/viewer/flush
/vis/viewer/set/projection p 40 deg
/vis/viewer/set/style s
/vis/viewer/set/hiddenEdge true
#/vis/viewer/set/background 1 1 1 0
#/vis/viewer/set/background 0 0 0 0
/vis/viewer/set/hiddenMarker
/vis/geometry/set/forceLineSegmentsPerCircle all 0 50
# /vis/viewer/set/globalLineWidthScale 1.5
# /vis/geometry/set/lineWidth all 0 1
/vis/ogl/set/displayListLimit 500000
#fp
#/vis/viewer/save
# #mcp
# /vis/viewer/set/viewpointVector -1 0 0.00000001
# /vis/viewer/set/upVector 0 1
# /vis/viewer/set/viewpointThetaPhi 9 41 deg
# /vis/viewer/zoomTo 6
# /vis/viewer/set/targetPoint 88.5358 -17.0546 18.8692 cm
# lens
# /vis/viewer/zoomTo 20
# /vis/viewer/set/viewpointThetaPhi 129.792 1.39204 deg
# /vis/viewer/set/targetPoint 100 20 210 cm
# # #lens side
# /vis/viewer/set/viewpointVector 1.31839e-16 -1 -6.93889e-18
# /vis/viewer/set/upVector 0 1 0
# /vis/viewer/set/projection orthogonal
# /vis/viewer/zoomTo 11
# /vis/viewer/scaleTo 1 1 1
# /vis/viewer/set/targetPoint 1.01299 -0.569503 2.15227 m
# side wedge
# /vis/viewer/set/viewpointVector -5.20417e-17 1 -3.46945e-18
# /vis/viewer/set/upVector 0 1 0
# /vis/viewer/set/projection orthogonal
# /vis/viewer/zoomTo 13.4
# /vis/viewer/scaleTo 1 1 1
# /vis/viewer/set/targetPoint 1.0404 -0.128502 2.17344 m
# whole length
# /vis/viewer/zoomTo 7.0883
# /vis/viewer/set/targetPoint 1.11348 -0.128502 0.164898 m
#/vis/ogl/export ev_1.png
# draw field
#/vis/scene/add/magneticField 10
#/vis/scene/create
#/vis/scene/add/volume
#
#/vis/sceneHandler/create VRML2FILE
#
#/vis/viewer/create
#
#/tracking/storeTrajectory 1
#/vis/scene/add/trajectories
#/vis/scene/endOfEventAction accumulate
/vis/viewer/refresh
/gps/verbose 2
/gps/particle pi-
/gps/number 1
#/gps/ene/type Gauss
/gps/ene/mono 6.0 GeV
#/gps/ene/sigma 3.0 GeV
#/gps/pos/type Volume
#/gps/pos/shape Cylinder
#/gps/pos/centre 0.0 0.0 0.0 cm
#/gps/pos/radius 0.01 cm
#/gps/pos/halfz 10 cm
/gps/position 0 0 0 cm
#/gps/direction 1 0 0
/gps/direction -1 0 0
#/gps/ang/type iso
#/gps/ang/mintheta 10 degree
#/gps/ang/maxtheta 170 degree
/vis/viewer/set/viewpointVector 0 -1 0
/vis/viewer/set/upVector -1 0 0
/vis/viewer/set/projection orthogonal
/vis/viewer/zoomTo 6.8984
/vis/viewer/scaleTo 1 1 1
/vis/viewer/set/targetPoint -0.987804 0.579407 2.01758 m
/run/beamOn 1
\ No newline at end of file
/run/initialize
#/vis/open OGL 800x800-0+0
/vis/open OGLIQt 800x800-0+0
#
/vis/drawVolume
/vis/viewer/set/viewpointThetaPhi 20 30
/vis/viewer/zoom 1.1
#/vis/viewer/set/style wireframe
#/vis/scene/add/axes 0 0 0 1 m
/vis/scene/add/trajectories rich smooth
/vis/modeling/trajectories/create/drawByCharge
#/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
#/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
/vis/scene/add/hits
/vis/scene/endOfEventAction accumulate 2
#/vis/filtering/trajectories/create/particleFilter
#/vis/filtering/trajectories/particleFilter-0/add gamma
#/vis/filtering/trajectories/particleFilter-0/invert true
#/vis/filtering/trajectories/particleFilter-0/verbose true
#/vis/filtering/trajectories/particleFilter-0/active true
/vis/ogl/set/displayListLimit 50000
/vis/viewer/flush
/gps/verbose 2
/gps/particle pi-
/gps/number 1
/gps/ene/type Gauss
/gps/ene/mono 8.0 GeV
/gps/ene/sigma 1.0 GeV
/gps/pos/type Volume
/gps/pos/shape Cylinder
/gps/pos/centre 0.0 0.0 0.0 cm
/gps/pos/radius 0.001 cm
/gps/pos/halfz 1 cm
/gps/position 0 0 0 cm
#/gps/direction 0 0.1 1.0
/gps/ang/type iso
/gps/ang/mintheta 10 degree
/gps/ang/maxtheta 20 degree
/run/beamOn 1
/vis/open OGL 800x800-0+0
/vis/drawVolume
/vis/viewer/set/viewpointThetaPhi 30 30
#/vis/viewer/zoom 30.
#/vis/viewer/set/style wireframe
#/vis/scene/add/axes 0 0 0 1 m
/vis/scene/add/trajectories rich smooth
/vis/modeling/trajectories/create/drawByCharge
#/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
#/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
/vis/scene/add/hits
/vis/scene/endOfEventAction accumulate 2
#/vis/filtering/trajectories/create/particleFilter
#/vis/filtering/trajectories/particleFilter-0/add gamma
#/vis/filtering/trajectories/particleFilter-0/invert true
#/vis/filtering/trajectories/particleFilter-0/verbose true
#/vis/filtering/trajectories/particleFilter-0/active true
/vis/ogl/set/displayListLimit 500000
/vis/viewer/flush
/run/beamOn 1
#/control/execute macro/gun.mac
# Usage example:
# npsim --runType vis --compactFile athena.xml --random.seed 1 --enableGun --gun.energy 2*GeV --gun.thetaMin 90*deg --gun.thetaMax 90*deg --gun.distribution uniform --macro macro/vis_OGL_along_z_beamOn_1.mac --outputFile test.root
/vis/open OGL 1920x1080
/vis/scene/create
/vis/scene/add/volume
/vis/sceneHandler/attach
/vis/viewer/zoom 10
/vis/viewer/flush
/vis/scene/add/trajectories
/vis/scene/add/hits
/run/beamOn 1
#include "DD4hep/Detector.h"
#include "DDG4/Geant4Data.h"
#include "DDRec/CellIDPositionConverter.h"
#include "DDRec/SurfaceManager.h"
#include "DDRec/Surface.h"
#include "fmt/core.h"
/** Example using dd4hep
*/
void example_dd4hep(const char* fname = "test_tracker_disc.root"){
using namespace ROOT::Math;
// -------------------------
// Get the DD4hep instance
// Load the compact XML file
// Initialize the position converter tool
dd4hep::Detector& detector = dd4hep::Detector::getInstance();
detector.fromCompact("athena.xml");
dd4hep::rec::CellIDPositionConverter cellid_converter(detector);
fmt::print("Detector Types:\n");
for(const auto& dtype : detector.detectorTypes() ) {
fmt::print(" {}\n", dtype);
}
fmt::print("\n");
fmt::print("All detector subsystem names:\n");
for(const auto& d : detector.detectors() ) {
fmt::print(" {}\n", d.first);
}
}
HepMC::Version 3.02.02
HepMC::Asciiv3-START_EVENT_LISTING
E 0 4 9
U GEV CM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 -9.9999999869440064e+00 1.0000000000000000e+01 5.1099888971089147e-04 4
P 2 1 22 -5.8225640056623670e-03 3.7747924008719728e-02 -2.9249301763891555e+00 2.9248270767857321e+00 -4.5408321610621201e-02 3
P 3 1 11 5.8225640056623670e-03 -3.7747924008719728e-02 -7.0750698105548508e+00 7.0751729232142679e+00 5.1101967722736764e-04 1
P 4 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 9.9995598131387851e+01 1.0000000000000000e+02 9.3827199999876709e-01 4
P 5 4 2212 0.0000000000000000e+00 0.0000000000000000e+00 9.9995598131482922e+01 1.0000000000009507e+02 9.3827199999973643e-01 3
V -3 0 [2,5]
P 6 -3 553 -1.4745608418116361e-02 -8.6828685571490272e-01 4.7980031183979008e+00 1.0642943648781511e+01 9.4603000000109834e+00 2
P 7 -3 2212 8.9230444123625328e-03 9.0603477972421620e-01 9.2272664838178372e+01 9.2281883429672035e+01 9.3827200000070576e-01 1
P 8 6 -13 4.4907597498767587e-01 2.0906320322010372e+00 -2.1757837479786910e+00 3.0524760533554351e+00 1.0565800000001382e-01 1
P 9 6 13 -4.6382158340577534e-01 -2.9589188879149320e+00 6.9737868663710216e+00 7.5904675954137195e+00 1.0565800000002223e-01 1
E 0 4 10
U GEV CM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 -9.9999999869440064e+00 1.0000000000000000e+01 5.1099888971089147e-04 4
P 2 1 22 -2.6839726606050791e-04 1.1264659797828775e-03 -6.3401069726794805e+00 6.3401067668601172e+00 -1.9876609922101014e-03 3
P 3 1 11 2.6839726606050791e-04 -1.1264659797828775e-03 -3.6598930142645258e+00 3.6598932331398828e+00 5.1103633096365880e-04 1
P 4 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 9.9995598131387851e+01 1.0000000000000000e+02 9.3827199999876709e-01 4
P 5 4 2212 0.0000000000000000e+00 0.0000000000000000e+00 9.9995598131482922e+01 1.0000000000009507e+02 9.3827199999973643e-01 3
V -3 0 [2,5]
P 6 -3 553 1.9156252814767760e-01 2.1790735768546463e-01 -2.8073109612741973e+00 9.8723072682332713e+00 9.4603000029807429e+00 2
P 7 -3 2212 -1.9183092541375127e-01 -2.1678089170561543e-01 9.6462802125352582e+01 9.6467799504704473e+01 9.3827199999779787e-01 1
P 8 6 -13 -2.4852998465289872e-01 2.3091049977702758e+00 -5.7337843777899966e+00 6.1871786743193251e+00 1.0565799999995498e-01 1
P 9 6 13 4.4342149179344215e-01 -2.1010576035711188e+00 2.9552377554469285e+00 3.6545395711486477e+00 1.0565800000003905e-01 1
P 10 6 22 -3.3289790532426214e-03 9.8599634176282647e-03 -2.8764338046322176e-02 3.0589019653741657e-02 3.2927225399135965e-10 1
E 0 4 9
U GEV CM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 -9.9999999869440064e+00 1.0000000000000000e+01 5.1099888971089147e-04 4
P 2 1 22 2.1549001953953920e-01 5.3446029602846556e-01 -6.2965867413439192e-01 6.1195545733789913e-01 -5.9503304168678661e-01 3
P 3 1 11 -2.1549001953953920e-01 -5.3446029602846556e-01 -9.3703413128096145e+00 9.3880445426621009e+00 5.0981276742689016e-04 1
P 4 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 9.9995598131387851e+01 1.0000000000000000e+02 9.3827199999876709e-01 4
P 5 4 2212 0.0000000000000000e+00 0.0000000000000000e+00 9.9995598131482922e+01 1.0000000000009507e+02 9.3827199999973643e-01 3
V -3 0 [2,5]
P 6 -3 553 2.2825834022061950e-01 3.3334310888886032e-01 3.5569092662904950e+01 3.6807891116586688e+01 9.4603000000031017e+00 2
P 7 -3 2212 -1.2768320678757170e-02 2.0111718714536578e-01 6.3796846795456545e+01 6.3804064341873378e+01 9.3827200000094813e-01 1
P 8 6 -13 -3.2477759288923482e+00 3.3065214111492942e+00 1.3631832024299879e+01 1.4398581189769127e+01 1.0565800000146809e-01 1
P 9 6 13 3.4760342691128936e+00 -2.9731783022605436e+00 2.1937260638593418e+01 2.2409309926805506e+01 1.0565799999797114e-01 1
E 0 4 9
U GEV CM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 -9.9999999869440064e+00 1.0000000000000000e+01 5.1099888971089147e-04 4
P 2 1 22 8.1053930688133671e-03 -1.2356942914208306e-02 -2.8212751471844815e+00 2.8212599310500082e+00 -1.7442735092468440e-02 3
P 3 1 11 -8.1053930688133671e-03 1.2356942914208306e-02 -7.1787248397595249e+00 7.1787400689499918e+00 5.1101148051165002e-04 1
P 4 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 9.9995598131387851e+01 1.0000000000000000e+02 9.3827199999876709e-01 4
P 5 4 2212 0.0000000000000000e+00 0.0000000000000000e+00 9.9995598131482922e+01 1.0000000000009507e+02 9.3827199999973643e-01 3
V -3 0 [2,5]
P 6 -3 553 -2.4074047134142244e-02 2.6879165673024504e-02 5.1101881387075991e+00 1.0752330024333787e+01 9.4602999999952058e+00 2
P 7 -3 2212 3.2179440203073603e-02 -3.9236108587412617e-02 9.2064134846942238e+01 9.2068929908251562e+01 9.3827200000167510e-01 1
P 8 6 -13 3.4101173607658830e+00 -1.3038459453885907e+00 5.9422927439678519e+00 6.9750212423676778e+00 1.0565800000106459e-01 1
P 9 6 13 -3.4341914079000371e+00 1.3307251110616287e+00 -8.3210460525766239e-01 3.7773087819715596e+00 1.0565800000016515e-01 1
E 0 1 3
U GEV MM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+01 1.0000000000000000e+01 0.0000000000000000e+00 4
P 2 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 9.3799999999999994e-01 9.3799999999999994e-01 4
V -1 0 [1,2]
P 3 -1 11 8.3077231638512800e-02 3.4688303864359871e-01 -9.3422177831854492e-01 1.0000001305604915e+00 5.1100000015238706e-04 1
E 0 1 3
U GEV MM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+01 1.0000000000000000e+01 0.0000000000000000e+00 4
P 2 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 9.3799999999999994e-01 9.3799999999999994e-01 4
V -1 0 [1,2]
P 3 -1 11 7.2104820115711854e-01 1.5628742640734802e-01 -1.8589415622754393e+00 2.0000000652802488e+00 5.1100000036965185e-04 1
E 0 1 3
U GEV MM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+01 1.0000000000000000e+01 0.0000000000000000e+00 4
P 2 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 9.3799999999999994e-01 9.3799999999999994e-01 4
V -1 0 [1,2]
P 3 -1 11 -1.4361173664326103e+00 -9.3836236801405426e-01 -2.4611060473140363e+00 3.0000000435201661e+00 5.1100000036965185e-04 1
E 0 1 3
U GEV MM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+01 1.0000000000000000e+01 0.0000000000000000e+00 4
P 2 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 9.3799999999999994e-01 9.3799999999999994e-01 4
V -1 0 [1,2]
P 3 -1 11 -2.6126728458756499e-01 2.0189611701651842e+00 -3.4431867796228350e+00 4.0000000326401244e+00 5.1099999515529708e-04 1
E 0 1 3
U GEV MM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+01 1.0000000000000000e+01 0.0000000000000000e+00 4
P 2 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 9.3799999999999994e-01 9.3799999999999994e-01 4
V -1 0 [1,2]
P 3 -1 11 8.5091281358231141e-01 -2.4919887833464918e+00 -4.2504046027827407e+00 5.0000000261121000e+00 5.1099999863153363e-04 1
E 0 1 3
U GEV MM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+01 1.0000000000000000e+01 0.0000000000000000e+00 4
P 2 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 9.3799999999999994e-01 9.3799999999999994e-01 4
V -1 0 [1,2]
P 3 -1 11 -2.5637625613563038e+00 2.9774447329110156e+00 -4.5345280230083720e+00 6.0000000217600835e+00 5.1100000210777007e-04 1
E 0 1 3
U GEV MM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+01 1.0000000000000000e+01 0.0000000000000000e+00 4
P 2 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 9.3799999999999994e-01 9.3799999999999994e-01 4
V -1 0 [1,2]
P 3 -1 11 8.5248676124549916e-01 1.3423464093622672e+00 -6.8169914507188132e+00 7.0000000186514999e+00 5.1100000210777007e-04 1
E 0 1 3
U GEV MM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+01 1.0000000000000000e+01 0.0000000000000000e+00 4
P 2 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 9.3799999999999994e-01 9.3799999999999994e-01 4
V -1 0 [1,2]
P 3 -1 11 2.7295844590149682e-01 -1.0660162875541499e+00 -7.9239575315293242e+00 8.0000000163200617e+00 5.1099999515529708e-04 1
E 0 1 3
U GEV MM
HepMC::Asciiv3-END_EVENT_LISTING
...@@ -18,21 +18,22 @@ from matplotlib.patches import Rectangle, Circle ...@@ -18,21 +18,22 @@ from matplotlib.patches import Rectangle, Circle
CRYSTAL_SIZE = (20., 20., 200.) # mm CRYSTAL_SIZE = (20., 20., 200.) # mm
CRYSTAL_GAP = 0.5 # mm CRYSTAL_GAP = 0.5 # mm
CRYSTAL_ALIGNMENT = [ CRYSTAL_ALIGNMENT = [
(7, 17), (7, 17), (7, 17), (6, 18), (5, 21), (5, 21), (5, 21), (4, 22),
(6, 18), (5, 19), (3, 19), (0, 22), (3, 23), (0, 26), (0, 24), (0, 24),
(0, 22), (0, 22), (0, 22), (0, 22), (0, 24), (0, 24), (0, 24), (0, 24),
(0, 20), (0, 20), (0, 18), (0, 18), (0, 22), (0, 22), (0, 20), (0, 20),
(0, 16), (0, 16), (0, 14), (0, 14), (0, 18), (0, 18), (0, 16), (0, 16),
(0, 12), (0, 12), (0, 6), (0, 6), (0, 14), (0, 14), (0, 12), (0, 12),
(0, 6), (0, 6),
] ]
GLASS_SIZE = (40., 40., 400.) # mm GLASS_SIZE = (40., 40., 400.) # mm
GLASS_GAP = 1.0 # mm GLASS_GAP = 1.0 # mm
GLASS_ALIGNMENT = [ GLASS_ALIGNMENT = [
(12, 11), (12, 11), (12, 11), (11, 11), (13, 10), (13, 10), (13, 10), (12, 10),
(11, 11), (11, 11), (10, 12), (9, 12), (12, 10), (12, 10), (11, 11), (10, 11),
(8, 13), (7, 14), (6, 14), (3, 16), (9, 12), (8, 13), (7, 13), (6, 14),
(0, 19), (0, 18), (0, 18), (0, 16), (3, 16), (0, 18), (0, 18), (0, 16),
(0, 16), (0, 14), (0, 13), (0, 11), (0, 16), (0, 14), (0, 13), (0, 11),
(0, 10), (0, 7), (0, 3), (0, 10), (0, 7), (0, 3),
] ]
...@@ -92,7 +93,7 @@ def compact_constants(path, names): ...@@ -92,7 +93,7 @@ def compact_constants(path, names):
if __name__ == '__main__': if __name__ == '__main__':
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('-s', '--save', default='compact/ce_ecal_crystal_glass.xml', parser.add_argument('-s', '--save', default='ce_ecal_placement_test.xml',
help='path to save compact file.') help='path to save compact file.')
parser.add_argument('-c', '--compact', default='', parser.add_argument('-c', '--compact', default='',
help='compact file to get contant to plot') help='compact file to get contant to plot')
......
...@@ -44,28 +44,30 @@ done ...@@ -44,28 +44,30 @@ done
set -- "${POSITIONAL[@]}" # restore positional parameters set -- "${POSITIONAL[@]}" # restore positional parameters
# Side view # Side view (lines)
dawncut 1 0 0 1 ${INPUT_FILE} ${FILE_TAG}_temp0.prim dawncut -1 0 0 1 ${INPUT_FILE} ${FILE_TAG}.prim
dawncut -1 0 0 1 ${FILE_TAG}_temp0.prim ${FILE_TAG}.prim # dawncut 1 0 0 1 ${INPUT_FILE} ${FILE_TAG}_temp0.prim
../../bin/dawn_tweak --mag 10 # dawncut -1 0 0 1 ${FILE_TAG}_temp0.prim ${FILE_TAG}.prim
dawn -d ${FILE_TAG}.prim ../../bin/dawn_tweak --mag 10 --draw 3 --theta 165 --phi 75 --light-theta 180 --light-phi 90
dawn -d ${FILE_TAG}.prim
ps2pdf ${FILE_TAG}.eps ${FILE_TAG}_full.pdf ps2pdf ${FILE_TAG}.eps ${FILE_TAG}_full.pdf
gs -o ${FILE_TAG}.pdf -sDEVICE=pdfwrite \ gs -o ${FILE_TAG}.pdf -sDEVICE=pdfwrite \
-c "[/CropBox [51 250 550 590] /PAGES pdfmark" \ -c "[/CropBox [51 250 550 590] /PAGES pdfmark" \
-f ${FILE_TAG}_full.pdf -f ${FILE_TAG}_full.pdf
pdftoppm ${FILE_TAG}.pdf ${FILE_TAG} -png -singlefile -cropbox pdftoppm ${FILE_TAG}.pdf ${FILE_TAG} -png -singlefile -cropbox -thinlinemode solid -aaVector yes -r 600
# Top view # Top view
#dawncut 0 -1 0 1 ${INPUT_FILE} ${FILE_TAG}.prim
dawncut 0 1 0 1 ${INPUT_FILE} ${FILE_TAG}_temp0.prim dawncut 0 1 0 1 ${INPUT_FILE} ${FILE_TAG}_temp0.prim
dawncut 0 -1 0 1 ${FILE_TAG}_temp0.prim ${FILE_TAG}.prim dawncut 0 -1 0 1 ${FILE_TAG}_temp0.prim ${FILE_TAG}.prim
../../bin/dawn_tweak --theta 270 --mag 20 ../../bin/dawn_tweak --mag 10 --draw 1 --theta 90 --phi 90
dawn -d ${FILE_TAG}.prim dawn -d ${FILE_TAG}.prim
ps2pdf ${FILE_TAG}.eps ${FILE_TAG}_top_full.pdf ps2pdf ${FILE_TAG}.eps ${FILE_TAG}_top_full.pdf
gs -o ${FILE_TAG}_top.pdf -sDEVICE=pdfwrite \ gs -o ${FILE_TAG}_top.pdf -sDEVICE=pdfwrite \
-c "[/CropBox [51 250 550 590] /PAGES pdfmark" \ -c "[/CropBox [51 250 550 590] /PAGES pdfmark" \
-f ${FILE_TAG}_top_full.pdf -f ${FILE_TAG}_top_full.pdf
pdftoppm ${FILE_TAG}_top.pdf ${FILE_TAG}_top -png -singlefile -cropbox pdftoppm ${FILE_TAG}_top.pdf ${FILE_TAG}_top -png -singlefile -cropbox -thinlinemode solid -aaVector yes
1.34392e+07
90
180
0
0
0
25000
2.0
1
0.001
0
1
1
1
0.5
0.5
0.5
19
71
0.001
0.001
0.001
3
71
0.001
0
0
1
evince
0
0
1.34392e+07
0
180
0
0
0
0
8
1
0.001
0
1
1
1
0.5
0.5
0.5
19
71
0.01
0.01
0.01
3
70
0.01
1
1
1
evince
0
0
...@@ -18,7 +18,7 @@ tan () ...@@ -18,7 +18,7 @@ tan ()
function print_the_help { function print_the_help {
echo "USAGE: $0 -i <PRIM_FILE> " echo "USAGE: $0 -i <PRIM_FILE> <slices ...> "
echo " OPTIONS: " echo " OPTIONS: "
echo " -t,--tag filename tag (default: view1)" echo " -t,--tag filename tag (default: view1)"
exit exit
...@@ -48,12 +48,16 @@ do ...@@ -48,12 +48,16 @@ do
shift # past argument shift # past argument
shift # past value shift # past value
;; ;;
*) # unknown option -[a-zA-Z]*) # unknown option
#POSITIONAL+=("$1") # save it in an array for later POSITIONAL+=("$1") # save it in an array for later
echo "unknown option $1" echo "unknown option $1"
print_the_help print_the_help
shift # past argument shift # past argument
;; ;;
*) # positional options
POSITIONAL+=("$1") # save it in an array for later
shift # past argument
;;
esac esac
done done
set -- "${POSITIONAL[@]}" # restore positional parameters set -- "${POSITIONAL[@]}" # restore positional parameters
...@@ -62,17 +66,6 @@ set -- "${POSITIONAL[@]}" # restore positional parameters ...@@ -62,17 +66,6 @@ set -- "${POSITIONAL[@]}" # restore positional parameters
echo "view12 produces a series of slightly rotated XY slices a different z locations. Along beamline" echo "view12 produces a series of slightly rotated XY slices a different z locations. Along beamline"
# slice at z = 2m
# note the offset has to change with sign of the direction to cut in the opposite direction.
dawncut 0 0 1 2005 ${INPUT_FILE} ${FILE_TAG}b_temp0.prim
dawncut 0 0 -1 -2000 ${FILE_TAG}b_temp0.prim ${FILE_TAG}b.prim
dawn -d ${FILE_TAG}b.prim
ps2pdf ${FILE_TAG}b.eps ${FILE_TAG}b_full.pdf
gs -o ${FILE_TAG}b.pdf -sDEVICE=pdfwrite \
-c "[/CropBox [50 175 550 675] /PAGES pdfmark" \
-f ${FILE_TAG}b_full.pdf
pdftoppm ${FILE_TAG}b.pdf ${FILE_TAG}b -png -singlefile -cropbox
original_file_tag="${FILE_TAG}" original_file_tag="${FILE_TAG}"
make_slice(){ make_slice(){
...@@ -90,9 +83,10 @@ make_slice(){ ...@@ -90,9 +83,10 @@ make_slice(){
rm "${FILE_TAG}_temp0.prim" rm "${FILE_TAG}_temp0.prim"
rm "${FILE_TAG}.prim" rm "${FILE_TAG}.prim"
} }
for zzz in $(seq 50 50 2000) ;
for zzz in $@ ;
do do
make_slice ${zzz} & make_slice ${zzz}
done done
wait wait
......
...@@ -9,7 +9,7 @@ function print_the_help { ...@@ -9,7 +9,7 @@ function print_the_help {
exit exit
} }
FILE_TAG="view2" FILE_TAG="view13"
INPUT_FILE="g4_0000.prim" INPUT_FILE="g4_0000.prim"
......
0.0
72.5
189.5
0
0
0
1500
55
3
0.001
0
1
1
1
0.5
0.5
0.5
25.5
71
0.001
0.001
0.001
1
70
0.001
1
0
1
evince
0
0
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
function print_the_help { function print_the_help {
echo "USAGE: $0 -i <PRIM_FILE> " echo "USAGE: $0 -i <PRIM_FILE> <slices ...> "
echo " OPTIONS: " echo " OPTIONS: "
echo " -t,--tag filename tag (default: view1)" echo " -t,--tag filename tag (default: view1)"
exit exit
...@@ -53,34 +53,22 @@ do ...@@ -53,34 +53,22 @@ do
shift # past argument shift # past argument
shift # past value shift # past value
;; ;;
*) # unknown option -[a-zA-Z]*) # unknown option
#POSITIONAL+=("$1") # save it in an array for later POSITIONAL+=("$1") # save it in an array for later
echo "unknown option $1" echo "unknown option $1"
print_the_help print_the_help
shift # past argument shift # past argument
;; ;;
*) # positional options
POSITIONAL+=("$1") # save it in an array for later
shift # past argument
;;
esac esac
done done
set -- "${POSITIONAL[@]}" # restore positional parameters set -- "${POSITIONAL[@]}" # restore positional parameters
# units are mm # units are mm
echo "view14 produces a series of slightly rotated XY slices a different z locations. Along beamline"
# slice at z = 2m
# note the offset has to change with sign of the direction to cut in the opposite direction.
dawncut 0 0 1 10005 ${INPUT_FILE} ${FILE_TAG}b_temp0.prim
dawncut 0 0 -1 -1000 ${FILE_TAG}b_temp0.prim ${FILE_TAG}b.prim
dawn -d ${FILE_TAG}b.prim
ps2pdf ${FILE_TAG}b.eps ${FILE_TAG}b_full.pdf
gs -o ${FILE_TAG}b.pdf -sDEVICE=pdfwrite \
-c "[/CropBox [50 175 550 675] /PAGES pdfmark" \
-f ${FILE_TAG}b_full.pdf
pdftoppm ${FILE_TAG}b.pdf ${FILE_TAG}b -png -singlefile -cropbox
echo "done ..."
original_file_tag="${FILE_TAG}" original_file_tag="${FILE_TAG}"
make_slice(){ make_slice(){
...@@ -102,7 +90,8 @@ make_slice(){ ...@@ -102,7 +90,8 @@ make_slice(){
rm "${FILE_TAG}_temp0.prim" rm "${FILE_TAG}_temp0.prim"
rm "${FILE_TAG}.prim" rm "${FILE_TAG}.prim"
} }
for zzz in $(seq 150 50 2000) ;
for zzz in $@ ;
do do
make_slice ${zzz} make_slice ${zzz}
done done
......
0.0
72.5
189.5
0
0
0
1500
50
3
0.001
0
1
1
1
0.5
0.5
0.5
25.5
71
0.001
0.001
0.001
1
70
0.001
1
0
1
evince
0
0