X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=RICH%2FAliRICHParam.h;h=fdee982f1400a0b1f3d997d3bd145ef8f42d5c27;hb=4fa35c50191efdeeaa0695c53ad9025541d3730c;hp=4f4112c66dfc206ec69b2f66644aacb78ee00822;hpb=08479a101ed383d7ceab3d02c91683e2843f3013;p=u%2Fmrichter%2FAliRoot.git diff --git a/RICH/AliRICHParam.h b/RICH/AliRICHParam.h index 4f4112c66df..fdee982f140 100644 --- a/RICH/AliRICHParam.h +++ b/RICH/AliRICHParam.h @@ -1,21 +1,32 @@ #ifndef AliRICHParam_h #define AliRICHParam_h -#include "AliRICHConst.h" #include #include #include #include + +static const int kNCH=7; //number of RICH chambers +static const int kNpadsX = 144; //number of pads along X in single chamber +static const int kNpadsY = 160; //number of pads along Y in single chamber +static const int kBad=-101; //useful static const to mark initial (uninitalised) values + + +static const int kadc_satm = 4096; //dynamic range (10 bits) +static const int kCerenkov=50000050; //??? go to something more general like TPDGCode +static const int kFeedback=50000051; //??? go to something more general like TPDGCode + + class AliRICHParam :public TObject { public: AliRICHParam() {;} virtual ~AliRICHParam() {;} - static const Int_t NpadsX() {return kNpadsX;} - static const Int_t NpadsY() {return kNpadsY;} - static Int_t NpadsXsec() {return NpadsX()/3;} - static Int_t NpadsYsec() {return NpadsY()/2;} + static const Int_t NpadsX() {return kNpadsX;} + static const Int_t NpadsY() {return kNpadsY;} + static Int_t NpadsXsec() {return NpadsX()/3;} + static Int_t NpadsYsec() {return NpadsY()/2;} static Double_t DeadZone() {return 2.6;} static Double_t PadSizeX() {return 0.84;} static Double_t PadSizeY() {return 0.8;} @@ -67,10 +78,9 @@ public: inline static Int_t Loc2TotQdc(TVector3 locX3,Double_t eloss,Int_t iPid, Int_t §or); inline static Double_t Loc2PadFrac(TVector3 locX3,Int_t padx,Int_t pady); - void SigGenInit(Double_t,Double_t){;} - Bool_t SigGenCond(Double_t,Double_t){return kFALSE;} inline static Int_t Loc2Sec(Double_t &x,Double_t &y); inline static Int_t Pad2Sec(Int_t &padx,Int_t &pady); + static Int_t Sector(Int_t padx,Int_t pady) {return Pad2Sec(padx,pady);} inline Bool_t IsOverTh(Int_t iChamber, Int_t x, Int_t y, Double_t q); static Int_t NsigmaTh() {return fgNsigmaTh;} static Float_t SigmaThMean() {return fgSigmaThMean;} @@ -81,7 +91,7 @@ protected: static Bool_t fgIsResolveClusters; //performs declustering or not static Int_t fgHV; //HV applied to anod wires static Double_t fgAngleRot; //rotation of RICH from up postion (0,0,490)cm - Float_t fSigmaThMap[kNCH][kNpadsX][kNpadsY]; // sigma of the pedestal distributions for all pads + static Float_t fSigmaThMap[kNCH][kNpadsX][kNpadsY]; // sigma of the pedestal distributions for all pads static Int_t fgNsigmaTh; // n. of sigmas to cut for zero suppression static Float_t fgSigmaThMean; // sigma threshold value static Float_t fgSigmaThSpread; // spread of sigma @@ -91,10 +101,11 @@ protected: Int_t AliRICHParam::PadNeighbours(Int_t iPadX,Int_t iPadY,Int_t listX[4],Int_t listY[4]) { Int_t nPads=0; - if(iPadY1) {listX[nPads]=iPadX; listY[nPads]=iPadY-1; nPads++;} - if(iPadX>1) {listX[nPads]=iPadX-1; listY[nPads]=iPadY; nPads++;} + if(iPadY!=NpadsY()&&iPadY!=NpadsYsec()) {listX[nPads]=iPadX; listY[nPads]=iPadY+1; nPads++;} + if(iPadX!=NpadsXsec()&&iPadX!=2*NpadsXsec()&&iPadX!=NpadsX()){listX[nPads]=iPadX+1; listY[nPads]=iPadY; nPads++;} + if(iPadY!=1&&iPadY!=NpadsYsec()+1) {listX[nPads]=iPadX; listY[nPads]=iPadY-1; nPads++;} + if(iPadX!=1&&iPadX!=NpadsXsec()+1&&iPadX!=2*NpadsXsec()+1) {listX[nPads]=iPadX-1; listY[nPads]=iPadY; nPads++;} + return nPads; }//Pad2ClosePads() //__________________________________________________________________________________________________ @@ -167,12 +178,15 @@ void AliRICHParam::Pad2Loc(Int_t padx,Int_t pady,Double_t &x,Double_t &y) //__________________________________________________________________________________________________ Double_t AliRICHParam::GainVariation(Double_t y,Int_t sector) { +//returns % of gain degradation due to wire sagita if(IsWireSag()){ if(y>0) y-=SectorSizeY()/2; else y+=SectorSizeY()/2; switch(HV(sector)){ - case 2150: - default: - return 9e-6*TMath::Power(y,4)+2e-7*TMath::Power(y,3)-0.0316*TMath::Power(y,2)-3e-4*y+25.367;//% + case 2150: return 9e-6*TMath::Power(y,4)+2e-7*TMath::Power(y,3)-0.0316*TMath::Power(y,2)-3e-4*y+25.367;//% + case 2100: return 8e-6*TMath::Power(y,4)+2e-7*TMath::Power(y,3)-0.0283*TMath::Power(y,2)-2e-4*y+23.015; + case 2050: return 7e-6*TMath::Power(y,4)+1e-7*TMath::Power(y,3)-0.0254*TMath::Power(y,2)-2e-4*y+20.888; + case 2000: return 6e-6*TMath::Power(y,4)+8e-8*TMath::Power(y,3)-0.0227*TMath::Power(y,2)-1e-4*y+18.961; + default: return 0; } }else return 0; @@ -214,14 +228,14 @@ Double_t AliRICHParam::Loc2PadFrac(TVector3 hitX3,Int_t padx,Int_t pady) //__________________________________________________________________________________________________ Double_t AliRICHParam::Mathieson(Double_t xMin,Double_t yMin,Double_t xMax,Double_t yMax) {//see NIM A370(1988)602-603 - const Double_t SqrtKx3=0.77459667;const Double_t Kx2=0.962;const Double_t Kx4=0.379; - const Double_t SqrtKy3=0.77459667;const Double_t Ky2=0.962;const Double_t Ky4=0.379; - - Double_t ux1=SqrtKx3*TMath::TanH(Kx2*xMin); - Double_t ux2=SqrtKx3*TMath::TanH(Kx2*xMax); - Double_t uy1=SqrtKy3*TMath::TanH(Ky2*yMin); - Double_t uy2=SqrtKy3*TMath::TanH(Ky2*yMax); - return 4*Kx4*(TMath::ATan(ux2)-TMath::ATan(ux1))*Ky4*(TMath::ATan(uy2)-TMath::ATan(uy1)); + const Double_t kSqrtKx3=0.77459667;const Double_t kX2=0.962;const Double_t kX4=0.379; + const Double_t kSqrtKy3=0.77459667;const Double_t kY2=0.962;const Double_t kY4=0.379; + + Double_t ux1=kSqrtKx3*TMath::TanH(kX2*xMin); + Double_t ux2=kSqrtKx3*TMath::TanH(kX2*xMax); + Double_t uy1=kSqrtKy3*TMath::TanH(kY2*yMin); + Double_t uy2=kSqrtKy3*TMath::TanH(kY2*yMax); + return 4*kX4*(TMath::ATan(ux2)-TMath::ATan(ux1))*kY4*(TMath::ATan(uy2)-TMath::ATan(uy1)); } //__________________________________________________________________________________________________ void AliRICHParam::Loc2Area(TVector3 hitX3,Int_t &iPadXmin,Int_t &iPadYmin,Int_t &iPadXmax,Int_t &iPadYmax)