Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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/////////////////////////////////////////////////////////////////////////////
18// TGeoTrack - Tracks attached to a geometry. //
19// Tracks are 3D objects made of points and they store a //
20// pointer to a TParticle. The geometry manager holds a list //
21// of all tracks that will be deleted on destruction of //
22// gGeoManager. //
23// //
24/////////////////////////////////////////////////////////////////////////////
25
27{
28public:
29
35 kGeoPDrawn = BIT(11)
36};
37
38private :
39 Int_t fPointsSize; // capacity of points array
40 Int_t fNpoints; // number of stored points
41 Double_t *fPoints; //[fNpoints] array of points (x,y,z,t) belonging to this track
42
43protected:
44 TGeoTrack(const TGeoTrack&) = delete;
45 TGeoTrack& operator=(const TGeoTrack&) = delete;
46
47public:
48 TGeoTrack();
49 TGeoTrack(Int_t id, Int_t pdgcode, TVirtualGeoTrack *parent=nullptr, TObject *particle=nullptr);
50 virtual ~TGeoTrack();
51
52 virtual TVirtualGeoTrack *AddDaughter(Int_t id, Int_t pdgcode, TObject *particle=nullptr);
53 virtual Int_t AddDaughter(TVirtualGeoTrack *other);
54 virtual void AddPoint(Double_t x, Double_t y, Double_t z, Double_t t);
55 virtual void AnimateTrack(Double_t tmin=0, Double_t tmax=5E-8, Double_t nframes=200, Option_t *option="/*"); // *MENU*
56 void Browse(TBrowser *b);
57 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
58 virtual void Draw(Option_t *option=""); // *MENU*
59 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
60 virtual char *GetObjectInfo(Int_t px, Int_t py) const;
61 virtual Int_t GetNpoints() const {return (fNpoints>>2);}
62 virtual Int_t GetPoint(Int_t i, Double_t &x, Double_t &y, Double_t &z, Double_t &t) const;
63 virtual const Double_t *GetPoint(Int_t i) const;
64 Int_t GetPoint(Double_t tof, Double_t *point, Int_t istart=0) const;
65 Bool_t IsFolder() const {return (GetNdaughters()>0)?kTRUE:kFALSE;}
66 virtual void Paint(Option_t *option="");
67 virtual void PaintCollect(Double_t time, Double_t *box);
68 virtual void PaintCollectTrack(Double_t time, Double_t *box);
69 void PaintMarker(Double_t *point, Option_t *option="");
70 virtual void PaintTrack(Option_t *option="");
71 virtual void Print(Option_t *option="") const; // *MENU*
72 virtual void ResetTrack();
73 Int_t SearchPoint(Double_t time, Int_t istart=0) const;
74 void SetBits(Bool_t is_default=kTRUE, Bool_t is_onelevel=kFALSE,
75 Bool_t is_all=kFALSE, Bool_t is_type=kFALSE);
76 Int_t Size(Int_t &imin, Int_t &imax);
77 virtual void Sizeof3D() const;
78
79 ClassDef(TGeoTrack, 1) // geometry tracks class
80};
81
82#endif
83
84
85
86
#define b(i)
Definition RSha256.hxx:100
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
double Double_t
Definition RtypesCore.h:59
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:337
#define BIT(n)
Definition Rtypes.h:85
Option_t Option_t option
Using a TBrowser one can browse all ROOT objects.
Definition TBrowser.h:37
Int_t fPointsSize
Definition TGeoTrack.h:39
virtual void Print(Option_t *option="") const
Print some info about the track.
virtual void Sizeof3D() const
Returns 3D size for the track.
virtual void Paint(Option_t *option="")
Paint this track (and descendents) with current attributes.
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...
virtual void PaintCollectTrack(Double_t time, Double_t *box)
Paint just this track.
Int_t SearchPoint(Double_t time, Int_t istart=0) const
Search index of track point having the closest time tag smaller than TIME.
virtual TVirtualGeoTrack * AddDaughter(Int_t id, Int_t pdgcode, TObject *particle=nullptr)
Add a daughter track to this.
Definition TGeoTrack.cxx:83
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Event treatment.
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.
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Definition TGeoTrack.h:65
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Returns distance to track primitive for picking.
Double_t * fPoints
Definition TGeoTrack.h:41
virtual ~TGeoTrack()
Destructor.
Definition TGeoTrack.cxx:74
TGeoTrack()
Default constructor.
Definition TGeoTrack.cxx:40
TGeoTrack & operator=(const TGeoTrack &)=delete
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Get some info about the track.
virtual Int_t GetNpoints() const
Definition TGeoTrack.h:61
void PaintMarker(Double_t *point, Option_t *option="")
Paint current point of the track as marker.
EGeoParticleActions
Definition TGeoTrack.h:30
@ kGeoPDefault
Definition TGeoTrack.h:31
@ kGeoPOnelevel
Definition TGeoTrack.h:32
@ kGeoPAllDaughters
Definition TGeoTrack.h:33
void Browse(TBrowser *b)
How-to-browse for a track.
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.
TGeoTrack(const TGeoTrack &)=delete
virtual void PaintCollect(Double_t time, Double_t *box)
Paint track and daughters.
virtual void ResetTrack()
Reset data for this track.
virtual void AddPoint(Double_t x, Double_t y, Double_t z, Double_t t)
Add a point on the track.
virtual void PaintTrack(Option_t *option="")
Paint this track with its current attributes.
virtual void AnimateTrack(Double_t tmin=0, Double_t tmax=5E-8, Double_t nframes=200, Option_t *option="/*")
Draw animation of this track.
Int_t fNpoints
Definition TGeoTrack.h:40
Mother of all ROOT objects.
Definition TObject.h:41
Base class for user-defined tracks attached to a geometry.
Int_t GetNdaughters() const
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Definition fillpatterns.C:1
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
th1 Draw()