return true;
}
-//______________________________________________________________________________
-Bool_t AliMUONGeometrySegmentation::GetPadE(Int_t detElemId,
- Int_t &ix, Int_t &iy,
- AliMUONSegmentManuIndex* connect)
-{
-/// Get pads for a given electronic connection
-
- if (!OwnNotify(detElemId)) return false;
-
- if (!fCurrentSegmentation->HasPad(ix, iy)) return false;
-
- fCurrentSegmentation->GetPadE(ix, iy, connect);
- return true;
-}
-
-//______________________________________________________________________________
-AliMUONSegmentManuIndex* AliMUONGeometrySegmentation:: GetMpConnection(Int_t detElemId,
- Int_t ix, Int_t iy)
-{
-/// Get electronic connection for given pads
-
- if (!OwnNotify(detElemId)) return 0x0;
-
- AliMUONSegmentManuIndex* connect;
-
- connect = fCurrentSegmentation->GetMpConnection(ix, iy);
- if (connect == 0x0) return 0x0;
-
- Int_t busPatchId = connect->GetBusPatchId();
-
- Int_t dBusPatch = 0;
- // not very clean way, to be changed (Ch.F.)
-
- if (detElemId/100 > 4 && detElemId/100 < 11)
- dBusPatch = 4;
- else if (detElemId/100 < 5)
- dBusPatch = 25;
-
- if (detElemId % 100 < 50)
- busPatchId+= (detElemId/100 - 1)*100 + (detElemId % 100)*dBusPatch;
- else
- busPatchId+= (detElemId/100 - 1)*100 + ((detElemId-50) % 100)*dBusPatch + 50;
-
- connect->SetBusPatchId(busPatchId);
- return connect;
-}
-
-
//______________________________________________________________________________
void AliMUONGeometrySegmentation::Init(Int_t chamber)
{
// Transform from real to pad coordinates
virtual Bool_t HasPad(Int_t detElemId, Int_t ix, Int_t iy);
-
- // get pad for a given connection
- virtual Bool_t GetPadE(Int_t detElemId, Int_t &ix, Int_t &iy, AliMUONSegmentManuIndex* connect);
- virtual AliMUONSegmentManuIndex* GetMpConnection(Int_t detElemId, Int_t ix, Int_t iy);
- // get electronics connection for given pad
-
+
// Initialisation
//
virtual void Init(Int_t chamber);
class AliMpSectorSegmentation;
class AliMpVPadIterator;
class AliMpPad;
-class AliMUONSegmentManuIndex;
class AliMUONChamber;
virtual void GetPadC(Int_t ix, Int_t iy, Float_t& x, Float_t& y, Float_t& z);
virtual void GetPadC(Int_t ix, Int_t iy, Float_t& x, Float_t& y);
// Transform from real to pad coordinates
- // get pad for a given connection
- virtual void GetPadE(Int_t &/*ix*/, Int_t &/*iy*/, AliMUONSegmentManuIndex* /*connect*/) {return;}
- virtual AliMUONSegmentManuIndex* GetMpConnection(Int_t /*ix*/, Int_t /*iy*/) {return 0x0;}
- // get electronics connection for given pad
+
// Initialisation
//
virtual void Init(Int_t chamber);
#include <TArrayI.h>
#include <TArrayF.h>
#include "AliMUONSt345SlatSegmentation.h"
-#include "AliMUONSegmentationDetectionElement.h"
-#include "AliMUONSegmentManuIndex.h"
-#include "AliMUONSegmentIndex.h"
-
#include "AliLog.h"
ClassImp(AliMUONSt345SlatSegmentation)
fIxmax(0),
fIymin(0),
fIymax(0),
- fInitDone(kFALSE),
- fSegmentationDetectionElement(0x0)
+ fInitDone(kFALSE)
{
// default constructor
AliDebug(1,Form("this=%p default (empty) ctor",this));
fIxmax(0),
fIymin(0),
fIymax(0),
- fInitDone(kFALSE),
- fSegmentationDetectionElement(0x0)
-
+ fInitDone(kFALSE)
{
// Non default constructor
fIxmin(0),
fIxmax(0),
fIymin(0),
- fIymax(0),
- fSegmentationDetectionElement(0x0)
+ fIymax(0)
{
AliFatal("Not implemented");
}
GetPadI(x, y, ix, iy);
}
-//-------------------------------------------------------------------------
-void AliMUONSt345SlatSegmentation::GetPadE(Int_t &ix, Int_t &iy, AliMUONSegmentManuIndex* manuIndex)
-{
- //
- // return Padx and Pady
- // input value: electronic connection number
-
- Int_t icathode = (fBending == 1) ? 0 : 1; // cathode 0 == bending
-
- // Int_t busPatchId = manuIndex->GetBusPatchId(); //
- Int_t manuId = manuIndex->GetManuId();
- Int_t manuChannelId = manuIndex->GetManuChannelId();
- // Int_t channelId = manuIndex->GetChannelId();
-
- AliMUONSegmentIndex* index = fSegmentationDetectionElement->GetIndex(manuId, manuChannelId);
-
- ix = index->GetPadX();
- iy = index->GetPadY();
- swap(ix,iy); // swap cos origin in segmentation and mapping file are different for iy (temporary solution)
-
- if (index->GetCathode() != icathode)
- AliWarning("Wrong cathode number !");
-
-}
-
-//-------------------------------------------------------------------------
- AliMUONSegmentManuIndex* AliMUONSt345SlatSegmentation::GetMpConnection(Int_t ix, Int_t iy)
-{
- //
- // return electronic connection number
- // input value: Padx and Pady
-
- Int_t icathode = (fBending == 1) ? 0 : 1; // cathode 0 == bending
-
- return fSegmentationDetectionElement->GetManuIndex(ix, iy, icathode);
-
-}
//_______________________________________________________________
void AliMUONSt345SlatSegmentation::SetPadDivision(Int_t ndiv[4])
//
fId = detectionElementId;
- //
- // initalize mapping
- //
-// Int_t icathode = (fBending == 1) ? 0 : 1; // cathode 0 == bending
-// Char_t name[15];
-// GetMpFileName(name);
-// fSegmentationDetectionElement = new AliMUONSegmentationDetectionElement();
-// fSegmentationDetectionElement->Init(name, icathode);
fInitDone = kTRUE;
}
-
-//--------------------------------------------------------------------------
-void AliMUONSt345SlatSegmentation::GetMpFileName(Char_t* name) const
-{
- //
- // Get mapping file name
- //
-
- strcpy(name,"slat");
-
- for (Int_t isec = 1; isec < 4; isec++) {
-
- switch(isec) {
- case 1:
- for (Int_t i = 0; i < fPcbBoards[isec]; i++)
- strcat(name,"1");
- break;
- case 2 :
- for (Int_t i = 0; i < fPcbBoards[isec]; i++)
- strcat(name,"2");
- break;
- case 3:
- for (Int_t i = 0; i < fPcbBoards[isec]; i++)
- strcat(name,"3");
- break;
- }
- }
-
- while (strlen(name) < 10)
- strcat(name,"0");
-
- switch(fRtype) {
- case 0:
- strcat(name, "N");
- break;
- case 1:
- strcat(name, "NR1");
- break;
- case 2:
- strcat(name, "NR2");
- break;
- case 3:
- strcat(name, "NR3");
- break;
- case 4:
- strcat(name, "S");
- break;
- case -1:
- strcat(name, "SR1");
- break;
- case -2:
- strcat(name, "SR2");
- break;
- case -3:
- strcat(name, "SR3"); // should not exist
- AliFatal("SR3 Slat type does not exist !!");
- break;
- }
-}
-
-//--------------------------------------------------------------------------
-void AliMUONSt345SlatSegmentation::Swap(Int_t padX, Int_t &padY)
-{
-
- // swap the numbering between segmentation (i.e. pady = [0,40])
- // and mapping file (i.e. pady = [-20,20])
-
-
- if (fBending == 1) {
- if (padY < 0)
- padY += fNpy + 1;
- else
- padY += fNpy;
- }
-
-
- if (fBending == 0) {
- if (padY < 0)
- padY += fNpyS[Sector(padX, padY)] + 1;
- else
- padY += fNpyS[Sector(padX, padY)];
- }
-
-}
-
-
class TArrayF;
class TArrayI;
-class AliMUONSegmentManuIndex;
-class AliMUONSegmentationDetectionElement;
+
class AliMUONSt345SlatSegmentation : public AliMUONVGeometryDESegmentation
{
virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y);
virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y, Float_t &z) {z=0; GetPadC(ix, iy, x , y);}
- virtual void GetPadE(Int_t &ix, Int_t &iy, AliMUONSegmentManuIndex* connect); // get pad for a given connection
- virtual AliMUONSegmentManuIndex* GetMpConnection(Int_t ix, Int_t iy); // get electronics connection for given pad
-
-
virtual void IntegrationLimits(Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2); //Current integration limits
virtual Int_t ISector() {return fSector;} // Current Pad during Integration (current sector)
virtual Int_t Ix() {return fIx;} // x-coordinate
AliMUONSt345SlatSegmentation(const AliMUONSt345SlatSegmentation& rhs);
AliMUONSt345SlatSegmentation& operator=(const AliMUONSt345SlatSegmentation& rhs);
- void GetMpFileName(Char_t* name) const;
- void Swap(Int_t padX, Int_t &padY);
private:
// Internal geometry of the slat
Bool_t fInitDone; // flag for initialization
- // electronics mapping
- AliMUONSegmentationDetectionElement* fSegmentationDetectionElement; //! pointer to the electronics mapping
-
ClassDef(AliMUONSt345SlatSegmentation,3)
};
#endif
return kDirUndefined;
}
-//_____________________________________________________________________________
-AliMUONSegmentManuIndex*
-AliMUONSt345SlatSegmentationV2::GetMpConnection(Int_t,Int_t)
-{
- AliFatal("Not Implemented");
- return 0x0;
-}
-
//_____________________________________________________________________________
void
AliMUONSt345SlatSegmentationV2::GetNParallelAndOffset(Int_t,Int_t,Int_t*,Int_t*)
y = pad.Position().Y() * fgkLengthUnit;
}
-//_____________________________________________________________________________
-void
-AliMUONSt345SlatSegmentationV2::GetPadE(Int_t&,Int_t&,AliMUONSegmentManuIndex*)
-{
- AliFatal("Not Implemented");
-}
//_____________________________________________________________________________
void
// to be deprecated. Use the one above w/o z instead.
void GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy);
- void GetPadE(Int_t& /*ix*/, Int_t& /*iy*/, AliMUONSegmentManuIndex*);
-
- AliMUONSegmentManuIndex* GetMpConnection(Int_t /*ix*/, Int_t /*iy*/);
/// Whether a pad exists at a given position.
Bool_t HasPad(Float_t x, Float_t y, Float_t z);
/// \brief Segmentation for trigger modules
#include "AliMUONVGeometryDESegmentation.h"
-class AliMUONSegmentManuIndex;
class AliMUONTriggerSegmentation : public AliMUONVGeometryDESegmentation
{
virtual void GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy);
virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y);
virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y, Float_t &z) {z=0; GetPadC(ix, iy, x , y);}
-
- virtual void GetPadE(Int_t &/*ix*/, Int_t &/*iy*/, AliMUONSegmentManuIndex* /*connect*/) {return;} // get pad for a given connection
- virtual AliMUONSegmentManuIndex* GetMpConnection(Int_t /*ix*/, Int_t /*iy*/) {return 0x0;} // get electronics connection for given pad
-
+
virtual void GetPadLoc2Glo(Int_t ixLoc, Int_t iyLoc, Int_t &ixGlo, Int_t &iyGlo);
virtual void GetPadGlo2Loc(Int_t ixLoc, Int_t iyLoc, Int_t &ixGlo, Int_t &iyGlo);
virtual void IntegrationLimits(Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2); //Current integration limits
// for the bending plane and kDirX with cathode segmentation
// for the non bending plane
- virtual void GetPadE(Int_t &ix, Int_t &iy, AliMUONSegmentManuIndex* connect) = 0;
- virtual AliMUONSegmentManuIndex* GetMpConnection(Int_t ix, Int_t iy) = 0;
-
protected:
AliMUONVGeometryDESegmentation(const AliMUONVGeometryDESegmentation& rhs);