<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Zipai,</p>
    <p>I didn't look into details, but it appears to be a float/double
      issue, or a precision problem when you write your txt file. <br>
    </p>
    <p>Maybe you could set the precision of the value in the output txt
      file in your c++ script with <i>std::setprecision(x)</i>. <br>
    </p>
    <p>Hope this helps,<br>
      Thibaut<br>
    </p>
    <div class="moz-cite-prefix"> On 26/04/2021 17:56, Zipai Wang wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CABOvga-EWYozoUAmL_3v5GSPCbFETaMH-nTD2hRXHK13H7ohqQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Dear CASToR developers and users
        <div><br>
        </div>
        <div>I am post-processing the root list-mode data generated from
          the GATE simulation and reconstructing it using the CASToR.
          First I convert the ROOT to TXT, after the post-processing,
          I convert the TXT back to ROOT for the reconstruction. Most of
          the things went well, and the image can be successfully
          reconstructed by CASToR. </div>
        <div><br>
        </div>
        <div>However, recently I am trying to add TOF in the recon, but
          soon realize that the txt file converted from ROOT has a lower
          TOF data precision. I have output the .dat file from GATE
          directly for a comparison: For example, In the txt file
          converted from ROOT, I got TOF = 4.83994e-06 for eventID 30.
          In .dat, I got  TOF = 4.83994034373751110439431e-06 for the
          same event. </div>
        <div><br>
        </div>
        <div>The loss of precision basically ruined the image since
          every event got the same time difference. Although I can
          bypass the loss of precision during the root to txt by using
          the .dat files, I am worrying that the same thing will happen
          again when I convert txt back to ROOT.</div>
        <div><br>
        </div>
        <div>Apologize that I am very new to c programming and ROOT. I
          attached the converting code I am currently using. May someone
          point out where is the problem, please. Thank you very much
          for your attention, appreciate it!</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Cheers!</div>
        -- <br>
        <div dir="ltr" class="gmail_signature"
          data-smartmail="gmail_signature">
          <div dir="ltr">
            <div>
              <div dir="ltr">
                <div>
                  <div dir="ltr">Zipai Wang</div>
                  <div dir="ltr">Biomedical Engineering PhD student
                    <div>Stony Brook University </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Castor-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Castor-users@lists.castor-project.org">Castor-users@lists.castor-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.castor-project.org/mailman/listinfo/castor-users">https://lists.castor-project.org/mailman/listinfo/castor-users</a>

To look for something in the mailing-list archives, use the search box at:
<a class="moz-txt-link-freetext" href="https://castor-project.org/mailing-list">https://castor-project.org/mailing-list</a></pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Thibaut MERLIN -- PhD

Docteur en Imagerie Médicale au Laboratoire de Traitement de l'Information Medicale (LaTIM - INSERM UMR 1101)
Institut Brestois de recherche en Bio-Santé (IBRBS)
12 Avenue Foch, 29200 Brest, FRANCE
Tel: 06.75.12.24.90</pre>
  </body>
</html>