/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ /* $Id$ */ #include #include "AliMUONSegmentationTriggerY.h" #include "AliMUONTriggerConstants.h" #include "AliMUON.h" #include "AliRun.h" #include "AliLog.h" ClassImp(AliMUONSegmentationTriggerY) //------------------------------------------------------------------ AliMUONSegmentationTriggerY::AliMUONSegmentationTriggerY() : AliMUONSegmentationTrigger() { // Constructor } //------------------------------------------------------------------ void AliMUONSegmentationTriggerY::Init(Int_t chamber) { // intialize Y segmentation AliDebug(2,"Initialize Trigger Chamber Geometry Y"); AliMUONSegmentationTrigger::Init(chamber); // calculate x & y position of Y strips Int_t nModule=AliMUONTriggerConstants::Nmodule(); for (Int_t imodule=0; imodule7) { fXofysmin[imodule][istrip]= ( AliMUONTriggerConstants::XcMin(imodule)+ (width*2.)*8 + width*(istrip-8) )*fZscale; fXofysmax[imodule][istrip]= ( AliMUONTriggerConstants::XcMin(imodule)+ (width*2.)*8 + width*(istrip-7) )*fZscale; } else { fXofysmin[imodule][istrip]= (AliMUONTriggerConstants::XcMin(imodule) +width*(istrip))*fZscale; fXofysmax[imodule][istrip]= (AliMUONTriggerConstants::XcMin(imodule) +width*(istrip+1))*fZscale; } } else { fXofysmin[imodule][istrip]=-1.*fXofysmax[imodule-63][istrip]; fXofysmax[imodule][istrip]=-1.*fXofysmin[imodule-63][istrip]; } fYofysmin[imodule][istrip] = fYcmin[imodule]*fZscale; fYofysmax[imodule][istrip] = fYcmax[imodule]*fZscale; } } /* if (TMath::Abs(AliMUONTriggerConstants::ModuleId(imodule))==11) { printf("module Id istrip fXofxsmin fXofxsmax fYofxsmin fYofxsmax %d %d %f %f %f %f \n", AliMUONTriggerConstants::ModuleId(imodule), istrip, fXofysmin[imodule][istrip], fXofysmax[imodule][istrip], fYofysmin[imodule][istrip], fYofysmax[imodule][istrip]); } */ } //------------------------------------------------------------------ void AliMUONSegmentationTriggerY::GetPadI(Float_t x,Float_t y,Int_t &ix,Int_t &iy) { // Returns pad coordinates (ix,iy) for given real coordinates (x,y) // x,y = real coordinates; ix = module number , iy = strip number ix = 0; iy = 0; Int_t nModule=AliMUONTriggerConstants::Nmodule(); for (Int_t imodule=0; imodulefXofysmin[imodule][istrip]&&xfYofysmin[imodule][istrip]&&y=0 ) { // strip in same module Xlist[j] = absiX; Ylist[j] = iCandidateLeft; } else if ( iNewCandidateLeft !=0) { Xlist[j] = absiX-1; Ylist[j] = iNewCandidateLeft; iNewCandidateLeft--; } } if (iX<0) { // left side of chamber for (Int_t i=0; i<10; i++) { if (Xlist[i]!=0) Xlist[i]=-Xlist[i]; } } } // iY < nStrip } //------------------------------------------------------------------ void AliMUONSegmentationTriggerY::SetPad(Int_t ix, Int_t iy) { // Sets virtual pad coordinates, needed for evaluating pad response // outside the tracking program GetPadC(ix,iy,fX,fY); GetPadI(fX,fY,fIx,fIy); fSector=Sector(ix,iy); } //------------------------------------------------------------------ Int_t AliMUONSegmentationTriggerY::ISector() { return fSector;} //------------------------------------------------------------------ Int_t AliMUONSegmentationTriggerY::Ix() { return fIx;} //------------------------------------------------------------------ Int_t AliMUONSegmentationTriggerY::Iy() { return fIy;} //------------------------------------------------------------------ Float_t AliMUONSegmentationTriggerY::Dpx(Int_t isec) const { // returns x size of y strips for sector isec if (isec==1) { return AliMUONTriggerConstants::StripWidth(1)*fZscale; } else if (isec==2) { return AliMUONTriggerConstants::StripWidth(1)*fZscale; } else if (isec==3) { return AliMUONTriggerConstants::StripWidth(1)*fZscale; } else if (isec==4) { return AliMUONTriggerConstants::StripWidth(2)*fZscale; } else { return 0.; } } //------------------------------------------------------------------ Float_t AliMUONSegmentationTriggerY::Dpy(Int_t isec) const { // returns y size of y strips for sector isec if (isec==1) { return AliMUONTriggerConstants::StripLength(3)*fZscale; } else if (isec==2) { return AliMUONTriggerConstants::StripLength(2)*fZscale; } else if (isec==3) { return AliMUONTriggerConstants::StripLength(3)*fZscale; } else if (isec==4) { return AliMUONTriggerConstants::StripLength(3)*fZscale; } else if (isec==5) { return AliMUONTriggerConstants::StripLength(3)*fZscale; } else { return 0.; } } //------------------------------------------------------------------ void AliMUONSegmentationTriggerY::GetPadI(Float_t x, Float_t y, Float_t /*z*/, Int_t &ix, Int_t &iy) { GetPadI(x, y, ix, iy); } //------------------------------------------------------------------ void AliMUONSegmentationTriggerY::SetHit(Float_t xhit, Float_t yhit) { // set hits during diintegration AliMUONSegmentationTrigger::SetHit(xhit,yhit); } //------------------------------------------------------------------ void AliMUONSegmentationTriggerY::SetHit(Float_t xhit, Float_t yhit, Float_t /*zhit*/) { SetHit(xhit, yhit); } //------------------------------------------------------------------ Int_t AliMUONSegmentationTriggerY::Sector(Int_t ix, Int_t iy) { // Returns sector number for given module // Int_t absix=TMath::Abs(ix); Int_t iwidth=Int_t(StripSizeY(absix,iy)); if (absix==52) { return 1; } else if (absix==41||absix==61) { return 2; } else if (iwidth==2) { return 3; } else if (iwidth==4) { return 4; } else { return 0; } } //------------------------------------------------------------------ void AliMUONSegmentationTriggerY:: IntegrationLimits(Float_t& x1, Float_t& x2, Float_t& x3, Float_t& x4) { // returns quantities needed to evaluate neighbour strip response Int_t ix,iy; Float_t xstrip,ystrip; GetPadI(fXhit,fYhit,ix,iy); GetPadC(ix,iy,xstrip,ystrip); x1=fXhit; // hit x position x2=xstrip; // x coordinate of the main strip x3=fX; // current strip real x coordinate // width=StripSizeY(ix); // width of the main strip // find the position of the 2 borders of the current strip Float_t xmin = fXofysmin[ModuleNumber(fIx)][fIy]; Float_t xmax = fXofysmax[ModuleNumber(fIx)][fIy]; // dist. between the hit and the closest border of the current strip x4 = (TMath::Abs(xmax-x1) > TMath::Abs(xmin-x1)) ? TMath::Abs(xmin-x1):TMath::Abs(xmax-x1); }