AliRoot Core  v5-06-15 (45dab64)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMpPCB Class Reference

A PCB for station 3,4 or 5. More...

#include <AliMpPCB.h>

Inheritance diagram for AliMpPCB:

Public Member Functions

 AliMpPCB ()
 
 AliMpPCB (AliMpSlatMotifMap *motifMap, const char *id, Double_t padSizeX, Double_t padSizeY, Double_t enveloppeSizeX, Double_t enveloppeSizeY)
 
 AliMpPCB (const char *id, AliMpMotifSpecial *ms)
 
 AliMpPCB (const AliMpPCB &o)
 
AliMpPCBoperator= (const AliMpPCB &o)
 
virtual ~AliMpPCB ()
 
TObject * Clone (const char *newname="") const
 
AliMpPCBClone (const TArrayI &manuids, Int_t ixOffset, Double_t xOffset) const
 
void Copy (TObject &o) const
 
void Add (AliMpMotifType *motifType, Int_t ix, Int_t iy)
 
AliMpArea Area () const
 
void Print (Option_t *option="") const
 
Bool_t HasMotifPositionID (Int_t manuId) const
 
Double_t ActiveDX () const
 
Double_t ActiveDY () const
 
Double_t DX () const
 
Double_t DY () const
 
Double_t X () const
 
Double_t Y () const
 
Double_t Xmin () const
 
Double_t Xmax () const
 
Double_t ActiveXmin () const
 
Double_t ActiveXmax () const
 
Double_t Ymin () const
 
Double_t Ymax () const
 
Double_t PadSizeX () const
 
Double_t PadSizeY () const
 
AliMpMotifPositionGetMotifPosition (Int_t i) const
 
AliMpMotifPositionFindMotifPosition (Int_t ix, Int_t iy) const
 Returns the motifPosition which contains the pad at (ix,iy). More...
 
AliMpMotifPositionFindMotifPosition (Double_t x, Double_t y) const
 Returns the motifPosition which contains the pad at (x,y). More...
 
Int_t GetSize () const
 The number of motifs, aka manus. More...
 
Int_t GetNofPadsX () const
 
Int_t GetNofPadsY () const
 
Int_t Ixmin () const
 
Int_t Ixmax () const
 
Int_t Iymin () const
 
Int_t Iymax () const
 
const char * GetID () const
 
Int_t NofPads () const
 Return the number of pads in this PCB. More...
 
AliMpSlatMotifMapMotifMap () const
 Return the motif map. More...
 
void Save () const
 

Private Attributes

TString fId
 PCB name. More...
 
Double_t fPadSizeX
 x-size of this PCB's pads (cm) More...
 
Double_t fPadSizeY
 y-size of this PCB's pads (cm) More...
 
Double_t fEnveloppeSizeX
 max x-size of this PCB (cm) More...
 
Double_t fEnveloppeSizeY
 max y-size of this PCB (cm) More...
 
Double_t fXoffset
 x-offset = x of first pad of this PCB (cm) More...
 
Double_t fActiveXmin
 min x of an actual pad in this PCB (cm) More...
 
Double_t fActiveXmax
 max x of an actual pad in this PCB (cm) More...
 
Int_t fIxmin
 min pad index in x More...
 
Int_t fIxmax
 max pad index in x More...
 
Int_t fIymin
 min pad index in y More...
 
Int_t fIymax
 max pad index in y More...
 
TObjArray fMotifPositions
 array of motifs More...
 
Int_t fNofPads
 number of pads in this PCB More...
 
AliMpSlatMotifMapfMotifMap
 to keep track of things to avoid duplications of motif and motiftypes, and get proper deletion More...
 

Detailed Description

A PCB for station 3,4 or 5.

A PCB for station 3,4 or 5

A PCB is a group of pads having the same size Pads are grouped in motifs, where 1 motif = 1 MANU

The notion of PCB enveloppe is due to the fact that not all PCBs are "full" of pads, e.g. the rounded or short ones miss some pads, but the enveloppe is a virtual size that should be constant across the slats, and is 400x400 mm. It's a usefull notion to compute e.g. slat center in a uniform way, considering that a slat is N PCBs, of the same "virtual" size, that of the enveloppe.

Author
L. Aphecetche

Definition at line 46 of file AliMpPCB.h.

Constructor & Destructor Documentation

AliMpPCB::AliMpPCB ( )

Default ctor.

Definition at line 62 of file AliMpPCB.cxx.

Referenced by Clone().

AliMpPCB::AliMpPCB ( AliMpSlatMotifMap motifMap,
const char *  id,
Double_t  padSizeX,
Double_t  padSizeY,
Double_t  enveloppeSizeX,
Double_t  enveloppeSizeY 
)

Ctor. The sizes are given in mm. See full doc for the meaning of enveloppe parameters.

Normal ctor. Must be fed with the PCB's name (id), the pad dimensions and the global dimension of the virtual enveloppe of the PCB (usually 400x400 mm)

Definition at line 88 of file AliMpPCB.cxx.

AliMpPCB::AliMpPCB ( const char *  id,
AliMpMotifSpecial ms 
)

Very special ctor to be used by trigger stations only (and for a very specific case).

Note that in this very case, we only allow one (special) motif per PCB. This limitation might not be justified, except that it's all we need so far ;-)

Definition at line 145 of file AliMpPCB.cxx.

AliMpPCB::AliMpPCB ( const AliMpPCB o)

Copy constructor

Definition at line 116 of file AliMpPCB.cxx.

AliMpPCB::~AliMpPCB ( )
virtual

Dtor.

Definition at line 197 of file AliMpPCB.cxx.

Member Function Documentation

Double_t AliMpPCB::ActiveDX ( ) const

Half-length (in x-direction) occupied by pads

Definition at line 443 of file AliMpPCB.cxx.

Double_t AliMpPCB::ActiveDY ( ) const

Half-length (in y-direction) occupied by pads

Definition at line 469 of file AliMpPCB.cxx.

Double_t AliMpPCB::ActiveXmax ( ) const

Returns the maximum x for which there is a pad in this PCB. Different from Xmax only for PCB which are not full of pads.

Definition at line 219 of file AliMpPCB.cxx.

Referenced by AliMpPCBPadIterator::CropArea(), and Print().

Double_t AliMpPCB::ActiveXmin ( ) const

Returns the mininum x for which there is a pad in this PCB. Different from Xmin only for PCB which are not full of pads.

Definition at line 207 of file AliMpPCB.cxx.

Referenced by AliMpPCBPadIterator::CropArea(), and Print().

void AliMpPCB::Add ( AliMpMotifType motifType,
Int_t  ix,
Int_t  iy 
)

Add a motif to this PCB. (ix,iy) are the coordinates of one corner of the motif, in pad-units. Which corner depends on the sign(s) of (ix,iy): (ix>0,iy>0) : bottom-left corner (ix<0,iy>0) : bottom-right corner (ix<0,iy<0) : top-right corner (ix>0,iy<0) : top-left corner.

Add a motif to this PCB. (ix,iy) indicates one corner position of the motif where the sign of ix and iy is used to indicate which corner is the reference (then for values, abs(ix) and abs(iy) are used indeed) :

(ix>0,iy>0) : bottom-left corner (ix<0,iy>0) : bottom-right corner (ix<0,iy<0) : top-right corner (ix>0,iy<0) : top-left corner.

Definition at line 231 of file AliMpPCB.cxx.

Referenced by AliMpSt345Reader::ReadPCB(), and AliMpTriggerReader::ReadPCB().

AliMpArea AliMpPCB::Area ( ) const

Return the area of this PCB

Definition at line 319 of file AliMpPCB.cxx.

Referenced by AliMpSlatPadIterator::Prepare().

TObject * AliMpPCB::Clone ( const char *  newname = "") const

Return a full copy of this object.

Definition at line 328 of file AliMpPCB.cxx.

Referenced by AliMpSlat::Add(), and Clone().

AliMpPCB * AliMpPCB::Clone ( const TArrayI &  manuids,
Int_t  ixOffset,
Double_t  xOffset 
) const

Duplicate this PCB. The copy has the manuids of its motifs changed according to the manuid vector, and its x-offset according to ix and x.

Get a full copy of *this, and then apply 2 changes to it :

a) define the relationship motifType <-> manu id b) define the x-offset c) shift ix indices backwards to insure that e.g. the first pcb of a slat will start at ix=0 (only relevant for rounded pcbs).

Definition at line 341 of file AliMpPCB.cxx.

void AliMpPCB::Copy ( TObject &  o) const

Copy *this into o

Definition at line 398 of file AliMpPCB.cxx.

Referenced by AliMpPCB(), and operator=().

Double_t AliMpPCB::DX ( ) const

Half-length (in x-direction) of the PCB. This length is the one of the virtual enveloppe of the PCB and might be bigger than the length occupied by pads (e.g. for rounded or short PCBs). See also ActiveDX().

Definition at line 454 of file AliMpPCB.cxx.

Referenced by AliMpSlat::Add(), Area(), AliMpSlatPainter::Draw(), AliMpPCBPainter::GetDimensions(), AliMpTriggerReader::ReadSlat(), AliMpBusPatch::SetNofManusPerModule(), X(), Xmax(), and Xmin().

Double_t AliMpPCB::DY ( ) const

Half-length (in y-direction) of the PCB. This length is the one of the virtual enveloppe of the PCB and might be bigger than the length occupied by pads (e.g. for rounded or short PCBs). See also ActiveDY().

Definition at line 480 of file AliMpPCB.cxx.

Referenced by AliMpSlat::Add(), Area(), AliMpPCBPadIterator::CropArea(), AliMpSlatPainter::Draw(), AliMpPCBPainter::GetDimensions(), AliMpTriggerReader::ReadSlat(), Y(), Ymax(), and Ymin().

AliMpMotifPosition * AliMpPCB::FindMotifPosition ( Int_t  ix,
Int_t  iy 
) const

Returns the motifPosition which contains the pad at (ix,iy).

Returns the motifPosition located at the position referenced by integer indices (ix,iy).

Definition at line 495 of file AliMpPCB.cxx.

Referenced by AliMpSlat::FindMotifPosition().

AliMpMotifPosition * AliMpPCB::FindMotifPosition ( Double_t  x,
Double_t  y 
) const

Returns the motifPosition which contains the pad at (x,y).

Returns the motifPosition located at position (x,y)

Definition at line 515 of file AliMpPCB.cxx.

const char * AliMpPCB::GetID ( ) const

Returns the name of this PCB.

Definition at line 542 of file AliMpPCB.cxx.

Referenced by AliMpSlat::Add(), Clone(), AliMpPCBPadIterator::CropArea(), and Print().

AliMpMotifPosition * AliMpPCB::GetMotifPosition ( Int_t  i) const

Returns the i-th motifPosition of this PCB. i : [0..GetSize()-1]

Get the i-th motifPosition stored in this PCB's internal array.

Definition at line 553 of file AliMpPCB.cxx.

Referenced by AliMpSlat::Add(), Clone(), AliMpPCBPainter::Draw(), AliMpDEVisu::PopUpManuMotif(), Save(), and AliMUONRejectList::SetPCBProbability().

Int_t AliMpPCB::GetNofPadsX ( ) const

Returns the number of pads in x-direction.

Definition at line 566 of file AliMpPCB.cxx.

Referenced by ActiveDX(), AliMpSlat::Add(), and Ixmax().

Int_t AliMpPCB::GetNofPadsY ( ) const

Returns the number of pads in y-direction.

Definition at line 577 of file AliMpPCB.cxx.

Referenced by ActiveDY(), AliMpSlat::Add(), and Iymax().

Int_t AliMpPCB::GetSize ( ) const

The number of motifs, aka manus.

Returns the number of motifPositions stored in this PCB.

Definition at line 588 of file AliMpPCB.cxx.

Referenced by AliMpSlat::Add(), Clone(), AliMpPCBPainter::Draw(), AliMpDEVisu::PopUpManuMotif(), AliMpSt345Reader::ReadSlat(), and AliMUONRejectList::SetPCBProbability().

Bool_t AliMpPCB::HasMotifPositionID ( Int_t  manuId) const

Returns whether or not we have manuId

Definition at line 599 of file AliMpPCB.cxx.

Referenced by AliMpSlat::FindPCBIndexByMotifPositionID().

Int_t AliMpPCB::Ixmax ( ) const

Returns the index value of the rightmost pad.

Definition at line 626 of file AliMpPCB.cxx.

Referenced by AliMpSlat::Add(), AliMpPCBPadIterator::CropArea(), AliMpSlat::FindPCB(), AliMpSlat::FindPCBIndex(), and AliMpSlat::GetMaxPadIndexX().

Int_t AliMpPCB::Ixmin ( ) const

Returns the index value of the leftmost pad.

Definition at line 615 of file AliMpPCB.cxx.

Referenced by AliMpSlat::Add(), AliMpPCBPadIterator::CropArea(), AliMpSlat::FindPCB(), AliMpSlat::FindPCBIndex(), Ixmax(), and AliMUONTriggerCircuit::LoadXPos().

Int_t AliMpPCB::Iymax ( ) const

Returns the index value of the top pad.

Definition at line 648 of file AliMpPCB.cxx.

Referenced by AliMUONTriggerCircuit::LoadYPos().

Int_t AliMpPCB::Iymin ( ) const

Returns the index value of the bottom pad.

Definition at line 637 of file AliMpPCB.cxx.

Referenced by AliMpPCBPadIterator::CropArea(), and Iymax().

AliMpSlatMotifMap* AliMpPCB::MotifMap ( ) const
inline

Return the motif map.

Definition at line 141 of file AliMpPCB.h.

Int_t AliMpPCB::NofPads ( ) const
inline

Return the number of pads in this PCB.

Definition at line 138 of file AliMpPCB.h.

Referenced by AliMpSlat::Add().

AliMpPCB & AliMpPCB::operator= ( const AliMpPCB o)

Assignment operator

Definition at line 186 of file AliMpPCB.cxx.

Double_t AliMpPCB::PadSizeX ( ) const

Returns the pad size in x-direction (in mm)

Definition at line 659 of file AliMpPCB.cxx.

Referenced by Add(), and AliMpPCBPadIterator::CropArea().

Double_t AliMpPCB::PadSizeY ( ) const

Returns the pad size in y-direction (in mm)

Definition at line 670 of file AliMpPCB.cxx.

Referenced by Add(), and AliMpPCBPadIterator::CropArea().

void AliMpPCB::Print ( Option_t *  option = "") const

Printout of this PCB. If option="M", the contained motifs are printed too.

Definition at line 681 of file AliMpPCB.cxx.

void AliMpPCB::Save ( ) const

Save this PCB in the file

Definition at line 706 of file AliMpPCB.cxx.

Double_t AliMpPCB::X ( ) const

Returns the x-position of the PCB center.

Definition at line 756 of file AliMpPCB.cxx.

Referenced by AliMpSlatPainter::Draw(), AliMpPCBPainter::GetPosition(), Xmax(), and Xmin().

Double_t AliMpPCB::Xmax ( ) const

Returns the rightmost x-position in this PCB.

Definition at line 778 of file AliMpPCB.cxx.

Referenced by Add(), Area(), AliMpSlat::FindPCB(), AliMpSlat::FindPCBIndex(), and Print().

Double_t AliMpPCB::Xmin ( ) const

Returns the leftmost x-position in this PCB.

Definition at line 767 of file AliMpPCB.cxx.

Referenced by Area(), AliMpSlat::FindPCBIndex(), and Print().

Double_t AliMpPCB::Y ( ) const

Returns the y-position of the PCB center.

Definition at line 789 of file AliMpPCB.cxx.

Referenced by AliMpSlatPainter::Draw(), AliMpPCBPainter::GetPosition(), Ymax(), and Ymin().

Double_t AliMpPCB::Ymax ( ) const

Returns the largest y-position in this PCB.

Definition at line 811 of file AliMpPCB.cxx.

Referenced by Add(), AliMpSlat::FindPCB(), and AliMpSlat::FindPCBIndex().

Double_t AliMpPCB::Ymin ( ) const

Returns the smallest y-position in this PCB.

Definition at line 800 of file AliMpPCB.cxx.

Referenced by AliMpPCBPadIterator::CropArea(), AliMpSlat::FindPCB(), and AliMpSlat::FindPCBIndex().

Member Data Documentation

Double_t AliMpPCB::fActiveXmax
private

max x of an actual pad in this PCB (cm)

Definition at line 153 of file AliMpPCB.h.

Referenced by ActiveXmax(), Add(), Clone(), and Copy().

Double_t AliMpPCB::fActiveXmin
private

min x of an actual pad in this PCB (cm)

Definition at line 152 of file AliMpPCB.h.

Referenced by ActiveXmin(), Add(), Clone(), and Copy().

Double_t AliMpPCB::fEnveloppeSizeX
private

max x-size of this PCB (cm)

Definition at line 149 of file AliMpPCB.h.

Referenced by Copy(), DX(), and Save().

Double_t AliMpPCB::fEnveloppeSizeY
private

max y-size of this PCB (cm)

Definition at line 150 of file AliMpPCB.h.

Referenced by Copy(), DY(), and Save().

TString AliMpPCB::fId
private

PCB name.

Definition at line 146 of file AliMpPCB.h.

Referenced by Copy(), GetID(), and Save().

Int_t AliMpPCB::fIxmax
private

max pad index in x

Definition at line 155 of file AliMpPCB.h.

Referenced by Add(), AliMpPCB(), Clone(), Copy(), GetNofPadsX(), and Print().

Int_t AliMpPCB::fIxmin
private

min pad index in x

Definition at line 154 of file AliMpPCB.h.

Referenced by Add(), AliMpPCB(), Clone(), Copy(), GetNofPadsX(), Ixmin(), and Print().

Int_t AliMpPCB::fIymax
private

max pad index in y

Definition at line 157 of file AliMpPCB.h.

Referenced by Add(), AliMpPCB(), Copy(), GetNofPadsY(), and Print().

Int_t AliMpPCB::fIymin
private

min pad index in y

Definition at line 156 of file AliMpPCB.h.

Referenced by Add(), AliMpPCB(), Copy(), GetNofPadsY(), Iymin(), and Print().

AliMpSlatMotifMap* AliMpPCB::fMotifMap
private

to keep track of things to avoid duplications of motif and motiftypes, and get proper deletion

Definition at line 160 of file AliMpPCB.h.

Referenced by Add(), Copy(), and MotifMap().

TObjArray AliMpPCB::fMotifPositions
private

array of motifs

Definition at line 158 of file AliMpPCB.h.

Referenced by Add(), AliMpPCB(), Copy(), FindMotifPosition(), GetMotifPosition(), GetSize(), HasMotifPositionID(), Print(), and Save().

Int_t AliMpPCB::fNofPads
private

number of pads in this PCB

Definition at line 159 of file AliMpPCB.h.

Referenced by Add(), Copy(), and NofPads().

Double_t AliMpPCB::fPadSizeX
private

x-size of this PCB's pads (cm)

Definition at line 147 of file AliMpPCB.h.

Referenced by ActiveDX(), Copy(), PadSizeX(), Print(), and Save().

Double_t AliMpPCB::fPadSizeY
private

y-size of this PCB's pads (cm)

Definition at line 148 of file AliMpPCB.h.

Referenced by ActiveDY(), Copy(), PadSizeY(), Print(), and Save().

Double_t AliMpPCB::fXoffset
private

x-offset = x of first pad of this PCB (cm)

Definition at line 151 of file AliMpPCB.h.

Referenced by Clone(), Copy(), and X().


The documentation for this class was generated from the following files: