ROOT logo
// @(#)root/geom:$Id: TGeoTrack.h 21425 2007-12-17 15:59:27Z brun $
// Author: Andrei Gheata   2003/04/10

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TGeoTrack
#define ROOT_TGeoTrack

#ifndef ROOT_TVirtualGeoTrack
#include "TVirtualGeoTrack.h"
#endif

#ifndef ROOT_TPolyLine3D
#include "TPolyLine3D.h"
#endif

class TPolyMarker3D;

/////////////////////////////////////////////////////////////////////////////
// TGeoTrack - Tracks attached to a geometry.                              //
//             Tracks are 3D objects made of points and they store a       //
//             pointer to a TParticle. The geometry manager holds a list   //
//             of all tracks that will be deleted on destruction of        //
//             gGeoManager.                                                //
//                                                                         //
/////////////////////////////////////////////////////////////////////////////

class TGeoTrack : public TVirtualGeoTrack
{
public:

enum EGeoParticleActions {
   kGeoPDefault      = BIT(7),
   kGeoPOnelevel     = BIT(8),
   kGeoPAllDaughters = BIT(9),
   kGeoPType         = BIT(10),
   kGeoPDrawn        = BIT(11)
};   

private :
   Int_t          fPointsSize; // capacity of points array
   Int_t          fNpoints;    // number of stored points
   Double_t      *fPoints;     //[fNpoints] array of points (x,y,z,t) belonging to this track

protected:
   TGeoTrack(const TGeoTrack&);
   TGeoTrack& operator=(const TGeoTrack&);

public:
   TGeoTrack();
   TGeoTrack(Int_t id, Int_t pdgcode, TVirtualGeoTrack *parent=0, TObject *particle=0);
   virtual ~TGeoTrack();
   
   virtual TVirtualGeoTrack *AddDaughter(Int_t id, Int_t pdgcode, TObject *particle=0);
   virtual Int_t       AddDaughter(TVirtualGeoTrack *other);
   virtual void        AddPoint(Double_t x, Double_t y, Double_t z, Double_t t);
   virtual void        AnimateTrack(Double_t tmin=0, Double_t tmax=5E-8, Double_t nframes=200, Option_t *option="/*"); // *MENU*
   void                Browse(TBrowser *b);
   virtual Int_t       DistancetoPrimitive(Int_t px, Int_t py);
   virtual void        Draw(Option_t *option=""); // *MENU*
   virtual void        ExecuteEvent(Int_t event, Int_t px, Int_t py);
   virtual char       *GetObjectInfo(Int_t px, Int_t py) const;
   virtual Int_t       GetNpoints() const {return (fNpoints>>2);}
   virtual Int_t       GetPoint(Int_t i, Double_t &x, Double_t &y, Double_t &z, Double_t &t) const;
   virtual const Double_t *GetPoint(Int_t i) const;
   Int_t               GetPoint(Double_t tof, Double_t *point, Int_t istart=0) const;
   Bool_t              IsFolder() const {return (GetNdaughters()>0)?kTRUE:kFALSE;}
   virtual void        Paint(Option_t *option="");
   virtual void        PaintCollect(Double_t time, Double_t *box);
   virtual void        PaintCollectTrack(Double_t time, Double_t *box);
   void                PaintMarker(Double_t *point, Option_t *option="");
   virtual void        PaintTrack(Option_t *option="");
   virtual void        Print(Option_t *option="") const; // *MENU*
   virtual void        ResetTrack();
   Int_t               SearchPoint(Double_t time, Int_t istart=0) const;
   void                SetBits(Bool_t is_default=kTRUE, Bool_t is_onelevel=kFALSE, 
                               Bool_t is_all=kFALSE, Bool_t is_type=kFALSE);
   Int_t               Size(Int_t &imin, Int_t &imax);
   virtual void        Sizeof3D() const;
   
   ClassDef(TGeoTrack, 1)              // geometry tracks class
};

#endif
   
   
   
   
 TGeoTrack.h:1
 TGeoTrack.h:2
 TGeoTrack.h:3
 TGeoTrack.h:4
 TGeoTrack.h:5
 TGeoTrack.h:6
 TGeoTrack.h:7
 TGeoTrack.h:8
 TGeoTrack.h:9
 TGeoTrack.h:10
 TGeoTrack.h:11
 TGeoTrack.h:12
 TGeoTrack.h:13
 TGeoTrack.h:14
 TGeoTrack.h:15
 TGeoTrack.h:16
 TGeoTrack.h:17
 TGeoTrack.h:18
 TGeoTrack.h:19
 TGeoTrack.h:20
 TGeoTrack.h:21
 TGeoTrack.h:22
 TGeoTrack.h:23
 TGeoTrack.h:24
 TGeoTrack.h:25
 TGeoTrack.h:26
 TGeoTrack.h:27
 TGeoTrack.h:28
 TGeoTrack.h:29
 TGeoTrack.h:30
 TGeoTrack.h:31
 TGeoTrack.h:32
 TGeoTrack.h:33
 TGeoTrack.h:34
 TGeoTrack.h:35
 TGeoTrack.h:36
 TGeoTrack.h:37
 TGeoTrack.h:38
 TGeoTrack.h:39
 TGeoTrack.h:40
 TGeoTrack.h:41
 TGeoTrack.h:42
 TGeoTrack.h:43
 TGeoTrack.h:44
 TGeoTrack.h:45
 TGeoTrack.h:46
 TGeoTrack.h:47
 TGeoTrack.h:48
 TGeoTrack.h:49
 TGeoTrack.h:50
 TGeoTrack.h:51
 TGeoTrack.h:52
 TGeoTrack.h:53
 TGeoTrack.h:54
 TGeoTrack.h:55
 TGeoTrack.h:56
 TGeoTrack.h:57
 TGeoTrack.h:58
 TGeoTrack.h:59
 TGeoTrack.h:60
 TGeoTrack.h:61
 TGeoTrack.h:62
 TGeoTrack.h:63
 TGeoTrack.h:64
 TGeoTrack.h:65
 TGeoTrack.h:66
 TGeoTrack.h:67
 TGeoTrack.h:68
 TGeoTrack.h:69
 TGeoTrack.h:70
 TGeoTrack.h:71
 TGeoTrack.h:72
 TGeoTrack.h:73
 TGeoTrack.h:74
 TGeoTrack.h:75
 TGeoTrack.h:76
 TGeoTrack.h:77
 TGeoTrack.h:78
 TGeoTrack.h:79
 TGeoTrack.h:80
 TGeoTrack.h:81
 TGeoTrack.h:82
 TGeoTrack.h:83
 TGeoTrack.h:84
 TGeoTrack.h:85
 TGeoTrack.h:86
 TGeoTrack.h:87
 TGeoTrack.h:88
 TGeoTrack.h:89
 TGeoTrack.h:90
 TGeoTrack.h:91
 TGeoTrack.h:92
 TGeoTrack.h:93
 TGeoTrack.h:94