AliMUONSt12QuadrantSegmentation::AliMUONSt12QuadrantSegmentation(
AliMpStationType stationType,
AliMpPlaneType planeType)
-: AliSegmentation(),
+: AliMUONVGeometryDESegmentation(),
fSector(0),
fSectorSegmentation(0),
fSectorIterator(0),
//______________________________________________________________________________
AliMUONSt12QuadrantSegmentation::AliMUONSt12QuadrantSegmentation()
-: AliSegmentation(),
+: AliMUONVGeometryDESegmentation(),
fSector(0),
fSectorSegmentation(0),
fSectorIterator(0),
//______________________________________________________________________________
AliMUONSt12QuadrantSegmentation::AliMUONSt12QuadrantSegmentation(const AliMUONSt12QuadrantSegmentation& rhs)
- : AliSegmentation(rhs)
+ : AliMUONVGeometryDESegmentation(rhs)
{
// Copy constructor
AliFatal("Copy constructor is not implemented.");
fWireD = d;
}
+//______________________________________________________________________________
+Bool_t AliMUONSt12QuadrantSegmentation::HasPad(Float_t x, Float_t y, Float_t /*z*/)
+{
+// Returns true if a pad exists in the given position
+
+ AliMpPad pad = fSectorSegmentation
+ ->PadByPosition(TVector2(x/fgkLengthUnit, y/fgkLengthUnit), false);
+
+ return pad.IsValid();
+}
+
+
+//______________________________________________________________________________
+Bool_t AliMUONSt12QuadrantSegmentation::HasPad(Int_t ix, Int_t iy)
+{
+// Returns true if a pad with given indices exists
+
+ AliMpPad pad = fSectorSegmentation->PadByIndices(AliMpIntPair(ix,iy), false);
+
+ return pad.IsValid();
+}
+
+
//______________________________________________________________________________
Float_t AliMUONSt12QuadrantSegmentation::GetAnod(Float_t xhit) const
{
// ---
AliMpPad pad = fSectorSegmentation
- ->PadByPosition(TVector2(x/fgkLengthUnit, y/fgkLengthUnit), false);
+ ->PadByPosition(TVector2(x/fgkLengthUnit, y/fgkLengthUnit), true);
ix = pad.GetIndices().GetFirst();
iy = pad.GetIndices().GetSecond();
// If there is no pad, x = 0., y = 0. are returned.
// ---
- AliMpPad pad = fSectorSegmentation->PadByIndices(AliMpIntPair(ix,iy));
+ AliMpPad pad = fSectorSegmentation->PadByIndices(AliMpIntPair(ix,iy), true);
x = pad.Position().X() * fgkLengthUnit;
y = pad.Position().Y() * fgkLengthUnit;
Int_t AliMUONSt12QuadrantSegmentation::Npx() const
{
// Maximum number of Pads in x
+// hard coded for the time being
// ---
//Fatal("Npx", "Not yet implemented.");
- return 142; //hard coded for the time being
+ switch (fSector->GetDirection()) {
+ case kX:
+ return 142;
+ case kY:
+ return 108;
+ default:
+ AliError("Unknown sector direction");
+ return 0;
+ }
}
//______________________________________________________________________________
Int_t AliMUONSt12QuadrantSegmentation::Npy() const
{
// Maximum number of Pads in y
+// hard coded for the time being
// ---
//Fatal("Npy", "Not yet implemented.");
- return 213; //hard coded for the time being
+ switch (fSector->GetDirection()) {
+ case kX:
+ return 160;
+ case kY:
+ return 213;
+ default:
+ AliError("Unknown sector direction");
+ return 0;
+ }
}
//______________________________________________________________________________