| #include "Event.h" |
| Inheritance Chart: | |||||
|
public:
HistogramManager(TDirectory* dir)
HistogramManager(const HistogramManager&)
virtual ~HistogramManager()
static TClass* Class()
void Hfill(Event* event)
virtual TClass* IsA() const
HistogramManager& operator=(const HistogramManager&)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
private:
TH1F* fNtrack
TH1F* fNseg
TH1F* fTemperature
TH1F* fPx
TH1F* fPy
TH1F* fPz
TH1F* fRandom
TH1F* fMass2
TH1F* fBx
TH1F* fBy
TH1F* fMeanCharge
TH1F* fXfirst
TH1F* fXlast
TH1F* fYfirst
TH1F* fYlast
TH1F* fZfirst
TH1F* fZlast
TH1F* fCharge
TH1F* fNpoint
TH1F* fValid
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.
Create histogram manager object. Histograms will be created
in the "dir" directory.