Logo ROOT   6.14/05
Reference Guide
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 
31 {
32 public:
33 
38  kGeoPType = BIT(10),
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 
Int_t SearchPoint(Double_t time, Int_t istart=0) const
Search index of track point having the closest time tag smaller than TIME.
Definition: TGeoTrack.cxx:673
TGeoTrack()
Default constructor.
Definition: TGeoTrack.cxx:37
virtual void PaintCollectTrack(Double_t time, Double_t *box)
Paint just this track.
Definition: TGeoTrack.cxx:476
const char Option_t
Definition: RtypesCore.h:62
#define BIT(n)
Definition: Rtypes.h:78
virtual void PaintCollect(Double_t time, Double_t *box)
Paint track and daughters.
Definition: TGeoTrack.cxx:449
Int_t fPointsSize
Definition: TGeoTrack.h:43
virtual void Draw(Option_t *option="")
Draw this track over-imposed on a geometry, according to option.
Definition: TGeoTrack.cxx:312
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Definition: fillpatterns.C:1
virtual void Paint(Option_t *option="")
Paint this track (and descendents) with current attributes.
Definition: TGeoTrack.cxx:418
virtual void ResetTrack()
Reset data for this track.
Definition: TGeoTrack.cxx:711
virtual TVirtualGeoTrack * AddDaughter(Int_t id, Int_t pdgcode, TObject *particle=0)
Add a daughter track to this.
Definition: TGeoTrack.cxx:105
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:320
EGeoParticleActions
Definition: TGeoTrack.h:34
Base class for user-defined tracks attached to a geometry.
TGeoTrack & operator=(const TGeoTrack &)
Assignment operator. NOT TO BE CALLED.
Definition: TGeoTrack.cxx:82
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Event treatment.
Definition: TGeoTrack.cxx:350
virtual void PaintTrack(Option_t *option="")
Paint this track with its current attributes.
Definition: TGeoTrack.cxx:512
virtual void Print(Option_t *option="") const
Print some info about the track.
Definition: TGeoTrack.cxx:640
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
virtual Int_t GetPoint(Int_t i, Double_t &x, Double_t &y, Double_t &z, Double_t &t) const
Get coordinates for point I on the track.
Definition: TGeoTrack.cxx:371
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Returns distance to track primitive for picking.
Definition: TGeoTrack.cxx:242
virtual void AddPoint(Double_t x, Double_t y, Double_t z, Double_t t)
Add a point on the track.
Definition: TGeoTrack.cxx:203
Int_t Size(Int_t &imin, Int_t &imax)
Return the number of points within the time interval specified by TGeoManager class and the correspon...
Definition: TGeoTrack.cxx:656
virtual void AnimateTrack(Double_t tmin=0, Double_t tmax=5E-8, Double_t nframes=200, Option_t *option="/*")
Draw animation of this track.
Definition: TGeoTrack.cxx:129
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
Definition: TGeoTrack.h:69
constexpr Double_t E()
Base of natural log: .
Definition: TMath.h:97
Int_t fNpoints
Definition: TGeoTrack.h:44
const Bool_t kFALSE
Definition: RtypesCore.h:88
Double_t * fPoints
Definition: TGeoTrack.h:45
double Double_t
Definition: RtypesCore.h:55
void Browse(TBrowser *b)
How-to-browse for a track.
Definition: TGeoTrack.cxx:226
Double_t y[n]
Definition: legend1.C:17
Mother of all ROOT objects.
Definition: TObject.h:37
you should not use this method at all Int_t Int_t z
Definition: TRolke.cxx:630
Class for user-defined tracks attached to a geometry.
Definition: TGeoTrack.h:30
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Get some info about the track.
Definition: TGeoTrack.cxx:359
A 3D polymarker.
Definition: TPolyMarker3D.h:32
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
virtual ~TGeoTrack()
Destructor.
Definition: TGeoTrack.cxx:96
virtual Int_t GetNpoints() const
Definition: TGeoTrack.h:65
Int_t GetNdaughters() const
const Bool_t kTRUE
Definition: RtypesCore.h:87
virtual void Sizeof3D() const
Returns 3D size for the track.
Definition: TGeoTrack.cxx:704
void PaintMarker(Double_t *point, Option_t *option="")
Paint current point of the track as marker.
Definition: TGeoTrack.cxx:494
void SetBits(Bool_t is_default=kTRUE, Bool_t is_onelevel=kFALSE, Bool_t is_all=kFALSE, Bool_t is_type=kFALSE)
Set drawing bits for this track.
Definition: TGeoTrack.cxx:692