<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Dear David,</p>
<p><br>
</p>
<p>Thanks for your advice, I actually managed to analyse the Ascii output with python and got everything I wanted.</p>
<p><br>
</p>
<p>Best regards,</p>
<p><br>
</p>
<p>Paul K.<br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Gate-users <gate-users-bounces@lists.opengatecollaboration.org> im Auftrag von gate-users-request@lists.opengatecollaboration.org <gate-users-request@lists.opengatecollaboration.org><br>
<b>Gesendet:</b> Montag, 30. Mai 2022 07:27:48<br>
<b>An:</b> gate-users@lists.opengatecollaboration.org<br>
<b>Betreff:</b> Gate-users Digest, Vol 192, Issue 28</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Send Gate-users mailing list submissions to<br>
gate-users@lists.opengatecollaboration.org<br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users">
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
gate-users-request@lists.opengatecollaboration.org<br>
<br>
You can reach the person managing the list at<br>
gate-users-owner@lists.opengatecollaboration.org<br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Gate-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: How do you get the deposited energy for each layer or<br>
crystal in a separate output/tree? (David Leibold)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 30 May 2022 06:13:00 +0000<br>
From: David Leibold <D.Leibold@tudelft.nl><br>
To: "Klever, Paul" <paul.klever@alumni.fh-aachen.de><br>
Cc: "gate-users@lists.opengatecollaboration.org"<br>
<gate-users@lists.opengatecollaboration.org><br>
Subject: Re: [Gate-users] How do you get the deposited energy for each<br>
layer or crystal in a separate output/tree?<br>
Message-ID: <F5D3C373-3224-474C-A70C-61AA057633AA@tudelft.nl><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Dear Paul,<br>
<br>
have you tried accessing the componentID, volumeID, pixelID etc. stored in the root tree? These variables should enable you to figure out in which element of your system an event was registered.<br>
<br>
Best regards,<br>
David<br>
<br>
<br>
On 25 May2022, at 15:01, Klever, Paul <paul.klever@alumni.fh-aachen.de<mailto:paul.klever@alumni.fh-aachen.de>> wrote:<br>
<br>
Dear Users,<br>
<br>
I am currently working on a cylindrical PET system with heterostructured scintillators. At first I am designing a one block detector and want to get a proper readout done before creating a whole scanner.<br>
Goal of this is to simulate a couple of materials and calculate their CTRs. My problem is that eventhough I assigned the two different layers as separate sensitive detectors, I only get one root tree for the energy deposited in the singles tree.<br>
I've tried it with one crystal for each layer, or with just one crystal for both layers. I've tried the DoseActor, but the created File seems to have as many entries as I define in the macro with the variable z in "/setResolution x y z", eventhough I dont have
that many hits or singles. So I don't think thats a proper way to get the deposited energy for each layer.<br>
<br>
There is not much to find about that topic, neither in the mailing list archive nor in the benchmarks.<br>
<br>
I appreciate any advice.<br>
Best regards<br>
<br>
Paul K.<br>
<br>
Here is my macro. I use Gate 9.1 with geant4-10-07. I've installed the precompiled version of Gate and recompiled it, to activate photons and surfaces.<br>
<br>
<br>
# M A T E R I A L F I L E<br>
<br>
/gate/geometry/setMaterialDatabase data/GateMaterials.db<br>
/gate/geometry/setIonisationPotential EJ232 64.7 eV<br>
<br>
<br>
#===============================================================<br>
<br>
# W O R L D<br>
<br>
/gate/world/geometry/setXLength 100. cm<br>
/gate/world/geometry/setYLength 100. cm<br>
/gate/world/geometry/setZLength 100. cm<br>
#/gate/world/setMaterial Air<br>
<br>
#==============================================================<br>
<br>
# S Y S T E M<br>
<br>
/gate/world/daughters/name cylindricalPET<br>
/gate/world/daughters/systemType cylindricalPET<br>
/gate/world/daughters/insert box<br>
/gate/cylindricalPET/setMaterial Air<br>
/gate/cylindricalPET/geometry/setXLength 15 mm<br>
/gate/cylindricalPET/geometry/setYLength 2.1 mm<br>
/gate/cylindricalPET/geometry/setZLength 3. mm<br>
/gate/cylindricalPET/placement/setTranslation 0 0 -1.5 mm<br>
/gate/cylindricalPET/vis/setColor gray<br>
/gate/cylindricalPET/vis/forceWireframe<br>
<br>
#==============================================================<br>
<br>
# P H A N T O M<br>
<br>
<br>
#==============================================================<br>
<br>
# R S E C T O R<br>
<br>
/gate/cylindricalPET/daughters/name rsector<br>
/gate/cylindricalPET/daughters/insert box<br>
/gate/rsector/placement/setTranslation 0 0 0 mm<br>
/gate/rsector/geometry/setXLength 15. mm<br>
/gate/rsector/geometry/setYLength 2.1 mm<br>
/gate/rsector/geometry/setZLength 3. mm<br>
/gate/rsector/vis/setColor green<br>
/gate/rsector/vis/forceWireframe<br>
<br>
#==============================================================<br>
<br>
# M O D U L E<br>
<br>
/gate/rsector/daughters/name module<br>
/gate/rsector/daughters/insert box<br>
/gate/module/placement/setTranslation 0 0 0 mm<br>
/gate/module/geometry/setXLength 15. mm<br>
/gate/module/geometry/setYLength 2.1 mm<br>
/gate/module/geometry/setZLength 3. mm<br>
/gate/module/vis/setColor blue<br>
/gate/module/vis/forceWireframe<br>
<br>
#=============================================================<br>
<br>
# C R Y S T A L 0<br>
<br>
/gate/module/daughters/name crystal<br>
/gate/module/daughters/insert box<br>
/gate/crystal/geometry/setXLength 15. mm<br>
/gate/crystal/geometry/setYLength 2.1 mm<br>
/gate/crystal/geometry/setZLength 3. mm<br>
/gate/crystal/placement/setTranslation 0 0. 0 mm<br>
/gate/crystal/setMaterial Air<br>
/gate/crystal/vis/forceWireframe<br>
/gate/crystal/vis/setColor yellow<br>
/gate/crystal/vis/setVisible false<br>
<br>
<br>
<br>
# L A Y E R 0<br>
<br>
/gate/crystal/daughters/name LYSO<br>
/gate/crystal/daughters/insert box<br>
/gate/LYSO/geometry/setXLength 15. mm<br>
/gate/LYSO/geometry/setYLength 0.1 mm<br>
/gate/LYSO/geometry/setZLength 3. mm<br>
/gate/LYSO/placement/setTranslation 0 0 0 mm<br>
/gate/LYSO/setMaterial LYSO<br>
/gate/LYSO/vis/forceSolid<br>
/gate/LYSO/vis/setColor yellow<br>
<br>
<br>
# L A Y E R 1<br>
<br>
/gate/crystal/daughters/name EJ232<br>
/gate/crystal/daughters/insert box<br>
/gate/EJ232/geometry/setXLength 15. mm<br>
/gate/EJ232/geometry/setYLength 0.1 mm<br>
/gate/EJ232/geometry/setZLength 3. mm<br>
/gate/EJ232/placement/setTranslation 0 0 0 mm<br>
/gate/EJ232/setMaterial EJ232<br>
/gate/EJ232/vis/forceSolid<br>
/gate/EJ232/vis/setColor red<br>
<br>
<br>
<br>
<br>
#=============================================================<br>
# R E P E A T C R Y S T A L<br>
<br>
/gate/LYSO/repeaters/insert cubicArray<br>
/gate/LYSO/cubicArray/setRepeatNumberX 1<br>
/gate/LYSO/cubicArray/setRepeatNumberY 11<br>
/gate/LYSO/cubicArray/setRepeatNumberZ 1<br>
/gate/LYSO/cubicArray/setRepeatVector 0. 0.2 0. mm<br>
<br>
/gate/EJ232/repeaters/insert cubicArray<br>
/gate/EJ232/cubicArray/setRepeatNumberX 1<br>
/gate/EJ232/cubicArray/setRepeatNumberY 10<br>
/gate/EJ232/cubicArray/setRepeatNumberZ 1<br>
/gate/EJ232/cubicArray/setRepeatVector 0. 0.2 0. mm<br>
<br>
<br>
<br>
<br>
#=============================================================<br>
<br>
# R E P E A T M O D U L E<br>
<br>
#/gate/module/repeaters/insert linear<br>
#/gate/module/linear/setRepeatNumber 33<br>
#/gate/module/linear/setRepeatVector 0. 0. 3.01 mm<br>
<br>
# R E P E A T R S E C T O R<br>
<br>
#/gate/rsector/repeaters/insert ring<br>
#/gate/rsector/ring/setRepeatNumber 250<br>
<br>
#/gate/cylindricalPET/placement/setRotationAxis 0 0 1<br>
<br>
#=============================================================<br>
<br>
# A T T A C H S Y S T E M<br>
<br>
/gate/LYSO/attachCrystalSD<br>
/gate/EJ232/attachCrystalSD<br>
<br>
/gate/systems/cylindricalPET/rsector/attach rsector<br>
/gate/systems/cylindricalPET/module/attach module<br>
/gate/systems/cylindricalPET/crystal/attach crystal<br>
/gate/systems/cylindricalPET/layer0/attach LYSO<br>
/gate/systems/cylindricalPET/layer1/attach EJ232<br>
<br>
<br>
# A C T O R<br>
<br>
/gate/actor/addActor DoseActor MyActor0<br>
/gate/actor/MyActor0/save EdepLYSO.txt<br>
/gate/actor/MyActor0/attachTo LYSO<br>
/gate/actor/MyActor0/stepHitType random<br>
/gate/actor/MyActor0/setResolution 1 1 3000<br>
/gate/actor/MyActor0/enableEdep true<br>
/gate/actor/MyActor0/enableDose false<br>
<br>
/gate/actor/addActor DoseActor MyActor1<br>
/gate/actor/MyActor1/save EdepEJ232.txt<br>
/gate/actor/MyActor1/attachTo EJ232<br>
/gate/actor/MyActor1/stepHitType random<br>
/gate/actor/MyActor1/setResolution 1 1 3000<br>
/gate/actor/MyActor1/enableEdep true<br>
/gate/actor/MyActor1/enableDose false<br>
<br>
<br>
#=============================================================<br>
<br>
#A T T A C H L A Y E R SD<br>
<br>
<br>
#/gate/my_phantom/attachPhantomSD<br>
<br>
<br>
#=============================================================<br>
#=====================================================<br>
# VISUALISATION<br>
#=====================================================<br>
<br>
# V I E W E R #<br>
#/vis/open OGLSX<br>
<br>
# set the view angle<br>
#/vis/viewer/set/viewpointThetaPhi 45 45<br>
<br>
<br>
# define the zoom factor<br>
#/vis/viewer/zoom 50.<br>
<br>
<br>
# set the drawing style<br>
#/vis/viewer/set/style wireframe<br>
#/vis/viewer/set/style surface<br>
<br>
# tell the viewer to draw the volume<br>
#/vis/drawVolume<br>
<br>
#/vis/viewer/flush<br>
#/tracking/verbose 2<br>
<br>
# The trajectories for each run should be drawn together<br>
# don't store trajectories = 0; store trajectories = 1<br>
#/tracking/storeTrajectory 1<br>
#/vis/scene/add/trajectories<br>
<br>
# Requests viewer to refresh hits, tracks, etc., at end of event.<br>
# Or to accumulate drawings. Detector remains or is redrawn.<br>
#/vis/scene/endOfEventAction accumulate<br>
<br>
#=====================================================<br>
# PHYSICS<br>
#=====================================================<br>
<br>
/gate/physics/addPhysicsList emstandard_opt4<br>
#/gate/physics/addPhysicsList emlivermore<br>
<br>
<br>
/gate/physics/addProcess Scintillation<br>
/gate/physics/addProcess OpticalAbsorption<br>
/gate/physics/addProcess OpticalRayleigh<br>
#/gate/physics/addProcess OpticalBoundary<br>
#/gate/physics/addProcess OpticalMie<br>
/gate/physics/addProcess OpticalWLS<br>
<br>
<br>
#/gate/physics/addPhysicsList emlivermore<br>
#/gate/physics/addProcess Scintillation<br>
<br>
<br>
#/gate/physics/addProcess RadioactiveDecay<br>
<br>
#/gate/physics/processList Enabled<br>
#/gate/physics/processList Initialized<br>
<br>
#=====================================================<br>
# INITIALISATION<br>
#=====================================================<br>
<br>
/gate/run/initialize<br>
<br>
/gate/LYSO/surfaces/name surface1<br>
/gate/LYSO/surfaces/insert EJ232<br>
/gate/LYSO/surfaces/surface1/setSurface perfect_apd<br>
<br>
<br>
/gate/EJ232/surfaces/name surface2<br>
/gate/EJ232/surfaces/insert LYSO<br>
/gate/EJ232/surfaces/surface2/setSurface perfect_apd<br>
<br>
#=====================================================<br>
# D I G I T I Z E R: DETECTOR ELECTRONIC RESPONSE<br>
#=====================================================<br>
<br>
<br>
/gate/digitizer/Singles/insert opticaladder<br>
/gate/digitizer/Singles/insert readout<br>
/gate/digitizer/Singles/readout/setDepth 4 #Crystal | "5" Layer<br>
<br>
<br>
/gate/digitizer/Singles/insert blurring<br>
/gate/digitizer/Singles/blurring/setEnergyOfReference 511. keV<br>
<br>
<br>
#/gate/digitizer/verbose 1<br>
<br>
<br>
<br>
# C O I N C I D E N C E<br>
<br>
#/gate/digitizer/Coincidences/setWindow 4. ns<br>
#/gate/digitizer/Coincidences/setOffset 0. ns<br>
#/gate/digitizer/Coincidences/minSectorDifference 88<br>
<br>
#/gate/digitizer/DelCoinc/addSource prompts<br>
#/gate/digitizer/DelCoinc/addSource delayed<br>
<br>
<br>
#===================================================<br>
# D E F I N E T H E S O U R C E<br>
#===================================================<br>
<br>
# source: opticalPhoton<br>
<br>
/gate/source/addSource Mysource gps<br>
#/gate/source/Mysource/setType backtoback<br>
/gate/source/Mysource/gps/particle gamma<br>
/gate/source/Mysource/gps/pos/shape Sphere<br>
/gate/source/Mysource/gps/pos/radius 0.125 mm<br>
/gate/source/Mysource/gps/pos/centre 0. 0. 10.125 mm<br>
/gate/source/Mysource/gps/ene/type Mono<br>
/gate/source/Mysource/gps/ene/mono 511. keV<br>
/gate/source/Mysource/setActivity 100000. Bq<br>
/gate/source/Mysource/gps/ang/type iso<br>
#/gate/source/Mysource/gps/polarization 1 1 1<br>
<br>
<br>
/gate/source/Mysource/gps/ang/mintheta 0 deg<br>
/gate/source/Mysource/gps/ang/maxtheta 30 deg<br>
<br>
/gate/source/Mysource/gps/ang/minphi 0 deg<br>
/gate/source/Mysource/gps/ang/maxphi 360. deg<br>
<br>
<br>
#=====================================================<br>
# D A T A O U T P U T<br>
#=====================================================<br>
<br>
/gate/output/root/enable<br>
/gate/output/root/setFileName LYSOEJ232CP1<br>
#/gate/output/root/setRootSinglesAdderFlag 1<br>
#/gate/output/root/setRootSinglesReadoutFlag 1<br>
/gate/output/root/setRootHitFlag 1<br>
/gate/output/root/setRootSinglesFlag 1<br>
#/gate/output/root/setRootNtupleFlag 1<br>
#/gate/output/root/setRootCoincidencesFlag 1<br>
/gate/output/root/setRootOpticalFlag 1<br>
<br>
<br>
<br>
#/gate/output/fastanalysis/enable<br>
#/gate/output/analysis/enable<br>
<br>
#====================================================<br>
# R A N D O M E N G I N E A N D S E E D<br>
#====================================================<br>
# JamesRandom<br>
/gate/random/setEngineName JamesRandom<br>
/gate/random/setEngineSeed auto<br>
/gate/random/verbose 0<br>
<br>
#=====================================================<br>
# M E A S U R E M E N T S E T T I N G S<br>
#=====================================================<br>
<br>
/gate/application/setTimeSlice 1 s<br>
/gate/application/setTimeStart 0 s<br>
/gate/application/setTimeStop 1 s<br>
<br>
/gate/application/startDAQ<br>
<br>
<br>
<br>
_______________________________________________<br>
Gate-users mailing list<br>
Gate-users@lists.opengatecollaboration.org<mailto:Gate-users@lists.opengatecollaboration.org><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.opengatecollaboration.org_mailman_listinfo_gate-2Dusers&d=DwIGaQ&c=XYzUhXBD2cD-CornpT4QE19xOJBbRy-TBPLK0X9U2o8&r=lfXR69GFfS7NT-Wp5HZqbtBDrbYoilDdmNEG7fKW7aM&m=juE_LVJk8AxwoV5bFLHu_Nwk0nwnFtYQrGJNYy7mhDOQ6-HfZMDrTGG-tVz5fmY0&s=Oez5zdU0jkAWMosbJGX6bSBdUGGZQlBXySX_5mN27C8&e=">https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.opengatecollaboration.org_mailman_listinfo_gate-2Dusers&d=DwIGaQ&c=XYzUhXBD2cD-CornpT4QE19xOJBbRy-TBPLK0X9U2o8&r=lfXR69GFfS7NT-Wp5HZqbtBDrbYoilDdmNEG7fKW7aM&m=juE_LVJk8AxwoV5bFLHu_Nwk0nwnFtYQrGJNYy7mhDOQ6-HfZMDrTGG-tVz5fmY0&s=Oez5zdU0jkAWMosbJGX6bSBdUGGZQlBXySX_5mN27C8&e=</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20220530/227a0888/attachment.html">http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20220530/227a0888/attachment.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
Gate-users mailing list<br>
Gate-users@lists.opengatecollaboration.org<br>
<a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a><br>
<br>
------------------------------<br>
<br>
End of Gate-users Digest, Vol 192, Issue 28<br>
*******************************************<br>
</div>
</span></font>
</body>
</html>