| #include "Event.h" |

| Event() | |
| Event(const Event&) | |
| virtual | ~Event() |
| void | TObject::AbstractMethod(const char* method) const |
| Track* | AddTrack(Float_t random, Float_t ptmin = 1) |
| virtual void | TObject::AppendPad(Option_t* option = "") |
| virtual void | TObject::Browse(TBrowser* b) |
| void | Build(Int_t ev, Int_t arg5 = 600, Float_t ptmin = 1) |
| static TClass* | Class() |
| virtual const char* | TObject::ClassName() const |
| virtual void | Clear(Option_t* option = "") |
| virtual TObject* | TObject::Clone(const char* newname = "") const |
| virtual Int_t | TObject::Compare(const TObject* obj) const |
| virtual void | TObject::Copy(TObject& object) const |
| virtual void | TObject::Delete(Option_t* option = "") |
| virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
| virtual void | TObject::Draw(Option_t* option = "") |
| virtual void | TObject::DrawClass() const |
| virtual TObject* | TObject::DrawClone(Option_t* option = "") const |
| virtual void | TObject::Dump() const |
| virtual void | TObject::Error(const char* method, const char* msgfmt) const |
| virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
| virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
| virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
| virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
| virtual TObject* | TObject::FindObject(const char* name) const |
| virtual TObject* | TObject::FindObject(const TObject* obj) const |
| Float_t | GetClosestDistance(Int_t i) |
| virtual Option_t* | TObject::GetDrawOption() const |
| static Long_t | TObject::GetDtorOnly() |
| UInt_t | GetFlag() const |
| EventHeader* | GetHeader() |
| TRefArray* | GetHighPt() const |
| TH1F* | GetHistogram() const |
| virtual const char* | TObject::GetIconName() const |
| Track* | GetLastTrack() const |
| Double32_t | GetMatrix(UChar_t x, UChar_t y) |
| Int_t | GetMeasure(UChar_t which) |
| TRefArray* | GetMuons() const |
| virtual const char* | TObject::GetName() const |
| Int_t | GetNseg() const |
| Int_t | GetNtrack() const |
| Int_t | GetNvertex() const |
| virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
| static Bool_t | TObject::GetObjectStat() |
| virtual Option_t* | TObject::GetOption() const |
| Double32_t | GetTemperature() const |
| virtual const char* | TObject::GetTitle() const |
| TClonesArray* | GetTracks() const |
| TBits& | GetTriggerBits() |
| char* | GetType() |
| virtual UInt_t | TObject::GetUniqueID() const |
| TH1* | GetWebHistogram() const |
| virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
| virtual ULong_t | TObject::Hash() const |
| virtual void | TObject::Info(const char* method, const char* msgfmt) const |
| virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
| virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
| virtual void | TObject::Inspect() const |
| void | TObject::InvertBit(UInt_t f) |
| virtual TClass* | IsA() const |
| virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
| virtual Bool_t | TObject::IsFolder() const |
| Bool_t | TObject::IsOnHeap() const |
| virtual Bool_t | TObject::IsSortable() const |
| Bool_t | IsValid() const |
| Bool_t | TObject::IsZombie() const |
| virtual void | TObject::ls(Option_t* option = "") const |
| void | TObject::MayNotUse(const char* method) const |
| virtual Bool_t | TObject::Notify() |
| static void | TObject::operator delete(void* ptr) |
| static void | TObject::operator delete(void* ptr, void* vp) |
| static void | TObject::operator delete[](void* ptr) |
| static void | TObject::operator delete[](void* ptr, void* vp) |
| void* | TObject::operator new(size_t sz) |
| void* | TObject::operator new(size_t sz, void* vp) |
| void* | TObject::operator new[](size_t sz) |
| void* | TObject::operator new[](size_t sz, void* vp) |
| Event& | operator=(const Event&) |
| virtual void | TObject::Paint(Option_t* option = "") |
| virtual void | TObject::Pop() |
| virtual void | TObject::Print(Option_t* option = "") const |
| virtual Int_t | TObject::Read(const char* name) |
| virtual void | TObject::RecursiveRemove(TObject* obj) |
| static void | Reset(Option_t* option = "") |
| void | TObject::ResetBit(UInt_t f) |
| void | ResetHistogramPointer() |
| virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") const |
| virtual void | TObject::SavePrimitive(ostream& out, Option_t* option = "") |
| void | TObject::SetBit(UInt_t f) |
| void | TObject::SetBit(UInt_t f, Bool_t set) |
| virtual void | TObject::SetDrawOption(Option_t* option = "") |
| static void | TObject::SetDtorOnly(void* obj) |
| 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) |
| static void | TObject::SetObjectStat(Bool_t stat) |
| void | SetRandomVertex() |
| void | SetTemperature(Double32_t t) |
| void | SetType(char* type) |
| virtual void | TObject::SetUniqueID(UInt_t uid) |
| virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
| virtual void | Streamer(TBuffer& b) |
| void | StreamerNVirtual(TBuffer& b) |
| virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
| Bool_t | TObject::TestBit(UInt_t f) const |
| Int_t | TObject::TestBits(UInt_t f) const |
| virtual void | TObject::UseCurrentStyle() |
| virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
| virtual Int_t | TObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) |
| virtual Int_t | TObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) const |
| virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
| void | TObject::MakeZombie() |
| enum TObject::EStatusBits { | kCanDelete | |
| kMustCleanup | ||
| kObjInCanvas | ||
| kIsReferenced | ||
| kHasUUID | ||
| kCannotPick | ||
| kNoContextMenu | ||
| kInvalidObject | ||
| }; | ||
| enum TObject::[unnamed] { | kIsOnHeap | |
| kNotDeleted | ||
| kZombie | ||
| kBitMask | ||
| kSingleKey | ||
| kOverwrite | ||
| kWriteDelete | ||
| }; |
| 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 |
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 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.
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.
Static function to reset all static objects for this event fgTracks->Delete(option);