<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><pre>Dear BestSoman,<br>
<br>
You can enable ascii or root output first, shown as below:<br>
/gate/output/root/enable<br>
/gate/output/root/setFileName xxxx.dat<br>
/gate/output/root/setRootHitFlag 0<br>
/gate/output/root/setRootSinglesFlag 1<br>
/gate/output/root/setRootNtupleFlag 0<br>
/gate/output/verbose 2<br>
<br>
Then retrieve energy deposition in each crystal from the root or ascii file using a script. The following sample code is a demo:<br>
<br>
Float_t* data= new Float_t[size];<br>
data[pixelID]+=energy;<br>
<br>
Hope this would be helpful.<br>
Best,<br>
Wei <br>
<br>
<div class="moz-cite-prefix">On 9/28/2015 6:00 PM, gate-users-request@lists.opengatecollaboration.org wrote:<br>
</div>
<blockquote cite="mid:mailman.1.1443434401.6495.gate-users@lists.opengatecollaboration.org" type="cite">
<pre wrap="">----------------------------------------------------------------------
Message: 1
Date: Mon, 28 Sep 2015 07:27:30 +0000 (UTC)
From: "S. Saghamanesh" <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:s.saghamanesh@yahoo.com"><s.saghamanesh@yahoo.com></a>
To: Gate-users <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:gate-users@lists.opengatecollaboration.org"><gate-users@lists.opengatecollaboration.org></a>
Subject: [Gate-users] How to score energy deposition in each crystal
with ascii or root outputs?
Message-ID:
<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:1449478000.1761918.1443425250856.JavaMail.yahoo@mail.yahoo.com"><1449478000.1761918.1443425250856.JavaMail.yahoo@mail.yahoo.com></a>
Content-Type: text/plain; charset="utf-8"
Dear all,
I want to calculate the energy deposition in each pixel of my detector. But what I obtain by an ascii (or root) output is just the global position (XYZ) and energy deposition of a hit (or single). Does anybody know how I can discern the energy deposition in each pixel (i.e. each crystal) in my output file? There must be a way.
I know that macros can give me that kind of pixelated information, but I also need to score the time of flight of a hit and I think no actor can give me the time information. So I have to get back to output data.
Thanks for your comments.
BestSoman</pre>
</blockquote>
<br>
</pre></div><br><br><span title="neteasefooter"><p> </p></span>