GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » Howto for eventdisplay
Howto for eventdisplay [message #17696] Tue, 23 December 2014 17:29 Go to next message
MartinJGaluska is currently offline  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 #17697 is a reply to message #17696] Tue, 23 December 2014 17:36 Go to previous messageGo to next message
MartinJGaluska is currently offline  MartinJGaluska
Messages: 203
Registered: March 2010
Location: Germany
first-grade participant
From: *physik.uni-giessen.de
I forgot to mention my second question:

Is there a way to know which visualized particle track in the FairEventManager has which index in the TClonesArray of the MC truth tracks?
Re: Howto for eventdisplay [message #17699 is a reply to message #17696] Thu, 25 December 2014 07:40 Go to previous messageGo to next message
Shyam Kumar is currently offline  Shyam Kumar
Messages: 78
Registered: September 2012
Location: Mumbai, Maharashtra India
continuous participant
From: 103.21.127*
Hi Martin,
I have seen the event display, then I got there is some thing like VizVolumedaughters (see in screen shots),vizvolume etc. If I deselect it for a volume that becomes invisible attached screen shots. There should be some function in class corresponding to it in GeoNode (or in other class eclipse user can easily find) as it is showing just above it. Some one expert in the c++ classes (I don't know how to put) can put this in the code then the selected volume can be removed. I think It should work.


Shyam
Re: Howto for eventdisplay [message #17747 is a reply to message #17696] Tue, 13 January 2015 17:56 Go to previous messageGo to next message
asanchez is currently offline  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 Go to previous messageGo to next message
MartinJGaluska is currently offline  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. Smile

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

Re: Howto for eventdisplay [message #17749 is a reply to message #17748] Tue, 13 January 2015 18:44 Go to previous messageGo to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: 89.204.135*
I'm glad to hear that Smile.
As much as the second possibility concerns Could you specify, please?
Re: Howto for eventdisplay [message #17750 is a reply to message #17749] Tue, 13 January 2015 18:54 Go to previous messageGo to next message
MartinJGaluska is currently offline  MartinJGaluska
Messages: 203
Registered: March 2010
Location: Germany
first-grade participant
From: *physik.uni-giessen.de
I expected / hoped that this piece of code

  // everything invisible (does not actually do anything)
  TGeoNode* cave = gGeoManager->GetTopNode();
  cave->SetAllInvisible();


would select all daughter volumes invisible. And then I would only need to make the fts volumes visible (instead of hiding everything which I do not want to see).

Actually, the code quoted above does not hide any volumes at all.

Kind regards,
Martin
Re: Howto for eventdisplay [message #17751 is a reply to message #17750] Tue, 13 January 2015 18:58 Go to previous messageGo to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: 89.204.135*
I'm afraid you should apply again the nasty trick again Smile
Namely increase the vislevel once by hand so that it activates the changes made by the macro. Let me know if it works Smile
Cheers Alicia.
Re: Howto for eventdisplay [message #17754 is a reply to message #17751] Tue, 13 January 2015 19:05 Go to previous message
MartinJGaluska is currently offline  MartinJGaluska
Messages: 203
Registered: March 2010
Location: Germany
first-grade participant
From: *physik.uni-giessen.de
Changing the vis level did not do the trick.
Previous Topic: Track perpendicular to Strip/Pixel
Next Topic: Reading a tree HELP!
Goto Forum:
  


Current Time: Mon Apr 29 05:10:32 CEST 2024

Total time taken to generate the page: 0.00763 seconds