00001
00002 #ifndef __N3AnaBase__tof_col_h
00003 #define __N3AnaBase__tof_col_h 1
00004
00005 #include <vector>
00006 #include <datatools/serialization/serialization.h>
00007
00008 namespace nemo3 {
00009
00010 class ana_event;
00011
00013
00020 class tof_col
00021 {
00022
00023 public:
00024
00025 tof_col ();
00026 ~tof_col ();
00027
00028 void init (const ana_event &evt_);
00029 bool is_initiated () const {return __init;}
00030 void set_values (unsigned int s1_, unsigned int s2_, double *dt_, double *chi2_, double *P_, bool tt_=true);
00031 void get_values (unsigned int s1_, unsigned int s2_, double *dt_, double *chi2_, double *P_, bool tt_=true) const;
00032 void get_values (unsigned int s1_, unsigned int s2_, float *dt_, float *chi2_, float *P_, bool tt_=true) const;
00033 unsigned int hasher (unsigned int, unsigned int, bool tt_=true) const;
00034 void unhasher (unsigned int hash_, unsigned int&, unsigned int&, bool tt_=true) const;
00035 void clean_all ();
00036
00037
00038
00039 private:
00040
00041 bool __init;
00042
00043 std::vector<double> __dt_tt_int;
00044 std::vector<double> __chi2_tt_int;
00045 std::vector<double> __P_tt_int;
00046 std::vector<double> __dt_tt_ext;
00047 std::vector<double> __chi2_tt_ext;
00048 std::vector<double> __P_tt_ext;
00049
00050 std::vector<double> __dt_ts_int;
00051 std::vector<double> __chi2_ts_int;
00052 std::vector<double> __P_ts_int;
00053 std::vector<double> __dt_ts_ext;
00054 std::vector<double> __chi2_ts_ext;
00055 std::vector<double> __P_ts_ext;
00056
00057
00061 friend class boost::serialization::access;
00062
00063 template<class Archive>
00064 void serialize (Archive & ar_,
00065 const unsigned int version_)
00066 {
00067 ar_ & boost::serialization::make_nvp ("dt_tt_int", __dt_tt_int);
00068 ar_ & boost::serialization::make_nvp ("chi2_tt_int", __chi2_tt_int);
00069 ar_ & boost::serialization::make_nvp ("P_tt_int", __P_tt_int);
00070 ar_ & boost::serialization::make_nvp ("dt_tt_ext", __dt_tt_ext);
00071 ar_ & boost::serialization::make_nvp ("chi2_tt_ext", __chi2_tt_ext);
00072 ar_ & boost::serialization::make_nvp ("P_tt_ext", __P_tt_ext);
00073
00074 ar_ & boost::serialization::make_nvp ("dt_ts_int", __dt_ts_int);
00075 ar_ & boost::serialization::make_nvp ("chi2_ts_int", __chi2_ts_int);
00076 ar_ & boost::serialization::make_nvp ("P_ts_int", __P_ts_int);
00077 ar_ & boost::serialization::make_nvp ("dt_ts_ext", __dt_ts_ext);
00078 ar_ & boost::serialization::make_nvp ("chi2_ts_ext", __chi2_ts_ext);
00079 ar_ & boost::serialization::make_nvp ("P_ts_ext", __P_ts_ext);
00080
00081 ar_ & boost::serialization::make_nvp ("initiated", __init);
00082 }
00083
00084
00085 };
00086 }
00087
00088 BOOST_CLASS_VERSION(nemo3::tof_col, 0)
00089
00090 #endif