/* $Id$ */
+// -------------------------------------
+// Class AliMUONSt345SlatSegmentation
+// -------------------------------------
+// Segmentation for MUON slat stations using
+// the mapping package
+
+
#include "AliMUONSt345SlatSegmentationV2.h"
#include "AliMUONConstants.h"
#include "AliLog.h"
#include "Riostream.h"
-#include "TClass.h"
ClassImp(AliMUONSt345SlatSegmentationV2)
fXhit(FMAX),
fYhit(FMAX)
{
+// Default ctor
+
AliDebug(1,Form("this=%p default (empty) ctor",this));
}
//_____________________________________________________________________________
AliMUONSt345SlatSegmentationV2::~AliMUONSt345SlatSegmentationV2()
{
+// Destructor
+
AliDebug(1,Form("dtor this=%p",this));
delete fPadIterator;
}
//_____________________________________________________________________________
TF1*
-AliMUONSt345SlatSegmentationV2::CorrFunc(Int_t) const
+AliMUONSt345SlatSegmentationV2::CorrFunc(Int_t /*isec*/) const
{
+// Not implemented
+
AliFatal("Not Implemented");
return 0x0;
}
//_____________________________________________________________________________
Float_t
-AliMUONSt345SlatSegmentationV2::Distance2AndOffset(Int_t,Int_t,
- Float_t,Float_t,Int_t*)
-{
+AliMUONSt345SlatSegmentationV2::Distance2AndOffset(Int_t /*iX*/, Int_t /*iY*/,
+ Float_t /*x*/, Float_t /*y*/, Int_t* /*dummy*/){
+// Not implemented
+
AliFatal("Not Implemented");
return 0.0;
}
//_____________________________________________________________________________
void
-AliMUONSt345SlatSegmentationV2::Draw(Option_t*)
+AliMUONSt345SlatSegmentationV2::Draw(Option_t* /*opt*/)
{
+// Not implemented
+
AliFatal("Not Implemented");
}
Float_t
AliMUONSt345SlatSegmentationV2::Dpx() const
{
+// Not implemented
+
AliFatal("Not Implemented");
return 0.0;
}
Float_t
AliMUONSt345SlatSegmentationV2::Dpy() const
{
+// Not implemented
+
AliFatal("Not Implemented");
return 0.0;
}
Float_t
AliMUONSt345SlatSegmentationV2::Dpx(int ipcb) const
{
+// Get pad size in x
+
AliMpPCB* pcb = fSlat->GetPCB(ipcb);
if (!pcb)
{
Float_t
AliMUONSt345SlatSegmentationV2::Dpy(int ipcb) const
{
+// Get pad size in y
+
AliMpPCB* pcb = fSlat->GetPCB(ipcb);
if (!pcb)
{
//_____________________________________________________________________________
void
-AliMUONSt345SlatSegmentationV2::FirstPad(Float_t xhit, Float_t yhit,
- Float_t /*zhit*/,
- Float_t dx, Float_t dy)
+AliMUONSt345SlatSegmentationV2::FirstPad(Float_t xhit, Float_t yhit,Float_t /*zhit*/,
+ Float_t dx, Float_t dy)
{
// OK. We will do it in 2 steps. First get the area over which to
// iterate, based on hit coordinates and (dx,dy). This first step
AliMUONGeometryDirection
AliMUONSt345SlatSegmentationV2::GetDirection()
{
+// Not implemented
+
//AliWarning("Not Implemented");
return kDirUndefined;
}
//_____________________________________________________________________________
void
-AliMUONSt345SlatSegmentationV2::GetNParallelAndOffset(Int_t,Int_t,Int_t*,Int_t*)
+AliMUONSt345SlatSegmentationV2::GetNParallelAndOffset(Int_t /*iX*/, Int_t /*iY*/,
+ Int_t* /*Nparallel*/, Int_t* /*Offset*/)
{
+// Not implemented
+
AliFatal("Not Implemented");
}
//_____________________________________________________________________________
void
AliMUONSt345SlatSegmentationV2::GetPadC(Int_t ix, Int_t iy,
- Float_t& x, Float_t& y, Float_t& z)
-{
+ Float_t& x, Float_t& y, Float_t& z)
+{
+// Transform from pad to real coordinates
+
z = 0;
GetPadC(ix,iy,x,y);
}
//_____________________________________________________________________________
void
AliMUONSt345SlatSegmentationV2::GetPadC(Int_t ix, Int_t iy,
- Float_t& x, Float_t& y)
+ Float_t& x, Float_t& y)
{
+// Transform from pad to real coordinates
+
AliMpPad pad =
fSlatSegmentation->PadByIndices(AliMpIntPair(ix,iy),kTRUE);
x = pad.Position().X();
AliMUONSt345SlatSegmentationV2::GetPadI(Float_t x, Float_t y, Float_t /*z*/,
Int_t& ix, Int_t& iy)
{
+// Returns pad coordinates (ix,iy) for given real coordinates (x,y)
+
GetPadI(x,y,ix,iy);
}
//_____________________________________________________________________________
void
AliMUONSt345SlatSegmentationV2::GetPadI(Float_t x, Float_t y,
- Int_t& ix, Int_t& iy)
+ Int_t& ix, Int_t& iy)
{
+// Returns pad coordinates (ix,iy) for given real coordinates (x,y)
+
AliMpPad pad = fSlatSegmentation->PadByPosition(TVector2(x,y), kTRUE);
if ( pad != AliMpPad::Invalid() )
//_____________________________________________________________________________
void
-AliMUONSt345SlatSegmentationV2::GiveTestPoints(Int_t&,Float_t*,Float_t*) const
+AliMUONSt345SlatSegmentationV2::GiveTestPoints(Int_t& /*n*/,
+ Float_t* /*x*/, Float_t* /*y*/) const
{
+// Not implemented
+
AliFatal("Not Implemented");
}
Bool_t
AliMUONSt345SlatSegmentationV2::HasPad(Float_t x, Float_t y, Float_t z)
{
+// Returns true if a pad exists in the given position
+
Int_t ix, iy;
GetPadI(x,y,z,ix,iy);
return HasPad(ix,iy);
Bool_t
AliMUONSt345SlatSegmentationV2::HasPad(Int_t ix, Int_t iy)
{
+// Returns true if a pad with given indices exists
+
return fSlatSegmentation->HasPad(AliMpIntPair(ix,iy));
}
//_____________________________________________________________________________
void
-AliMUONSt345SlatSegmentationV2::IntegrationLimits(Float_t& x1, Float_t& x2,
- Float_t& y1, Float_t& y2)
+AliMUONSt345SlatSegmentationV2::IntegrationLimits(Float_t& x1, Float_t& x2,
+ Float_t& y1, Float_t& y2)
{
//
// Returns integration limits for current pad
Int_t
AliMUONSt345SlatSegmentationV2::Ix()
{
+// Current pad cursor during disintegration
+// x, y-coordinate
+
if ( fPadIterator )
{
return fPadIterator->CurrentItem().GetIndices().GetFirst();
Int_t
AliMUONSt345SlatSegmentationV2::Iy()
{
+// Current pad cursor during disintegration
+// x, y-coordinate
+
if ( fPadIterator )
{
return fPadIterator->CurrentItem().GetIndices().GetSecond();
//_____________________________________________________________________________
void
-AliMUONSt345SlatSegmentationV2::Neighbours(Int_t iX, Int_t iY, Int_t* Nlist,
- Int_t Xlist[10], Int_t Ylist[10])
+AliMUONSt345SlatSegmentationV2::Neighbours(Int_t iX, Int_t iY, Int_t* Nlist,
+ Int_t Xlist[10], Int_t Ylist[10])
{
// Find pad at (ix,iy) for which we'll search neighbours.
AliMpPad pad =
void
AliMUONSt345SlatSegmentationV2::NextPad()
{
+// Iterate over pads - stepper
+
if ( fPadIterator )
{
fPadIterator->Next();
Int_t
AliMUONSt345SlatSegmentationV2::Npx() const
{
+// Maximum number of Pads in x
+
return fSlatSegmentation->MaxPadIndexX()+1;
}
Int_t
AliMUONSt345SlatSegmentationV2::Npy() const
{
+// Maximum number of Pads in y
+
return fSlatSegmentation->MaxPadIndexY()+1;
}
//_____________________________________________________________________________
void
-AliMUONSt345SlatSegmentationV2::Print(Option_t*) const
+AliMUONSt345SlatSegmentationV2::Print(Option_t* /*opt*/) const
{
+// Printing
+
cout << "DetElemId=" << fDetElemId << " PlaneType="
<< fPlaneType << " Npx,Npy=" << Npx() << "," << Npy() << " fSlat=" << fSlat
<< " fSlatSegmentation=" << fSlatSegmentation
//_____________________________________________________________________________
Int_t
-AliMUONSt345SlatSegmentationV2::Sector(Int_t ix, Int_t)
+AliMUONSt345SlatSegmentationV2::Sector(Int_t ix, Int_t /*iy*/)
{
+// Calculate sector from pad coordinates
+
return fSlat->FindPCBIndex(ix);
}
Int_t
AliMUONSt345SlatSegmentationV2::Sector(Float_t x, Float_t y)
{
+// Calculate sector from pad coordinates
+
return fSlat->FindPCBIndex(x,y);
}
//_____________________________________________________________________________
void
-AliMUONSt345SlatSegmentationV2::SetCorrFunc(Int_t,TF1*)
+AliMUONSt345SlatSegmentationV2::SetCorrFunc(Int_t /*isec*/,TF1* /*func*/)
{
+// Not implemented
+
AliFatal("Not Implemented");
}
//_____________________________________________________________________________
void
-AliMUONSt345SlatSegmentationV2::SetDAnod(float)
+AliMUONSt345SlatSegmentationV2::SetDAnod(float /*d*/)
{
+// Not implemented
+
AliFatal("Not Implemented");
}
void
AliMUONSt345SlatSegmentationV2::SetHit(Float_t x, Float_t y, Float_t)
{
+// Set hit position
+// Sets virtual hit position, needed for evaluating pad response
+// outside the tracking program
+
fXhit = x;
fYhit = y;
if ( fXhit < -fSlat->DX() || fXhit > fSlat->DX() ||
fYhit < -fSlat->DY() || fYhit > fSlat->DY() )
{
- Double_t DX = - fSlat->DX() + TMath::Abs(fXhit);
- Double_t DY = - fSlat->DY() + TMath::Abs(fYhit);
- DX = ( DX > 0 ? DX : 0);
- DY = ( DY > 0 ? DY : 0);
+ Double_t dx = - fSlat->DX() + TMath::Abs(fXhit);
+ Double_t dy = - fSlat->DY() + TMath::Abs(fYhit);
+ dx = ( dx > 0 ? dx : 0);
+ dy = ( dy > 0 ? dy : 0);
AliWarning(Form("Hit outside slat %s limits (x,y)hit = (%e,%e). "
"Outside by (%e,%e) cm. Might be ok though.",
- fSlat->GetID(),fXhit,fYhit,DX,DY));
+ fSlat->GetID(),fXhit,fYhit,dx,dy));
}
}
void
AliMUONSt345SlatSegmentationV2::SetPad(Int_t ix, Int_t iy)
{
+// Set pad position.
+// Sets virtual pad coordinates, needed for evaluating pad response
+// outside the tracking program.
+
fCurrentPad =
fSlatSegmentation->PadByIndices(AliMpIntPair(ix,iy),kTRUE);
if ( !fCurrentPad.IsValid() )
//_____________________________________________________________________________
void
-AliMUONSt345SlatSegmentationV2::SetPadSize(float,float)
+AliMUONSt345SlatSegmentationV2::SetPadSize(float /*p1*/,float /*p2*/)
{
+// Not implemented
+
AliFatal("Not Implemented");
}
//_____________________________________________________________________________
Int_t
-AliMUONSt345SlatSegmentationV2::SigGenCond(Float_t,Float_t,Float_t)
+AliMUONSt345SlatSegmentationV2::SigGenCond(Float_t /*x*/, Float_t /*y*/, Float_t /*z*/)
{
+// Not implemented
+
AliFatal("Not Implemented");
return 0;
}
void
AliMUONSt345SlatSegmentationV2::SigGenInit(Float_t,Float_t,Float_t)
{
+// Not implemented
+
AliFatal("Not Implemented");
}
Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
void SigGenInit(Float_t x, Float_t y, Float_t z);
- void SetCorrFunc(Int_t, TF1*);
+ void SetCorrFunc(Int_t isec, TF1* func);
- TF1* CorrFunc(Int_t) const;
+ TF1* CorrFunc(Int_t isec) const;
- void SetPadSize(float,float);
+ void SetPadSize(float x,float y);
- void SetDAnod(float);
+ void SetDAnod(float d);
- void Init(int) {}
- void Draw(Option_t * = "");
+ void Init(int /*chamber*/) {}
+ void Draw(Option_t* opt = "");
Float_t Dpx() const;
Float_t Dpy() const;
- Float_t Dpx(int) const;
- Float_t Dpy(int) const;
+ Float_t Dpx(int ipcb) const;
+ Float_t Dpy(int ipcb) const;
Float_t GetAnod(Float_t xhit) const;
void SetPad(Int_t ix,Int_t iy);
/// Sets the current hit.
- void SetHit(Float_t x, Float_t y, Float_t z_is_not_used);
+ void SetHit(Float_t x, Float_t y, Float_t zIsNotUsed);
AliMUONGeometryDirection GetDirection();// { return kDirUndefined; }
private:
- Int_t fDetElemId;
- AliMpPlaneType fPlaneType;
- const AliMpSlat* fSlat;
- AliMpSlatSegmentation* fSlatSegmentation;
- AliMpVPadIterator* fPadIterator; //!
+ Int_t fDetElemId; // det element Id
+ AliMpPlaneType fPlaneType; // plane type
+ const AliMpSlat* fSlat; // slat
+ AliMpSlatSegmentation* fSlatSegmentation; // slat segmentation
+ AliMpVPadIterator* fPadIterator; //! pad iterator
AliMpPad fCurrentPad; //!FIXME: should not be needed, if we externalise the SetPad, SetHit, IntegrationLimits methods which have nothing to do here anyway, together with the iteration methods FirstPad, NextPad, MorePads, which have nothing to do here either.
- Float_t fXhit; //!
- Float_t fYhit; //!
+ Float_t fXhit; //! x-position of hit
+ Float_t fYhit; //! y-position of hit
ClassDef(AliMUONSt345SlatSegmentationV2,1)
};