X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONSegmentationSlatModule.cxx;h=7988c2cfab8a5904d9fffb51ec0411fd1eb89ce1;hb=7e6d7e077aa7b287c41f82db9696019fadeb1466;hp=ef63343ddd21cad86893a3d52819900c65b4cb41;hpb=f30dea327df25229d050aaa718cc054f17fa01c9;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONSegmentationSlatModule.cxx b/MUON/AliMUONSegmentationSlatModule.cxx index ef63343ddd2..7988c2cfab8 100644 --- a/MUON/AliMUONSegmentationSlatModule.cxx +++ b/MUON/AliMUONSegmentationSlatModule.cxx @@ -13,45 +13,72 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* -$Log$ -Revision 1.3 2000/10/22 16:56:32 morsch -- Store chamber number as slat id. - -Revision 1.2 2000/10/18 11:42:06 morsch -- AliMUONRawCluster contains z-position. -- Some clean-up of useless print statements during initialisations. - -Revision 1.1 2000/10/06 08:59:03 morsch -Segmentation classes for bending and non bending plane slat modules (A. de Falco, A. Morsch) - -*/ +/* $Id$ */ ///////////////////////////////////////////////////// // Segmentation classes for slat modules // // to be used with AluMUONSegmentationSlat // ///////////////////////////////////////////////////// +#include +#include #include "AliMUONSegmentationSlatModule.h" -#include -#include - -#include "AliMUONSegmentationV01.h" //___________________________________________ ClassImp(AliMUONSegmentationSlatModule) -AliMUONSegmentationSlatModule::AliMUONSegmentationSlatModule() +AliMUONSegmentationSlatModule::AliMUONSegmentationSlatModule() + : AliMUONSegmentationV0() { // Default constructor - fNsec=4; + fNDiv = 0; + fDpxD = 0; +} + +AliMUONSegmentationSlatModule::AliMUONSegmentationSlatModule(Int_t nsec) + : AliMUONSegmentationV0() +{ +// Non default constructor + fNsec = nsec; fNDiv = new TArrayI(fNsec); fDpxD = new TArrayF(fNsec); (*fNDiv)[0]=(*fNDiv)[1]=(*fNDiv)[2]=(*fNDiv)[3]=0; (*fDpxD)[0]=(*fDpxD)[1]=(*fDpxD)[2]=(*fDpxD)[3]=0; } +//---------------------------------------------------------------------- +AliMUONSegmentationSlatModule::AliMUONSegmentationSlatModule( + const AliMUONSegmentationSlatModule& rhs) + : AliMUONSegmentationV0(rhs) +{ +// Protected copy constructor + + Fatal("AliMUONSegmentationSlatModule", "Not implemented."); +} + + +AliMUONSegmentationSlatModule::~AliMUONSegmentationSlatModule() +{ +// Destructor + if (fNDiv) delete fNDiv; + if (fDpxD) delete fDpxD; +} + +//---------------------------------------------------------------------- +AliMUONSegmentationSlatModule& +AliMUONSegmentationSlatModule::operator=( + const AliMUONSegmentationSlatModule& rhs) +{ +// Protected assignement operator + + if (this == &rhs) return *this; + + Fatal("operator=", "Not implemented."); + + return *this; +} + void AliMUONSegmentationSlatModule::SetPcbBoards(Int_t n[4]) { // @@ -80,7 +107,7 @@ Float_t AliMUONSegmentationSlatModule::Dpx(Int_t isec) const } -Float_t AliMUONSegmentationSlatModule::Dpy(Int_t isec) const +Float_t AliMUONSegmentationSlatModule::Dpy(Int_t /*isec*/) const { // Return y-strip width @@ -136,7 +163,12 @@ GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y) x=y=0; } } - +//------------------------------------------------------------------------- +void AliMUONSegmentationSlatModule::GetPadI(Float_t x, Float_t y , Float_t /*z*/, Int_t &ix, Int_t &iy) +{ + GetPadI(x, y, ix, iy); +} +//------------------------------------------------------------------------- void AliMUONSegmentationSlatModule:: SetPad(Int_t ix, Int_t iy) { @@ -150,6 +182,8 @@ SetPad(Int_t ix, Int_t iy) void AliMUONSegmentationSlatModule:: SetHit(Float_t x, Float_t y) { +// Set current hit +// fXhit = x; fYhit = y; @@ -161,8 +195,12 @@ SetHit(Float_t x, Float_t y) } - - +//---------------------------------------------------------- +void AliMUONSegmentationSlatModule::SetHit(Float_t xhit, Float_t yhit, Float_t /*zhit*/) +{ + SetHit(xhit, yhit); +} +//---------------------------------------------------------- void AliMUONSegmentationSlatModule:: FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy) { @@ -183,7 +221,7 @@ FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy) if (y01 < 0) y01 = 0; if (x02 >= fCx[fNsec-1]) x02 = fCx[fNsec-1]; - if (y02 >= fDyPCB) y02 = fDyPCB; + Int_t isec=-1; @@ -194,6 +232,8 @@ FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy) break; } } + y02 += Dpy(isec); + if (y02 >= fDyPCB) y02 = fDyPCB; // // find the pads over which the charge distributes @@ -202,11 +242,12 @@ FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy) if (fIxmax > fNpx) fIxmax=fNpx; if (fIymax > fNpyS[isec]) fIymax = fNpyS[isec]; + fXmin=x01; - fXmax=x02; + fXmax=x02; fYmin=y01; - fYmax=y02; - + fYmax=y02; + // // Set current pad to lower left corner if (fIxmax < fIxmin) fIxmax=fIxmin; @@ -216,12 +257,19 @@ FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy) GetPadC(fIx,fIy,fX,fY); fSector=Sector(fIx,fIy); -// printf("\n \n First Pad: %d %d %f %f %d %d %d %f" , -// fIxmin, fIxmax, fXmin, fXmax, fNpx, fId, isec, Dpy(isec)); -// printf("\n \n First Pad: %d %d %f %f %d %d %d %f", -// fIymin, fIymax, fYmin, fYmax, fNpyS[isec], fId, isec, Dpy(isec)); +/* + printf("\n \n First Pad: %d %d %f %f %d %d %d %f" , + fIxmin, fIxmax, fXmin, fXmax, fNpx, fId, isec, Dpy(isec)); + printf("\n \n First Pad: %d %d %f %f %d %d %d %f", + fIymin, fIymax, fYmin, fYmax, fNpyS[isec], fId, isec, Dpy(isec)); +*/ } - +//---------------------------------------------------------------------- +void AliMUONSegmentationSlatModule::FirstPad(Float_t xhit, Float_t yhit, Float_t /*zhit*/, Float_t dx, Float_t dy) +{ + FirstPad(xhit, yhit, dx, dy); +} +//---------------------------------------------------------------------- void AliMUONSegmentationSlatModule::NextPad() { // Stepper for the iteration over pads @@ -248,10 +296,10 @@ void AliMUONSegmentationSlatModule::NextPad() Int_t AliMUONSegmentationSlatModule::MorePads() +{ // Stopping condition for the iterator over pads // // Are there more pads in the integration region -{ return (fIx != -1 || fIy != -1); } @@ -329,7 +377,6 @@ Neighbours(Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]) void AliMUONSegmentationSlatModule::Init(Int_t chamber) { - printf("\n Initialise Segmentation SlatModule \n"); // // Fill the arrays fCx (x-contour) and fNpxS (ix-contour) for each sector // These arrays help in converting from real to pad co-ordinates and @@ -339,6 +386,8 @@ void AliMUONSegmentationSlatModule::Init(Int_t chamber) // concentric circles as shown below // // PCB module size in cm + // printf("\n Initialise Segmentation SlatModule \n"); + fDxPCB=40; fDyPCB=40; // @@ -377,7 +426,6 @@ void AliMUONSegmentationSlatModule::Init(Int_t chamber) fNpx=fNpxS[3]; // fId = chamber; - }