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

Go to the documentation of this file.
00001 #ifndef CALIB_ENDCAP_LEFT_H
00002 #define CALIB_ENDCAP_LEFT_H
00003 
00004 #include "tofcalgsec/TofCalib.h"
00005 
00006 const int nEndcapLeft = 7;
00007 
00008 class calib_endcap_left:public TofCalib {
00009  public:
00010   calib_endcap_left():TofCalib( nEndcapLeft ) {
00011     m_name = string("calib_endcap_left");
00012   }
00013 
00014   void calculate_funcs( const Record* r ) {
00015     double q = r->qleft();
00016     double z = r->zrhit();
00017 
00018     funcs[0] = 1.0;
00019     funcs[1] = 1.0/sqrt(q);
00020     funcs[2] = 1.0/q;
00021     funcs[3] = q;
00022     funcs[4] = z;
00023     funcs[5] = z*z;
00024     funcs[6] = z*z*z;
00025 
00026     return;
00027   }
00028 
00029   void calculate_y(const Record* r) {
00030     y = r->tleft() - r->texp();
00031     return;
00032   }
00033 
00034   void updateData( RecordSet*& data ) {
00035     if( data->size() > 0 ) {
00036       std::vector<Record*>::iterator iter = data->begin();
00037       for( ; iter!=data->end(); iter++ ) {
00038         calculate_funcs( (*iter) );
00039         double tcorr = 0.0;
00040         for( int i=0; i<X.num_row(); i++ ) {
00041           tcorr += X[i]*funcs[i];
00042         }
00043         (*iter)->settleft( (*iter)->tleft() - tcorr - (*iter)->texp() );
00044       }
00045     }
00046     return;
00047   }
00048 
00049 };
00050 
00051 #endif

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