ROOT logo
AliRoot » FMD » AliFMDAltroMapping

class AliFMDAltroMapping: public AliAltroMapping

Function Members (Methods)

public:
AliFMDAltroMapping()
virtual~AliFMDAltroMapping()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
Char_tBoard2Ring(UShort_t board) const
virtual voidTObject::Browse(TBrowser* b)
Bool_tChannel2StripBase(UShort_t board, UShort_t altro, UShort_t chan, Char_t& ring, UShort_t& sec, Short_t& str) const
UInt_tChannelAddress(UShort_t board, UShort_t altro, UShort_t channel) const
voidChannelAddress(UShort_t hwaddr, UShort_t& board, UShort_t& altro, UShort_t& channel) const
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
Short_tDDL2Detector(UInt_t ddl) const
virtual voidTObject::Delete(Option_t* option = "")MENU
UShort_tDetector2DDL(UShort_t det) const
Bool_tDetector2Hardware(UShort_t det, Char_t ring, UShort_t sec, UShort_t str, UShort_t sam, UShort_t preSamples, UShort_t sampleRate, UShort_t& ddl, UShort_t& hwaddr, UShort_t& timebin) const
Bool_tDetector2Hardware(UShort_t det, Char_t ring, UShort_t sec, UShort_t str, UShort_t sam, UShort_t preSamples, UShort_t sampleRate, UShort_t& ddl, UShort_t& board, UShort_t& altro, UShort_t& channel, UShort_t& timebin) const
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
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual Int_tGetHWAddress(Int_t sector, Int_t str, Int_t ring)
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual Int_tGetPad(Int_t hwaddr) const
virtual Int_tGetPadRow(Int_t hwaddr) const
virtual Int_tGetSector(Int_t hwaddr) const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
Bool_tHardware2Detector(UShort_t ddl, UShort_t hwaddr, UShort_t timebin, UShort_t preSamples, UShort_t sampleRate, UShort_t& det, Char_t& ring, UShort_t& sec, Short_t& str, UShort_t& sam) const
Bool_tHardware2Detector(UShort_t ddl, UShort_t board, UShort_t altro, UShort_t chan, UShort_t timebin, UShort_t preSamples, UShort_t sampleRate, UShort_t& det, Char_t& ring, UShort_t& sec, Short_t& str, UShort_t& sam) const
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
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
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
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)
TObject&TObject::operator=(const TObject& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* option = "hw") 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 = "")
Short_tSector2Board(Char_t ring, UShort_t sec) 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)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
Bool_tStrip2Channel(Char_t ring, UShort_t sec, UShort_t str, UShort_t& board, UShort_t& altro, UShort_t& chan) const
UShort_tStrip2Timebin(UShort_t sec, UShort_t strip, UShort_t sam, UShort_t preSamples, UShort_t sampleRate) const
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
voidTimebin2Strip(UShort_t sec, UShort_t timebin, UShort_t preSamples, UShort_t sampleRate, Short_t& strip, UShort_t& sample) 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:
voidAliAltroMapping::CloseMappingFile()
virtual Bool_tCreateInvMapping()
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
virtual Bool_tReadMapping()

Data Members

protected:
ifstream*AliAltroMapping::fIn! External mapping file
Short_t*AliAltroMapping::fMapping[fMappingSize] Array which connects hardware adresses to detector element indices
Int_tAliAltroMapping::fMappingSizeSize of the mapping array, used by the streamer of derived classes
Int_tAliAltroMapping::fMaxHWAddressMaximum HW adress
Int_tAliAltroMapping::fNumberOfChannelsNumber of ALTRO channels

Class Charts

Inheritance Chart:
TObject
AliAltroMapping
AliFMDAltroMapping

Function documentation

AliFMDAltroMapping()
 Constructor
ReadMapping()
 Read map from file - not used
CreateInvMapping()
 Create inverse mapping - not used
Channel2StripBase(UShort_t board, UShort_t altro, UShort_t chan, Char_t& ring, UShort_t& sec, Short_t& str) const
 Translate a hardware address to detector coordinates.
 The detector is simply

    ddl + 1

 The ring number, sector, and strip number is given by the addr
 argument.  The address argument, has the following format

   12            7          4          0
   +-------------+----------+----------+
   | Board       | ALTRO    | Channel  |
   +-------------+----------+----------+

 The board number identifier among other things the ring.  There's
 up to 4 boards per DDL, and the two first (0 and 16) corresponds
 to the inner rings, while the two last (1 and 17) corresponds to
 the outer rings.

 The board number and ALTRO number together identifies the sensor,
 and hence.  The lower board number (0 or 16) are the first N / 2
 sensors (where N is the number of sensors in the ring).

 There are 3 ALTRO's per card, and each ALTRO serves up to 4
 sensors.  Which of sensor is determined by the channel number.
 For the inner rings, the map is

    ALTRO 0, Channel  0 to  7   -> Sensor 0 or 5
    ALTRO 0, Channel  8 to 15   -> Sensor 1 or 6
    ALTRO 1, Channel  0 to  7   -> Sensor 2 or 7
    ALTRO 2, Channel  0 to  7   -> Sensor 3 or 8
    ALTRO 2, Channel  8 to 15   -> Sensor 4 or 9

 For the outer rings, the map is

    ALTRO 0, Channel  0 to  3   -> Sensor 0 or 10
    ALTRO 0, Channel  4 to  7   -> Sensor 1 or 11
    ALTRO 0, Channel  8 to 11   -> Sensor 2 or 12
    ALTRO 0, Channel 12 to 15   -> Sensor 3 or 13
    ALTRO 1, Channel  0 to  3   -> Sensor 4 or 14
    ALTRO 1, Channel  4 to  7   -> Sensor 5 or 15
    ALTRO 2, Channel  0 to  3   -> Sensor 6 or 16
    ALTRO 2, Channel  4 to  7   -> Sensor 7 or 17
    ALTRO 2, Channel  8 to 11   -> Sensor 8 or 18
    ALTRO 2, Channel 12 to 15   -> Sensor 9 or 19

 Which divison of the sensor we're in, depends on the channel
 number only.  For the inner rings, the map is

    Channel 0                   -> Sector 0, strips   0-127
    Channel 1                   -> Sector 1, strips 127-0
    Channel 3                   -> Sector 0, strips 128-255
    Channel 4                   -> Sector 1, strips 255-128
    Channel 5                   -> Sector 0, strips 256-383
    Channel 6                   -> Sector 1, strips 383-256
    Channel 7                   -> Sector 0, strips 384-511
    Channel 8                   -> Sector 1, strips 511-384

 There are only half as many strips in the outer sensors, so there
 only 4 channels are used for a full sensor.  The map is

    Channel 0                   -> Sector 0, strips   0-127
    Channel 1                   -> Sector 1, strips 127-0
    Channel 3                   -> Sector 0, strips 128-255
    Channel 4                   -> Sector 1, strips 255-128

 With this information, we can decode the hardware address to give
 us detector coordinates, unique at least up a 128 strips.  We
 return the first strip, as seen by the ALTRO channel, in the
 given range.

Timebin2Strip(UShort_t sec, UShort_t timebin, UShort_t preSamples, UShort_t sampleRate, Short_t& strip, UShort_t& sample) const
 Compute the strip off-set in the current channel from the sector
 and timebin.   Also needed for this computation is the basic
 offset in timebins, as well as the sample rat.
Hardware2Detector(UShort_t ddl, UShort_t board, UShort_t altro, UShort_t chan, UShort_t timebin, UShort_t preSamples, UShort_t sampleRate, UShort_t& det, Char_t& ring, UShort_t& sec, Short_t& str, UShort_t& sam) const
 Full conversion from hardware address, including timebin number,
 to detector coordinates and sample number.  Note, that this
 conversion depends on the oversampling rate and the number of
 pre-samples
Hardware2Detector(UShort_t ddl, UShort_t hwaddr, UShort_t timebin, UShort_t preSamples, UShort_t sampleRate, UShort_t& det, Char_t& ring, UShort_t& sec, Short_t& str, UShort_t& sam) const
 Translate a hardware address to detector coordinates.

 See also Hardware2Detector that accepts 4 inputs
Sector2Board(Char_t ring, UShort_t sec) const
 Return board address corresponding to a sector

 Parameters:
    ring  Ring identifier
    sec   Sector number
 Return:
    The board number, or negative number in case of failure

Strip2Channel(Char_t ring, UShort_t sec, UShort_t str, UShort_t& board, UShort_t& altro, UShort_t& chan) const
 Translate detector coordinates to a hardware address.
 The ddl is simply

    (det - 1)

 The ring number, sector, and strip number must be encoded into a
 hardware address.  The address argument, will have the following
 format on output

   12            7          4          0
   +-------------+----------+----------+
   | Board       | ALTRO    | Channel  |
   +-------------+----------+----------+

 The board number is given by the ring and sector.  The inner
 rings board 0 and 16, while the outer are 1 and 17.  Which of these
 depends on the sector.  The map is

    Ring I, sector  0- 9       ->   board 0
    Ring I, sector 10-19       ->   board 16
    Ring O, sector  0-19       ->   board 1
    Ring O, sector 20-39       ->   board 17

 There are 3 ALTRO's per board.  The ALTRO number is given by the
 sector number.  For the inner rings, these are given by

    Sector  0- 3  or  10-13    ->   ALTRO 0
    Sector  4- 5  or  14-15    ->   ALTRO 1
    Sector  6- 9  or  16-19    ->   ALTRO 2

 For the outers, it's given by

    Sector  0- 7  or  20-27    ->   ALTRO 0
    Sector  8-11  or  28-31    ->   ALTRO 1
    Sector 12-19  or  32-39    ->   ALTRO 2

 The channel number is given by the sector and strip number.  For
 the inners, the map is

    Sector  0, strips   0-127  ->   Channel  0
    Sector  0, strips 128-255  ->   Channel  2
    Sector  0, strips 256-383  ->   Channel  4
    Sector  0, strips 384-511  ->   Channel  6
    Sector  1, strips 127-  0  ->   Channel  1
    Sector  1, strips 255-128  ->   Channel  3
    Sector  1, strips 383-256  ->   Channel  5
    Sector  1, strips 511-384  ->   Channel  7
    Sector  2, strips   0-127  ->   Channel  8
    Sector  2, strips 128-255  ->   Channel 10
    Sector  2, strips 256-383  ->   Channel 12
    Sector  2, strips 384-511  ->   Channel 14
    Sector  3, strips 127-  0  ->   Channel  9
    Sector  3, strips 255-128  ->   Channel 11
    Sector  3, strips 383-256  ->   Channel 13
    Sector  3, strips 511-384  ->   Channel 15

 and so on, up to sector 19.  For the outer, the map is

    Sector  0, strips   0-127  ->   Channel  0
    Sector  0, strips 128-255  ->   Channel  2
    Sector  1, strips 127-  0  ->   Channel  1
    Sector  1, strips 255-128  ->   Channel  3
    Sector  2, strips   0-127  ->   Channel  4
    Sector  2, strips 128-255  ->   Channel  6
    Sector  3, strips 127-  0  ->   Channel  5
    Sector  3, strips 255-128  ->   Channel  7
    Sector  4, strips   0-127  ->   Channel  8
    Sector  4, strips 128-255  ->   Channel 10
    Sector  5, strips 127-  0  ->   Channel  9
    Sector  5, strips 255-128  ->   Channel 11
    Sector  6, strips   0-127  ->   Channel 12
    Sector  6, strips 128-255  ->   Channel 14
    Sector  7, strips 127-  0  ->   Channel 13
    Sector  7, strips 255-128  ->   Channel 15

 and so on upto sector 40.

 With this information, we can decode the detector coordinates to
 give us a unique hardware address

Strip2Timebin(UShort_t sec, UShort_t strip, UShort_t sam, UShort_t preSamples, UShort_t sampleRate) const
 Get the timebin correspoding to a strip and sample

 Parameters:
    sec        Sector number
    str        Strip number
    sam        Sample number
    preSamples Number of pre-samples.
    sampleRate The over-sampling rate
 Return:
    the timebin corresponding to the passed strip

Detector2Hardware(UShort_t det, Char_t ring, UShort_t sec, UShort_t str, UShort_t sam, UShort_t preSamples, UShort_t sampleRate, UShort_t& ddl, UShort_t& board, UShort_t& altro, UShort_t& channel, UShort_t& timebin) const
 Map a detector index into a hardware address.

 Parameters:
    det         The detector #
    ring        The ring ID
    sec         The sector #
    str         The strip #
    sam         The sample number
    preSamples  Number of pre-samples
    sampleRate  The oversampling rate
    ddl         On return, hardware DDL number
    board       On return, the FEC board address (local to DDL)
    altro       On return, the ALTRO number (local to FEC)
    channel     On return, the channel number (local to ALTRO)
    timebin     On return, the timebin number (local to ALTRO)
 Return:
    @c true on success, false otherwise

Detector2Hardware(UShort_t det, Char_t ring, UShort_t sec, UShort_t str, UShort_t sam, UShort_t preSamples, UShort_t sampleRate, UShort_t& ddl, UShort_t& hwaddr, UShort_t& timebin) const
 Map a detector index into a hardware address.

 Parameters:
    det         The detector #
    ring        The ring ID
    sec         The sector #
    str         The strip #
    sam         The sample number
    preSamples  Number of pre-samples
    sampleRate  The oversampling rate
    ddl         On return, hardware DDL number
    hwaddr      On return, hardware address.
    timebin     On return, the timebin number (local to ALTRO)
 Return:
    @c true on success, false otherwise

ChannelAddress(UShort_t board, UShort_t altro, UShort_t channel) const
 Convert board, chip, channel to a hardware address

 Parameters:
    board   Board number
    altro   Altro number
    channel Channel number
 Return:
    hardware address of a channel

ChannelAddress(UShort_t hwaddr, UShort_t& board, UShort_t& altro, UShort_t& channel) const
 Convert a channel address to board, altro, channel fields

 Parameters:
    hwaddr  Channel address
    board   On return, the Board number
    altro   On return, the Altro number
    channel On return, the Channel number

GetHWAddress(Int_t sector, Int_t str, Int_t ring)
 Return hardware address corresponding to sector sec, strip str,
 and ring ring.   Mapping from TPC to FMD coordinates are

   TPC     | FMD
   --------+------
   padrow  | sector
   pad     | strip
   sector  | ring

GetPadRow(Int_t hwaddr) const
 Return sector corresponding to hardware address hwaddr.  Mapping
 from TPC to FMD coordinates are

   TPC     | FMD
   --------+------
   padrow  | sector
   pad     | strip
   sector  | ring

GetPad(Int_t hwaddr) const
 Return strip corresponding to hardware address hwaddr.  Mapping
 from TPC to FMD coordinates are

   TPC     | FMD
   --------+------
   padrow  | sector
   pad     | strip
   sector  | ring

GetSector(Int_t hwaddr) const
 Return ring corresponding to hardware address hwaddr.  Mapping
 from TPC to FMD coordinates are

   TPC     | FMD
   --------+------
   padrow  | sector
   pad     | strip
   sector  | ring

Print(Option_t* option = "hw") const
 Print map to standard out

 Parameters:
    option Option string (hw, or det)

virtual ~AliFMDAltroMapping()
   * Destructor

{}
Short_t DDL2Detector(UInt_t ddl) const
   * Return detector number corresponding to given DDL number
   *
   * @param ddl DDL number
   * @return Detector number

Char_t Board2Ring(UShort_t board) const
   * Return the ring identifier corresponding to a board number
   *
   * @param board Board number
   * @return Ring identifier

{ return (board%2)?'O':'I'; }
UShort_t Detector2DDL(UShort_t det) const
   * Return DDL number corresponding to given detector number
   *
   * @param det Detector number
   * @return DDL number

{ return det - 1; }