ROOT logo
AliRoot » TRD » AliTRDchamberTimeBin

class AliTRDchamberTimeBin: public TObject


Organization of clusters at the level of 1 TRD chamber.
The data structure is used for tracking at the stack level.

Functionalities:
1. cluster organization and sorting
2. fast data navigation

Authors:
Alex Bercuci <A.Bercuci@gsi.de>
Markus Fasel <M.Fasel@gsi.de>


Function Members (Methods)

public:
AliTRDchamberTimeBin(const AliTRDchamberTimeBin& layer)
AliTRDchamberTimeBin(Int_t plane = -1, Int_t stack = -1, Int_t sector = -1, Double_t z0 = -1., Double_t zLength = -1.)
virtual~AliTRDchamberTimeBin()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
voidBootstrap(const AliTRDReconstructor* rec, Int_t det)
virtual voidTObject::Browse(TBrowser* b)
voidBuildCond(AliTRDcluster *const cl, Double_t* cond, UChar_t Layer, Double_t theta = 0., Double_t phi = 0.)
voidBuildIndices(Int_t iter = 0)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidClear(Option_t* opt = NULL)
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
AliTRDcluster*GetCluster(Int_t index) const
voidGetClusters(const Double_t *const cond, Int_t* index, Int_t& ncl, Int_t BufferSize = kMaxClustersLayer)
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Double_tGetDZ0() const
Int_tGetGlobalIndex(Int_t index) const
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
Int_tGetNClusters() const
AliTRDcluster*GetNearestCluster(Double_t* cond)
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Int_tGetPlane() const
Int_tGetSector() const
Int_tGetStack() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
Double_tGetX() const
Double_tGetZ0() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
voidInsertCluster(AliTRDcluster* c, UInt_t index)
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
Bool_tIsOwner() const
virtual Bool_tTObject::IsSortable() const
Bool_tIsT0() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
Int_toperator Int_t() const
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)
AliTRDchamberTimeBin&operator=(const AliTRDchamberTimeBin& myLayer)
AliTRDcluster*operator[](const Int_t i) const
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* opt = NULL) const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
Int_tSearchNearestCluster(Double_t y, Double_t z, Double_t Roady, Double_t Roadz) const
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetNRows(Int_t nRows)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetOwner(Bool_t copy = kTRUE)
voidSetPlane(Int_t plane)
voidSetRange(Float_t z0, Float_t zLength)
voidSetReconstructor(const AliTRDReconstructor* rec)
voidSetSector(Int_t sector)
voidSetStack(Int_t stack)
voidSetT0(Bool_t set = kTRUE)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetX(Double_t x)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
virtual voidCopy(TObject& o) const
Int_tFind(Float_t y) const
Int_tFindNearestYCluster(Double_t y, UChar_t z) const
Int_tFindYPosition(Double_t y, UChar_t z, Int_t nClusters) const

Data Members

public:
enum AliTRDchamberTimeBinStatus { kT0
kOwner
};
enum { kMaxClustersLayer
kMaxRows
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
private:
AliTRDcluster*fClusters[150]Array of pointers to clusters
UInt_tfIndex[150]! Array of cluster indexes
Int_tfN! Number of clusters
Char_tfNRows! Number of pad rows in the chamber
Char_tfPlane! Plane number
UChar_tfPositions[16]! Starting index of clusters in pad row
Char_tfSector! Sector mumber
Char_tfStack! Stack number in supermodule
Double_tfX! Radial position of tb
Double_tfZ0Starting position of the layer in Z direction
Double_tfZLengthLength of the layer in Z direction
const AliTRDReconstructor*fkReconstructor! Global TRD reconstructor

Class Charts

Inheritance Chart:
TObject
AliTRDchamberTimeBin

Function documentation

AliTRDchamberTimeBin(Int_t plane = -1, Int_t stack = -1, Int_t sector = -1, Double_t z0 = -1., Double_t zLength = -1.)
 Default constructor (Only provided to use AliTRDchamberTimeBin with arrays)

AliTRDchamberTimeBin(const AliTRDchamberTimeBin& layer)
 Copy Constructor
AliTRDchamberTimeBin & operator=(const AliTRDchamberTimeBin& myLayer)
 Assignment operator
void Clear(Option_t* opt = NULL)
 Reset the Chamber Timebin
void Copy(TObject& o) const
 Copy method. Performs a deep copy of all data from this object to object o.
~AliTRDchamberTimeBin()
 Destructor
void SetOwner(Bool_t copy = kTRUE)
 Sets the ownership of the clusters to this
 If option "copy" is kTRUE [default] the clusters
 are also copied otherwise only the ownership bit
 is flipped.
void SetRange(Float_t z0, Float_t zLength)
 Sets the range in z-direction

 Parameters:
   z0      : starting position of layer in the z direction
   zLength : length of layer in the z direction
void InsertCluster(AliTRDcluster* c, UInt_t index)
 Insert cluster in cluster array.
 Clusters are sorted according to Y coordinate.

void Bootstrap(const AliTRDReconstructor* rec, Int_t det)
 Reinitialize all data members from the clusters array
 It has to be used after reading from disk
void BuildIndices(Int_t iter = 0)
 Rearrangement of the clusters belonging to the propagation layer for the stack.

 Detailed description

 The array indices of all clusters in one PropagationLayer are stored in
 array. The array is divided into several bins.
 The clusters are sorted in increasing order of their y coordinate.

 Sorting algorithm: TreeSearch

Int_t Find(Float_t y) const
 Returns index of the cluster nearest in Y

Int_t FindYPosition(Double_t y, UChar_t z, Int_t nClusters) const
 Tree search Algorithm to find the nearest left cluster for a given
 y-position in a certain z-bin (in fact AVL-tree).
 Making use of the fact that clusters are sorted in y-direction.

 Parameters:
   y : y position of the reference point in tracking coordinates
   z : z reference bin.
   nClusters :

 Output :
 Index of the nearest left cluster in the StackLayer indexing (-1 if no clusters are found)

Int_t FindNearestYCluster(Double_t y, UChar_t z) const
 Tree search Algorithm to find the nearest cluster for a given
 y-position in a certain z-bin (in fact AVL-tree).
 Making use of the fact that clusters are sorted in y-direction.

 Parameters:
   y : y position of the reference point in tracking coordinates
   z : z reference bin.

 Output
 Index of the nearest cluster in the StackLayer indexing (-1 if no clusters are found)

Int_t SearchNearestCluster(Double_t y, Double_t z, Double_t Roady, Double_t Roadz) const
 Finds the nearest cluster from a given point in a defined range.
 Distance is determined in a 2D space by the 2-Norm.

 Parameters :
   y : y position of the reference point in tracking coordinates
   z : z reference bin.
   maxroady : maximum searching distance in y direction
   maxroadz : maximum searching distance in z direction

 Output
 Index of the nearest cluster in the StackLayer indexing (-1 if no cluster is found).
 Cluster can be accessed with the operator[] or GetCluster(Int_t index)

 Detail description

 The following steps are perfomed:
 1. Get the expected z bins inside maxroadz.
 2. For each z bin find nearest y cluster.
 3. Select best candidate

void BuildCond(AliTRDcluster *const cl, Double_t* cond, UChar_t Layer, Double_t theta = 0., Double_t phi = 0.)
 Helper function to calculate the area where to expect a cluster in THIS
 layer.

 Parameters :
   cl    :
   cond  :
   Layer :
   theta :
   phi   :

 Detail description

 Helper function to calculate the area where to expect a cluster in THIS
 layer. by using the information of a former cluster in another layer
 and the angle in theta- and phi-direction between layer 0 and layer 3.
 If the layer is zero, initial conditions are calculated. Otherwise a
 linear interpolation is performed.


void GetClusters(const Double_t *const cond, Int_t* index, Int_t& ncl, Int_t BufferSize = kMaxClustersLayer)
 Finds all clusters situated in this layer inside a rectangle  given by the center an ranges.

 Parameters :
   cond  :
   index :
   ncl :
   BufferSize   :

 Output :

 Detail description

 Function returs an array containing the indices in the stacklayer of
 the clusters found an  the number of found clusters in the stacklayer
AliTRDcluster * GetNearestCluster(Double_t* cond)
 Function returning a pointer to the nearest cluster (nullpointer if not successfull).

 Parameters :
   cond  :

 Output :
   pointer to the nearest cluster (nullpointer if not successfull).

 Detail description

 returns a pointer to the nearest cluster (nullpointer if not
 successfull) by the help of the method FindNearestCluster
void Print(Option_t* opt = NULL) const
 Prints the position of each cluster in the stacklayer on the stdout

AliTRDcluster* operator[](const Int_t i) const
AliTRDcluster* GetCluster(Int_t index) const
{return index < fN && index >= 0 ? fClusters[index] : NULL;}
Int_t GetGlobalIndex(Int_t index) const
{return ((index < fN) && (index >= 0)) ? fIndex[index] : 0; }
Double_t GetX() const
Double_t GetZ0() const
{ return fZ0; }
Double_t GetDZ0() const
{ return fZLength;}
Int_t GetNClusters() const
{ return fN; }
Int_t GetPlane() const
{ return fPlane; }
Int_t GetStack() const
{ return fStack; }
Int_t GetSector() const
{ return fSector; }
Bool_t IsT0() const
{return TestBit(kT0);}
Bool_t IsOwner() const
{return TestBit(kOwner);}
void SetNRows(Int_t nRows)
{ fNRows = nRows; }
void SetPlane(Int_t plane)
{ fPlane = plane; }
void SetReconstructor(const AliTRDReconstructor* rec)
void SetStack(Int_t stack)
{ fStack = stack; }
void SetSector(Int_t sector)
{ fSector = sector; }
void SetT0(Bool_t set = kTRUE)
{SetBit(kT0, set);}
void SetX(Double_t x)
{fX = x;}