Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TGeoTrack.h
Go to the documentation of this file.
1 // @(#)root/geom:$Id$
2 // Author: Andrei Gheata 2003/04/10
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGeoTrack
13 #define ROOT_TGeoTrack
14 
15 #include "TVirtualGeoTrack.h"
16 
17 #include "TPolyLine3D.h"
18 
19 class TPolyMarker3D;
20 
21 /////////////////////////////////////////////////////////////////////////////
22 // TGeoTrack - Tracks attached to a geometry. //
23 // Tracks are 3D objects made of points and they store a //
24 // pointer to a TParticle. The geometry manager holds a list //
25 // of all tracks that will be deleted on destruction of //
26 // gGeoManager. //
27 // //
28 /////////////////////////////////////////////////////////////////////////////
29 
30 class TGeoTrack : public TVirtualGeoTrack
31 {
32 public:
33 
34 enum EGeoParticleActions {
35  kGeoPDefault = BIT(7),
36  kGeoPOnelevel = BIT(8),
37  kGeoPAllDaughters = BIT(9),
38  kGeoPType = BIT(10),
39  kGeoPDrawn = BIT(11)
40 };
41 
42 private :
43  Int_t fPointsSize; // capacity of points array
44  Int_t fNpoints; // number of stored points
45  Double_t *fPoints; //[fNpoints] array of points (x,y,z,t) belonging to this track
46 
47 protected:
48  TGeoTrack(const TGeoTrack&);
49  TGeoTrack& operator=(const TGeoTrack&);
50 
51 public:
52  TGeoTrack();
53  TGeoTrack(Int_t id, Int_t pdgcode, TVirtualGeoTrack *parent=0, TObject *particle=0);
54  virtual ~TGeoTrack();
55 
56  virtual TVirtualGeoTrack *AddDaughter(Int_t id, Int_t pdgcode, TObject *particle=0);
57  virtual Int_t AddDaughter(TVirtualGeoTrack *other);
58  virtual void AddPoint(Double_t x, Double_t y, Double_t z, Double_t t);
59  virtual void AnimateTrack(Double_t tmin=0, Double_t tmax=5E-8, Double_t nframes=200, Option_t *option="/*"); // *MENU*
60  void Browse(TBrowser *b);
61  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
62  virtual void Draw(Option_t *option=""); // *MENU*
63  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
64  virtual char *GetObjectInfo(Int_t px, Int_t py) const;
65  virtual Int_t GetNpoints() const {return (fNpoints>>2);}
66  virtual Int_t GetPoint(Int_t i, Double_t &x, Double_t &y, Double_t &z, Double_t &t) const;
67  virtual const Double_t *GetPoint(Int_t i) const;
68  Int_t GetPoint(Double_t tof, Double_t *point, Int_t istart=0) const;
69  Bool_t IsFolder() const {return (GetNdaughters()>0)?kTRUE:kFALSE;}
70  virtual void Paint(Option_t *option="");
71  virtual void PaintCollect(Double_t time, Double_t *box);
72  virtual void PaintCollectTrack(Double_t time, Double_t *box);
73  void PaintMarker(Double_t *point, Option_t *option="");
74  virtual void PaintTrack(Option_t *option="");
75  virtual void Print(Option_t *option="") const; // *MENU*
76  virtual void ResetTrack();
77  Int_t SearchPoint(Double_t time, Int_t istart=0) const;
78  void SetBits(Bool_t is_default=kTRUE, Bool_t is_onelevel=kFALSE,
79  Bool_t is_all=kFALSE, Bool_t is_type=kFALSE);
80  Int_t Size(Int_t &imin, Int_t &imax);
81  virtual void Sizeof3D() const;
82 
83  ClassDef(TGeoTrack, 1) // geometry tracks class
84 };
85 
86 #endif
87 
88 
89 
90