#ifndef __HPARTICLECANDFILLERPAR_H__
#define __HPARTICLECANDFILLERPAR_H__
#include "hparcond.h"
#include "hparticletool.h"
#include "TArrayD.h"
#include "TH1D.h"
#include "TH2D.h"
class HParamList;
class HParticleCandFillerPar : public HParCond {
protected:
    TArrayD phiLow   [6];     
    TArrayD phiUp    [6];     
    TArrayD thetaLow [6];     
    TArrayD thetaUp  [6];     
    Float_t zRichCenter;      
    TH1D*   hphiLow  [6];     
    TH1D*   hphiUp   [6];     
    TH1D*   hthetaLow[6];     
    TH1D*   hthetaUp [6];     
    void    createHists();   
    void    removeHists();   
public:
    HParticleCandFillerPar(const Char_t* name   = "ParticleCandFillerPar",
			   const Char_t* title  = "parameters for PartticleCandFiller",
			   const Char_t* context= "ParticleCandFillerParProduction");
    ~HParticleCandFillerPar();
    void     setPhiLow  (Int_t s, const TArrayD& linData);
    void     setPhiUp   (Int_t s, const TArrayD& linData);
    void     setThetaLow(Int_t s, const TArrayD& linData);
    void     setThetaUp (Int_t s, const TArrayD& linData);
    void     setZRichCenter(Float_t shift) { zRichCenter = shift; }
    const TArrayD* getPhiLow  (Int_t s)  {return (s >= 0 && s < 6)? &phiLow  [s] : 0;}
    const TArrayD* getPhiUp   (Int_t s)  {return (s >= 0 && s < 6)? &phiUp   [s] : 0;}
    const TArrayD* getThetaLow(Int_t s)  {return (s >= 0 && s < 6)? &thetaLow[s] : 0;}
    const TArrayD* getThetaUp (Int_t s)  {return (s >= 0 && s < 6)? &thetaUp [s] : 0;}
    Float_t getPhiLow  (Int_t s, Float_t mom) { return HParticleTool::getInterpolatedValue(hphiLow  [s],mom,kFALSE) ;}
    Float_t getPhiUp   (Int_t s, Float_t mom) { return HParticleTool::getInterpolatedValue(hphiUp   [s],mom,kFALSE) ;}
    Float_t getThetaLow(Int_t s, Float_t mom) { return HParticleTool::getInterpolatedValue(hthetaLow[s],mom,kFALSE) ;}
    Float_t getThetaUp (Int_t s, Float_t mom) { return HParticleTool::getInterpolatedValue(hthetaUp [s],mom,kFALSE) ;}
    Float_t getRichCorr(Float_t zVertex, Float_t thetaRich, Float_t phiRich);
    Float_t getZRichCenter() { return zRichCenter ;}
    Bool_t  acceptPhiTheta(Int_t s,Float_t mom,Float_t dphi,Float_t dtheta);
    Bool_t  init(HParIo*, Int_t*);
    void    putParams(HParamList*);
    Bool_t  getParams(HParamList*);
    void    clear();
    void    printParam(void);
    ClassDef(HParticleCandFillerPar,2) 
};
#endif  /*!__HPARTICLECANDFILLERPAR_H_*/
 hparticlecandfillerpar.h:1  hparticlecandfillerpar.h:2  hparticlecandfillerpar.h:3  hparticlecandfillerpar.h:4  hparticlecandfillerpar.h:5  hparticlecandfillerpar.h:6  hparticlecandfillerpar.h:7  hparticlecandfillerpar.h:8  hparticlecandfillerpar.h:9  hparticlecandfillerpar.h:10  hparticlecandfillerpar.h:11  hparticlecandfillerpar.h:12  hparticlecandfillerpar.h:13  hparticlecandfillerpar.h:14  hparticlecandfillerpar.h:15  hparticlecandfillerpar.h:16  hparticlecandfillerpar.h:17  hparticlecandfillerpar.h:18  hparticlecandfillerpar.h:19  hparticlecandfillerpar.h:20  hparticlecandfillerpar.h:21  hparticlecandfillerpar.h:22  hparticlecandfillerpar.h:23  hparticlecandfillerpar.h:24  hparticlecandfillerpar.h:25  hparticlecandfillerpar.h:26  hparticlecandfillerpar.h:27  hparticlecandfillerpar.h:28  hparticlecandfillerpar.h:29  hparticlecandfillerpar.h:30  hparticlecandfillerpar.h:31  hparticlecandfillerpar.h:32  hparticlecandfillerpar.h:33  hparticlecandfillerpar.h:34  hparticlecandfillerpar.h:35  hparticlecandfillerpar.h:36  hparticlecandfillerpar.h:37  hparticlecandfillerpar.h:38  hparticlecandfillerpar.h:39  hparticlecandfillerpar.h:40  hparticlecandfillerpar.h:41  hparticlecandfillerpar.h:42  hparticlecandfillerpar.h:43  hparticlecandfillerpar.h:44  hparticlecandfillerpar.h:45  hparticlecandfillerpar.h:46  hparticlecandfillerpar.h:47  hparticlecandfillerpar.h:48  hparticlecandfillerpar.h:49  hparticlecandfillerpar.h:50  hparticlecandfillerpar.h:51  hparticlecandfillerpar.h:52  hparticlecandfillerpar.h:53  hparticlecandfillerpar.h:54  hparticlecandfillerpar.h:55  hparticlecandfillerpar.h:56  hparticlecandfillerpar.h:57  hparticlecandfillerpar.h:58  hparticlecandfillerpar.h:59  hparticlecandfillerpar.h:60  hparticlecandfillerpar.h:61  hparticlecandfillerpar.h:62  hparticlecandfillerpar.h:63  hparticlecandfillerpar.h:64  hparticlecandfillerpar.h:65