25 #include "Riostream.h"
27 #include "TObjArray.h"
50 Bool_t IsEqual(Double_t a, Double_t b, Double_t precision)
54 Double_t diff = TMath::Abs(b-a)/TMath::Abs(b);
55 if ( diff < precision )
62 if ( !a )
return kTRUE;
74 fSlatSegmentations(0),
81 AliDebugStream(1) <<
"this = " <<
this << endl;
91 fPlaneType(bendingOrNot),
93 fSlatSegmentations(0),
100 AliDebugStream(1) <<
"this = " <<
this << endl;
110 AliDebugStream(1) <<
"this = " <<
this << endl;
122 AliDebug(2,Form(
"%s is adopting %s ",
132 AliError(Form(
"In %s trying to add a layer (%e,%e) (layer #%d) "
133 "of a different size than mine (%e,%e)",
144 fDX = TMath::Max(fDX,slat->
DX());
145 fDY = TMath::Max(fDY,slat->
DY());
171 for ( Int_t i = 0; i <
GetSize(); ++i )
180 for ( Int_t i = 0; i <
GetSize(); ++i )
184 for ( Int_t j = 0; j < slbn.GetSize(); ++j )
186 lbn[index] = slbn[j];
205 TString name(
GetID());
212 name +=
".NonBending";
271 return fSlats.GetEntriesFast();
279 if ( layer >= 0 && layer <
GetSize() )
299 cout <<
"AliMpTrigger::" <<
GetID();
306 cout <<
" Number of layers : " <<
GetSize();
310 cout <<
" One layer";
313 for ( Int_t i = 0; i <
GetSize(); ++i )
Int_t GetNofPadsX() const
void GetAllMotifPositionsIDs(TArrayI &ecn) const
Return the ids of the electronic cards (either manu or local board).
void Print(Option_t *option="") const
void GetAllLocalBoardNumbers(TArrayI &lbn) const
const char * GetID() const
AliMpSlat * GetLayer(int layer) const
Bool_t IsLayerValid(int layer) const
AliMpVSegmentation * GetLayerSegmentation(int layer) const
Double_t fDX
half-size in x (cm)
AliMp::PlaneType PlaneType() const
A slat (building block of stations 3, 4 and 5)
TObjArray fSlats
virtual slat composing this trigger slat
static Double_t LengthTolerance()
Return the length precision for tests.
Bool_t AdoptLayer(AliMpSlat *slat)
void Print(Option_t *option="") const
Double_t fDY
half-size in y (cm)
const char * GetName() const
Int_t GetSize() const
Returns the number of layers.
Int_t GetNofPadsX() const
Returns the number of pads in the x-direction contained in this slat.
Int_t GetMaxNofPadsY() const
const char * GetID() const
Implementation of AliMpVSegmentation for St345 slats.
The abstract base class for the segmentation.
AliMp::PlaneType fPlaneType
bending or non-bending
Int_t fMaxNofPadsY
max number of pads in y direction
Int_t GetNofElectronicCards() const
Return the number of electronic cards (either manu or local board).
TString fId
name of that slat
TObjArray fSlatSegmentations
segmentations for virtual slats
Int_t GetMaxNofPadsY() const