Event
class description - source file - inheritance tree
public:
Event Event()
Event Event(Event&)
virtual void ~Event()
void AddTrack(Float_t random)
TClass* Class()
virtual void Clear(Option_t* option)
UInt_t GetFlag()
EventHeader* GetHeader()
TH1F* GetHistogram()
Int_t GetNseg()
Int_t GetNtrack()
Int_t GetNvertex()
Float_t GetTemperature()
TClonesArray* GetTracks()
void Hcreate()
void Hfill()
virtual TClass* IsA()
void SetFlag(UInt_t f)
void SetHeader(Int_t i, Int_t run, Int_t date, Float_t random)
void SetNseg(Int_t n)
void SetNtrack(Int_t n)
void SetNvertex(Int_t n)
void SetTemperature(Float_t t)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
public:
Int_t fNtrack
Int_t fNseg
Int_t fNvertex
UInt_t fFlag
Float_t fTemperature
EventHeader fEvtHdr
TClonesArray* fTracks
TH1F* fH
Event and Track classes
=======================
The Event class is a naive/simple example of an event structure.
public:
Int_t fNtrack;
Int_t fNseg;
Int_t fNvertex;
UInt_t fFlag;
Float_t fTemperature;
EventHeader fEvtHdr;
TClonesArray *fTracks;
TH1F *fH;
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
Float_t fCharge; //Charge of this track
Int_t fNpoint; //Number of points for this track
Short_t fValid; //Validity criterion
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
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Event()
Create one Event object
When the constructor is invoked for the first time, the global
variable gTracks is NULL. The TClonesArray gTracks is created.
The histogram fH is created.
~Event()
void AddTrack(Float_t random)
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 NULL, a new Track object will be created
otherwise the previous Track[i] will be overwritten.
void Clear(Option_t *option)
void Hcreate()
void Hfill()
void SetHeader(Int_t i, Int_t run, Int_t date, Float_t random)
Inline Functions
void SetNseg(Int_t n)
void SetNtrack(Int_t n)
void SetNvertex(Int_t n)
void SetFlag(UInt_t f)
void SetTemperature(Float_t t)
Int_t GetNtrack()
Int_t GetNseg()
Int_t GetNvertex()
UInt_t GetFlag()
Float_t GetTemperature()
EventHeader* GetHeader()
TClonesArray* GetTracks()
TH1F* GetHistogram()
TClass* Class()
TClass* IsA()
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
Event Event(Event&)
Author: Rene Brun 19/08/96
Last update: 1.03/09 11/12/97 11.00.17 by Rene Brun
ROOT page - Class index - 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.