00001 00009 #ifndef FORIA_PHIGRID_HH 00010 #define FORIA_PHIGRID_HH 00011 00012 #include "ForIA/IFourMomentum.hh" 00013 00014 #include "boost/smart_ptr.hpp" 00015 00016 #include <vector> 00017 00018 namespace ForIA{ 00019 00020 using std::vector; 00021 00022 typedef boost::shared_ptr<vector<double> > GridPtr; 00023 typedef vector<unsigned int> GridMultiplicity; 00024 typedef boost::shared_ptr<vector<unsigned int> > GridMultiplicityPtr; 00025 00026 class PhiGrid{ 00027 00028 public: 00029 00030 PhiGrid(); 00031 00032 bool setFourMomenta(const MomentumVector &momenta); 00033 bool setNSegments(int nSegs); 00034 00035 GridPtr grid() const; 00036 GridPtr etaGrid(IFourMomentumConstPtr centre=IFourMomentumConstPtr()) const; 00037 00038 GridMultiplicityPtr multiplicity()const; 00039 00040 int nSegments() const; 00041 00042 private: 00043 00044 void update()const; 00045 00046 void updateEta(IFourMomentumConstPtr centre)const; 00047 00048 bool m_canChangeSettings; 00049 bool m_haveSetNSegments; 00050 00051 int m_nSegments; 00052 double m_phi2Bin; 00053 double m_eta2Bin; 00054 mutable GridPtr m_grid; 00055 mutable GridPtr m_etaGrid; 00056 mutable GridMultiplicityPtr m_multiplicity; 00057 00058 double m_etaMin; 00059 00060 mutable bool m_updateGrid; 00061 mutable bool m_updateEta; 00062 00063 00064 MomentumVector m_momenta; 00065 00066 }; 00067 } 00068 00069 #endif