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.
| Track() | |
| Track(const Track& orig) | |
| Track(Float_t random) | |
| virtual | ~Track() |
| void | TObject::AbstractMethod(const char* method) const |
| virtual void | TObject::AppendPad(Option_t* option = "") |
| virtual void | TObject::Browse(TBrowser* b) |
| 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 | GetBx() const |
| Float_t | GetBy() const |
| Double32_t | GetCharge() const |
| virtual Option_t* | TObject::GetDrawOption() const |
| static Long_t | TObject::GetDtorOnly() |
| virtual const char* | TObject::GetIconName() const |
| Float_t | GetMass2() const |
| Float_t | GetMeanCharge() const |
| Int_t | GetN() const |
| virtual const char* | TObject::GetName() const |
| Int_t | GetNpoint() 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 | GetPointValue(Int_t i = 0) const |
| Float_t | GetPt() const |
| Float_t | GetPx() const |
| Float_t | GetPy() const |
| Float_t | GetPz() const |
| Float_t | GetRandom() const |
| virtual const char* | TObject::GetTitle() const |
| TBits& | GetTriggerBits() |
| virtual UInt_t | TObject::GetUniqueID() const |
| Short_t | GetValid() const |
| Double32_t | GetVertex(Int_t i = 0) |
| Float_t | GetXfirst() const |
| Float_t | GetXlast() const |
| Float_t | GetYfirst() const |
| Float_t | GetYlast() const |
| Float_t | GetZfirst() const |
| Float_t | GetZlast() 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 | 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) |
| Track& | operator=(const Track&) |
| 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) |
| void | TObject::ResetBit(UInt_t f) |
| virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") const |
| virtual void | TObject::SavePrimitive(basic_ostream<char,char_traits<char> >& 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) |
| static void | TObject::SetObjectStat(Bool_t stat) |
| virtual void | TObject::SetUniqueID(UInt_t uid) |
| virtual void | SetValid(Int_t valid = 1) |
| 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 | ||
| }; |
| Float16_t | fBx | [0,0,10] X intercept at the vertex |
| Float16_t | fBy | [0,0,10] Y intercept at the vertex |
| Double32_t | fCharge | [-1,1,2] Charge of this track |
| Float16_t | fMass2 | [0,0,8] The mass square of this particle |
| Float_t | fMeanCharge | Mean charge deposition of all hits of this track |
| Int_t | fNpoint | Number of points for this track |
| Int_t | fNsp | Number of points for this track with a special value |
| Double32_t* | fPointValue | [fNsp][0,3] a special quantity for some point. |
| 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 |
| TBits | fTriggerBits | Bits triggered by this track. |
| Short_t | fValid | Validity criterion |
| Double32_t | fVertex[3] | [-30,30,16] Track vertex position |
| Float16_t | fXfirst | X coordinate of the first point |
| Float16_t | fXlast | X coordinate of the last point |
| Float16_t | fYfirst | Y coordinate of the first point |
| Float16_t | fYlast | Y coordinate of the last point |
| Float16_t | fZfirst | Z coordinate of the first point |
| Float16_t | fZlast | Z coordinate of the last point |

Create a track object. Note that in this example, data members do not have any physical meaning.