Skip to content
Snippets Groups Projects
Commit 5c734ab0 authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

Merge branch 'cherenkov' into 'master'

Cherenkov photon detector

See merge request !43
parents 544c140e 681c51d0
Branches
Tags
No related merge requests found
Showing
with 905 additions and 291 deletions
......@@ -32,6 +32,7 @@ endif()
# ---------------------------------------------------------------------------
# load additional OS dependent settings
include(cmake/os.cmake)
include(cmake/root.cmake)
#----------------------------------------------------------------------------
# Find Libraries
......
......@@ -6,7 +6,7 @@
/gps/number 1
/gps/ene/type Gauss
/gps/ene/mono 3.0 GeV
/gps/ene/mono 5.0 GeV
/gps/ene/sigma 2.0 GeV
/gps/pos/type Volume
......@@ -16,7 +16,7 @@
/gps/pos/halfz 0.01 cm
/gps/position 0 0 0
#/gps/direction 1 0 0
#/gps/direction 0 0.1 1
/gps/ang/type iso
/run/beamOn 100
#!/bin/bash
rm -f simple_example_out.slcio
rm -f simple_example_out.root
#ddsim --runType run --enableG4GPS \
# --macroFile gps.mac \
......@@ -15,7 +13,7 @@ rm -f simple_example_out.root
ddsim --runType run --enableG4GPS \
--macroFile gps.mac \
--compactFile ./solid.xml \
--compactFile ./solid_sidis.xml \
--outputFile simple_example_out.root
#anajob example1_ddsim_out.slcio | tail -n 30 > collections.txt
......
......@@ -5,12 +5,14 @@ cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
# locations on all platforms.
include(GNUInstallDirs)
include ( ${DD4hep_DIR}/cmake/DD4hep.cmake )
dd4hep_configure_output()
#-----------------------------------------------------------------------------------
find_package(Acts REQUIRED COMPONENTS Core IdentificationPlugin TGeoPlugin DD4hepPlugin )
dd4hep_configure_output()
add_subdirectory(pid/sdet)
#dd4hep_package (GenDetectors MAJOR ${NPDet_VERSION_MAJOR} MINOR ${NPDet_VERSION_MINOR} PATCH ${NPDet_VERSION_PATCH}
# USES [ROOT REQUIRED COMPONENTS Geom GenVector]
# [DD4hep REQUIRED COMPONENTS DDCore DDRec]
......@@ -43,6 +45,7 @@ dd4hep_add_plugin(GenDetectors
)
target_link_libraries(GenDetectors
PUBLIC DDG4_PIDsdet
PUBLIC DD4hep::DDCore DD4hep::DDRec
PUBLIC ActsCore
)
......
{
"material": "N2 gas",
"property": "index of refraction",
"data": {
"wavelengths": [
150.0, 160.0, 170.0, 180.0, 190.0, 200.0, 210.0, 220.0, 230.0, 240.0, 250.0,
260.0, 270.0, 280.0, 290.0, 300.0, 310.0, 320.0, 330.0, 340.0, 350.0, 360.0,
370.0, 380.0, 390.0, 400.0, 410.0, 420.0, 430.0, 440.0, 450.0, 460.0, 470.0,
480.0, 490.0, 500.0, 510.0, 520.0, 530.0, 540.0, 550.0, 560.0, 570.0, 580.0,
590.0, 600.0, 610.0, 620.0, 630.0, 640.0, 650.0, 660.0, 670.0, 680.0, 690.0,
700.0, 710.0, 720.0, 730.0, 740.0, 750.0, 760.0, 770.0, 780.0, 790.0,
800.0],
"energies": [8.26667, 7.75, 7.29412, 6.88889, 6.52632, 6.2, 5.90476,
5.63636, 5.3913, 5.16667, 4.96, 4.76923, 4.59259, 4.42857, 4.27586,
4.13333, 4.0, 3.875, 3.75758, 3.64706, 3.54286, 3.44444, 3.35135,
3.26316, 3.17949, 3.1, 3.02439, 2.95238, 2.88372, 2.81818, 2.75556,
2.69565, 2.6383, 2.58333, 2.53061, 2.48, 2.43137, 2.38462, 2.33962,
2.2963, 2.25455, 2.21429, 2.17544, 2.13793, 2.10169, 2.06667,
2.03279, 2.0, 1.96825, 1.9375, 1.90769, 1.87879, 1.85075, 1.82353,
1.7971, 1.77143, 1.74648, 1.72222, 1.69863, 1.67568, 1.65333,
1.63158, 1.61039, 1.58974, 1.56962, 1.55],
"index of refraction": [1.0004, 1.00038,
1.00037, 1.00036, 1.00035, 1.00034, 1.00034, 1.00033, 1.00033,
1.00032, 1.00032, 1.00032, 1.00032, 1.00032, 1.00031, 1.00031,
1.00031, 1.00031, 1.00031, 1.00031, 1.00031, 1.00031, 1.00031,
1.00031, 1.0003, 1.0003, 1.0003, 1.0003, 1.0003, 1.0003, 1.0003,
1.0003, 1.0003, 1.0003, 1.0003, 1.0003, 1.0003, 1.0003, 1.0003,
1.0003, 1.0003, 1.0003, 1.0003, 1.0003, 1.0003, 1.0003, 1.0003,
1.0003, 1.0003, 1.0003, 1.0003, 1.0003, 1.0003, 1.0003, 1.0003,
1.0003, 1.0003, 1.0003, 1.0003, 1.0003, 1.0003, 1.0003, 1.0003,
1.0003, 1.0003, 1.0003]
},
"comments": "Standard conditions: 0 °C; 101 325 Pa.",
"reference": "https://refractiveindex.info/?shelf=main&book=N2&page=Griesmann"
}
<lccdd>
<info name="beam_pipe" title="Beam pipe test"
author="Whitney Armstrong"
url="https://eicweb.phy.anl.gov/EIC/NPDet"
status="development"
version="">
<comment>EIC Beam Pipe</comment>
</info>
<includes>
<gdmlFile ref="elements.xml"/>
<gdmlFile ref="materials.xml"/>
<gdmlFile ref="material_properties.xml"/>
</includes>
<material_properties>
<material_properties_table name="N2derp">
<data file="N2_index_of_refraction.json" />
</material_properties_table>
</material_properties>
<derps>
</derps>
<define>
<constant name="world_side" value="10*m"/>
<constant name="world_x" value="world_side"/>
<constant name="world_y" value="world_side"/>
<constant name="world_z" value="10*world_side"/>
<constant name="CrossingAngle" value="0.020*rad"/>
<constant name="CentralBeamPipe_length" value="50.0*cm"/>
<constant name="CentralBeamPipe_thickness" value="0.1*mm"/>
<constant name="CentralBeamPipe_radius" value="3.5*cm"/>
<constant name="CentralBeamPipe_z" value="0.0*cm"/>
<constant name="UpStreamBeamPipe_length" value="150.0*cm"/>
<constant name="UpStreamBeamPipe_thickness" value="0.1*mm"/>
<constant name="UpStreamBeamPipe_radius" value="5*cm"/>
<constant name="UpStreamBeamPipe_z" value="-1.0*(CentralBeamPipe_length+UpStreamBeamPipe_length)/2.0"/>
<constant name="DownStreamBeamPipe_length" value="250.0*cm"/>
<constant name="DownStreamBeamPipe_thickness" value="0.1*mm"/>
<constant name="DownStreamBeamPipe_radius" value="5*cm"/>
<constant name="DownStreamBeamPipe_z" value="1.0*(CentralBeamPipe_length+DownStreamBeamPipe_length)/2.0"/>
<constant name="Place_Center" value="0*cm"/>
<constant name="ForwardTrackerPlane_z0" value="400*cm"/>
<constant name="tracking_region_radius" value="1.0*cm"/>
<constant name="tracking_region_zmax" value="2.0*m"/>
<constant name="tracker_region_rmax" value="tracking_region_radius"/>
<constant name="tracker_region_zmax" value="tracking_region_zmax"/>
</define>
<limits>
<limitset name="cal_limits">
<limit name="step_length_max" particles="*" value="5.0" unit="mm" />
</limitset>
<limitset name="SiTrackerBarrelRegionLimitSet">
<limit name="step_length_max" particles="*" value="5.0" unit="mm" />
<limit name="track_length_max" particles="*" value="5.0" unit="mm" />
<limit name="time_max" particles="*" value="5.0" unit="ns" />
<limit name="ekin_min" particles="*" value="0.01" unit="MeV" />
<limit name="range_min" particles="*" value="5.0" unit="mm" />
</limitset>
</limits>
<regions>
<region name="SiTrackerBarrelRegion" eunit="MeV" lunit="mm" cut="0.001" threshold="0.001">
<limitsetref name="SiTrackerBarrelRegionLimitSet"/>
</region>
</regions>
<limits>
<limitset name="Tracker_limits">
<limit name="step_length_max" particles="*" value="5.0" unit="mm" />
</limitset>
</limits>
<comment>Common Generic visualization attributes</comment>
<display>
<vis name="InvisibleNoDaughters" showDaughters="false" visible="false"/>
<vis name="InvisibleWithDaughters" showDaughters="true" visible="false"/>
<vis name="GreenVis" alpha="0.5" r= "0.0" g="1.0" b="0.0" showDaughters="true" visible="true"/>
<vis name="RedVis" alpha="0.5" r= "1.0" g="0.0" b="0.0" showDaughters="true" visible="true"/>
<vis name="BlueVis" alpha="0.5" r= "0.0" g="0.0" b="1.0" showDaughters="true" visible="true"/>
<vis name="OrangeVis" alpha="0.5" r= "1.0" g="0.45" b="0.0" showDaughters="true" visible="true"/>
<vis name="RedGreenVis" alpha="0.5" r= "1.0" g="1.0" b="0.0" showDaughters="true" visible="true"/>
<vis name="BlueGreenVis" alpha="0.5" r= "0.0" g="1.0" b="1.0" showDaughters="true" visible="true"/>
<vis name="PurpleVis" alpha="0.5" r= "1.0" g="0.0" b="1.0" showDaughters="true" visible="true"/>
<vis name="DoubleRedG" alpha="0.5" r= "2.0" g=".10" b="0.0" showDaughters="true" visible="true"/>
<vis name="RBG015" alpha="0.5" r= "0.0" g=".2" b="1.0" showDaughters="true" visible="true"/>
<vis name="RBG510" alpha="0.5" r= "1.0" g=".2" b="0.0" showDaughters="true" visible="true"/>
<vis name="RBG" alpha="0.5" r= "1.0" g="1.0" b="1.0" showDaughters="true" visible="true"/>
<vis name="GrayVis" alpha="1.0" r= "0.75" g="0.75" b="0.75" showDaughters="true" visible="true"/>
</display>
<detectors>
<detector id="5" name="ForwardRich" type="ForwardRICH" vis="BlueGreenVis" >
</detector>
<!--
<detector
name="TrackerPlanes"
type="ForwardPlaneTracker"
vis="PurpleVis"
id="1"
limits="Tracker_limits"
readout="TPCollection"
insideTrackingVolume="true">
<layer z_offset="ForwardTrackerPlane_z0+10*cm" id="0">
<module name="SinglePlane" thickness="1*cm" x_half="100*cm" y_half="100*cm" material="CarbonFiber" vis="BlueVis" />
<sensitive thickness="0.1*mm" material="Air" vis="GreenVis" />
</layer>
<layer z_offset="ForwardTrackerPlane_z0+20*cm" id="1">
<module name="SinglePlane1" thickness="1*cm" x_half="100*cm" y_half="100*cm" material="CarbonFiber" vis="BlueVis" />
<sensitive thickness="0.1*mm" material="Air" vis="GreenVis" />
</layer>
<layer z_offset="ForwardTrackerPlane_z0+40*cm" id="2">
<module name="SinglePlane2" thickness="1*cm" x_half="100*cm" y_half="100*cm" material="CarbonFiber" vis="BlueVis" />
<sensitive thickness="0.1*mm" material="Air" vis="GreenVis" />
</layer>
<layer z_offset="ForwardTrackerPlane_z0+70*cm" id="3">
<module name="SinglePlane3" thickness="1*cm" x_half="100*cm" y_half="100*cm" material="CarbonFiber" vis="BlueVis" />
<sensitive thickness="0.1*mm" material="Air" vis="GreenVis" />
</layer>
<layer z_offset="ForwardTrackerPlane_z0+100*cm" id="4">
<module name="SinglePlane4" thickness="1*cm" x_half="100*cm" y_half="100*cm" material="CarbonFiber" vis="BlueVis" />
<sensitive thickness="0.1*mm" material="Air" vis="GreenVis" />
</layer>
</detector>
-->
</detectors>
<!--
<readouts>
<readout name="TPCollection">
<segmentation type="CartesianGridXY" grid_size_x="10.0*cm" grid_size_y="10.0*cm" />
<id>system:5,layer:9,module:8,x:32:-16,y:-16</id>
</readout>
</readouts>
-->
</lccdd>
/control/verbose 2
/run/initialize
/gps/verbose 2
/gps/particle e-
/gps/number 3
/gps/ene/type Gauss
/gps/ene/mono 9.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 0.01 cm
/gps/position 0 0 0
#/gps/direction 1 0 0
/gps/ang/type iso
/gps/ang/mintheta 178 deg
/run/beamOn 100
<?xml version="1.0" encoding="UTF-8"?>
<material_properties>
<material_properties_table name="N2">
<data file="N2_index_of_refraction.json" />
</material_properties_table>
<!--
<material name="PolystyreneFoam">
<D type="density" value="0.0056" unit="g/cm3"/>
<fraction n="1.0" ref="Polystyrene"/>
</material>
<material name="Kapton">
<D value="1.43" unit="g/cm3" />
<composite n="22" ref="C"/>
<composite n="10" ref="H" />
<composite n="2" ref="N" />
<composite n="5" ref="O" />
</material>
<material name="PEEK">
<D value="1.37" unit="g/cm3" />
<composite n="19" ref="C"/>
<composite n="12" ref="H" />
<composite n="3" ref="O" />
</material>
-->
</material_properties>
#!/bin/bash
rm -f forward_rich.slcio
rm -f forward_rich.root
#ddsim --runType run --enableG4GPS \
# --macroFile gps.mac \
# --compactFile detectors/SiD/slic/sieic3/sieic3_compact.xml \
# --outputFile slic_ddsim_out.slcio
#ddsim --runType run --enableG4GPS \
# --macroFile gps.mac \
# --compactFile detectors/SiD/compact/sid_working/sidloi3_v00.xml \
# --outputFile example1_ddsim_out.slcio
#ddsim --runType run --enableG4GPS \
# --macroFile gps.mac \
# --compactFile ./gem_tracker_disc.xml \
# --outputFile test_tracker_disc.root
ddsim --runType run --enableG4GPS \
--macroFile gps.mac \
--compactFile ./roman_pots.xml \
--outputFile roman_pot_test.root
#anajob example1_ddsim_out.slcio | tail -n 30 > collections.txt
#rm outputfile.slcio
#Marlin steering_files/basicsteering.xml
#
#anajob outputfile.slcio | tail -n 30 > collections2.txt
......@@ -116,14 +116,15 @@
<detectors>
<detector id="1" name="ForwardRICH" type="GenericRICH" readout="ForwardRICHHits" vis="RedVis" material="N2cherenkov">
<dimensions rmin="10*cm" rmax1="40*cm" rmax2="80*cm" zmin="20*cm" zmax="120*cm"/>
<dimensions rmin="10*cm" rmax1="80*cm" rmax2="120*cm" zmin="20*cm" zmax="120*cm"/>
</detector>
</detectors>
<!-- Definition of the readout segmentation/definition -->
<readouts>
<readout name="ForwardRICHHits">
<id>system:5,layer:4,module:14,sensor:2,side:32:-2,strip:24</id>
<segmentation type="CartesianGridXY" grid_size_x="3*mm" grid_size_y="3*mm" />
<id>system:5,layer:4,module:14,x:32:-16,y:-16</id>
</readout>
</readouts>
......
<lccdd>
<info name="TestMaterialProperties"
title="Test reading of TGeo's Material Properties"
author="Markus Frank"
url="None"
status="development"
version="1.0">
<comment>Test reading of TGeo's Material Properties</comment>
</info>
<define>
<constant name="world_side" value="1*m"/>
<constant name="world_x" value="world_side/2"/>
<constant name="world_y" value="world_side/2"/>
<constant name="world_z" value="world_side/2"/>
</define>
<properties>
<matrix name="RINDEX__0x123aff00" coldim="2" values="
2.034*eV 1.3435
2.068*eV 1.344
2.103*eV 1.3445
2.139*eV 1.345
2.177*eV 1.3455
2.216*eV 1.346
2.256*eV 1.3465
2.298*eV 1.347
2.341*eV 1.3475
2.386*eV 1.348
2.433*eV 1.3485
2.481*eV 1.3492
2.532*eV 1.35
2.585*eV 1.3505
2.640*eV 1.351
2.697*eV 1.3518
2.757*eV 1.3522
2.820*eV 1.3530
2.885*eV 1.3535
2.954*eV 1.354
3.026*eV 1.3545
3.102*eV 1.355
3.181*eV 1.3555
3.265*eV 1.356
3.353*eV 1.3568
3.446*eV 1.3572
3.545*eV 1.358
3.649*eV 1.3585
3.760*eV 1.359
3.877*eV 1.3595
4.002*eV 1.36
4.136*eV 1.3608
"/>
<matrix name="ABSLENGTH__0x123aff00" coldim="2" values="
2.034*eV 3.448*m
2.068*eV 4.082*m
2.103*eV 6.329*m
2.139*eV 9.174*m
2.177*eV 12.346*m
2.216*eV 13.889*m
2.256*eV 15.152*m
2.298*eV 17.241*m
2.341*eV 18.868*m
2.386*eV 20.000*m
2.433*eV 26.316*m
2.481*eV 35.714*m
2.532*eV 45.455*m
2.585*eV 47.619*m
2.640*eV 52.632*m
2.697*eV 52.632*m
2.757*eV 55.556*m
2.820*eV 52.632*m
2.885*eV 52.632*m
2.954*eV 47.619*m
3.026*eV 45.455*m
3.102*eV 41.667*m
3.181*eV 37.037*m
3.265*eV 33.333*m
3.353*eV 30.000*m
3.446*eV 28.500*m
3.545*eV 27.000*m
3.649*eV 24.500*m
3.760*eV 22.000*m
3.877*eV 19.500*m
4.002*eV 17.500*m
4.136*eV 14.500*m
"/>
<matrix name= "FASTCOMPONENT__0x123aff00" coldim="2" values="
2.034*eV 1
2.068*eV 1
2.103*eV 1
2.139*eV 1
2.177*eV 1
2.216*eV 1
2.256*eV 1
2.298*eV 1
2.341*eV 1
2.386*eV 1
2.433*eV 1
2.481*eV 1
2.532*eV 1
2.585*eV 1
2.640*eV 1
2.697*eV 1
2.757*eV 1
2.820*eV 1
2.885*eV 1
2.954*eV 1
3.026*eV 1
3.102*eV 1
3.181*eV 1
3.265*eV 1
3.353*eV 1
3.446*eV 1
3.545*eV 1
3.649*eV 1
3.760*eV 1
3.877*eV 1
4.002*eV 1
4.136*eV 1
"/>
<matrix name= "SLOWCOMPONENT__0x123aff00" coldim="2" values="
2.034*eV 0.01
2.068*eV 1
2.103*eV 2
2.139*eV 3
2.177*eV 4
2.216*eV 5
2.256*eV 6
2.298*eV 7
2.341*eV 8
2.386*eV 9
2.433*eV 8
2.481*eV 7
2.532*eV 6
2.585*eV 4
2.640*eV 3
2.697*eV 2
2.757*eV 1
2.820*eV 0.01
2.885*eV 1
2.954*eV 2
3.026*eV 3
3.102*eV 4
3.181*eV 5
3.265*eV 6
3.353*eV 7
3.446*eV 8
3.545*eV 9
3.649*eV 8
3.760*eV 7
3.877*eV 6
4.002*eV 5
4.136*eV 4
"/>
<ignore>
<matrix name= "REFLECTIVITY__0x123aff00" coldim="2" values="
2.034*eV
2.068*eV
2.103*eV
2.139*eV
2.177*eV
2.216*eV
2.256*eV
2.298*eV
2.341*eV
2.386*eV
2.433*eV
2.481*eV
2.532*eV
2.585*eV
2.640*eV
2.697*eV
2.757*eV
2.820*eV
2.885*eV
2.954*eV
3.026*eV
3.102*eV
3.181*eV
3.265*eV
3.353*eV
3.446*eV
3.545*eV
3.649*eV
3.760*eV
3.877*eV
4.002*eV
4.136*eV
"/>
</ignore>
</properties>
<includes>
<gdmlFile ref="${DD4hepINSTALL}/DDDetectors/compact/elements.xml"/>
</includes>
<materials>
<material name="Air">
<D type="density" unit="g/cm3" value="0.0012"/>
<fraction n="0.754" ref="N"/>
<fraction n="0.234" ref="O"/>
<fraction n="0.012" ref="Ar"/>
</material>
<!-- We model vakuum just as very thin air -->
<material name="Vacuum">
<D type="density" unit="g/cm3" value="0.0000000001" />
<fraction n="0.754" ref="N"/>
<fraction n="0.234" ref="O"/>
<fraction n="0.012" ref="Ar"/>
</material>
<material name="Water">
<D type="density" value="1.0" unit="g/cm3"/>
<composite n="2" ref="H"/>
<composite n="1" ref="O"/>
<property name="RINDEX" ref="RINDEX__0x123aff00"/>
<property name="ABSLENGTH" ref="ABSLENGTH__0x123aff00"/>
<property name="FASTCOMPONENT" ref="FASTCOMPONENT__0x123aff00"/>
<property name="SLOWCOMPONENT" ref="SLOWCOMPONENT__0x123aff00"/>
</material>
</materials>
</lccdd>
/run/beamOn 1
/control/verbose 2
/run/initialize
......@@ -22,4 +24,4 @@
#/control/execute vis.mac
/run/beamOn 1
/run/beamOn 10
......@@ -16,5 +16,5 @@
/run/beamOn 1
/control/execute gps.mac
/control/execute macro/gps.mac
#!/usr/bin/env python
#
from __future__ import absolute_import, unicode_literals
import os
import time
import logging
import DDG4
from DDG4 import OutputLevel as Output
from g4units import keV, GeV, mm, ns, MeV
#
global geant4
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
#
"""
dd4hep simulation example setup using the python configuration
@author M.Frank
@version 1.0
"""
def setupWorker():
k = DDG4.Kernel()
kernel = k.worker()
logger.info('PYTHON: +++ Creating Geant4 worker thread ....')
# Configure Run actions
run1 = DDG4.RunAction(kernel, 'Geant4TestRunAction/RunInit')
run1.Property_int = 12345
run1.Property_double = -5e15 * keV
run1.Property_string = 'Startrun: Hello_2'
logger.info("%s %f %d", run1.Property_string, run1.Property_double, run1.Property_int)
run1.enableUI()
kernel.registerGlobalAction(run1)
kernel.runAction().adopt(run1)
# Configure Event actions
prt = DDG4.EventAction(kernel, 'Geant4ParticlePrint/ParticlePrint')
prt.OutputLevel = Output.DEBUG
prt.OutputType = 3 # Print both: table and tree
kernel.eventAction().adopt(prt)
# Configure Event actions
prt = DDG4.EventAction(kernel, 'Geant4SurfaceTest/SurfaceTest')
prt.OutputLevel = Output.INFO
kernel.eventAction().adopt(prt)
# Configure I/O
evt_lcio = geant4.setupLCIOOutput('LcioOutput', 'CLICSiD_' + time.strftime('%Y-%m-%d_%H-%M'))
evt_lcio.OutputLevel = Output.DEBUG
# evt_root = geant4.setupROOTOutput('RootOutput','CLICSiD_'+time.strftime('%Y-%m-%d_%H-%M'))
# generator_output_level = Output.INFO
gen = DDG4.GeneratorAction(kernel, "Geant4GeneratorActionInit/GenerationInit")
kernel.generatorAction().adopt(gen)
# VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
"""
Generation of isotrope tracks of a given multiplicity with overlay:
"""
# First particle generator: pi+
gen = DDG4.GeneratorAction(kernel, "Geant4IsotropeGenerator/IsotropPi+")
gen.Particle = 'pi+'
gen.Energy = 100 * GeV
gen.Multiplicity = 2
gen.Mask = 1
gen.OutputLevel = Output.DEBUG
gen.PhiMin = 0
gen.PhiMax = 0
gen.ThetaMin = 1.61
gen.ThetaMax = 1.61
kernel.generatorAction().adopt(gen)
# Install vertex smearing for this interaction
gen = DDG4.GeneratorAction(kernel, "Geant4InteractionVertexSmear/SmearPi+")
gen.Mask = 1
gen.Offset = (20 * mm, 10 * mm, 10 * mm, 0 * ns)
gen.Sigma = (4 * mm, 1 * mm, 1 * mm, 0 * ns)
kernel.generatorAction().adopt(gen)
"""
# Second particle generator: e-
gen = DDG4.GeneratorAction(kernel,"Geant4IsotropeGenerator/IsotropE-");
gen.Particle = 'e-'
gen.Energy = 25 * GeV
gen.Multiplicity = 3
gen.Mask = 2
gen.OutputLevel = Output.DEBUG
kernel.generatorAction().adopt(gen)
# Install vertex smearing for this interaction
gen = DDG4.GeneratorAction(kernel,"Geant4InteractionVertexSmear/SmearE-");
gen.Mask = 2
gen.Offset = (-20*mm, -10*mm, -10*mm, 0*ns)
gen.Sigma = (12*mm, 8*mm, 8*mm, 0*ns)
kernel.generatorAction().adopt(gen)
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"""
# Merge all existing interaction records
gen = DDG4.GeneratorAction(kernel, "Geant4InteractionMerger/InteractionMerger")
gen.OutputLevel = 4 # generator_output_level
gen.enableUI()
kernel.generatorAction().adopt(gen)
# Finally generate Geant4 primaries
gen = DDG4.GeneratorAction(kernel, "Geant4PrimaryHandler/PrimaryHandler")
gen.OutputLevel = Output.DEBUG # generator_output_level
gen.enableUI()
kernel.generatorAction().adopt(gen)
# And handle the simulation particles.
part = DDG4.GeneratorAction(kernel, "Geant4ParticleHandler/ParticleHandler")
kernel.generatorAction().adopt(part)
# part.SaveProcesses = ['conv','Decay']
part.SaveProcesses = ['Decay']
part.MinimalKineticEnergy = 100 * MeV
part.OutputLevel = Output.DEBUG # generator_output_level
part.enableUI()
user = DDG4.Action(kernel, "Geant4TCUserParticleHandler/UserParticleHandler")
user.TrackingVolume_Zmax = DDG4.EcalEndcap_zmin
user.TrackingVolume_Rmax = DDG4.EcalBarrel_rmin
user.enableUI()
part.adopt(user)
logger.info('PYTHON: +++ Geant4 worker thread configured successfully....')
return 1
def setupMaster():
logger.info('PYTHON: +++ Setting up master thread.....')
return 1
def setupSensitives():
global geant4
# First the tracking detectors
seq, act = geant4.setupTracker('SiVertexBarrel')
act.OutputLevel = Output.ERROR
act.CollectSingleDeposits = False
seq, act = geant4.setupTracker('SiVertexEndcap')
act.OutputLevel = Output.ERROR
act.CollectSingleDeposits = False
logger.info('PYTHON: +++ Setting up Geant4 sensitive detectors for worker thread.....')
return 1
def dummy_sd():
logger.info('PYTHON: +++ Setting up DUMMY Geant4 sensitive detectors for worker thread.....')
return 1
def dummy_geom():
logger.info('PYTHON: +++ Setting up DUMMY Geant4 geometry for worker thread.....')
return 1
def run():
global geant4
kernel = DDG4.Kernel()
description = kernel.detectorDescription()
install_dir = os.environ['DD4hepINSTALL']
kernel.loadGeometry(str("file:" + install_dir + "/DDDetectors/compact/SiD_Markus.xml"))
DDG4.importConstants(description)
DDG4.Core.setPrintLevel(Output.DEBUG)
DDG4.Core.setPrintFormat(str("%-32s %6s %s"))
kernel.NumberOfThreads = 1
geant4 = DDG4.Geant4(kernel, tracker='Geant4TrackerWeightedAction')
geant4.printDetectors()
# Configure UI
geant4.setupCshUI()
# Geant4 user initialization action
geant4.addUserInitialization(worker=setupWorker, master=setupMaster)
# Configure G4 geometry setup
seq, act = geant4.addDetectorConstruction("Geant4DetectorGeometryConstruction/ConstructGeo")
# Configure G4 magnetic field tracking
self.setupTrackingFieldMT() # noqa: F821
seq, act = geant4.addDetectorConstruction("Geant4PythonDetectorConstruction/DummyDet",
geometry=dummy_geom,
sensitives=dummy_sd)
# Configure G4 sensitive detectors
seq, act = geant4.addDetectorConstruction("Geant4PythonDetectorConstruction/SetupSD",
sensitives=setupSensitives)
# Configure G4 sensitive detectors
seq, act = geant4.addDetectorConstruction("Geant4DetectorSensitivesConstruction/ConstructSD",
allow_threads=True)
# Setup random generator
rndm = DDG4.Action(kernel, 'Geant4Random/Random')
rndm.Seed = 987654321
rndm.initialize()
# Setup global filters fur use in sensntive detectors
f1 = DDG4.Filter(kernel, 'GeantinoRejectFilter/GeantinoRejector')
kernel.registerGlobalFilter(f1)
# seq,act = geant4.setupTracker('SiTrackerBarrel')
# seq,act = geant4.setupTracker('SiTrackerEndcap')
# seq,act = geant4.setupTracker('SiTrackerForward')
# Now the calorimeters
# seq,act = geant4.setupCalorimeter('EcalBarrel')
# seq,act = geant4.setupCalorimeter('EcalEndcap')
# seq,act = geant4.setupCalorimeter('HcalBarrel')
# seq,act = geant4.setupCalorimeter('HcalEndcap')
# seq,act = geant4.setupCalorimeter('HcalPlug')
# seq,act = geant4.setupCalorimeter('MuonBarrel')
# seq,act = geant4.setupCalorimeter('MuonEndcap')
# seq,act = geant4.setupCalorimeter('LumiCal')
# seq,act = geant4.setupCalorimeter('BeamCal')
# Now build the physics list:
seq = geant4.setupPhysics('QGSP_BERT')
phys = DDG4.PhysicsList(geant4.master(), 'Geant4PhysicsList/MyPhysics')
part = DDG4.Action(geant4.master(), 'Geant4ExtraParticles/extraparts')
part.pdgfile = 'checkout/DDG4/examples/particle.tbl'
phys.adoptPhysicsConstructor(part.get())
seq.add(phys)
geant4.run()
# kernel.configure()
# kernel.initialize()
# DDG4.setPrintLevel(Output.DEBUG)
# kernel.run()
# kernel.terminate()
return 1
if __name__ == "__main__":
import sys
logger.info('Arguments: %s', str(sys.argv))
run()
R__LOAD_LIBRARY(libfmt.so)
#include "fmt/core.h"
R__LOAD_LIBRARY(libDDG4IO.so)
R__LOAD_LIBRARY(libGenDetectors.so)
#include "DD4hep/Detector.h"
#include "DDG4/Geant4Data.h"
#include "DDRec/CellIDPositionConverter.h"
#include "DDRec/SurfaceManager.h"
#include "DDRec/Surface.h"
#include "ROOT/RDataFrame.hxx"
#include "TCanvas.h"
#include "TChain.h"
#include <random>
#include "npdet/PhotoMultiplierHit.h"
//#include "lcio2/TrackerRawDataData.h"
//#include "lcio2/TrackerRawData.h"
using PMHit = npdet::PhotoMultiplierHit;
using PMHitRVec = ROOT::VecOps::RVec<npdet::PhotoMultiplierHit*>;
using PMTHitVector = std::vector<npdet::PhotoMultiplierHit*>;
void cherenkov_xy_plot(const char* fname = "derp.root"){
//ROOT::EnableImplicitMT(); // Tell ROOT you want to go parallel
//using namespace lcio2;
double degree = TMath::Pi()/180.0;
//std::random_device rd;
//std::mt19937 gen(rd());
TChain* t = new TChain("EVENT");
t->Add(fname);
ROOT::RDataFrame d0(*t);
std::cout << t->GetBranch("ForwardRICHHits")->GetClassName() << std::endl;
// -------------------------
// Get the DD4hep instance
// Load the compact XML file
// Initialize the position converter tool
//dd4hep::Detector& detector = dd4hep::Detector::getInstance();
//detector.fromCompact("GenericRICH_example.xml");
//dd4hep::rec::CellIDPositionConverter cellid_converter(detector);
//// -------------------------
//// Get the surfaces map
//dd4hep::rec::SurfaceManager& surfMan = *detector.extension<dd4hep::rec::SurfaceManager>() ;
//auto surfMap = surfMan.map( "world" ) ;
//auto nhits = [] (std::vector<npdet::sim::Geant4Tracker::Hit*>& hits){ return (int) hits.size(); };
auto pmt_x = [&](const PMTHitVector& hits) {
//return ROOT::VecOps::Map(hits, [](const PMHit& h) { return h.position.x(); });
std::vector<double> res;
for(auto h : hits) {
if(h->position.z() < 400) {
res.push_back(h->position.x());
}
}
return res;
};
auto pmt_y = [&](const PMTHitVector& hits) {
std::vector<double> res;
for(auto h : hits) {
if(h->position.z() < 400) {
res.push_back(h->position.y());
}
}
return res;
};
//auto pmt_x = [&](const PMTHitVector& hits) {
// return ROOT::VecOps::Map(hits, [](const PMHit& h) { return h.position.x(); });
//};
auto d1 = d0
.Define("nhits", [](const PMTHitVector& hits) { return hits.size(); }, {"ForwardRICHHits"})
.Define("pmt_x",pmt_x,{"ForwardRICHHits"})
.Define("pmt_y",pmt_y,{"ForwardRICHHits"});
auto h1 = d1.Histo1D("nhits");
auto h1_x = d1.Histo1D("pmt_x");
auto h2 = d1.Histo2D({"cerxy", "cer_xy", 100u, -1000, -1000, 100u, -1000, -1000}, "pmt_x", "pmt_y");
auto graph = d1.Graph("nhits", "nhits");
TCanvas* c = new TCanvas();
h2->DrawCopy("colz");
//graph->DrawClone("ap");
//graph->SetMarkerStyle(20);
//c->Update();
}
#!/bin/bash
ddsim --runType vis --enableG4GPS \
--macroFile macro/gps.mac \
--compactFile $1 \
--outputFile test_tracker_disc.root || exit
......@@ -31,8 +31,9 @@ def run():
geant4 = DDG4.Geant4(kernel, tracker='Geant4TrackerCombineAction')
geant4.printDetectors()
logger.info("# Configure UI")
geant4.setupUI('qt',vis=True,macro='vis.mac')
geant4.setupUI('tcsh',vis=False,macro='macro/gps.mac')
logger.info("# Configure G4 magnetic field tracking")
geant4.setupTrackingField()
......@@ -138,19 +139,22 @@ def run():
logger.info("# Setup global filters fur use in sensitive detectors")
#f1 = DDG4.Filter(kernel, 'GeantinoRejectFilter/GeantinoRejector')
#f2 = DDG4.Filter(kernel, 'ParticleRejectFilter/OpticalPhotonRejector')
#f2.particle = 'opticalphoton'
#f3 = DDG4.Filter(kernel, 'ParticleSelectFilter/OpticalPhotonSelector')
#f3.particle = 'opticalphoton'
f2 = DDG4.Filter(kernel, 'ParticleRejectFilter/OpticalPhotonRejector')
f2.particle = 'opticalphoton'
f3 = DDG4.Filter(kernel, 'ParticleSelectFilter/OpticalPhotonSelector')
f3.particle = 'opticalphoton'
#f4 = DDG4.Filter(kernel, 'EnergyDepositMinimumCut')
#f4.Cut = 10 * MeV
#f4.enableUI()
#kernel.registerGlobalFilter(f1)
#kernel.registerGlobalFilter(f2)
#kernel.registerGlobalFilter(f3)
kernel.registerGlobalFilter(f2)
kernel.registerGlobalFilter(f3)
#kernel.registerGlobalFilter(f4)
logger.info("# First the tracking detectors")
logger.info("# First the PID detectors")
seq, act = geant4.setupDetector('ForwardRICH','PhotoMultiplierSDAction')
act.adopt(f2)
#seq, act = geant4.setupTracker('SiVertexBarrel')
#seq.adopt(f1)
## seq.adopt(f4)
......
#!/usr/bin/env python
#
from __future__ import absolute_import, unicode_literals
import os
import time
import logging
import DDG4
from DDG4 import OutputLevel as Output
from g4units import keV, GeV, mm, ns, MeV
#
#
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
"""
dd4hep simulation example setup using the python configuration
@author M.Frank
@version 1.0
"""
def run():
kernel = DDG4.Kernel()
description = kernel.detectorDescription()
install_dir = os.environ['DD4hepINSTALL']
#kernel.loadGeometry(str("file:" + install_dir + "/DDDetectors/compact/SiD.xml"))
kernel.loadGeometry(str("file:" + "GenericRICH_example.xml"))
DDG4.importConstants(description)
geant4 = DDG4.Geant4(kernel, tracker='Geant4TrackerCombineAction')
geant4.printDetectors()
logger.info("# Configure UI")
geant4.setupUI('tcsh',vis=True,macro='macro/vis.mac')
logger.info("# Configure G4 magnetic field tracking")
geant4.setupTrackingField()
logger.info("# Setup random generator")
rndm = DDG4.Action(kernel, 'Geant4Random/Random')
rndm.Seed = 987654321
rndm.initialize()
# rndm.showStatus()
logger.info("# Configure Run actions")
run1 = DDG4.RunAction(kernel, 'Geant4TestRunAction/RunInit')
run1.Property_int = 12345
run1.Property_double = -5e15 * keV
run1.Property_string = 'Startrun: Hello_2'
logger.info("%s %s %s", run1.Property_string, str(run1.Property_double), str(run1.Property_int))
run1.enableUI()
kernel.registerGlobalAction(run1)
kernel.runAction().adopt(run1)
logger.info("# Configure Event actions")
prt = DDG4.EventAction(kernel, 'Geant4ParticlePrint/ParticlePrint')
prt.OutputLevel = Output.INFO
prt.OutputType = 3 # Print both: table and tree
kernel.eventAction().adopt(prt)
logger.info("""
Configure I/O
""")
# evt_lcio = geant4.setupLCIOOutput('LcioOutput','CLICSiD_'+time.strftime('%Y-%m-%d_%H-%M'))
# evt_lcio.OutputLevel = Output.ERROR
geant4.setupROOTOutput('RootOutput', 'derp_' + time.strftime('%Y-%m-%d_%H-%M'))
gen = DDG4.GeneratorAction(kernel, "Geant4GeneratorActionInit/GenerationInit")
kernel.generatorAction().adopt(gen)
gen = DDG4.GeneratorAction(kernel, "Geant4GeneratorWrapper/GPS")
gen.Uses = 'G4GeneralParticleSource'
gen.OutputLevel = Output.INFO
gen.Mask = 1
gen.enableUI()
kernel.generatorAction().adopt(gen)
#gen = DDG4.GeneratorAction(kernel, "Geant4IsotropeGenerator/IsotropPi+")
#gen.Mask = 1
#gen.Particle = 'e-'
#gen.Energy = 5 * GeV
#gen.Multiplicity = 2
#gen.Distribution = 'cos(theta)'
#geant4.setupGun('electron','e-',3.0*GeV)
#logger.info("# Install vertex smearing for this interaction")
#gen = DDG4.GeneratorAction(kernel, "Geant4InteractionVertexSmear/SmearPi+")
#gen.Mask = 1
#gen.Offset = (20 * mm, 10 * mm, 10 * mm, 0 * ns)
#gen.Sigma = (4 * mm, 1 * mm, 1 * mm, 0 * ns)
#kernel.generatorAction().adopt(gen)
#logger.info("# Second particle generator: e-")
#gen = DDG4.GeneratorAction(kernel, "Geant4IsotropeGenerator/IsotropE-")
#gen.Mask = 2
#gen.Particle = 'e-'
#gen.Energy = 25 * GeV
#gen.Multiplicity = 3
#gen.Distribution = 'uniform'
#kernel.generatorAction().adopt(gen)
#logger.info(" Install vertex smearing for this interaction")
#gen = DDG4.GeneratorAction(kernel, "Geant4InteractionVertexSmear/SmearE-")
#gen.Mask = 2
#gen.Offset = (-20 * mm, -10 * mm, -10 * mm, 0 * ns)
#gen.Sigma = (12 * mm, 8 * mm, 8 * mm, 0 * ns)
#kernel.generatorAction().adopt(gen)
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#logger.info("# Merge all existing interaction records")
#gen = DDG4.GeneratorAction(kernel, "Geant4InteractionMerger/InteractionMerger")
#gen.OutputLevel = 4 # generator_output_level
#gen.enableUI()
#kernel.generatorAction().adopt(gen)
#logger.info("# Finally generate Geant4 primaries")
#gen = DDG4.GeneratorAction(kernel, "Geant4PrimaryHandler/PrimaryHandler")
#gen.OutputLevel = 4 # generator_output_level
#gen.enableUI()
#kernel.generatorAction().adopt(gen)
#logger.info("# ....and handle the simulation particles.")
#part = DDG4.GeneratorAction(kernel, "Geant4ParticleHandler/ParticleHandler")
#kernel.generatorAction().adopt(part)
## part.SaveProcesses = ['conv','Decay']
#part.SaveProcesses = ['Decay']
#part.MinimalKineticEnergy = 100 * MeV
#part.OutputLevel = 5 # generator_output_level
#part.enableUI()
#user = DDG4.Action(kernel, "Geant4TCUserParticleHandler/UserParticleHandler")
#user.TrackingVolume_Zmax = DDG4.EcalEndcap_zmin
#user.TrackingVolume_Rmax = DDG4.EcalBarrel_rmin
#user.enableUI()
#part.adopt(user)
logger.info("# Setup global filters fur use in sensitive detectors")
#f1 = DDG4.Filter(kernel, 'GeantinoRejectFilter/GeantinoRejector')
f2 = DDG4.Filter(kernel, 'ParticleRejectFilter/OpticalPhotonRejector')
f2.particle = 'opticalphoton'
f3 = DDG4.Filter(kernel, 'ParticleSelectFilter/OpticalPhotonSelector')
f3.particle = 'opticalphoton'
#f4 = DDG4.Filter(kernel, 'EnergyDepositMinimumCut')
#f4.Cut = 10 * MeV
#f4.enableUI()
#kernel.registerGlobalFilter(f1)
kernel.registerGlobalFilter(f2)
kernel.registerGlobalFilter(f3)
#kernel.registerGlobalFilter(f4)
logger.info("# First the PID detectors")
seq, act = geant4.setupDetector('ForwardRICH','PhotoMultiplierSDAction')
act.adopt(f2)
#seq, act = geant4.setupTracker('SiVertexBarrel')
#seq.adopt(f1)
## seq.adopt(f4)
#act.adopt(f1)
#seq, act = geant4.setupTracker('SiVertexEndcap')
#seq.adopt(f1)
## seq.adopt(f4)
#seq, act = geant4.setupTracker('SiTrackerBarrel')
#seq, act = geant4.setupTracker('SiTrackerEndcap')
#seq, act = geant4.setupTracker('SiTrackerForward')
#logger.info("# Now setup the calorimeters")
#seq, act = geant4.setupCalorimeter('EcalBarrel')
#seq, act = geant4.setupCalorimeter('EcalEndcap')
#seq, act = geant4.setupCalorimeter('HcalBarrel')
#seq, act = geant4.setupCalorimeter('HcalEndcap')
#seq, act = geant4.setupCalorimeter('HcalPlug')
#seq, act = geant4.setupCalorimeter('MuonBarrel')
#seq, act = geant4.setupCalorimeter('MuonEndcap')
#seq, act = geant4.setupCalorimeter('LumiCal')
#seq, act = geant4.setupCalorimeter('BeamCal')
logger.info("# Now build the physics list:")
phys = geant4.setupPhysics('QGSP_BERT')
geant4.addPhysics(str('Geant4PhysicsList/Myphysics'))
ph = DDG4.PhysicsList(kernel, 'Geant4OpticalPhotonPhysics/OpticalPhotonPhys')
ph.VerboseLevel = 2
ph.enableUI()
phys.adopt(ph)
ph = DDG4.PhysicsList(kernel, 'Geant4CerenkovPhysics/CerenkovPhys')
ph.MaxNumPhotonsPerStep = 10
ph.MaxBetaChangePerStep = 10.0
ph.TrackSecondariesFirst = True
ph.VerboseLevel = 2
ph.enableUI()
phys.adopt(ph)
## Add special particle types from specialized physics constructor
#part = geant4.addPhysics('Geant4ExtraParticles/ExtraParticles')
#part.pdgfile = 'checkout/DDG4/examples/particle.tbl'
# Add global range cut
rg = geant4.addPhysics('Geant4DefaultRangeCut/GlobalRangeCut')
rg.RangeCut = 0.7 * mm
phys.dump()
#ui_action = dd4hep.sim.createAction(kernel, "Geant4UIManager/UI")
#ui_action.HaveVIS = True
#ui_action.HaveUI = True
#ui_action.SessionType = qt
#ui_action.SetupUI = macro
#kernel.registerGlobalAction(ui_action)
#ui = geant4.setupUI("qt",vis=True,macro="vis.mac")
#ui.enableUI()
kernel.configure()
kernel.initialize()
# DDG4.setPrintLevel(Output.DEBUG)
kernel.run()
kernel.terminate()
if __name__ == "__main__":
run()
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
#find_package ( DD4hep REQUIRED )
#include ( ${DD4hep_DIR}/cmake/DD4hep.cmake )
include ( ${DD4hep_DIR}/cmake/DD4hepBuild.cmake )
dd4hep_configure_output()
dd4hep_set_compiler_flags()
set( sdet_headers
include/PhotoMultiplierHit.h
)
root_generate_dictionary(G__DDG4_PIDsdet
#$<BUILD_INTERFACE:-I${SPDLOG_INCLUDE_DIR}>
#$<BUILD_INTERFACE:-I${FMT_INCLUDE_DIR}>
-I${CMAKE_CURRENT_SOURCE_DIR}
-I${CMAKE_CURRENT_SOURCE_DIR}/include
${sdet_headers}
LINKDEF LinkDef.h
)
add_custom_target(G__DDG4_PIDsdet_ROOTDICT DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/G__DDG4_PIDsdet.cxx)
#dd4hep_add_dictionary(G__DDG4_PIDsdet
# SOURCES ${DD4hep_DIR}/include/ROOT/Warnings.h src/PhotoMultiplierHit.h
# LINKDEF ${DD4hep_DIR}/include/ROOT/LinkDef.h
# OUTPUT ${LIBRARY_OUTPUT_PATH}
# USES DD4hep::DDCore DD4hep::DDG4 Geant4::Interface
# )
#
#---- Example of a client library with user defined plugins --------------------
dd4hep_add_plugin( DDG4_PIDsdet
GENERATED G__DDG4_PIDsdet.cxx
SOURCES
src/PhotoMultiplierHit.cpp
src/PhotoMultiplierSDAction.cpp
USES DD4hep::DDCore DD4hep::DDG4 Geant4::Interface ROOT::Core ROOT::Geom ROOT::GenVector ROOT::RIO
)
add_dependencies(DDG4_PIDsdet G__DDG4_PIDsdet_ROOTDICT)
target_include_directories(DDG4_PIDsdet
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC $<INSTALL_INTERFACE:include/npdet>
)
install(TARGETS DDG4_PIDsdet
EXPORT NPDetTargets
DESTINATION lib)
install(FILES ${sdet_headers}
DESTINATION include/npdet)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/G__DDG4_PIDsdet_rdict.pcm
DESTINATION lib)
# # Geant4 material scan. From position=0,0,0 to end-of-world
# dd4hep_add_test_reg( DDG4_PIDsdet_g4material_scan_SiliconBlock_LONGTEST
# COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_DDG4_PIDsdet.sh"
# EXEC_ARGS python ${DD4hep_ROOT}/bin/g4MaterialScan --compact=file:${CMAKE_INSTALL_PREFIX}/examples/ClientTests/compact/SiliconBlock.xml
# "--position=0,0,0" "--direction=0,1,0"
# REGEX_PASS " Terminate Geant4 and delete associated actions."
# )
#
# dd4hep_add_test_reg( DDG4_PIDsdet_sim_SiliconBlock_LONGTEST
# COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_DDG4_PIDsdet.sh"
# EXEC_ARGS python ${DDG4_PIDsdet_INSTALL}/scripts/PhotoMultiplierSD_sim.py
# --compact=file:${CMAKE_INSTALL_PREFIX}/examples/ClientTests/compact/SiliconBlock.xml
# REGEX_PASS NONE
# REGEX_FAIL "Exception;EXCEPTION;ERROR;Error" )
#endif()
#if defined(__CINT__) || defined(__MAKECINT__) || defined(__CLING__) || defined(__ROOTCLING__)
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ nestedclass;
#pragma link C++ nestedtypedef;
/// Define namespaces
#pragma link C++ namespace dd4hep;
#pragma link C++ namespace dd4hep::sim;
#pragma link C++ namespace npdet;
#pragma link C++ class npdet::PhotoMultiplierHit+;
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment