TGeoTrack.h

Go to the documentation of this file.
00001 // @(#)root/geom:$Id: TGeoTrack.h 21425 2007-12-17 15:59:27Z brun $
00002 // Author: Andrei Gheata   2003/04/10
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TGeoTrack
00013 #define ROOT_TGeoTrack
00014 
00015 #ifndef ROOT_TVirtualGeoTrack
00016 #include "TVirtualGeoTrack.h"
00017 #endif
00018 
00019 #ifndef ROOT_TPolyLine3D
00020 #include "TPolyLine3D.h"
00021 #endif
00022 
00023 class TPolyMarker3D;
00024 
00025 /////////////////////////////////////////////////////////////////////////////
00026 // TGeoTrack - Tracks attached to a geometry.                              //
00027 //             Tracks are 3D objects made of points and they store a       //
00028 //             pointer to a TParticle. The geometry manager holds a list   //
00029 //             of all tracks that will be deleted on destruction of        //
00030 //             gGeoManager.                                                //
00031 //                                                                         //
00032 /////////////////////////////////////////////////////////////////////////////
00033 
00034 class TGeoTrack : public TVirtualGeoTrack
00035 {
00036 public:
00037 
00038 enum EGeoParticleActions {
00039    kGeoPDefault      = BIT(7),
00040    kGeoPOnelevel     = BIT(8),
00041    kGeoPAllDaughters = BIT(9),
00042    kGeoPType         = BIT(10),
00043    kGeoPDrawn        = BIT(11)
00044 };   
00045 
00046 private :
00047    Int_t          fPointsSize; // capacity of points array
00048    Int_t          fNpoints;    // number of stored points
00049    Double_t      *fPoints;     //[fNpoints] array of points (x,y,z,t) belonging to this track
00050 
00051 protected:
00052    TGeoTrack(const TGeoTrack&);
00053    TGeoTrack& operator=(const TGeoTrack&);
00054 
00055 public:
00056    TGeoTrack();
00057    TGeoTrack(Int_t id, Int_t pdgcode, TVirtualGeoTrack *parent=0, TObject *particle=0);
00058    virtual ~TGeoTrack();
00059    
00060    virtual TVirtualGeoTrack *AddDaughter(Int_t id, Int_t pdgcode, TObject *particle=0);
00061    virtual Int_t       AddDaughter(TVirtualGeoTrack *other);
00062    virtual void        AddPoint(Double_t x, Double_t y, Double_t z, Double_t t);
00063    virtual void        AnimateTrack(Double_t tmin=0, Double_t tmax=5E-8, Double_t nframes=200, Option_t *option="/*"); // *MENU*
00064    void                Browse(TBrowser *b);
00065    virtual Int_t       DistancetoPrimitive(Int_t px, Int_t py);
00066    virtual void        Draw(Option_t *option=""); // *MENU*
00067    virtual void        ExecuteEvent(Int_t event, Int_t px, Int_t py);
00068    virtual char       *GetObjectInfo(Int_t px, Int_t py) const;
00069    virtual Int_t       GetNpoints() const {return (fNpoints>>2);}
00070    virtual Int_t       GetPoint(Int_t i, Double_t &x, Double_t &y, Double_t &z, Double_t &t) const;
00071    virtual const Double_t *GetPoint(Int_t i) const;
00072    Int_t               GetPoint(Double_t tof, Double_t *point, Int_t istart=0) const;
00073    Bool_t              IsFolder() const {return (GetNdaughters()>0)?kTRUE:kFALSE;}
00074    virtual void        Paint(Option_t *option="");
00075    virtual void        PaintCollect(Double_t time, Double_t *box);
00076    virtual void        PaintCollectTrack(Double_t time, Double_t *box);
00077    void                PaintMarker(Double_t *point, Option_t *option="");
00078    virtual void        PaintTrack(Option_t *option="");
00079    virtual void        Print(Option_t *option="") const; // *MENU*
00080    virtual void        ResetTrack();
00081    Int_t               SearchPoint(Double_t time, Int_t istart=0) const;
00082    void                SetBits(Bool_t is_default=kTRUE, Bool_t is_onelevel=kFALSE, 
00083                                Bool_t is_all=kFALSE, Bool_t is_type=kFALSE);
00084    Int_t               Size(Int_t &imin, Int_t &imax);
00085    virtual void        Sizeof3D() const;
00086    
00087    ClassDef(TGeoTrack, 1)              // geometry tracks class
00088 };
00089 
00090 #endif
00091    
00092    
00093    
00094    

Generated on Tue Jul 5 14:13:19 2011 for ROOT_528-00b_version by  doxygen 1.5.1