/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Tof/tofcalgsec/tofcalgsec-00-02-21/tofcalgsec/TofDataSet.h

Go to the documentation of this file.
00001 #ifndef TOFDATASET_H
00002 #define TOFDATASET_H
00003 
00004 #include "TofRecEvent/RecBTofCalHit.h"
00005 #include "TofRecEvent/RecETofCalHit.h"
00006 #include "TChain.h"
00007 #include "TTree.h"
00008 #include <string>
00009 
00010 using namespace std;
00011 
00012 const unsigned int NBarrel = 176;
00013 const unsigned int NEndcap = 96;
00014 const unsigned int NEtf    = 72;
00015 const unsigned int NStrip  = 12;
00016 
00017 typedef struct tagItem{
00018   Int_t    run;
00019   Int_t    event;
00020   Int_t    tofid;
00021   Int_t    strip;
00022   Double_t qleft;
00023   Double_t qright;
00024   Double_t tleft;
00025   Double_t tright;
00026   Double_t zrhit;
00027   Double_t dt;
00028   Double_t texp;
00029   Double_t path;
00030   Double_t phi;
00031   Double_t theta;
00032   Double_t p;
00033   Double_t t0;
00034   Double_t q0;
00035   Int_t    hitcase;
00036 } rootRecord;
00037 
00038 
00039 class Record{
00040  public:
00041   Record();
00042   ~Record();
00043  public:
00044   Record( RecBTofCalHit* hit );
00045   Record( RecETofCalHit* hit );
00046   Record( const rootRecord& one );
00047 
00048   void initial();
00049   bool cutBarrel();
00050   bool cutEndcap();
00051   bool cutEtf();
00052 
00053   int run()         const { return  m_run;     }
00054   int event()       const { return  m_event;   }
00055   int tofid()       const { return  m_tofid;   }
00056   int strip()       const { return  m_strip;   }
00057   double qleft()    const { return  m_qleft;   }
00058   double qright()   const { return  m_qright;  }
00059   double tleft()    const { return  m_tleft;   }
00060   double tright()   const { return  m_tright;  }
00061   double zrhit()    const { return  m_zrhit;   }
00062   double dt()       const { return  m_dt;      }
00063   double texp()     const { return  m_texp;    }
00064   double path()     const { return  m_path;    }
00065   double phi()      const { return  m_phi;     }
00066   double theta()    const { return  m_theta;   }
00067   double p()        const { return  m_p;       }
00068   double t0()       const { return  m_t0;      }
00069   double q0()       const { return  m_q0;      }
00070   int hitcase()     const { return  m_hitcase; }
00071 
00072 
00073   void settleft( double tleft )   { m_tleft  = tleft;  }
00074   void settright( double tright ) { m_tright = tright; }
00075   void setT0( double t0 )         { m_t0   = t0;       }
00076   void setQ0( double q0 )         { m_q0   = q0;       }
00077 
00078  private:
00079   int    m_run;
00080   int    m_event;
00081   int    m_tofid;
00082   int    m_strip;
00083   double m_qleft;
00084   double m_qright;
00085   double m_tleft;
00086   double m_tright;
00087   double m_zrhit;
00088   double m_dt;
00089   double m_texp;
00090   double m_path;
00091   double m_phi;
00092   double m_theta;
00093   double m_p;
00094   double m_t0;
00095   double m_q0;
00096   int    m_hitcase;
00097 };
00098 typedef std::vector<Record*> RecordSet;
00099 
00100 
00101 class TofDataSet{
00102  public:
00103   TofDataSet();
00104   ~TofDataSet();
00105 
00106  public:
00107   RecordSet* getBarrelData( unsigned int i )   const { return barrelData[i]; }
00108   RecordSet* getEndcapData( unsigned int i )   const { return endcapData[i]; }
00109   RecordSet* getEtfData( unsigned int i )      const { return etfData[i];    }
00110 
00111  public:
00112   void setData( TTree*, unsigned int );
00113   void setBarrelDataFiles( std::vector<std::string>& );
00114   void setEndcapDataFiles( std::vector<std::string>& );
00115   void setEtfDataFiles( std::vector<std::string>& );
00116 
00117   void setBarrelData( RecBTofCalHitCol& );
00118   void setEndcapData( RecETofCalHitCol& );
00119   void setEtfData( RecBTofCalHitCol& );
00120 
00121  private:
00122   RecordSet* barrelData[NBarrel];
00123   RecordSet* endcapData[NEndcap];
00124   RecordSet* etfData[NEtf*NStrip];
00125 };
00126 
00127 #endif

Generated on Tue Nov 29 23:14:37 2016 for BOSS_7.0.2 by  doxygen 1.4.7