From 3cedc6c8f3ed540d2c281265428fd9e21856a8af Mon Sep 17 00:00:00 2001 From: morsch Date: Thu, 15 Jun 2000 08:02:43 +0000 Subject: [PATCH 1/1] Obsolete files replaced by AliMUONSegmentation* and AliMUONResponse* --- MUON/AliMUONSegResV0.cxx | 294 ----------------------- MUON/AliMUONSegResV01.cxx | 486 -------------------------------------- MUON/AliMUONSegResV01.h | 111 --------- MUON/AliMUONSegResV1.h | 165 ------------- 4 files changed, 1056 deletions(-) delete mode 100644 MUON/AliMUONSegResV0.cxx delete mode 100644 MUON/AliMUONSegResV01.cxx delete mode 100644 MUON/AliMUONSegResV01.h delete mode 100644 MUON/AliMUONSegResV1.h diff --git a/MUON/AliMUONSegResV0.cxx b/MUON/AliMUONSegResV0.cxx deleted file mode 100644 index bdc0110efc9..00000000000 --- a/MUON/AliMUONSegResV0.cxx +++ /dev/null @@ -1,294 +0,0 @@ -/************************************************************************** - * 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. * - **************************************************************************/ - -/* -$Log$ -Revision 1.3 1999/09/29 09:24:23 fca -Introduction of the Copyright and cvs Log - -*/ - -#include "AliMUONSegResV0.h" -#include "TMath.h" -#include "TRandom.h" -#include "TArc.h" -#include "AliMUONchamber.h" -ClassImp(AliMUONsegmentationV0) - void AliMUONsegmentationV0::Init(AliMUONchamber* Chamber) -{ - fNpx=(Int_t) (Chamber->ROuter()/fDpx+1); - fNpy=(Int_t) (Chamber->ROuter()/fDpy+1); - fRmin=Chamber->RInner(); - fRmax=Chamber->ROuter(); - fCorr=0; - -} - - -Float_t AliMUONsegmentationV0::GetAnod(Float_t xhit) -{ - Float_t wire= (xhit>0)? Int_t(xhit/fWireD)+0.5:Int_t(xhit/fWireD)-0.5; - return fWireD*wire; -} - -void AliMUONsegmentationV0::SetPADSIZ(Float_t p1, Float_t p2) -{ - fDpx=p1; - fDpy=p2; -} -void AliMUONsegmentationV0:: - GetPadIxy(Float_t x, Float_t y, Int_t &ix, Int_t &iy) -{ -// returns pad coordinates (ix,iy) for given real coordinates (x,y) -// - ix = (x>0)? Int_t(x/fDpx)+1 : Int_t(x/fDpx)-1; - iy = (y>0)? Int_t(y/fDpy)+1 : Int_t(y/fDpy)-1; - if (iy > fNpy) iy= fNpy; - if (iy < -fNpy) iy=-fNpy; - if (ix > fNpx) ix= fNpx; - if (ix < -fNpx) ix=-fNpx; -} -void AliMUONsegmentationV0:: -GetPadCxy(Int_t ix, Int_t iy, Float_t &x, Float_t &y) -{ -// returns real coordinates (x,y) for given pad coordinates (ix,iy) -// - x = (ix>0) ? Float_t(ix*fDpx)-fDpx/2. : Float_t(ix*fDpx)+fDpx/2.; - y = (iy>0) ? Float_t(iy*fDpy)-fDpy/2. : Float_t(iy*fDpy)+fDpy/2.; -} - -void AliMUONsegmentationV0:: -SetHit(Float_t xhit, Float_t yhit) -{ - // - // Find the wire position (center of charge distribution) -// Float_t x0a=GetAnod(xhit); - fxhit=xhit; - fyhit=yhit; -} - -void AliMUONsegmentationV0:: -SetPad(Int_t ix, Int_t iy) -{ - GetPadCxy(ix,iy,fx,fy); -} - -void AliMUONsegmentationV0:: -FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy) -{ - // - // Find the wire position (center of charge distribution) - Float_t x0a=GetAnod(xhit); - fxhit=x0a; - fyhit=yhit; - // - // and take fNsigma*sigma around this center - Float_t x01=x0a - dx; - Float_t x02=x0a + dx; - Float_t y01=yhit - dy; - Float_t y02=yhit + dy; - // - // find the pads over which the charge distributes - GetPadIxy(x01,y01,fixmin,fiymin); - GetPadIxy(x02,y02,fixmax,fiymax); -// printf("\n %f %f %d %d \n",x02,y02,fixmax,fiymax); -// printf("\n FirstPad called %f %f \n", fDpx, fDpy); -// printf("\n Hit Position %f %f \n",xhit,yhit); -// printf("\n Integration limits: %i %i %i %i",fixmin,fixmax,fiymin,fiymax); -// printf("\n Integration limits: %f %f %f %f \n",x01,x02,y01,y02); - // - // Set current pad to lower left corner - fix=fixmin; - fiy=fiymin; - GetPadCxy(fix,fiy,fx,fy); -} - -void AliMUONsegmentationV0::NextPad() -{ - // - // Step to next pad in integration region - if (fix != fixmax) { - if (fix==-1) fix++; - fix++; - } else if (fiy != fiymax) { - fix=fixmin; - if (fiy==-1) fiy++; - fiy++; - } else { - printf("\n Error: Stepping outside integration region\n "); - } - GetPadCxy(fix,fiy,fx,fy); -} - -Int_t AliMUONsegmentationV0::MorePads() -// -// Are there more pads in the integration region -{ - if (fix == fixmax && fiy == fiymax) { - return 0; - } else { - return 1; - - } -} - -void AliMUONsegmentationV0::SigGenInit(Float_t x,Float_t y,Float_t) -{ -// -// Initialises pad and wire position during stepping - fxt =x; - fyt =y; - GetPadIxy(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) -{ -// -// Signal will be generated if particle crosses pad boundary or -// boundary between two wires. - Int_t ixt, iyt; - GetPadIxy(x,y,ixt,iyt); - Int_t iwt=(x>0) ? Int_t(x/fWireD)+1 : Int_t(x/fWireD)-1; - if ((ixt != fixt) || (iyt !=fiyt) || (iwt != fiwt)) { - return 1; - } else { - return 0; - } -} -void AliMUONsegmentationV0:: -IntegrationLimits(Float_t& x1,Float_t& x2,Float_t& y1, Float_t& y2) -{ -// x1=GetAnod(fxt)-fx-fDpx/2.; - x1=fxhit-fx-fDpx/2.; - x2=x1+fDpx; - y1=fyhit-fy-fDpy/2.; - y2=y1+fDpy; -} - -void AliMUONsegmentationV0:: -Neighbours(Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]) -{ - /* - *Nlist=4;Xlist[0]=Xlist[1]=iX;Xlist[2]=iX-1;Xlist[3]=iX+1; - Ylist[0]=iY-1;Ylist[1]=iY+1;Ylist[2]=Ylist[3]=iY; - */ - *Nlist=8; - Xlist[0]=Xlist[1]=iX; - Xlist[2]=iX-1; - Xlist[3]=iX+1; - Ylist[0]=iY-1; - Ylist[1]=iY+1; - Ylist[2]=Ylist[3]=iY; - - // Diagonal elements - Xlist[4]=iX+1; - Ylist[4]=iY+1; - - Xlist[5]=iX-1; - Ylist[5]=iY-1; - - Xlist[6]=iX-1; - Ylist[6]=iY+1; - - Xlist[7]=iX+1; - Ylist[7]=iY-1; -} - -Float_t AliMUONsegmentationV0::Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y -, Int_t *) -// Returns the square of the distance between 1 pad -// labelled by its Channel numbers and a coordinate -{ - Float_t x,y; - GetPadCxy(iX,iY,x,y); - return (x-X)*(x-X) + (y-Y)*(y-Y); -} - -void AliMUONsegmentationV0::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) -{ - n=1; - x[0]=(fRmax+fRmin)/2/TMath::Sqrt(2.); - y[0]=x[0]; -} - -void AliMUONsegmentationV0::Draw(Option_t *) -{ - TArc *circle; - Float_t scale=0.95/fRmax/2.; - - - circle = new TArc(0.5,0.5,fRmax*scale,0.,360.); - circle->SetFillColor(2); - circle->Draw(); - - circle = new TArc(0.5,0.5,fRmin*scale,0.,360.); - circle->SetFillColor(1); - circle->Draw(); -} - - - -//___________________________________________ -ClassImp(AliMUONresponseV0) -Float_t AliMUONresponseV0::IntPH(Float_t eloss) -{ - // Get number of electrons and return charge - - Int_t nel; - nel= Int_t(eloss*1.e9/32.); - Float_t charge=0; - if (nel == 0) nel=1; - for (Int_t i=1;i<=nel;i++) { - charge -= fChargeSlope*TMath::Log(gRandom->Rndm()); - } - return charge; -} -// ------------------------------------------- - -Float_t AliMUONresponseV0::IntXY(AliMUONsegmentation * segmentation) -{ - - const Float_t invpitch = 1/fPitch; -// -// Integration limits defined by segmentation model -// - Float_t xi1, xi2, yi1, yi2; - segmentation->IntegrationLimits(xi1,xi2,yi1,yi2); - xi1=xi1*invpitch; - xi2=xi2*invpitch; - yi1=yi1*invpitch; - yi2=yi2*invpitch; -// -// The Mathieson function - Double_t ux1=fSqrtKx3*TMath::TanH(fKx2*xi1); - Double_t ux2=fSqrtKx3*TMath::TanH(fKx2*xi2); - - Double_t uy1=fSqrtKy3*TMath::TanH(fKy2*yi1); - Double_t uy2=fSqrtKy3*TMath::TanH(fKy2*yi2); - - - return Float_t(4.*fKx4*(TMath::ATan(ux2)-TMath::ATan(ux1))* - fKy4*(TMath::ATan(uy2)-TMath::ATan(uy1))); -} - - - - - - - - - diff --git a/MUON/AliMUONSegResV01.cxx b/MUON/AliMUONSegResV01.cxx deleted file mode 100644 index ed2dca6fd7b..00000000000 --- a/MUON/AliMUONSegResV01.cxx +++ /dev/null @@ -1,486 +0,0 @@ -/************************************************************************** - * 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. * - **************************************************************************/ - -///////////////////////////////////////////////////// -// Segmentation and Response classes version 01 // -///////////////////////////////////////////////////// - -#include -#include -#include -#include - -#include "AliMUONSegResV01.h" -#include "AliRun.h" -#include "AliMC.h" -#include "iostream.h" - -//___________________________________________ -ClassImp(AliMUONSegmentationV01) - - -AliMUONSegmentationV01::AliMUONSegmentationV01() -{ - 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; - fCorr = new TObjArray(3); - (*fCorr)[0]=0; - (*fCorr)[1]=0; - (*fCorr)[2]=0; -} - -Float_t AliMUONSegmentationV01::Dpx(Int_t isec) -{ -// -// Returns x-pad size for given sector isec - return fDpxD[isec]; -} - -Float_t AliMUONSegmentationV01::Dpy(Int_t isec) -{ -// -// Returns y-pad size for given sector isec - return fDpy; -} - -void AliMUONSegmentationV01::SetSegRadii(Float_t r[4]) -{ -// -// 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]); - - } -} - - -void AliMUONSegmentationV01::SetPadDivision(Int_t ndiv[4]) -{ -// -// Defines the pad size perp. to the anode wire (y) for different sectors. -// Pad sizes are defined as integral fractions ndiv of a basis pad size -// fDpx -// - for (Int_t i=0; i<4; i++) { - fNDiv[i]=ndiv[i]; - printf("\n Ndiv %d %d \n",i,fNDiv[i]); - } - ndiv[0]=ndiv[1]; -} - - -void AliMUONSegmentationV01::Init(AliMUONChamber* Chamber) -{ -// -// 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 -// vice versa. -// This version approximates concentric segmentation zones -// - Int_t isec; - printf("\n Initialise segmentation v01 -- test !!!!!!!!!!!!!! \n"); - fNpy=Int_t(fRSec[fNsec-1]/fDpy)+1; - - 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]); - } - } -// -// fill the arrays defining the pad segmentation boundaries - Float_t ry; - Int_t dnx; - Int_t add; -// -// loop over sections - for(isec=0; isec fRSec[isec]) { - fNpxS[isec][iy]=0; - fCx[isec][iy]=0; - } else { - ry=TMath::Sqrt(fRSec[isec]*fRSec[isec]-x*x); - if (isec > 1) { - 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]; - } else if (isec == 1) { - 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]; - } else { - dnx=Int_t(ry/fDpxD[isec]); - fNpxS[isec][iy]=dnx; - fCx[isec][iy]=dnx*fDpxD[isec]; - } - } - } // y-pad loop - } // sector loop -} - -Int_t AliMUONSegmentationV01::Sector(Int_t ix, Int_t iy) -{ -// Returns sector number for given pad position -// - Int_t absix=TMath::Abs(ix); - Int_t absiy=TMath::Abs(iy); - Int_t isec=0; - for (Int_t i=0; i0)? Int_t(y/fDpy)+1 : Int_t(y/fDpy)-1; - if (iy > fNpy) iy= fNpy; - if (iy < -fNpy) iy=-fNpy; -// -// Find sector isec - Int_t isec=-1; - Float_t absx=TMath::Abs(x); - Int_t absiy=TMath::Abs(iy); - for (Int_t i=0; i < fNsec; i++) { - if (absx <= fCx[i][absiy]) { - isec=i; - break; - } - } - if (isec>0) { - 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; - } else { - ix=fNpxS[fNsec-1][absiy]+1; - } - ix = (x>0) ? ix:-ix; -} - -void AliMUONSegmentationV01:: -GetPadCxy(Int_t ix, Int_t iy, Float_t &x, Float_t &y) -{ -// Returns real coordinates (x,y) for given pad coordinates (ix,iy) -// - y = (iy>0) ? Float_t(iy*fDpy)-fDpy/2. : Float_t(iy*fDpy)+fDpy/2.; -// -// Find sector isec - Int_t isec=AliMUONSegmentationV01::Sector(ix,iy); -// - 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; - } else { - x=y=0; - } -} - -void AliMUONSegmentationV01:: -SetPad(Int_t ix, Int_t iy) -{ - // - // Sets virtual pad coordinates, needed for evaluating pad response - // outside the tracking program - GetPadCxy(ix,iy,fx,fy); - fSector=Sector(ix,iy); -} - - -void AliMUONSegmentationV01:: -FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy) -{ -// Initialises iteration over pads for charge distribution algorithm -// - // - // Find the wire position (center of charge distribution) - Float_t x0a=GetAnod(xhit); - fxhit=x0a; - fyhit=yhit; - - // - // and take fNsigma*sigma around this center - Float_t x01=x0a - dx; - Float_t x02=x0a + dx; - Float_t y01=yhit - dy; - Float_t y02=yhit + dy; - // - // find the pads over which the charge distributes - GetPadIxy(x01,y01,fixmin,fiymin); - GetPadIxy(x02,y02,fixmax,fiymax); - fxmin=x01; - fxmax=x02; - fymin=y01; - fymax=y02; - - // - // Set current pad to lower left corner - if (fixmax < fixmin) fixmax=fixmin; - if (fiymax < fiymin) fiymax=fiymin; - fix=fixmin; - fiy=fiymin; - GetPadCxy(fix,fiy,fx,fy); -} - - -void AliMUONSegmentationV01::NextPad() -{ -// Stepper for the iteration over pads -// -// Step to next pad in the integration region - // - // Step to next pad in integration region - Float_t xc,yc; - Int_t iyc; - -// step from left to right - if (fx < fxmax && fx != 0) { - if (fix==-1) fix++; - fix++; -// step up - } else if (fiy != fiymax) { - if (fiy==-1) fiy++; - fiy++; -// get y-position of next row (yc), xc not used here - GetPadCxy(fix,fiy,xc,yc); -// get x-pad coordiante for first pad in row (fix) - GetPadIxy(fxmin,yc,fix,iyc); - } else { - printf("\n Error: Stepping outside integration region\n "); - } - GetPadCxy(fix,fiy,fx,fy); - fSector=Sector(fix,fiy); - if (MorePads() && - (fSector ==-1 || fSector==0)) - NextPad(); -} - -Int_t AliMUONSegmentationV01::MorePads() -// Stopping condition for the iterator over pads -// -// Are there more pads in the integration region -{ - if ((fx >= fxmax && fiy >= fiymax) || fy==0) { - return 0; - } else { - return 1; - } -} - -void AliMUONSegmentationV01:: -IntegrationLimits(Float_t& x1,Float_t& x2,Float_t& y1, Float_t& y2) -{ -// Returns integration limits for current pad -// - x1=fxhit-fx-Dpx(fSector)/2.; - x2=x1+Dpx(fSector); - y1=fyhit-fy-Dpy(fSector)/2.; - y2=y1+Dpy(fSector); -} - -void AliMUONSegmentationV01:: -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) -// - const Float_t epsilon=fDpy/1000; - - Float_t x,y; - Int_t ixx, iyy, isec1; -// - Int_t isec0=AliMUONSegmentationV01::Sector(iX,iY); - Int_t i=0; -// -// step right - Xlist[i]=iX+1; - if (Xlist[i]==0) Xlist[i]++; - Ylist[i++]=iY; -// -// step left - Xlist[i]=iX-1; - if (Xlist[i]==0) Xlist[i]--; - Ylist[i++]=iY; -// -// step up - AliMUONSegmentationV01::GetPadCxy(iX,iY,x,y); - AliMUONSegmentationV01::GetPadIxy(x+epsilon,y+fDpy,ixx,iyy); - Xlist[i]=ixx; - Ylist[i++]=iyy; - isec1=AliMUONSegmentationV01::Sector(ixx,iyy); - if (isec1==isec0) { -// -// no sector boundary crossing -// Xlist[i]=ixx+1; -// Ylist[i++]=iY+1; - -// Xlist[i]=ixx-1; -// Ylist[i++]=iY+1; - } else if (isec1 < isec0) { -// finer segmentation -// Xlist[i]=ixx+1; -// Ylist[i++]=iY+1; - - Xlist[i]=ixx-1; - Ylist[i++]=iyy; - -// Xlist[i]=ixx-2; -// Ylist[i++]=iY+1; - } else { -// coarser segmenation -/* - if (TMath::Odd(iX-fNpxS[isec1-1][iY+1])) { - Xlist[i]=ixx-1; - Ylist[i++]=iY+1; - } else { - Xlist[i]=ixx+1; - Ylist[i++]=iY+1; - } -*/ - } - -// -// step down - AliMUONSegmentationV01::GetPadCxy(iX,iY,x,y); - AliMUONSegmentationV01::GetPadIxy(x+epsilon,y-fDpy,ixx,iyy); - Xlist[i]=ixx; - Ylist[i++]=iyy; - isec1=AliMUONSegmentationV01::Sector(ixx,iyy); - if (isec1==isec0) { -// -// no sector boundary crossing -/* - Xlist[i]=ixx+1; - Ylist[i++]=iY-1; - - Xlist[i]=ixx-1; - Ylist[i++]=iY-1; -*/ - } else if (isec1 < isec0) { -// finer segmentation -// Xlist[i]=ixx+1; -// Ylist[i++]=iY-1; - - Xlist[i]=ixx-1; - Ylist[i++]=iyy; - -// Xlist[i]=ixx-2; -// Ylist[i++]=iY-1; - } else { -// coarser segmentation -/* - if (TMath::Odd(iX-fNpxS[isec1-1][iY-1])) { - Xlist[i]=ixx-1; - Ylist[i++]=iY-1; - } else { - Xlist[i]=ixx+1; - Ylist[i++]=iY-1; - } -*/ - } - *Nlist=i; -} - -void AliMUONSegmentationV01::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) -{ -// 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.); - y[0]=x[0]; - x[1]=(fRSec[1]+fRSec[2])/2/TMath::Sqrt(2.); - y[1]=x[1]; - x[2]=(fRSec[2]+fRSec[3])/2/TMath::Sqrt(2.); - y[2]=x[2]; -} - -void AliMUONSegmentationV01::Draw() -{ -// Draws the segmentation zones -// - TBox *box; - - Float_t dx=0.95/fCx[3][1]/2; - Float_t dy=0.95/(Float_t(Npy()))/2; - Float_t x0,y0,x1,y1; - Float_t xc=0.5; - Float_t yc=0.5; - - for (Int_t iy=1; iySetFillColor(isec+1); - box->Draw(); - - box=new TBox(-x1+xc,y0+yc,-x0+xc,y1+yc); - box->SetFillColor(isec+1); - box->Draw(); - - box=new TBox(x0+xc,-y1+yc,x1+xc,-y0+yc); - box->SetFillColor(isec+1); - box->Draw(); - - box=new TBox(-x1+xc,-y1+yc,-x0+xc,-y0+yc); - box->SetFillColor(isec+1); - box->Draw(); - } - } -} -void AliMUONSegmentationV01::SetCorrFunc(Int_t isec, TF1* func) -{ - (*fCorr)[isec]=func; -} - -TF1* AliMUONSegmentationV01::CorrFunc(Int_t isec) -{ - return (TF1*) (*fCorr)[isec]; -} - diff --git a/MUON/AliMUONSegResV01.h b/MUON/AliMUONSegResV01.h deleted file mode 100644 index 7f9b74c6ba5..00000000000 --- a/MUON/AliMUONSegResV01.h +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef MUONSegResV01_H -#define MUONSegResV01_H -/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * See cxx source for full Copyright notice */ - -///////////////////////////////////////////////////// -// Segmentation and Response classes version 01 // -///////////////////////////////////////////////////// - -#include "AliMUON.h" -#include "AliMUONSegResV0.h" -#include "TArrayF.h" -#include "TArrayI.h" -#include "TObjArray.h" - -class AliMUONSegmentationV01 : -public AliMUONSegmentationV0 { - public: - AliMUONSegmentationV01(); - virtual ~AliMUONSegmentationV01(){} - // - // Set Chamber Segmentation Parameters - // - virtual void SetPadDivision(Int_t ndiv[4]); - // Radii - virtual void SetSegRadii(Float_t r[4]); - // - // Transform from pad (wire) to real coordinates and vice versa - // - // Transform from pad to real coordinates - virtual void GetPadIxy(Float_t x ,Float_t y ,Int_t &ix,Int_t &iy); - // Transform from real to pad coordinates - virtual void GetPadCxy(Int_t ix,Int_t iy,Float_t &x ,Float_t &y ); - // - // Initialisation - virtual void Init(AliMUONChamber*); - // - // Get member data - // - // Pad size in x by Sector - virtual Float_t Dpx(Int_t isec); - // Pad size in y by Sector - virtual Float_t Dpy(Int_t isec); - // Max number of Pads in x - virtual Int_t Npx(){return fNpxS[fNsec-1][1]+1;} - // - virtual void SetPad(Int_t,Int_t); - // - // Iterate over pads - // Initialiser - virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy); - // Stepper - virtual void NextPad(); - // Condition - virtual Int_t MorePads(); - // Get next neighbours - virtual void Neighbours - (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]); - // - // Current Pad during Integration - // current sector - virtual Int_t ISector() {return fSector;} - // calculate sector from pad coordinates - virtual Int_t Sector(Int_t ix, Int_t iy); - // - // Integration - // Current integration limits - 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); - // - // Draw segmentation zones - virtual void Draw(); - // 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); - 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 - // 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 - // Chamber region consideres during disintegration - // (lower left and upper right corner) - // - Float_t fxmin; // lower left x - Float_t fxmax; // lower left y - Float_t fymin; // upper right x - Float_t fymax; // upper right y - - // - // Current pad during integration (cursor for disintegration) - Int_t fSector; // Current sector - // - TObjArray *fCorr; // Correction functions -}; -#endif - - - - - - diff --git a/MUON/AliMUONSegResV1.h b/MUON/AliMUONSegResV1.h deleted file mode 100644 index b6a00aa0144..00000000000 --- a/MUON/AliMUONSegResV1.h +++ /dev/null @@ -1,165 +0,0 @@ -#ifndef MUONSegResV1_H -#define MUONSegResV1_H -/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * See cxx source for full Copyright notice */ - -/* $Id$ */ - -///////////////////////////////////////////////////////// -// Manager and hits classes for set:MUON version 0 // -///////////////////////////////////////////////////////// - -#include "AliMUONSegRes.h" - -const Int_t NZONE = 3; // Specific for chamber with equal pads -const Int_t NZONEm1 = 2; // NZONE - 1 -const Int_t NZONECUT = 30; - -class AliMUONsegmentationV1 : -public AliMUONsegmentation { - public: - AliMUONsegmentationV1(); - virtual ~AliMUONsegmentationV1(){} - // - // Set Chamber Segmentation Parameters - void SetNzone(Int_t N) {fNzone = N;}; - virtual void SetPADSIZ(Float_t p1, Float_t p2); - void SetSensOffset(Float_t Offset) {fSensOffset = Offset;}; - void SetDAnod(Float_t D) {fDAnod = D;}; - // max x and y for the zone in number of pads units - //(WARNING : first pad is labelled 0 !!) - virtual void AddCut(Int_t Zone, Int_t nX, Int_t nY); - virtual void DefaultCut(void); - - // - // Initialisation - virtual void Init(AliMUONchamber*); - // - // Get member data - virtual Float_t Dpx(){return fDpx;} - virtual Float_t Dpy(){return fDpy;} - virtual Float_t Dpx(Int_t ){return fDpx;} - virtual Float_t Dpy(Int_t ){return fDpy;} - virtual Int_t Npx(){return fNpx;} - virtual Int_t Npy(){return fNpy;} - virtual Float_t GetRealDpx(Int_t ) {return fDpx;} - // - // know the zone of segmentation - virtual Int_t GetZone(Float_t X, Float_t Y); - virtual Int_t GetZone(Int_t X, Int_t Y); - // - // Transform from pad (wire) to real coordinates and vice versa - virtual Int_t GetiAnod(Float_t xhit); - virtual Float_t GetAnod(Float_t xhit); - virtual void GetPadIxy(Float_t x ,Float_t y ,Int_t &ix,Int_t &iy); - virtual void GetPadCxy(Int_t ix,Int_t iy,Float_t &x ,Float_t &y ); - // set pad position - virtual void SetPad(Int_t, Int_t); - // set hit position - virtual void SetHit(Float_t, Float_t); - // - // Iterate over pads - virtual void SetPadCoord(Int_t iX, Int_t iY); - virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy); - virtual void NextPad(); - virtual Int_t MorePads(); - // Get next neighbours - virtual void Neighbours // implementation Neighbours function - (Int_t iX, Int_t iY, Int_t* Nlist, Int_t *Xlist, Int_t *Ylist); - virtual void NeighboursDiag // with diagonal elements - (Int_t iX, Int_t iY, Int_t* Nlist, Int_t *Xlist, Int_t *Ylist); - virtual void NeighboursNonDiag // without diagonal elements - (Int_t iX, Int_t iY, Int_t* Nlist, Int_t *Xlist, Int_t *Ylist); - void CleanNeighbours(Int_t* Nlist, Int_t *Xlist, Int_t *Ylist); - // Channel number expressed in pad coordinates (stored in Cluster) - virtual Int_t Ix(Int_t trueX, Int_t trueY); - virtual Int_t Ix(); - virtual Int_t Iy(){return fiy;} - // Actual number of pad in the chain - virtual Int_t ISector(); - virtual Int_t Sector(Int_t , Int_t ) {return 1;} - // Position of pad in perellel read-out - virtual Int_t IsParallel2(Int_t iX, Int_t iY); - virtual Int_t IsParallel3(Int_t iX, Int_t iY); - // Number of pads read in parallel - virtual Int_t NParallel2(Int_t iX, Int_t iY); - virtual Int_t NParallel3(Int_t iX, Int_t iY); - // - // Number of pads read in parallel and offset to add to x - virtual void GetNParallelAndOffset(Int_t iX, Int_t iY, - Int_t *Nparallel, Int_t *Offset); - // Minimum distance between 1 pad and a position - virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *Offset); - // - // Signal Generation Condition during Stepping - Int_t SigGenCond(Float_t x, Float_t y, Float_t z); - void SigGenInit(Float_t x, Float_t y, Float_t z); - void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y); - virtual void IntegrationLimits - (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2); - // - virtual void Draw(Option_t *){;} - // Function for systematic corrections - virtual void SetCorrFunc(Int_t , TF1* func) {fCorr=func;} - virtual TF1* CorrFunc(Int_t) {return fCorr;} - - // - // Identification - virtual char* YourName() {return fName;} - - ClassDef(AliMUONsegmentationV1,1) - protected: - // - // Implementation of the segmentation data - // Version This models rectangular pads with the same dimensions all - // over the cathode plane but let the possibilit for different design - // - // geometry - Int_t fNzone; // Number of differents sensitive zones - Float_t fDpx; // X pad width - Float_t fDpy; // Y pad width - Int_t fNZoneCut[NZONEm1]; // Number of cuts for given zone - Int_t fZoneX[NZONEm1][NZONECUT]; // X descriptor of zone segmentations - Int_t fZoneY[NZONEm1][NZONECUT]; // Y descriptor of zone segmentations - Float_t frSensMax2; // square of maximum sensitive radius - Float_t frSensMin2; // square of minimum sensitive radius - Int_t fNpx; // Maximum number of pads along x - Int_t fNpy; // Maximum number of pads along y - Float_t fDAnod; // Anod gap - Float_t fSensOffset; // Offset of sensitive zone with respect to quadrant (positive) - - // Chamber region consideres during disintegration (lower left and upper right corner) - // - Int_t fixmin; - Int_t fixmax; - Int_t fiymin; - Int_t fiymax; - // - // Current pad during integration (cursor for disintegration) - Int_t fix; - Int_t fiy; - Float_t fx; - Float_t fy; - // - // Current pad and wire during tracking (cursor at hit centre) - Int_t fixt; - Int_t fiyt; - Int_t fiwt; - Float_t fxt; - Float_t fyt; - Float_t fxhit; - Float_t fyhit; - - TF1* fCorr; - - // - // Version Identifier - char *fName; //[8] - - - -}; - -#endif - - -- 2.31.1