#ifndef HRICH700DIGIPAR_H_ #define HRICH700DIGIPAR_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 9 class HRich700DigiPar : 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 fPmtSensSize; // in mm, sensitive area of PMT Double_t fCollectionEfficiency; // collection efficiency. Final QE = QE * fCollectionEfficiency Double_t fCrossTalkProbability; // cross talk probability for direct neighbour pixel Int_t fNofNoiseHits; // number of noise hits per event Double_t fPmtGap; // in mm, gap betweem PMTs TArrayD fArrayPmt; // linearized pmt info fArrayPmt[pmyindex*(x,y,z,indx,indy,pmtid)] vector fArrayThetaMean ; // xy->theta hist TArrayD fArrayZVertices ; // alternative approach for x,y -> Theta and reverse transformation from Joerg Foertsch TArrayD fArrayThetaTransParamsPoly; // polynomial parameters TArrayD fArrayThetaTransParamsGeo; // geo parameters vector fhxyThetaMean; //! hist for mapping xy -> Theta [deg] // parameters for alignment procedure TArrayD fArrayPhiAlign; // array for alignment ThetaPhi -> Phi TArrayD fArrayThetaAlign; // array for alignment ThetaPhi -> Theta TH2D* fhPhiAlign; //! hist for alignment ThetaPhi -> Phi TH2D* fhThetaAlign; //! hist for alignment ThetaPhi -> Theta TArrayD fArrayInvPhiAlign; // array for inverse alignment ThetaPhi -> Phi TArrayD fArrayInvThetaAlign; // array for inverse alignment ThetaPhi -> Theta TH2D* fhInvPhiAlign; //! hist for inverse alignment ThetaPhi -> Phi TH2D* fhInvThetaAlign; //! hist for inverse alignment ThetaPhi -> Theta 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: HRich700DigiPar(const Char_t* name ="Rich700DigiPar", const Char_t* title ="Digitizer parameters for RICH", const Char_t* context="Rich700DigiParProduction"); virtual ~HRich700DigiPar(); void getLocation(Int_t pmtId, Float_t x, Float_t y, Int_t *loc,Bool_t silent=kTRUE); void pmtIdPixelToColRowSec(Int_t pmtId,Int_t pixel,Int_t& sec,Int_t& col,Int_t& row, 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 getPmtSensSize(){ return fPmtSensSize; } Double_t getCollectionEfficiency(){ return fCollectionEfficiency; } Double_t getCrossTalkProbability(){ return fCrossTalkProbability; } Int_t getNofNoiseHits(){ return fNofNoiseHits; } 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); map getPmtDataMapPmtId() {return fPmtDataMapPmtId;} Int_t getPMTId (Float_t x, Float_t y); Int_t getPMTId (Int_t col, Int_t row, Bool_t silent = kFALSE); HRich700PmtData* getPMTData(Int_t pmtid); Int_t getInterpolatedSectorThetaPhi(Float_t x, Float_t y, Float_t& theta,Float_t& phi); Int_t getInterpolatedSectorThetaPhi(Float_t x, Float_t y, Float_t zv, Float_t& theta,Float_t& phi); Int_t getInterpolatedSectorThetaPhiAnalytical(Float_t x, Float_t y, Float_t zv, Float_t& theta,Float_t& phi); void getRingCenterXY(Float_t theta, Float_t phi, Float_t zv, Float_t& x,Float_t& y); 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); // get aligned theta phi from the theta phi of the according ring! void getAlignedThetaPhi(const Float_t theta, const Float_t phi, Float_t & thetaCor, Float_t & phiCor); // get aligned theta phi from the theta phi of the particle cand! Needed for backtracking void getAlignedThetaPhiInv(const Float_t theta, const Float_t phi, Float_t & thetaCor, Float_t & phiCor); Bool_t init(HParIo* inp,Int_t* set); void putParams(HParamList*); Bool_t getParams(HParamList*); void clear(); void printParam(void); string getStringForParTxtFile(); ClassDef(HRich700DigiPar, 1) }; #endif