+ static Int_t HV(Int_t sector) {if (sector>=1 && sector <=6) return fgHV[sector-1]; else return -1;} //high voltage for this sector
+ static void SetHV(Int_t sector,Int_t hv){fgHV[sector-1]=hv;}
+//optical properties methodes
+ static Double_t MeanCkovEnergy() {return 6.766;} //mean Ckov energy according to the total trasmission curve
+ static Float_t PhotonEnergy(Int_t i) {return 0.1*i+5.5;} //photon energy (eV) for i-th point
+ static Float_t AbsCH4(Float_t ev); //CH4 absorption length (cm) for photon with given energy (eV)
+ static Float_t AbsGel(Float_t) {return 500;} //Aerogel absorption length (cm) for photon with given energy (eV)
+ static Float_t RefIdxC6F14(Float_t eV) {return eV*0.0172+1.177;} //Freon ref index for photon with given energy (eV)
+ static Float_t RefIdxCH4(Float_t) {return 1.000444;} //Methane ref index for photon with given energy (eV)
+ static Float_t RefIdxSiO2(Float_t eV) {Float_t e1=10.666,e2=18.125,f1=46.411,f2= 228.71;
+ return TMath::Sqrt(1.+f1/(e1*e1-eV*eV)+f2/(e2*e2-eV*eV));}//Quartz window ref index from TDR p.35
+ static Float_t RefIdxGel(Float_t) {return 1.05;} //aerogel ref index
+ static Float_t DenGel() {return (RefIdxGel(0)-1)/0.21;} //aerogel density gr/cm^3 parametrization by E.Nappi
+//trasformation methodes
+ inline static TVector Loc2Area(const TVector2 &x2); //return area affected by hit x2
+ inline static Int_t Loc2Sec(const TVector2 &x2); //return sector containing given position
+ static Int_t Loc2Sec(Double_t x,Double_t y) {return Loc2Sec(TVector2(x,y));} //return sector containing given position
+ inline static TVector Loc2Pad(const TVector2 &x2); //return pad containing given position
+ static TVector Loc2Pad(Double_t x,Double_t y) {return Loc2Pad(TVector2(x,y));} //return pad containing given position
+ inline static TVector2 Pad2Loc(TVector pad); //return center of the pad
+ static TVector2 Pad2Loc(Int_t x,Int_t y) {TVector pad(2);pad[0]=x;pad[1]=y;return Pad2Loc(pad);}//return center of the pad (x,y)
+ inline static Int_t Pad2Sec(const TVector &pad); //return sector of given pad
+ inline static Int_t PadNeighbours(Int_t iPadX,Int_t iPadY,Int_t aListX[4],Int_t aListY[4]); //number of neighbours for this pad
+ static Bool_t IsAccepted(const TVector2 &x2) {return ( x2.X()>=0 && x2.X()<=PcSizeX() && x2.Y()>=0 && x2.Y()<=PcSizeY() ) ? kTRUE:kFALSE;}
+//charge response methodes
+ inline static Double_t Mathieson(Double_t x1,Double_t x2,Double_t y1,Double_t y2); //Mathienson integral over given limits
+ inline static Double_t GainSag(Double_t x,Int_t sector); //gain variations in %
+ static Double_t QdcSlope(Int_t sec){switch(sec){case -1: return 0; default: return 33;}} //weight of electon in QDC channels
+ static Double_t Gain(const TVector2 &x2){//gives chamber gain in terms of QDC channels for given point in local ref system
+ if(fgIsWireSag) return QdcSlope(Loc2Sec(x2))*(1+GainSag(x2.X(),Loc2Sec(x2))/100);
+ else return QdcSlope(Loc2Sec(x2));}
+ inline static Double_t FracQdc(const TVector2 &x2,const TVector &pad); //charge fraction to pad from hit
+ inline static Int_t TotQdc(TVector2 x2,Double_t eloss); //total charge for hit eloss=0 for photons
+ inline static Bool_t IsOverTh(Int_t c,TVector pad,Double_t q); //is QDC of the pad registered by FEE
+ static Int_t NsigmaTh() {return fgNsigmaTh;} //
+ static Float_t SigmaThMean() {return fgSigmaThMean;} //QDC electronic noise mean
+ static Float_t SigmaThSpread() {return fgSigmaThSpread;} //QDC electronic noise width
+
+ static Double_t CogCorr(Double_t x) {return 3.31267e-2*TMath::Sin(2*TMath::Pi()/PadSizeX()*x) //correction of cluster CoG due to sinoidal
+ -2.66575e-3*TMath::Sin(4*TMath::Pi()/PadSizeX()*x)
+ +2.80553e-3*TMath::Sin(6*TMath::Pi()/PadSizeX()*x)+0.0070;}
+ static void ReadErrFiles(); //Read Err file parameters
+ static TVector3 SigmaSinglePhoton(Int_t Npart, Double_t mom, Double_t theta, Double_t phi); //Find Sigma for single photon
+ static Double_t Interpolate(Double_t par[4][330],Double_t x, Double_t y, Double_t phi); //Find the error value from interpolation
+
+ static TVector3 ForwardTracing(TVector3 entranceTrackPoint,TVector3 vectorTrack, Double_t thetaC, Double_t phiC); //it traces foward a photon from Emission Point to PC
+ static TVector3 PlaneIntersect(TVector3 vstart,TVector3 p0,TVector3 n,TVector3 v0); //it finds intersection between straight track and plane
+ static Double_t SnellAngle(Float_t n1, Float_t n2, Float_t theta1); // Snell law
+ static void AnglesInDRS(Double_t trackTheta,Double_t trackPhi,Double_t thetaCerenkov,Double_t phiCerenkov,Double_t &tout,Double_t &pout);//It finds photon angles in
+ //Detector Reference System