- static Int_t Abs (Int_t c,Int_t s,Int_t x,Int_t y) {return c*kChAbs+s*kPcAbs+x*kPadAbsX+y*kPadAbsY; } //(ch,pc,padx,pady)-> abs pad
- static Int_t A2C (Int_t pad ) {return pad/kChAbs; } //abs pad -> chamber
- static Int_t A2P (Int_t pad ) {return pad%kChAbs/kPcAbs; } //abs pad -> pc
- static Int_t A2X (Int_t pad ) {return pad%kPcAbs/kPadAbsX; } //abs pad -> pad X
- static Int_t A2Y (Int_t pad ) {return pad%kPadAbsX; } //abs pad -> pad Y
- Int_t Addr ( )const{Int_t map[6]={5,3,1,0,2,4};return map[A2Y(fPad)%6]+6*(A2X(fPad)%8);}//ADDRESS 0..47
- void AddTidOffset(Int_t offset ) {for (Int_t i=0; i<3; i++) if (fTracks[i]>0) fTracks[i]+=offset;}; //needed for merging
- Int_t Ch ( )const{return A2C(fPad); } //chamber number
- Int_t Dilogic ( )const{return 1+PadPcX()/8; } //DILOGIC# 1..10
- static void DrawPc (Bool_t isFill=kTRUE ); //draw PCs
- static void DrawSeg ( ); //draw segmentation
- void DrawZoom ( );
- Int_t DdlIdx ( )const{return 2*Ch()+Pc()%2; } //DDL# 0..13
- Int_t DdlId ( )const{return (6<<8)+DdlIdx(); } //DDL ID 0x600..0x60d
- static void Hit2Sdi (AliHMPIDHit *pHit,TClonesArray*); //hit -> 9 sdigits
- static Bool_t IsOverTh (Float_t q ) {return q > 6; } //is digit over threshold????
- static Bool_t IsInside (Float_t x,Float_t y ) {return x>0&&y>0&&x<SizeAllX()&&y<SizeAllY(); } //is point inside pc boundary?
- inline static Bool_t IsInDead (Float_t x,Float_t y ); //is point in dead area?
- Float_t LorsX ( )const{return (PadPcX()+0.5)*SizePadX()+(Pc()%2)*(SizePcX()+SizeDead());} //center of the pad x, [cm]
- Float_t LorsY ( )const{return (PadPcY()+0.5)*SizePadY()+(Pc()/2)*(SizePcY()+SizeDead());} //center of the pad y, [cm]
- void Manual1 (Int_t c,Float_t x,Float_t y,Int_t q=33){AliHMPIDHit h(c,q,x,y); Set(&h,0);} //manual creation
- void Manual2 (Int_t c,Int_t p,Int_t x,Int_t y) {fPad=Abs(c,p,x,y);} //manual creation
- inline Float_t Mathieson (Float_t x,Float_t y )const; //Mathieson distribution
- Int_t PadPcX ( )const{return A2X(fPad);} //pad pc x # 0..79
- Int_t PadPcY ( )const{return A2Y(fPad);} //pad pc y # 0..47
- Int_t PadChX ( )const{return (Pc()%2)*kPadPcX+PadPcX();} //pad ch x # 0..159
- Int_t PadChY ( )const{return (Pc()/2)*kPadPcY+PadPcY();} //pad ch y # 0..143
+
+ void AddTidOffset(Int_t offset ) {for (Int_t i=0; i<3; i++) if (fTracks[i]>0) fTracks[i]+=offset; } //needed for merging
+ Int_t Ch ( )const{return AliHMPIDParam::A2C(fPad); } //chamber number
+
+ Float_t LorsX ( )const{return AliHMPIDParam::LorsX(AliHMPIDParam::A2P(fPad),AliHMPIDParam::A2X(fPad)); } //center of the pad x, [cm]
+
+ Float_t LorsY ( )const{return AliHMPIDParam::LorsY(AliHMPIDParam::A2P(fPad),AliHMPIDParam::A2Y(fPad)); } //center of the pad y, [cm]
+//
+ inline Double_t MathiesonX (Double_t x )const; //Mathieson distribution along wires X
+ inline Double_t MathiesonY (Double_t x )const; //Mathieson distribution perp to wires Y
+ inline Double_t IntPartMathiX(Double_t z )const; //integral in 1-dim of Mathieson X
+ inline Double_t IntPartMathiY(Double_t z )const; //integral in 1-dim of Mathieson Y
+ inline Double_t IntMathieson (Double_t x,Double_t y )const; //integral in 2-dim of Mathieson
+ Int_t PadPcX ( )const{return AliHMPIDParam::A2X(fPad);} //pad pc x # 0..79
+ Int_t PadPcY ( )const{return AliHMPIDParam::A2Y(fPad);} //pad pc y # 0..47
+ Int_t PadChX ( )const{return (Pc()%2)*AliHMPIDParam::kPadPcX+PadPcX();} //pad ch x # 0..159
+ Int_t PadChY ( )const{return (Pc()/2)*AliHMPIDParam::kPadPcY+PadPcY();} //pad ch y # 0..143