Howto for eventdisplay [message #17696] |
Tue, 23 December 2014 17:29 |
MartinJGaluska
Messages: 203 Registered: March 2010 Location: Germany
|
first-grade participant |
From: *physik.uni-giessen.de
|
|
Hello,
I know that it is possible to hide individual geometry modules from being visualized in the event display. However, doing this by hand every time is quite tedious. Is there some way of doing this from within the macro itself?
I want to simulate events using the full detector geometry for testing purposes, but only want to visualize the FTS.
Kind regards and happy holidays,
Martin
|
|
|
|
|
Re: Howto for eventdisplay [message #17747 is a reply to message #17696] |
Tue, 13 January 2015 17:56 |
asanchez
Messages: 350 Registered: March 2006
|
first-grade participant |
From: *kph.uni-mainz.de
|
|
Hi, here there is a simple solution by using the macro, even if you still need to make use later of the Eve Main window.
so I suppose you are using as a reference the event display. C macro from trunk/macro/run
so after the line fMan->Init()
you should get rid of the TopVolume, which in this case is "cave"
TGeoVolume* top = gGeoManager->GetTopVolume();
then let's assume you have used emc fts ftof as detector volumes in your simulation.
That means, that if you only want to visualise the FTS, you should set the visibility
of the emc and ftof to zero.
first of all, since you have now a hierarchy of volumes inside the the Top Volume called "cave",
you should have first access to the single volumes you want to hide or make invisible.
For that you should know the name of the volume, that is the name which appears when you go to the menu
of Eve Main window, on the left upper part, the following structure looks like
window Manger
Viewers
Scenes
FairEventManger,
if you go to scenes->Geometry Scene -> cave_1->list of the volumes
take the name of the volume you want to hide as it appears there as string.
then,
TGeoNode* targ = top->FindNode("Realtop_0"); as example of the volume 1 I want to hide
TGeoNode* tg = top->FindNode("TargetComplex_0"); as example of the volume 2 I want to hide
targ->SetAllInvisible();
tg->SetAllInvisible();
then execute your macro as usual, you will see the Eve Main window again, with no changes apparently.
then go to scenes, Geometry Scene, cave_1, and click there.
below it appears the menu corresponding to the cave volume, as soon as you increase VisLevel, the volumes you have selected in the macro to be invisible
will disappear from the scene window.
I hope it works, unfortunately I have not found a better and direct way to do it.
bst regards
alicia.
|
|
|
Re: Howto for eventdisplay [message #17748 is a reply to message #17747] |
Tue, 13 January 2015 18:30 |
MartinJGaluska
Messages: 203 Registered: March 2010 Location: Germany
|
first-grade participant |
From: *physik.uni-giessen.de
|
|
Thank you very much. Your method works and I will use it.
I was hoping I could find a way to make first everything invisible and then only make visible what I am actually interested in. (This would be more convenient than hiding almost all subdetectors.)
I tried this:
// everything invisible
TGeoNode* cave = gGeoManager->GetTopNode();
cave->SetAllInvisible();
But it does not actually seem to do anything. Any ideas?
[Updated on: Tue, 13 January 2015 18:32] Report message to a moderator
|
|
|
|
|
|
|