[Gate-users] Creating New Gate Actors
David Boersma
david.boersma at acmit.at
Wed Oct 30 12:15:08 CET 2019
Hi Ignacio,
I tried reproducing that error message, but failed.
In order to save the track local time (instead of the track length), as you described, I changed line 96 of source/digits_hits/src/GateTrackLengthActor.cc, replacing:
pTrackLength->Fill( aTrack->GetTrackLength(),aTrack->GetWeight() );
... with:
pTrackLength->Fill( aTrack->GetLocalTime(),aTrack->GetWeight() );
(I guess I should also change the TH1D title and label in the Construct method, to say "track local time instead of track length", and similar text changes in the messenger class, but that's all cosmetics for now.)
In order to find out which method to use ("GetLocalTime()" on "aTrack") I checked the G4Track.hh header file in the geant4 source code, but I could also have found it online in the "doxygen" reference manual, e.g.
https://geant4.kek.jp/Reference/10.05.p01/classG4Track.html
After this simple modification, GATE compiles just file. Since you do get an compiler error, about G4VHit, your code is probably quite different. What did you try?
HTH,
David
________________________________
Von: Ignacio Romero <iromero7 at ucmerced.edu>
Gesendet: Dienstag, 29. Oktober 2019 17:39:14
An: David Boersma; gate-users at lists.opengatecollaboration.org
Betreff: Re: Creating New Gate Actors
Hi David,
Thank you for your response. Yes I am new to c++ programming. I am currently trying to improve on that.
I attempted to replicate the same setup from GateTrackLengthActor since the docs refers to it as an example. I am trying to save the local flight time of photons, pixel ID of detector and run ID (I know the standard root output has this information but I would like to save the storage). As a first attempt for a new actor, I only tried saving the track local time but when I try running make I get the error “‘const class G4VHit’ has no member named ‘GetTrackLocalTime’”.
This may be simple fix once I familiarize myself more with c++ and the G4 library. Do you have any recommendations?
Thank you for your time.
Best,
Ignacio Omar Romero, M.S
PhD student Bioengineering
University of California, Merced
________________________________
From: Gate-users <gate-users-bounces at lists.opengatecollaboration.org> on behalf of David Boersma <david.boersma at acmit.at>
Sent: Tuesday, October 29, 2019 6:27:24 AM
To: gate-users at lists.opengatecollaboration.org <gate-users at lists.opengatecollaboration.org>
Subject: Re: [Gate-users] Creating New Gate Actors
Hello Ignacio,
We are eager to improve the docs! Unfortunately, from you mail it's not so clear to me in what way the gate actor development page is incomplete for you.
What kind of trouble do you have? Are you new to C++ programming or do you already have some experience? What have you tried so far, and what kind of errors/problems are you now stuck on?
Best,
David B.
________________________________
Von: Gate-users <gate-users-bounces at lists.opengatecollaboration.org> im Auftrag von Ignacio Romero <iromero7 at ucmerced.edu>
Gesendet: Mittwoch, 23. Oktober 2019 21:20:41
An: gate-users at lists.opengatecollaboration.org
Betreff: [Gate-users] Creating New Gate Actors
Hello Gate users,
I was wondering if there are better instructions for developing new actors? I have looked at http://wiki.opengatecollaboration.org/index.php/GateActor but I am having trouble with developing the 4 required files (actor.cc, actor.hh, actorMessenger.cc, actorMessenger.hh).
Basically I would like to create an actor that is a mini version of the root output file. I don't need the entire output of root; I only require certain leaves from the Hits tree to save memory storage.
Thank you for your time.
Best,
Ignacio Romero
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20191030/2160a63f/attachment-0001.html>
More information about the Gate-users
mailing list