Re: [ROOT] visualization

From: Andrei Gheata (Andrei.Gheata@cern.ch)
Date: Thu Nov 27 2003 - 16:30:01 MET


Hi Jan,

You have to create TGeoTrack objects from your tracks information. You 
can keep track primary/secondary relationship if you have it. Create 
primary tracks with :
TGeoManager::AddTrack(id, pdg, TObject *particle=0) - you will have to 
supply a user id and the pdg code of the particle. If you have a 
TParticle for this track, you can also attach it, but it is not 
mandatory. You can set the line color for the track (see TAttLine)
  Then add the track points:

TVirtualGeoTrack::AddPoint(x,y,z,t); t is time, if you do not have it 
provide 0 instead (you will not be able to animate the track).

  Add secondaries to a track:

track->AddTrack(id,pdg) then add points to it in the same way.

Finally you will see the list of tracks in a TBrowser. Draw your 
geometry, then draw them individually (TGeoTrack::Draw) or alltogeather 
: (TGeoManager::DrawTracks(Option_t *option))
Animate tracks (if you have time information for points) with:
TGeoManager::AnimateTracks(Option_t *option)

Look for available options in: TGeoTrack::Draw() method.

More info you will find in the TGeo chapter in the users guide that will 
be released very soon.

Regards,
Andrei




Jano Hruby wrote:
>   Hi,
> please help me with this problem:
> We have simple geometry setup: target, 2 detectors, magnet, 3
> detectors (create with TGeo... clasess), all great working.
> We have tracks (one or two protons or deuterons) with all parameters:
> momentum or directions or angles and points (before magnet, over
> magnet, after magnet). How visualize this track(tracks) with TGeo...
> clasess ?
> We need only visualization this tracks.
> 
> Thank you
> Jan
> 
> 
> ====================== REKLAMA =================================
> Neobmedzený rýchly prístup na internet už od 666,- Sk mesačne!
> Nextra ADSLink. http://adsl.nextra.sk
> 
> 
> 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:17 MET