#include "Event.h"

Event


class description - header file - source file - inheritance tree (.pdf)

class Event : public TObject

Inheritance Chart:
TObject
<-
Event

    public:
Event() Event(const Event&) virtual ~Event() Track* AddTrack(Float_t random, Float_t ptmin = 1) void Build(Int_t ev, Int_t arg5 = 600, Float_t ptmin = 1) static TClass* Class() virtual void Clear(Option_t* option = "") Float_t GetClosestDistance(Int_t i) UInt_t GetFlag() const EventHeader* GetHeader() TRefArray* GetHighPt() const TH1F* GetHistogram() const Track* GetLastTrack() const Double32_t GetMatrix(UChar_t x, UChar_t y) Int_t GetMeasure(UChar_t which) TRefArray* GetMuons() const Int_t GetNseg() const Int_t GetNtrack() const Int_t GetNvertex() const Double32_t GetTemperature() const TClonesArray* GetTracks() const TBits& GetTriggerBits() char* GetType() TH1* GetWebHistogram() const virtual TClass* IsA() const Bool_t IsValid() const Event& operator=(const Event&) static void Reset(Option_t* option = "") void ResetHistogramPointer() void SetFlag(UInt_t f) void SetHeader(Int_t i, Int_t run, Int_t date, Float_t random) void SetMatrix(UChar_t x, UChar_t y, Double32_t what) void SetMeasure(UChar_t which, Int_t what) void SetNseg(Int_t n) void SetNtrack(Int_t n) void SetNvertex(Int_t n) void SetRandomVertex() void SetTemperature(Double32_t t) void SetType(char* type) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
char fType[20] event type char* fEventName run+event number in character format Int_t fNtrack Number of tracks Int_t fNseg Number of track segments Int_t fNvertex UInt_t fFlag Double32_t fTemperature Int_t fMeasures[10] Double32_t fMatrix[4][4] Double32_t* fClosestDistance [fNvertex][-10,10,16] EventHeader fEvtHdr TClonesArray* fTracks ->array with all tracks TRefArray* fHighPt array of High Pt tracks only TRefArray* fMuons array of Muon tracks only TRef fLastTrack reference pointer to last track TRef fWebHistogram EXEC:GetWebHistogram reference to an histogram in a TWebFile TH1F* fH -> TBits fTriggerBits Bits triggered by this event. Bool_t fIsValid static TClonesArray* fgTracks static TH1F* fgHist

Class Description


                       Event and Track classes
                       =======================

  The Event class is a naive/simple example of an event structure.
     public:
        char           fType[20];
        char          *fEventName;         //run+event number in character format
        Int_t          fNtrack;
        Int_t          fNseg;
        Int_t          fNvertex;
        UInt_t         fFlag;
        Double32_t     fTemperature;
        Int_t          fMeasures[10];
        Double32_t     fMatrix[4][4];
        Double32_t    *fClosestDistance; //[fNvertex] indexed array!
        EventHeader    fEvtHdr;
        TClonesArray  *fTracks;
        TRefArray     *fHighPt;            //array of High Pt tracks only
        TRefArray     *fMuons;             //array of Muon tracks only
        TRef           fLastTrack;         //pointer to last track
        TRef           fHistoWeb;          //EXEC:GetHistoWeb reference to an histogram in a TWebFile
        TH1F          *fH;
        TBits          fTriggerBits;       //Bits triggered by this event.

   The EventHeader class has 3 data members (integers):
     public:
        Int_t          fEvtNum;
        Int_t          fRun;
        Int_t          fDate;


   The Event data member fTracks is a pointer to a TClonesArray.
   It is an array of a variable number of tracks per event.
   Each element of the array is an object of class Track with the members:
     private:
        Float_t      fPx;           //X component of the momentum
        Float_t      fPy;           //Y component of the momentum
        Float_t      fPz;           //Z component of the momentum
        Float_t      fRandom;       //A random track quantity
        Float_t      fMass2;        //The mass square of this particle
        Float_t      fBx;           //X intercept at the vertex
        Float_t      fBy;           //Y intercept at the vertex
        Float_t      fMeanCharge;   //Mean charge deposition of all hits of this track
        Float_t      fXfirst;       //X coordinate of the first point
        Float_t      fXlast;        //X coordinate of the last point
        Float_t      fYfirst;       //Y coordinate of the first point
        Float_t      fYlast;        //Y coordinate of the last point
        Float_t      fZfirst;       //Z coordinate of the first point
        Float_t      fZlast;        //Z coordinate of the last point
        Double32_t   fCharge;       //Charge of this track
        Double32_t   fVertex[3];    //Track vertex position
        Int_t        fNpoint;       //Number of points for this track
        Short_t      fValid;        //Validity criterion
        Int_t        fNsp;          //Number of points for this track with a special value
        Double32_t  *fPointValue;   //[fNsp] a special quantity for some point.
        TBits        fTriggerBits;  //Bits triggered by this track.

   An example of a batch program to use the Event/Track classes is given
   in this directory: MainEvent.
   Look also in the same directory at the following macros:
     - eventa.C  an example how to read the tree
     - eventb.C  how to read events conditionally

   During the processing of the event (optionally) also a large number
   of histograms can be filled. The creation and handling of the
   histograms is taken care of by the HistogramManager class.


Event()
 Create an Event object.
 When the constructor is invoked for the first time, the class static
 variable fgTracks is 0 and the TClonesArray fgTracks is created.
~Event()
void Build(Int_t ev, Int_t arg5, Float_t ptmin)
Track * AddTrack(Float_t random, Float_t ptmin)
 Add a new track to the list of tracks for this event.
 To avoid calling the very time consuming operator new for each track,
 the standard but not well know C++ operator "new with placement"
 is called. If tracks[i] is 0, a new Track object will be created
 otherwise the previous Track[i] will be overwritten.
void SetHeader(Int_t i, Int_t run, Int_t date, Float_t random)
void SetMeasure(UChar_t which, Int_t what)
void SetRandomVertex()
 This delete is to test the relocation of variable length array
void Clear(Option_t *option="")
TBits& GetTriggerBits()
Event()
Bool_t IsValid()
void Reset(Option_t *option ="")
void ResetHistogramPointer()
void SetNseg(Int_t n)
void SetNtrack(Int_t n)
void SetNvertex(Int_t n)
void SetFlag(UInt_t f)
void SetTemperature(Double32_t t)
void SetType(char *type)
void SetMatrix(UChar_t x, UChar_t y, Double32_t what)
Float_t GetClosestDistance(Int_t i)
Int_t GetNtrack()
Int_t GetNseg()
Int_t GetNvertex()
UInt_t GetFlag()
Double32_t GetTemperature()
Int_t GetMeasure(UChar_t which)
Double32_t GetMatrix(UChar_t x, UChar_t y)

Author: Rene Brun 19/08/96
Last update: root/test:$Name: $:$Id: Event.cxx,v 1.29 2006/05/09 14:50:11 pcanal Exp $


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.