#ifndef HRICH700DIGIMAPPAR_H_ #define HRICH700DIGIMAPPAR_H_ #include "hparcond.h" #include "hrich700data.h" #include "TObject.h" #include "TArrayD.h" #include "TH2F.h" #include #include #include using namespace std; class HParamList; #define NPARPMT 8 class HRich700DigiMapPar : public HParCond { private: map fPmtDataMapPmtId; // pmtid -> (x,y,z,indx,indy,pmtid) map, HRich700PmtData> fPmtDataMapXY; // (xind,yind) -> (x,y,z,indx,indy,pmtid) Int_t fNofPixelsInRow ; Double_t fPmtSize ; // in mm Double_t fPmtGap ; // in mm TArrayD fArrayPmt ; // linearized pmt info fArrayPmt[pmyindex*(x,y,z,indx,indy,pmtid)] TArrayD fArrayPhiMean ; // xy->phi hist TArrayD fArrayThetaMean ; // xy->theta hist TH2F* fhxyPhiMean; //! hist for mapping xy -> Phi [deg] TH2F* fhxyThetaMean; //! hist for mapping xy -> Theta [deg] Float_t fmaxX; //! remember dimensions to calculate indX+indY from x+y Float_t fmaxY; //! remember dimensions to calculate indX+indY from x+y void fillMaps(); public: HRich700DigiMapPar(const Char_t* name ="Rich700DigiMapPar", const Char_t* title ="PMT Mapping parameters for RICH", const Char_t* context="Rich700DigiMapParProduction"); virtual ~HRich700DigiMapPar(); void getLocation(Int_t pmtId, Float_t x, Float_t y, Int_t *loc,Bool_t silent=kTRUE); pair getXY(Int_t* loc,Bool_t silent=kTRUE); pair getPmtCenter(Int_t pmtId); vector > getPmtCenters(); Double_t getPmtSize(){return fPmtSize;} Double_t getPmtGap (){return fPmtGap;} Int_t getNPmts() {return fArrayPmt.GetSize()/NPARPMT;} Int_t getNPixelInRow() { return fNofPixelsInRow;} vector > getDirectNeighbourPixels (Int_t col, Int_t row); vector > getDiagonalNeighbourPixels(Int_t col, Int_t row); vector > getNoisePixels (UInt_t nofNoisePixels); Int_t getPMTId (Float_t x, Float_t y); Int_t getPMTId (Int_t col, Int_t row); HRich700PmtData* getPMTData(Int_t pmtid); Int_t getInterpolatedSectorThetaPhi(Float_t x, Float_t y, Float_t& theta,Float_t& phi); Bool_t getInterpolatedThetaPhiPMT(Float_t x, Float_t y, Float_t& theta,Float_t& phi); Int_t getSector(Float_t x, Float_t y); Int_t getSectorPixels(Int_t col,Int_t row); Int_t getSectorPMTInd(Int_t xind,Int_t yInd); Int_t getSectorPMTId (Int_t pmtid); Int_t getSectorPhiThetaDegPixels(Int_t col,Int_t row, Float_t& phiDeg,Float_t& thetaDeg); Int_t getSectorPhiThetaDegPMTInd(Int_t xind,Int_t yInd, Float_t& phiDeg,Float_t& thetaDeg); Int_t getSectorPhiThetaDegPMTId (Int_t pmtid, Float_t& phiDeg,Float_t& thetaDeg); Bool_t init(HParIo* inp,Int_t* set); void putParams(HParamList*); Bool_t getParams(HParamList*); void clear(); void printParam(void); ClassDef(HRich700DigiMapPar, 1) }; #endif