class AliMUONSegmentationTrigger :
public AliMUONSegmentationV0 {
public:
- AliMUONSegmentationTrigger(){};
- virtual ~AliMUONSegmentationTrigger(){}
- virtual void Init(Int_t chamber); // Initialization
- Int_t ModuleNumber(Int_t imodule); // returns module number of ModuleId
- // Set pad position -> in SegRes X & Y
- // virtual void SetPad(Int_t, Int_t);
- // Set hit position
- virtual void SetHit(Float_t xhit, Float_t yhit);
- virtual void SetHit(Float_t xhit, Float_t yhit, Float_t zhit)
- {SetHit(xhit, yhit);}
-
- virtual void Draw(const char *opt="") {}
+ AliMUONSegmentationTrigger(){};
+ virtual ~AliMUONSegmentationTrigger(){}
+ virtual void Init(Int_t chamber); // Initialization
+ Int_t ModuleNumber(Int_t imodule); // returns module number of ModuleId
+ // Set pad position -> in SegRes X & Y
+ // virtual void SetPad(Int_t, Int_t);
+ // Set hit position
+ virtual void SetHit(Float_t xhit, Float_t yhit);
+ virtual void SetHit(Float_t xhit, Float_t yhit, Float_t zhit)
+ {SetHit(xhit, yhit);}
+
+ virtual void Draw(const char *opt="") const {}
- ClassDef(AliMUONSegmentationTrigger,1) //Segmentation class for trigger
- protected:
- Float_t StripSizeX(Int_t imodule);
- Float_t StripSizeY(Int_t imodule);
+
+ protected:
+ Float_t StripSizeX(Int_t imodule);
+ Float_t StripSizeY(Int_t imodule);
protected:
Float_t fYcmin[126]; // y min position of modules
Float_t fYcmax[126]; // y max position of modules
Float_t fZscale; // scaling factor (Zx/Z1, x=1,2,3,4)
-
+
// Current pad during integration (cursor for disintegration)
Int_t fIx; // pad coord. x
Int_t fIy; // pad coord. y
Float_t fYhit; // y-position of hit
Int_t fSector;// Segmentation Sector
+ ClassDef(AliMUONSegmentationTrigger,1) //Segmentation class for trigger
};
#endif
/*
$Log$
+Revision 1.6 2000/10/02 16:58:29 egangler
+Cleaning of the code :
+-> coding conventions
+-> void Streamers
+-> some useless includes removed or replaced by "class" statement
+
Revision 1.5 2000/07/03 11:54:57 morsch
AliMUONSegmentation and AliMUONHitMap have been replaced by AliSegmentation and AliHitMap in STEER
The methods GetPadIxy and GetPadXxy of AliMUONSegmentation have changed name to GetPadI and GetPadC.
}
//------------------------------------------------------------------
-void AliMUONSegmentationTriggerX::GetPadI(Float_t x,Float_t y,Int_t &ix,Int_t &iy){
+void AliMUONSegmentationTriggerX::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;
}
//------------------------------------------------------------------
-void AliMUONSegmentationTriggerX::GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y){
+void AliMUONSegmentationTriggerX::GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y)
+{
// Returns real coordinates (x,y) for given pad coordinates (ix,iy)
// ix = module number , iy = strip number; x,y = center of strip
x = 0.;
//------------------------------------------------------------------
void AliMUONSegmentationTriggerX::
-Neighbours(Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[2], Int_t Ylist[2]){
+Neighbours(Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[2], Int_t Ylist[2])
+{
// Returns list of next neighbours for given Pad (ix, iy)
Int_t absiX=TMath::Abs(iX);
}
//------------------------------------------------------------------
-Int_t AliMUONSegmentationTriggerX::ISector()
+Int_t AliMUONSegmentationTriggerX::ISector()
{ return fSector;}
//------------------------------------------------------------------
{ return fIx;}
//------------------------------------------------------------------
+
Int_t AliMUONSegmentationTriggerX::Iy()
{ return fIy;}
//------------------------------------------------------------------
-Float_t AliMUONSegmentationTriggerX::Dpx(Int_t isec)
+Float_t AliMUONSegmentationTriggerX::Dpx(Int_t isec) const
{
// returns x size of x strips for sector isec
}
//------------------------------------------------------------------
-Float_t AliMUONSegmentationTriggerX::Dpy(Int_t isec)
+Float_t AliMUONSegmentationTriggerX::Dpy(Int_t isec) const
{
// returns y size of x strips for sector isec
}
//------------------------------------------------------------------
-Int_t AliMUONSegmentationTriggerX::Sector(Int_t ix, Int_t iy)
+Int_t AliMUONSegmentationTriggerX::Sector(Int_t ix, Int_t iy)
{
// Returns sector number for given module
//
virtual ~AliMUONSegmentationTriggerX(){}
// Transform from pad to real coordinates
virtual void GetPadI(Float_t x, Float_t y, Int_t &ix, Int_t &iy);
- virtual void GetPadI(Float_t x, Float_t y, Float_t z, Int_t &ix, Int_t &iy)
+ virtual void GetPadI(Float_t x, Float_t y, Float_t z, Int_t &ix, Int_t &iy)
{GetPadI(x, y, ix, iy);}
// Transform from real to pad coordinates
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)
+ 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 Draw(const char *opt="") {}
+ virtual void Draw(const char *opt="") const {}
// Pad size Dx*Dy
virtual void SetPadSize(Float_t dp1, Float_t dp2);
// Strip size
- virtual Float_t Dpx(Int_t imodule);
- virtual Float_t Dpy(Int_t imodule);
+ virtual Float_t Dpx(Int_t imodule) const;
+ virtual Float_t Dpy(Int_t imodule) const;
// Set pad position
virtual void SetPad(Int_t ix, Int_t iy);
// Set hit position
/*
$Log$
+Revision 1.6 2000/10/02 16:58:29 egangler
+Cleaning of the code :
+-> coding conventions
+-> void Streamers
+-> some useless includes removed or replaced by "class" statement
+
Revision 1.5 2000/07/03 11:54:57 morsch
AliMUONSegmentation and AliMUONHitMap have been replaced by AliSegmentation and AliHitMap in STEER
The methods GetPadIxy and GetPadXxy of AliMUONSegmentation have changed name to GetPadI and GetPadC.
}
//------------------------------------------------------------------
-void AliMUONSegmentationTriggerY::GetPadI(Float_t x,Float_t y,Int_t &ix,Int_t &iy){
+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
}
//------------------------------------------------------------------
-void AliMUONSegmentationTriggerY::GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y){
+void AliMUONSegmentationTriggerY::GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y)
+{
// Returns real coordinates (x,y) for given pad coordinates (ix,iy)
// ix = module number , iy = strip number; x,y = center of strip
x = 0.;
//------------------------------------------------------------------
void AliMUONSegmentationTriggerY::
-Neighbours(Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[2], Int_t Ylist[2]){
+Neighbours(Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[2], Int_t Ylist[2])
+{
// Returns list of next neighbours for given Pad (ix, iy)
Int_t absiX=TMath::Abs(iX);
*Nlist = 0;
}
//------------------------------------------------------------------
-Int_t AliMUONSegmentationTriggerY::ISector()
+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)
+Float_t AliMUONSegmentationTriggerY::Dpx(Int_t isec) const
{
// returns x size of y strips for sector isec
if (isec==1) {
}
//------------------------------------------------------------------
-Float_t AliMUONSegmentationTriggerY::Dpy(Int_t isec)
+Float_t AliMUONSegmentationTriggerY::Dpy(Int_t isec) const
{
// returns y size of y strips for sector isec
if (isec==1) {
virtual ~AliMUONSegmentationTriggerY(){}
// Transform from pad to real coordinates
virtual void GetPadI(Float_t x,Float_t y,Int_t &ix,Int_t &iy);
- virtual void GetPadI(Float_t x, Float_t y, Float_t z, Int_t &ix, Int_t &iy)
+ virtual void GetPadI(Float_t x, Float_t y, Float_t z, Int_t &ix, Int_t &iy)
{GetPadI(x, y, ix, iy);}
// Transform from real to pad coordinates
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)
+ 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);}
// Pad size Dx*Dy
virtual void SetPadSize(Float_t dp1, Float_t dp2);
// Strip size by Module
- virtual Float_t Dpx(Int_t imodule);
- virtual Float_t Dpy(Int_t imodule);
+ virtual Float_t Dpx(Int_t imodule) const;
+ virtual Float_t Dpy(Int_t imodule) const;
// Set pad position
virtual void SetPad(Int_t ix, Int_t iy);
// Set hit position
**************************************************************************/
/*
$Log$
+Revision 1.6 2000/10/02 16:58:29 egangler
+Cleaning of the code :
+-> coding conventions
+-> void Streamers
+-> some useless includes removed or replaced by "class" statement
+
Revision 1.5 2000/07/13 16:19:44 fca
Mainly coding conventions + some small bug fixes
fRmin=iChamber->RInner();
fRmax=iChamber->ROuter();
fCorr=0;
-
}
-Float_t AliMUONSegmentationV0::GetAnod(Float_t xhit)
+Float_t AliMUONSegmentationV0::GetAnod(Float_t xhit) const
{
// Returns for a hit position xhit the position of the nearest anode wire
Float_t wire= (xhit>0)? Int_t(xhit/fWireD)+0.5:Int_t(xhit/fWireD)-0.5;
fDpx=p1;
fDpy=p2;
}
+
void AliMUONSegmentationV0::
- GetPadI(Float_t x, Float_t y, Int_t &ix, Int_t &iy)
+ GetPadI(Float_t x, Float_t y, Int_t &ix, Int_t &iy)
{
// Returns pad coordinates (ix,iy) for given real coordinates (x,y)
//
if (ix > fNpx) ix= fNpx;
if (ix < -fNpx) ix=-fNpx;
}
+
void AliMUONSegmentationV0::
-GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y)
+GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y)
{
// Returns real coordinates (x,y) for given pad coordinates (ix,iy)
//
GetPadI(x,y,fIxt,fIyt);
fIwt= (x>0) ? Int_t(x/fWireD)+1 : Int_t(x/fWireD)-1 ;
}
-
-Int_t AliMUONSegmentationV0::SigGenCond(Float_t x,Float_t y,Float_t z)
+
+Int_t AliMUONSegmentationV0::SigGenCond(Float_t x,Float_t y,Float_t z)
{
// Signal generation condition during stepping
// 0: don't generate signal
}
void AliMUONSegmentationV0::
-Neighbours(Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10])
+Neighbours(Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10])
{
// Returns list of next neighbours for given Pad (iX, iY)
//
}
-void AliMUONSegmentationV0::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y)
+void AliMUONSegmentationV0::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const
{
// Returns test point on the pad plane.
// Used during determination of the segmoid correction of the COG-method
y[0]=x[0];
}
-void AliMUONSegmentationV0::Draw(const char *)
+void AliMUONSegmentationV0::Draw(const char *) const
{
// Draws the segmentation zones
//
// Transform from pad (wire) to real coordinates and vice versa
//
// Anod wire coordinate closest to xhit
- virtual Float_t GetAnod(Float_t xhit);
+ virtual Float_t GetAnod(Float_t xhit) const;
// Transform from pad to real coordinates
- virtual void GetPadI(Float_t x, Float_t y , Int_t &ix, Int_t &iy);
- virtual void GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy)
+ virtual void GetPadI(Float_t x, Float_t y , Int_t &ix, Int_t &iy) ;
+ virtual void GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy)
{GetPadI(x, y, ix, iy);}
// Transform from real to pad coordinates
- 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)
+ 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);}
//
// Initialisation
Int_t *Nparallel, Int_t *Offset) {*Nparallel=1;*Offset=0;}
// Get next neighbours
virtual void Neighbours
- (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]);
+ (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]) ;
//
// Current Pad during Integration
// x-coordinaten
- virtual Int_t Ix() const {return fIx;}
+ virtual Int_t Ix() {return fIx;}
// y-coordinate
- virtual Int_t Iy() const {return fIy;}
+ virtual Int_t Iy() {return fIy;}
// current sector
virtual Int_t ISector() const {return 1;}
// calculate sector from pad coordinates
- virtual Int_t Sector(Int_t ix, Int_t iy) const {return 1;}
+ virtual Int_t Sector(Int_t ix, Int_t iy) {return 1;}
//
// Signal Generation Condition during Stepping
- virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
+ virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z) ;
// Initialise signal gneration at coord (x,y,z)
virtual void SigGenInit(Float_t x, Float_t y, Float_t z);
// Current integration limits
virtual void IntegrationLimits
(Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
// Test points for auto calibration
- virtual void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y);
+ virtual void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const;
// Draw segmentation zones
- virtual void Draw(const char *opt="");
+ virtual void Draw(const char *opt="") const;
// Function for systematic corrections
// Set the correction function
virtual void SetCorrFunc(Int_t dum, TF1* func) {fCorr=func;}
// Get the correction Function
- virtual TF1* CorrFunc(Int_t) {return fCorr;}
+ virtual TF1* CorrFunc(Int_t) const {return fCorr;}
// assignment operator
AliMUONSegmentationV0& operator=(const AliMUONSegmentationV0& rhs);
/*
$Log$
+Revision 1.7 2000/10/02 21:28:09 fca
+Removal of useless dependecies via forward declarations
+
Revision 1.6 2000/10/02 16:58:29 egangler
Cleaning of the code :
-> coding conventions
{
// Default constructor
fNsec=4;
- fRSec.Set(fNsec);
- fNDiv.Set(fNsec);
- fDpxD.Set(fNsec);
- fRSec[0]=fRSec[1]=fRSec[2]=fRSec[3]=0;
- fNDiv[0]=fNDiv[1]=fNDiv[2]=fNDiv[3]=0;
- fDpxD[0]=fDpxD[1]=fDpxD[2]=fDpxD[3]=0;
+ fRSec = new TArrayF(fNsec);
+ fNDiv = new TArrayI(fNsec);
+ fDpxD = new TArrayF(fNsec);
+ (*fRSec)[0]=(*fRSec)[1]=(*fRSec)[2]=(*fRSec)[3]=0;
+ (*fNDiv)[0]=(*fNDiv)[1]=(*fNDiv)[2]=(*fNDiv)[3]=0;
+ (*fDpxD)[0]=(*fDpxD)[1]=(*fDpxD)[2]=(*fDpxD)[3]=0;
fCorr = new TObjArray(3);
(*fCorr)[0]=0;
(*fCorr)[1]=0;
{
//
// Returns x-pad size for given sector isec
- return fDpxD.At(isec);
+ Float_t dpx = (*fDpxD)[isec];
+ return dpx;
}
Float_t AliMUONSegmentationV01::Dpy(Int_t isec) const
//
// Set the radii of the segmentation zones
for (Int_t i=0; i<4; i++) {
- fRSec[i]=r[i];
- printf("\n R %d %f \n",i,fRSec[i]);
+ (*fRSec)[i]=r[i];
+ printf("\n R %d %f \n",i,(*fRSec)[i]);
}
}
// fDpx
//
for (Int_t i=0; i<4; i++) {
- fNDiv[i]=ndiv[i];
- printf("\n Ndiv %d %d \n",i,fNDiv[i]);
+ (*fNDiv)[i]=ndiv[i];
+ printf("\n Ndiv %d %d \n",i,(*fNDiv)[i]);
}
ndiv[0]=ndiv[1];
}
//
Int_t isec;
printf("\n Initialise segmentation v01 -- test !!!!!!!!!!!!!! \n");
- fNpy=Int_t(fRSec[fNsec-1]/fDpy)+1;
+ fNpy=Int_t((*fRSec)[fNsec-1]/fDpy)+1;
- fDpxD[fNsec-1]=fDpx;
+ (*fDpxD)[fNsec-1]=fDpx;
if (fNsec > 1) {
for (Int_t i=fNsec-2; i>=0; i--){
- fDpxD[i]=fDpxD[fNsec-1]/fNDiv[i];
- printf("\n test ---dx %d %f \n",i,fDpxD[i]);
+ (*fDpxD)[i]=(*fDpxD)[fNsec-1]/(*fNDiv)[i];
+ printf("\n test ---dx %d %f \n",i,(*fDpxD)[i]);
}
}
//
for (Int_t iy=1; iy<=fNpy; iy++) {
//
Float_t x=iy*fDpy-fDpy/2;
- if (x > fRSec[isec]) {
+ if (x > (*fRSec)[isec]) {
fNpxS[isec][iy]=0;
fCx[isec][iy]=0;
} else {
- ry=TMath::Sqrt(fRSec[isec]*fRSec[isec]-x*x);
+ ry=TMath::Sqrt((*fRSec)[isec]*(*fRSec)[isec]-x*x);
if (isec > 1) {
- dnx= Int_t((ry-fCx[isec-1][iy])/fDpxD[isec]);
+ dnx= Int_t((ry-fCx[isec-1][iy])/(*fDpxD)[isec]);
if (isec < fNsec-1) {
if (TMath::Odd((Long_t)dnx)) dnx++;
}
fNpxS[isec][iy]=fNpxS[isec-1][iy]+dnx;
- fCx[isec][iy]=fCx[isec-1][iy]+dnx*fDpxD[isec];
+ fCx[isec][iy]=fCx[isec-1][iy]+dnx*(*fDpxD)[isec];
} else if (isec == 1) {
- dnx= Int_t((ry-fCx[isec-1][iy])/fDpxD[isec]);
+ dnx= Int_t((ry-fCx[isec-1][iy])/(*fDpxD)[isec]);
fNpxS[isec][iy]=fNpxS[isec-1][iy]+dnx;
add=4 - (fNpxS[isec][iy])%4;
if (add < 4) fNpxS[isec][iy]+=add;
dnx=fNpxS[isec][iy]-fNpxS[isec-1][iy];
- fCx[isec][iy]=fCx[isec-1][iy]+dnx*fDpxD[isec];
+ fCx[isec][iy]=fCx[isec-1][iy]+dnx*(*fDpxD)[isec];
} else {
- dnx=Int_t(ry/fDpxD[isec]);
+ dnx=Int_t(ry/(*fDpxD)[isec]);
fNpxS[isec][iy]=dnx;
- fCx[isec][iy]=dnx*fDpxD[isec];
+ fCx[isec][iy]=dnx*(*fDpxD)[isec];
}
}
} // y-pad loop
}
}
if (isec>0) {
- ix= Int_t((absx-fCx[isec-1][absiy])/fDpxD[isec])
+ ix= Int_t((absx-fCx[isec-1][absiy])/(*fDpxD)[isec])
+fNpxS[isec-1][absiy]+1;
} else if (isec == 0) {
- ix= Int_t(absx/fDpxD[isec])+1;
+ ix= Int_t(absx/(*fDpxD)[isec])+1;
} else {
ix=fNpxS[fNsec-1][absiy]+1;
}
Int_t absix=TMath::Abs(ix);
Int_t absiy=TMath::Abs(iy);
if (isec) {
- x=fCx[isec-1][absiy]+(absix-fNpxS[isec-1][absiy])*fDpxD[isec];
- x=(ix>0) ? x-fDpxD[isec]/2 : -x+fDpxD[isec]/2;
+ x=fCx[isec-1][absiy]+(absix-fNpxS[isec-1][absiy])*(*fDpxD)[isec];
+ x=(ix>0) ? x-(*fDpxD)[isec]/2 : -x+(*fDpxD)[isec]/2;
} else {
x=y=0;
}
Float_t y02=yhit + dy;
//
// find the pads over which the charge distributes
+
GetPadI(x01,y01,fIxmin,fIymin);
GetPadI(x02,y02,fIxmax,fIymax);
fXmin=x01;
Int_t iyc;
// step from left to right
+
if (fX < fXmax && fX != 0) {
if (fIx==-1) fIx++;
fIx++;
*Nlist=i;
}
-void AliMUONSegmentationV01::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y)
+void AliMUONSegmentationV01::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const
{
// Returns test point on the pad plane.
// Used during determination of the segmoid correction of the COG-method
n=3;
- x[0]=(fRSec[0]+fRSec[1])/2/TMath::Sqrt(2.);
+ x[0]=((*fRSec)[0]+(*fRSec)[1])/2/TMath::Sqrt(2.);
y[0]=x[0];
- x[1]=(fRSec[1]+fRSec[2])/2/TMath::Sqrt(2.);
+ x[1]=((*fRSec)[1]+(*fRSec)[2])/2/TMath::Sqrt(2.);
y[1]=x[1];
- x[2]=(fRSec[2]+fRSec[3])/2/TMath::Sqrt(2.);
+ x[2]=((*fRSec)[2]+(*fRSec)[3])/2/TMath::Sqrt(2.);
y[2]=x[2];
}
-void AliMUONSegmentationV01::Draw(const char *)
+void AliMUONSegmentationV01::Draw(const char *) const
{
// Draws the segmentation zones
//
(*fCorr)[isec]=func;
}
-TF1* AliMUONSegmentationV01::CorrFunc(Int_t isec)
+TF1* AliMUONSegmentationV01::CorrFunc(Int_t isec) const
{
return (TF1*) (*fCorr)[isec];
}
//
// Transform from pad to real coordinates
virtual void GetPadI(Float_t x ,Float_t y ,Int_t &ix,Int_t &iy);
- virtual void GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy)
+ virtual void GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy)
{GetPadI(x, y, ix, iy);}
// Transform from real to pad coordinates
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)
+ 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);}
//
// Initialisation
virtual void IntegrationLimits
(Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
// Test points for auto calibration
- void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y);
+ void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const;
//
// Draw segmentation zones
- virtual void Draw(const char *opt="");
+ virtual void Draw(const char *opt="") const;
// Function for systematic corrections
// Set the correction function
virtual void SetCorrFunc(Int_t dum, TF1* func);
// Get the correction function
- virtual TF1* CorrFunc(Int_t iZone);
+ virtual TF1* CorrFunc(Int_t iZone) const;
// assignment operator
AliMUONSegmentationV01& operator=(const AliMUONSegmentationV01& rhs);
ClassDef(AliMUONSegmentationV01,1) // Segmentation approximating circular zones with different pad size
protected:
// Geometry
//
- Int_t fNsec; // Number of sectors
- TArrayF fRSec; // Sector outer radia
- TArrayI fNDiv; // Pad size division
- TArrayF fDpxD; // y pad width per sector
+ Int_t fNsec; // Number of sectors
+ TArrayF* fRSec; // Sector outer radia
+ TArrayI* fNDiv; // Pad size division
+ TArrayF* fDpxD; // y pad width per sector
// Segmentation map
Int_t fNpxS[10][1000]; // Number of pads per sector in x
Float_t fCx[10][1000]; // pad-sector contour x vs y
/*
$Log$
+Revision 1.4 2000/10/02 16:58:29 egangler
+Cleaning of the code :
+-> coding conventions
+-> void Streamers
+-> some useless includes removed or replaced by "class" statement
+
Revision 1.3 2000/07/03 11:54:57 morsch
AliMUONSegmentation and AliMUONHitMap have been replaced by AliSegmentation and AliHitMap in STEER
The methods GetPadIxy and GetPadXxy of AliMUONSegmentation have changed name to GetPadI and GetPadC.
fDpx=p2;
}
-Int_t AliMUONSegmentationV02::Npx()
+Int_t AliMUONSegmentationV02::Npx() const
// Returns maximum number if pads in x
{return AliMUONSegmentationV01::Npy();}
-Int_t AliMUONSegmentationV02::Npy()
+Int_t AliMUONSegmentationV02::Npy() const
// Returns maximum number if pads in y
{return AliMUONSegmentationV01::Npx();}
-Float_t AliMUONSegmentationV02::Dpx(Int_t isec)
+Float_t AliMUONSegmentationV02::Dpx(Int_t isec) const
// Returns pad-size in x
{return fDpy;}
-Float_t AliMUONSegmentationV02::Dpy(Int_t isec)
+Float_t AliMUONSegmentationV02::Dpy(Int_t isec) const
// Returns pad-size in y
-{return fDpxD[isec];}
-Int_t AliMUONSegmentationV02::Sector(Int_t ix, Int_t iy)
+{return (*fDpxD)[isec];}
+
+Int_t AliMUONSegmentationV02::Sector(Int_t ix, Int_t iy)
// Returns sector number for given pad position
//
{return AliMUONSegmentationV01::Sector(iy, ix);}
void AliMUONSegmentationV02::
-
-GetPadI(Float_t x, Float_t y, Int_t &ix, Int_t &iy)
+GetPadI(Float_t x, Float_t y, Int_t &ix, Int_t &iy)
// Returns pad coordinates (ix,iy) for given real coordinates (x,y)
//
{
-AliMUONSegmentationV01::GetPadI(y, x, iy, ix);
+AliMUONSegmentationV01::GetPadI(y, x, iy, ix);
// printf("\n x,y,ix,iy %f %f %d %d", x,y,ix,iy);
}
void AliMUONSegmentationV02::
-GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y)
+GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y)
// Returns real coordinates (x,y) for given pad coordinates (ix,iy)
//
{
}
void AliMUONSegmentationV02::
-Neighbours(Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10])
+Neighbours(Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10])
{
// Returns list of next neighbours for given Pad (iX, iY)
//
//
// Get member data
// Pad size in x
- virtual Float_t Dpx() {return fDpy;}
+ virtual Float_t Dpx() const {return fDpy;}
// Pad size in y
- virtual Float_t Dpy() {return fDpx;}
+ virtual Float_t Dpy() const {return fDpx;}
// Pad size in x by Sector
- virtual Float_t Dpx(Int_t isec);
+ virtual Float_t Dpx(Int_t isec) const;
// Pad size in y by Sector
- virtual Float_t Dpy(Int_t isec);
+ virtual Float_t Dpy(Int_t isec) const;
// Max number of Pads in x
- virtual Int_t Npx();
+ virtual Int_t Npx() const;
// max number of Pads in y
- virtual Int_t Npy();
+ virtual Int_t Npy() const;
// calculate sector from pad coordinates
virtual Int_t Sector(Int_t ix, Int_t iy);
- virtual void Draw(const char *opt="") {}
+ virtual void Draw(const char *opt="") const {}
//
// Transform from pad (wire) to real coordinates and vice versa
// Transform from pad to real coordinates
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)
+ 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);}
// Transform from pad to real coordinates
virtual void GetPadI(Float_t x ,Float_t y , Int_t &ix, Int_t &iy);
- virtual void GetPad(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy)
+ virtual void GetPad(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy)
{GetPadI(x, y, ix, iy);}
// Set pad position
virtual void SetPad(Int_t ix,Int_t iy);
/*
$Log$
+Revision 1.3 2000/06/29 12:34:09 morsch
+AliMUONSegmentation class has been made independent of AliMUONChamber. This makes
+it usable with any other geometry class. The link to the object to which it belongs is
+established via an index. This assumes that there exists a global geometry manager
+from which the pointer to the parent object can be obtained (in our case gAlice).
+
Revision 1.2 2000/06/15 07:58:48 morsch
Code from MUON-dev joined
fDpxD[fNsec-1]=fDpx;
if (fNsec > 1) {
for (Int_t i=fNsec-2; i>=0; i--){
- fDpxD[i]=fDpxD[fNsec-1]/fNDiv[i];
- printf("\n test ---dx %d %f \n",i,fDpxD[i]);
+ (*fDpxD)[i]=(*fDpxD)[fNsec-1]/(*fNDiv)[i];
+ printf("\n test ---dx %d %f \n",i,(*fDpxD)[i]);
}
}
//
// Loop over sectors (isec=0 is the dead space surounding the beam pipe)
for (Int_t isec=0; isec<4; isec++) {
if (isec==0) {
- fNpxS[0][iy]=kpcb[irow][0]*Int_t(kDxPCB/fDpxD[0]);
+ fNpxS[0][iy]=kpcb[irow][0]*Int_t(kDxPCB/(*fDpxD)[0]);
fCx[0][iy]=kpcb[irow][0]*kDxPCB;
} else {
fNpxS[isec][iy]=fNpxS[isec-1][iy]
- +kpcb[irow][isec]*Int_t(kDxPCB/fDpxD[isec]);
+ +kpcb[irow][isec]*Int_t(kDxPCB/(*fDpxD)[isec]);
fCx[isec][iy]=fCx[isec-1][iy]
+kpcb[irow][isec]*kDxPCB;
} // PCB rows
}
-void AliMUONSegmentationV04::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y)
+void AliMUONSegmentationV04::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const
{
// Returns test point on the pad plane.
// Used during determination of the segmoid correction of the COG-method
// Initialisation
virtual void Init(Int_t chamber);
// Test points for auto calibration
- void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y);
+ void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const;
ClassDef(AliMUONSegmentationV04,1) // Segmentation zones are rectangular modules
};
+
/*
$Log$
+Revision 1.3 2000/06/29 12:34:09 morsch
+AliMUONSegmentation class has been made independent of AliMUONChamber. This makes
+it usable with any other geometry class. The link to the object to which it belongs is
+established via an index. This assumes that there exists a global geometry manager
+from which the pointer to the parent object can be obtained (in our case gAlice).
+
Revision 1.2 2000/06/15 07:58:48 morsch
Code from MUON-dev joined
fNpy=7*nPyPCB;
//
// Calculate padsize along x
- fDpxD[fNsec-1]=fDpx;
+ (*fDpxD)[fNsec-1]=fDpx;
if (fNsec > 1) {
for (Int_t i=fNsec-2; i>=0; i--){
- fDpxD[i]=fDpxD[fNsec-1]/fNDiv[i];
- printf("\n test ---dx %d %f \n",i,fDpxD[i]);
+ (*fDpxD)[i]=(*fDpxD)[fNsec-1]/(*fNDiv)[i];
+ printf("\n test ---dx %d %f \n",i,(*fDpxD)[i]);
}
}
//
// Loop over sectors (isec=0 is the dead space surounding the beam pipe)
for (Int_t isec=0; isec<4; isec++) {
if (isec==0) {
- fNpxS[0][iy]=kpcb[irow][0]*Int_t(kDxPCB/fDpxD[0]);
+ fNpxS[0][iy]=kpcb[irow][0]*Int_t(kDxPCB/(*fDpxD)[0]);
fCx[0][iy]=kpcb[irow][0]*kDxPCB;
} else {
fNpxS[isec][iy]=fNpxS[isec-1][iy]
- +kpcb[irow][isec]*Int_t(kDxPCB/fDpxD[isec]);
+ +kpcb[irow][isec]*Int_t(kDxPCB/(*fDpxD)[isec]);
fCx[isec][iy]=fCx[isec-1][iy]
+kpcb[irow][isec]*kDxPCB;
*/
}
-void AliMUONSegmentationV05::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y)
+void AliMUONSegmentationV05::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const
{
// Returns test point on the pad plane.
// Used during determination of the segmoid correction of the COG-method
// Initialisation
virtual void Init(Int_t chamber);
// Test points for auto calibration
- void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y);
+ void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const;
ClassDef(AliMUONSegmentationV05,1)// Segmentation zones are rectangular modules
};
#endif
/*
$Log$
+Revision 1.5 2000/10/02 16:58:29 egangler
+Cleaning of the code :
+-> coding conventions
+-> void Streamers
+-> some useless includes removed or replaced by "class" statement
+
Revision 1.4 2000/07/03 11:54:57 morsch
AliMUONSegmentation and AliMUONHitMap have been replaced by AliSegmentation and AliHitMap in STEER
The methods GetPadIxy and GetPadXxy of AliMUONSegmentation have changed name to GetPadI and GetPadC.
return (xhit>0) ? kwire : -kwire ;
}
-Float_t AliMUONSegmentationV1::GetAnod(Float_t xhit)
+Float_t AliMUONSegmentationV1::GetAnod(Float_t xhit) const
{
// Get anode position
Int_t kwire=Int_t((TMath::Abs(xhit)-fSensOffset)/fDAnod)+1; // to be compatible ...
return -1;
}
-Int_t AliMUONSegmentationV1::Ix()
+Int_t AliMUONSegmentationV1::Ix()
{
// returns the X number of pad which has to increment charge
// due to parallel read-out
-return Ix(fIx,fIy);
+ return Ix(fIx,fIy);
}
-Int_t AliMUONSegmentationV1::ISector()
+Int_t AliMUONSegmentationV1::ISector()
{
// This function is of no use for this kind of segmentation.
return GetZone(fIx,fIy);
}
-void AliMUONSegmentationV1::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y)
+void AliMUONSegmentationV1::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const
{
// Return a test point
n=1;
// Transform from pad (wire) to real coordinates and vice versa
virtual Int_t GetiAnod(Float_t xhit);
// Anod wire coordinate closest to xhit
- virtual Float_t GetAnod(Float_t xhit);
+ virtual Float_t GetAnod(Float_t xhit) const;
// Transform from pad to real coordinates
virtual void GetPadI(Float_t x ,Float_t y , Int_t &ix, Int_t &iy);
virtual void GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy)
virtual Int_t Ix(Int_t trueX, Int_t trueY);
virtual Int_t Ix();
// y-coordinate
- virtual Int_t Iy(){return fIy;}
+ virtual Int_t Iy() {return fIy;}
// current sector
virtual Int_t ISector();
// calculate sector from pad coordinates
// Initialise signal generation at coord (x,y,z)
void SigGenInit(Float_t x, Float_t y, Float_t z);
// Test points for auto calibration
- void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y);
+ void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const;
// Current integration limits
virtual void IntegrationLimits
(Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
// Draw the segmentation zones
- virtual void Draw(const char * = ""){}
+ virtual void Draw(const char * = "") const {}
// Function for systematic corrections
// Set the correction function
virtual void SetCorrFunc(Int_t dum, TF1* func) {fCorr=func;}
// Get the correction function
- virtual TF1* CorrFunc(Int_t) {return fCorr;}
+ virtual TF1* CorrFunc(Int_t) const {return fCorr;}
//
AliMUONSegmentationV1& operator=(const AliMUONSegmentationV1& rhs);
ClassDef(AliMUONSegmentationV1,1) // Implementation of the Lyon type chamber segmentation with parallel read-out