GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » Track Visualization questions
Track Visualization questions [message #9268] Tue, 01 September 2009 10:04 Go to next message
Christian Leitold is currently offline  Christian Leitold
Messages: 35
Registered: August 2009
Location: Stefan Meyer Institute
continuous participant
From: *smi.oeaw.ac.at
Hello,

I am a student and work currently at SMI, Vienna, where I should perform some simulations using PANDA ROOT. So far, we have created a set of macros for full simulation based on those in trunk/tutorials/analysis (sim, digi, reco, kalman, makeTCands). We are using revision 5813 following a suggestion by Klaus Götzen, since the macros were not compatible with the most current version. I could already perform some simple analysis, like getting the momentum or energy of different particle types, etc.

What I could not do -- and here is the reason for my question -- is track visualization. We would like to that, but unfortunately so far I have not found out how. There are some example scripts available, but they all do not work since they they look for some TGeoTrack objects which are apparently not present in our ROOT files, causing an error:

Error in <TTree::SetBranchAddress>: unknown branch -> GeoTracks

Is there a method for adding this branch to the tree, or has the track visualization process changed so I have to use another approach?

Thanks a lot and sorry for me asking so simple questions
Christian Leitold
Re: Track Visualization questions [message #9269 is a reply to message #9268] Tue, 01 September 2009 10:17 Go to previous messageGo to next message
Tobias Stockmanns is currently offline  Tobias Stockmanns
Messages: 489
Registered: May 2007
first-grade participant
From: *ikp.kfa-juelich.de
Dear Christian,

in your simulation macro you have to set:

fRun->SetStoreTraj(kTRUE);

then the GeoTracks should be created.

Cheers,

Tobias
Re: Track Visualization questions [message #9270 is a reply to message #9268] Tue, 01 September 2009 11:23 Go to previous messageGo to next message
Christian Leitold is currently offline  Christian Leitold
Messages: 35
Registered: August 2009
Location: Stefan Meyer Institute
continuous participant
From: *smi.oeaw.ac.at
Hey,

thank you for your fast answer. To add the GeoTracks was really that simple!

Unfortunately, I have another problem now:

The script needs to create FairVTrack objects, the actual "visual" representation of the tracks, to draw them. But that does not work:

Error: Symbol FairVTrack is not defined in current scope drawGLTracks.C:87:

The FairVTrack object exists in my revision in trunk/base and should be compiled into libBase, but in fact, it is not. There exists the file trunk/base/CMakeLists.txt, which contains a list of files to be compiled into the library. There, FairVTrack.cxx is commented out. If I remove the comment, compilation works fine (I execute "make" in directory build), BUT it is not possible to load the library in the macro any more, the load process stops with an error:

Load Error: Failed to load Dynamic link library /home/cleitold/pandaroot/fairsoft/build/lib/libBase.so

We already had this kind of error before, when we unsuccessfully tried to add a new generator class to our PANDA ROOT. So, the more general question is now, how can I compile new classes into libraries without generating a crash when trying to load those libraries?

Thanks
Christian
Re: Track Visualization questions [message #9272 is a reply to message #9270] Tue, 01 September 2009 12:46 Go to previous messageGo to next message
Tobias Stockmanns is currently offline  Tobias Stockmanns
Messages: 489
Registered: May 2007
first-grade participant
From: *ikp.kfa-juelich.de
Dear Christian,

which script are you using to display your tracks?

Cheers,

Tobias
Re: Track Visualization questions [message #9273 is a reply to message #9268] Tue, 01 September 2009 13:06 Go to previous messageGo to next message
Christian Leitold is currently offline  Christian Leitold
Messages: 35
Registered: August 2009
Location: Stefan Meyer Institute
continuous participant
From: *smi.oeaw.ac.at
I use macro/run/drawGLTracks.C, the interesting (which means, crashing) part is:

 
 TGeoTrack *tr;
 TObjArray *TrList= geoMan->GetListOfTracks(); 
   geoMan->SetAnimateTracks();
  for (Int_t j=0; j< t->GetEntriesFast(); j++)	{
 	t->GetEntry(0);
        Double_t *point;
	for (Int_t i=0; i<fT->GetEntriesFast(); i++)	{
    		tr=(TGeoTrack *)fT->At(i);
                Int_t Np=tr->GetNpoints();
                FairVTrack *pt = new FairVTrack(Np); 
                pt->SetLineColor(tr->GetLineColor());
                pt->SetLineWidth(2);
                pt->SetTrack(tr);
                pt->SetParticle((TParticle *)tr->GetParticle());
                for (Int_t n=0; n<Np; n++){
                   point=tr->GetPoint(n);
                   pt->SetPoint(n,point[0],point[1],point[2]);
		}
                pt->Draw();
	}
  }

As you can see, in the inner loop, the FairVTrack *pt is created, leading to the crash.

Thanks
Christian
Re: Track Visualization questions [message #9274 is a reply to message #9273] Tue, 01 September 2009 13:41 Go to previous messageGo to next message
Tobias Stockmanns is currently offline  Tobias Stockmanns
Messages: 489
Registered: May 2007
first-grade participant
From: *ikp.kfa-juelich.de
Dear Christian,

use the macro eventDisplay.C from macro/run/. You can visualize the different hits in the detectors, the Panda geometry and the tracks of particles.

Cheers,

Tobias
Re: Track Visualization questions [message #9275 is a reply to message #9268] Tue, 01 September 2009 14:06 Go to previous messageGo to next message
Christian Leitold is currently offline  Christian Leitold
Messages: 35
Registered: August 2009
Location: Stefan Meyer Institute
continuous participant
From: *smi.oeaw.ac.at
Hello,

I have just tried eventDisplay.C, unfortunately, I still have library problems:

Error in <TUnixSystem::DynamicPathName>: libEventDisplay[.so | .sl | .dl | .a | .dll] does not exist in [long list of paths follows]

The libEventDisplay.so library file does not exist on my system and I see no way how to compile it, even though the source files all are where they should be.

Maybe I should better open a new thread concerning my growing library problems?

Kind regards
Christian

[Updated on: Tue, 01 September 2009 14:07]

Report message to a moderator

Re: Track Visualization questions [message #9276 is a reply to message #9275] Tue, 01 September 2009 14:21 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
You should enable the compilation of that package.

Edit your trunk/CMakeLists.txt file and uncomment the line

add_subdirectory(PndEventdisplay)


Then, just do a new cmake and compile again pandaroot.
Re: Track Visualization questions [message #9277 is a reply to message #9268] Tue, 01 September 2009 14:38 Go to previous messageGo to next message
Christian Leitold is currently offline  Christian Leitold
Messages: 35
Registered: August 2009
Location: Stefan Meyer Institute
continuous participant
From: *smi.oeaw.ac.at
Thanks a lot Stefano, that worked, I have compiled the additional library! Now the thing I have left to do is actually SEE the tracks ...

Kind regards
Christian
Re: Track Visualization questions [message #9284 is a reply to message #9268] Wed, 02 September 2009 11:01 Go to previous message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *to.infn.it
Hi Christian,

You might want to look at my slides from the last Collaboration Meeting. There is also a small introduction how to use the EventDisplay.
I suppose you will find the latest Tutorial Wiki Site useful, too.

Kind regards, Ralf.
Previous Topic: Add new classes to libraries
Next Topic: Error in PndLheKalmanTask: track-array not found
Goto Forum:
  


Current Time: Tue Nov 19 17:53:41 CET 2024

Total time taken to generate the page: 0.00875 seconds