ROOT logo
AliRoot » TPC » BASE » AliTPCmapper

class AliTPCmapper: public TObject


 AliTPCmapper
 Authors: Christian.Lippmann@cern.ch, J.Wiechula@gsi.de
 Class to map detector coordinates (row, pad, sector, ...) to
 hardware coordinates (RCU, Branch, FEC, Altro, channel, Equipment ID, ...)

 There are two different ways to number padrows:
 1) local padrow: for each ROC, 0 ... 62 for an IROC, 0 ... 95 for an OROC,
 2) global padrow: for each sector, from 0 ... 158.
 If the global numbering is used, it is denoted by the variable name
 globalpadrow in this class.

 There are two different ways to number sectors:
 1) Sectors contain one IROC and one OROC and are counted from 0 to 17 on
    each of the two sides (A=0 and C=1),
 2) ROCs are numbered from 0 to 71 where the ROCs 0 ... 35 are IROCS and
    ROCs 36 ... 71 are OROCs. A ROC is often named "sector" in aliroot,
    which can be very confusing!


Function Members (Methods)

public:
AliTPCmapper()
AliTPCmapper(const char* dirname)
AliTPCmapper(const AliTPCmapper& mapper)
virtual~AliTPCmapper()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
Int_tCodeHWAddress(Int_t branch, Int_t fec, Int_t chip, Int_t channel) const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
Int_tDecodedHWAddressBranch(Int_t hwAddress) const
Int_tDecodedHWAddressChanneladdr(Int_t hwAddress) const
Int_tDecodedHWAddressChipaddr(Int_t hwAddress) const
Int_tDecodedHWAddressFECaddr(Int_t hwAddress) 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
AliTPCAltroMapping**GetAltroMapping()
Int_tGetBranch(Int_t roc, Int_t padrow, Int_t pad) const
Int_tGetBranchSector(Int_t globalpadrow, Int_t pad) const
Int_tGetChannel(Int_t roc, Int_t padrow, Int_t pad) const
Int_tGetChannelSector(Int_t globalpadrow, Int_t pad) const
Int_tGetChip(Int_t roc, Int_t padrow, Int_t pad) const
Int_tGetChipSector(Int_t globalpadrow, Int_t pad) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Int_tGetEquipmentID(Int_t roc, Int_t padrow, Int_t pad) const
Int_tGetEquipmentIDfromPatch(Int_t side, Int_t sector, Int_t patch) const
Int_tGetEquipmentIDsector(Int_t side, Int_t sector, Int_t globalpadrow, Int_t pad) const
Int_tGetFEC(Int_t roc, Int_t padrow, Int_t pad) const
Int_tGetFEChw(Int_t roc, Int_t padrow, Int_t pad) const
Int_tGetFEChwSector(Int_t globalpadrow, Int_t pad) const
Int_tGetFECSector(Int_t globalpadrow, Int_t pad) const
Int_tGetGlobalPadRow(Int_t patch, Int_t hwAddress) const
Int_tGetGlobalPadRow(Int_t patch, Int_t branch, Int_t fec, Int_t chip, Int_t channel) const
Int_tGetHWAddress(Int_t roc, Int_t padrow, Int_t pad) const
Int_tGetHWAddressSector(Int_t globalpadrow, Int_t pad) const
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
Int_tGetNfec(Int_t patch) const
Int_tGetNfec(Int_t patch, Int_t branch) const
Int_tGetNpadrows(Int_t roc) const
Int_tGetNpads(Int_t globalpadrow) const
Int_tGetNpads(Int_t roc, Int_t padrow) const
Int_tGetNumDdl() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Int_tGetPad(Int_t patch, Int_t hwAddress) const
Int_tGetPad(Int_t patch, Int_t branch, Int_t fec, Int_t chip, Int_t channel) const
Int_tGetPadRow(Int_t patch, Int_t hwAddress) const
Int_tGetPadRow(Int_t patch, Int_t branch, Int_t fec, Int_t chip, Int_t channel) const
Int_tGetPatch(Int_t roc, Int_t padrow, Int_t pad) const
Int_tGetPatchFromEquipmentID(Int_t equipmentID) const
Int_tGetPatchSector(Int_t globalpadrow, Int_t pad) const
Int_tGetRcu(Int_t roc, Int_t padrow, Int_t pad) const
Int_tGetRcuSector(Int_t globalpadrow, Int_t pad) const
Int_tGetRoc(Int_t side, Int_t sector, Int_t globalpadrow, Int_t pad) const
Int_tGetRocFromEquipmentID(Int_t equipmentID) const
Int_tGetRocFromPatch(Int_t side, Int_t sector, Int_t patch) const
Int_tGetSectorFromEquipmentID(Int_t equipmentID) const
Int_tGetSectorFromRoc(Int_t roc) const
Int_tGetSideFromEquipmentID(Int_t equipmentID) const
Int_tGetSideFromRoc(Int_t roc) const
virtual const char*TObject::GetTitle() const
Int_tGetTpcDdlOffset() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
Int_tHwToOffline(Int_t patch, Int_t branch, Int_t fec) 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
voidInit(const char* dirname)
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_tIsIROC(Int_t roc) const
Bool_tTObject::IsOnHeap() const
Bool_tIsOROC(Int_t roc) const
virtual Bool_tTObject::IsSortable() 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
Int_tOfflineToHwBranch(Int_t patch, Int_t fec) const
Int_tOfflineToHwFec(Int_t patch, Int_t fec) 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)
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)
AliTPCmapper&operator=(const AliTPCmapper& mapper)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") 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 = "")
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)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
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()

Data Members

private:
AliTPCAltroMapping*fMapping[6]The ALTRO mapping for each patch (rcu)
Int_tfNaltroFEC has 8 ALTROs
Int_tfNbranchRCU has 2 branches
Int_tfNchannelALTRO has 16 channels
Int_tfNpadrowSector has 159 padrows
Int_tfNpadrowIROCIROC has 63 padrows
Int_tfNpadrowOROCOROC has 96 padrows
Int_tfNrcuSector has 6 RCUs (patches)
Int_tfNsectorTPC side has 18 sectors
Int_tfNsideTPC has 2 sides
Int_tfTpcDdlOffsetDDL offset for TPC

Class Charts

Inheritance Chart:
TObject
AliTPCmapper

Function documentation

AliTPCmapper()
 Constructor

AliTPCmapper(const char* dirname)
 Constructor

 dirname - specify the directory with the ascii Altro mapping files

~AliTPCmapper()
 Destructor
AliTPCmapper(const AliTPCmapper& mapper)
 Copy Constructor
void Init(const char* dirname)
 Initialize all
Int_t GetHWAddress(Int_t roc, Int_t padrow, Int_t pad) const
 Get the hardware address from pad coordinates for a given ROC
Int_t GetHWAddressSector(Int_t globalpadrow, Int_t pad) const
 Get the hardware address from pad coordinates
Int_t GetRcu(Int_t roc, Int_t padrow, Int_t pad) const
 Get the patch (rcu) index from the pad coordinates. The Roc index is
 needed as well to determine if it is IROC or OROC.
Int_t GetPatch(Int_t roc, Int_t padrow, Int_t pad) const
 Get the patch (rcu) index from the pad coordinates. The Roc index is
 needed as well to determine if it is IROC or OROC.
Int_t GetRcuSector(Int_t globalpadrow, Int_t pad) const
 Get the patch (rcu) index from the pad coordinates for a sector
Int_t GetPatchSector(Int_t globalpadrow, Int_t pad) const
 Get the patch (rcu) index from the pad coordinates for a sector
Int_t GetPadRow(Int_t patch, Int_t hwAddress) const
 Get Pad Row (for a ROC) from the hardware address
Int_t GetGlobalPadRow(Int_t patch, Int_t hwAddress) const
 Get Pad Row (for full sector) from the hardware address
Int_t GetPad(Int_t patch, Int_t hwAddress) const
 Get Pad index from the hardware address
Int_t GetPadRow(Int_t patch, Int_t branch, Int_t fec, Int_t chip, Int_t channel) const
 Get pad row (for a ROC) from hardware coordinates
Int_t GetGlobalPadRow(Int_t patch, Int_t branch, Int_t fec, Int_t chip, Int_t channel) const
 Get Pad Row (for full sector) from the hardware address
Int_t GetPad(Int_t patch, Int_t branch, Int_t fec, Int_t chip, Int_t channel) const
 Get pad from hardware coordinates
Int_t GetBranch(Int_t roc, Int_t padrow, Int_t pad) const
 Get the branch to which this pad is connected. The FECs connected to
 one RCU are divided into two branches: A(=0) and B(=1). This information
 can be extracted from the hardware address.
Int_t GetBranchSector(Int_t globalpadrow, Int_t pad) const
 Get Branch from pad coordinates, where globalpadrow is counted
 for a full sector (0 ... 158)
Int_t GetFEChw(Int_t roc, Int_t padrow, Int_t pad) const
 Get the FEC number in hardware numbering. The FECs are numbered from 0 (in the
 center of the partition) to 8 (partition 3, 4, 5), 9 (partition 0, 2), 11
 (partition 1, branch A) or 12 (partition 1, branch B). This information
 can be extracted from the hardware address.
Int_t GetFEChwSector(Int_t globalpadrow, Int_t pad) const
 Get the FEC number in hardware numbering from pad coordinates, where
 globalpadrow is counted for a full sector (0 ... 158)
Int_t GetFEC(Int_t roc, Int_t padrow, Int_t pad) const
 Get the FEC number in offline-oriented numbering. The FECs are numbered from 0
 17 (partition 3, 4, 5), 19 (partition 0, 2) or 24 (partition 1).
Int_t GetFECSector(Int_t globalpadrow, Int_t pad) const
 Get the FEC number in offline-oriented numbering. globalpadrow is
 counted for a full sector (0 ... 158)
Int_t GetChip(Int_t roc, Int_t padrow, Int_t pad) const
 Get Chip (ALTRO) index (0 ... 7) from pad coordinates
Int_t GetChipSector(Int_t globalpadrow, Int_t pad) const
 Get Chip (ALTRO) index (0 ... 7) from pad coordinates, where
 globalpadrow is counted for a full sector (0 ... 158)
Int_t GetChannel(Int_t roc, Int_t padrow, Int_t pad) const
 Get Channel index (0 ... 15) from pad coordinates
Int_t GetChannelSector(Int_t globalpadrow, Int_t pad) const
 Get Channel index (0 ... 15) from pad coordinates, where
 globalpadrow is counted for a full sector (0 ... 158)
Int_t CodeHWAddress(Int_t branch, Int_t fec, Int_t chip, Int_t channel) const
 Get Hardware address from channel, altro, fec and branch coordinates
Int_t DecodedHWAddressBranch(Int_t hwAddress) const
 Get branch index (0, 1) from hardware address
Int_t DecodedHWAddressFECaddr(Int_t hwAddress) const
 Get FEC index (0 ... 12) from hardware address
Int_t DecodedHWAddressChipaddr(Int_t hwAddress) const
 Get ALTRO index (0 ... 7) from hardware address
Int_t DecodedHWAddressChanneladdr(Int_t hwAddress) const
 Get channel index (0 ... 15) from hardware address
Int_t GetNpads(Int_t roc, Int_t padrow) const
 Get number of pads in padrow for this ROC.
Int_t GetNpads(Int_t globalpadrow) const
 Get number of pads in padrow, where globalpadrow is counted for a full sector (0 ... 158)
Int_t GetNpadrows(Int_t roc) const
 Get number of padrows
Int_t GetNfec(Int_t patch) const
 Get size of readout partition (number of FECs) for this rcu (patch) index (0 ... 5)
Int_t GetNfec(Int_t patch, Int_t branch) const
 Get size of readout partition (number of FECs) for this branch
Int_t OfflineToHwFec(Int_t patch, Int_t fec) const
 Convert FEC position in offline-like numbering to hardware numbering (fec).
Int_t OfflineToHwBranch(Int_t patch, Int_t fec) const
 Convert fec position in offline-like numbering to hardware numbering (branch).
Int_t HwToOffline(Int_t patch, Int_t branch, Int_t fec) const
 Convert hardware FEC position (branch, fec) to the offline-oriented numbering
Int_t GetEquipmentID(Int_t roc, Int_t padrow, Int_t pad) const
 Get EqID from pad coordinate. The Roc index is
 needed as well to determine if it is IROC or OROC.
Int_t GetEquipmentIDsector(Int_t side, Int_t sector, Int_t globalpadrow, Int_t pad) const
 Get EqID from pad coordinate, where padrow is counted for a full sector (0 ... 158)
Int_t GetEquipmentIDfromPatch(Int_t side, Int_t sector, Int_t patch) const
 Get EqID from patch (rcu).
Int_t GetPatchFromEquipmentID(Int_t equipmentID) const
 Get rcu (patch) index (0 ... 5) from equipment ID
Int_t GetSideFromEquipmentID(Int_t equipmentID) const
 Get side from Eq ID
Int_t GetSectorFromEquipmentID(Int_t equipmentID) const
 Get sector index (0 ... 17) from equipment ID
Int_t GetRocFromEquipmentID(Int_t equipmentID) const
 Get ROC index (0 ... 71) from equipment ID
Int_t GetSectorFromRoc(Int_t roc) const
 get the sector number (0 ... 17) from the roc number (0 ... 71)
Int_t GetSideFromRoc(Int_t roc) const
 get the side (0, 1) from the roc number (0 ... 71)
Int_t GetRocFromPatch(Int_t side, Int_t sector, Int_t patch) const
 Get Roc (0 ... 71) from side (0, 1), sector (0 ... 17) and patch (0 ... 5)
Int_t GetRoc(Int_t side, Int_t sector, Int_t globalpadrow, Int_t pad) const
 Get Roc (0 ... 71) from side (0, 1), sector (0 ... 17) and pad coordinates
Bool_t IsIROC(Int_t roc) const
 Is this ROC an IROC?
Bool_t IsOROC(Int_t roc) const
 Is this ROC an OROC?
AliTPCAltroMapping ** GetAltroMapping()
{ return fMapping; }
Int_t GetTpcDdlOffset() const
{return fTpcDdlOffset;}
Int_t GetNumDdl() const
{return fNside*fNsector*fNrcu; }