[Gate-users] How to compile a new geometry class?
Andreas Menzel
am at crystal-photonics.com
Thu Jun 1 14:44:44 CEST 2017
Dear David Sarrut, der David Boersma,
thanks a lot for your really quick and detailed answers.
From a programming side, it turns out I had been doing exactly the
right thing.
I just setup the necessary git(Hub) infrastructure and, thanks to your
quick replies, I will see very soon if it works.
Thanks again!
Andreas Menzel
Am 01.06.2017 um 10:39 schrieb David Boersma:
> Hi Andreas,
>
> Den 01/06/2017 kl. 09:39, skrev Andreas Menzel:
>> Dear Gate community,
>>
>> probably this has been asked before, but it seems I cannot use the
>> mailing list's archive.
>>
>> So, can someone please tell me where to find instructions on how to
>> compile a newly added class in Gate? I don't seem to find it in the
>> online documentation, either.
>>
>> To be specific, I am supposed to do a simulation which contains a
>> rather complex collimator. As the Gate scripting language does not
>> seem to support what I am trying to do, I decided to use two
>> different ways and try out which one works better: The first one is
>> to use Geant4's boolean solids and do subtractions of geometry
>> primitives. The second would be to load a GDML file containing the
>> geometry which also can be done in Geant4. I only started the first
>> one and I wrote a Gate geometry class and a messenger connected to it
>> as well as the necessary header files.
>>
>> Now, is there some template makefile / CMakeLists.txt I could use to
>> actually compile these and test them? Or do I just put the sources
>> into the location of the other Gate sources and re-make the whole
>> thing so that the new files are compiled?
>
> I think that is the most straightforward way. Since you are developing
> something new, you should use the head of the "develop" branch on
> GitHub. Our official repository is here:
>
> https://github.com/OpenGATE/Gate
>
> (On the "Git" page of our website we still advertise an outdated git
> server. I hope we can update/clean that outdated web page soon. For
> now it's better to get all your git documentation & tutorials from the
> github website.)
>
> (If you just would like to retrieve & build the latest greatest
> development version of gate then you can just "clone" directly from
> there. But since you are planning to develop your own thing, it's
> recommended to get your own (free) github account and make a "fork"
> first, "clone" your "fork", make a new "branch", then when you are
> happy with your new feature you "push" that "branch" back to your
> "fork" on github and then you submit a "pull request" so that your new
> feature may (or may not) be included into the official Gate
> development. On the GitHub website you can find extensive help and
> tutorials for all the "quoted operations". It takes some time to get
> used to all these git things, but in the medium/long term it's a good
> system. And GitHub is used by a very large developer community, so
> it's a very useful skill to learn.)
>
> You shouldn't need to edit anything in the CMakeLists.txt file unless
> you are doing exotic things with external libraries of
> platform-dependent features. Just add your new geometry classes in the
> "include" and "src" subdirectories of Gate/source/geometry, then run
> ccmake and make, etc, as described on our wiki.
>
>>
>> Thanks for your help!
>
> Good luck!
> David B.
>
>>
>> Andreas Menzel
>>
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
--
Dr. Andreas Menzel
Crystal Photonics GmbH
Albert Einstein Straße 16
D - 12489 Berlin
Germany
FAX.: +49 (0) 30 34669299
am at crystal-photonics.com
www.crystal-photonics.com
-------------------------
Geschäftsführer: Klaus Schwenkenbecher
Amtsgericht Berlin-Charlottenburg HRB 99822B
Steuer-Nr.: 37/109/21041
VAT-No.: DE 814612031
More information about the Gate-users
mailing list