/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Mdc/MdcAlignAlg/MdcAlignAlg-00-01-04/src/MdcAliRecHit.cxx

Go to the documentation of this file.
00001 #include "MdcAlignAlg/MdcAliRecHit.h"
00002 
00003 #include "GaudiKernel/MsgStream.h"
00004 #include "GaudiKernel/IMessageSvc.h"
00005 #include "GaudiKernel/StatusCode.h"
00006 #include "GaudiKernel/ISvcLocator.h"
00007 #include "GaudiKernel/Bootstrap.h"
00008 #include "GaudiKernel/SmartDataPtr.h"
00009 #include "GaudiKernel/IDataProviderSvc.h"
00010 
00011 #include <iostream>
00012 
00013 const double MdcAliRecHit::m_df = 10.0;
00014 const double MdcAliRecHit::m_qf = 1.0;
00015 
00016 void MdcAliRecHit::setRecHit(HitRefVec::iterator it_hit){
00017      IMessageSvc *msgSvc;
00018      Gaudi::svcLocator()->service("MessageSvc", msgSvc);
00019      MsgStream log(msgSvc, "MdcAliRecHit");
00020      log << MSG::DEBUG << "MdcAliRecHit::setRecHit()" << endreq;
00021 
00022      Identifier identifier;
00023      MdcID mdcid;
00024 
00025      log << MSG::DEBUG << "hit Id: " << (*it_hit)->getId()
00026          << "  hits drift time " << (*it_hit)->getDriftT()
00027          << "  hits doca " << (*it_hit)->getDoca()
00028          << endreq;
00029 
00030      identifier = (*it_hit)->getMdcId();
00031      m_layid = mdcid.layer(identifier);
00032      m_cellid = mdcid.wire(identifier);
00033      m_lr = (*it_hit) -> getFlagLR();
00034      m_stat = (*it_hit) -> getStat();
00035 
00036      m_docaInc = (*it_hit) -> getDoca();
00037      m_docaExc = m_docaInc;
00038 
00039      if( 0 == m_lr ){
00040           m_dmeas = (*it_hit) -> getDriftDistLeft();
00041           m_errdmeas = (*it_hit) -> getErrDriftDistLeft();
00042      }else{
00043           m_dmeas = (*it_hit) -> getDriftDistRight();
00044           m_errdmeas = (*it_hit) -> getErrDriftDistRight();
00045      }
00046 
00047      m_rawtime = (*it_hit) -> getTdc();
00048      m_tdrift = (*it_hit) -> getDriftT();
00049 
00050      m_qhit = (*it_hit) -> getAdc();
00051      m_zhit = (*it_hit) -> getZhit();
00052      m_entra = (*it_hit) -> getEntra();
00053      m_chisqadd = (*it_hit) -> getChisqAdd();
00054 
00055      double flen = (*it_hit) -> getFltLen(); // cm
00056      m_tof = flen / 30.0;
00057 
00058      // the following is for cm to mm
00059      m_docaInc *= m_df;
00060      m_docaExc *= m_df;
00061      m_dmeas *= m_df;
00062      m_errdmeas *= m_df;
00063      m_zhit *= m_df;
00064      m_qhit *= m_qf;
00065 
00066      m_resiInc = fabs(m_dmeas) - fabs(m_docaInc);
00067      if( 0 == m_lr )   m_resilrInc = -1.0 * m_resiInc;//for recon of pat
00068      else              m_resilrInc = m_resiInc;
00069 
00070      m_resiExc = fabs(m_dmeas) - fabs(m_docaExc);
00071      if( 0 == m_lr )   m_resilrExc = -1.0 * m_resiExc;
00072      else              m_resilrExc = m_resiExc;
00073 }
00074 
00075 void MdcAliRecHit::setKalHit(HelixSegRefVec::iterator it_hit){
00076      IMessageSvc *msgSvc;
00077      Gaudi::svcLocator()->service("MessageSvc", msgSvc);
00078      MsgStream log(msgSvc, "MdcAliRecHit");
00079      log << MSG::DEBUG << "MdcAliRecHit::setKalHit()" << endreq;
00080 
00081      Identifier identifier;
00082      MdcID mdcid;
00083 
00084      identifier = (*it_hit) -> getMdcId();
00085      m_layid = mdcid.layer(identifier);
00086      m_cellid = mdcid.wire(identifier);
00087      m_stat = 1;
00088 
00089      m_lr = (*it_hit) -> getFlagLR();
00090      if(-1 == m_lr) m_lr = 0;   // definition not same as MdcRecHit
00091 
00092      m_docaInc = (*it_hit) -> getDocaIncl();
00093      m_docaExc = (*it_hit) -> getDocaExcl();
00094 
00095      if(1 == m_lr){
00096           m_docaInc *= -1.0;
00097           m_docaExc *= -1.0;
00098      }
00099 
00100      m_dmeas = (*it_hit) -> getDD();
00101      m_errdmeas = 0.013;
00102 
00103      m_rawtime = (*it_hit) -> getTdc();
00104      m_tdrift = (*it_hit) -> getDT();
00105 
00106      m_qhit = (*it_hit) -> getAdc();
00107      m_zhit = (*it_hit) -> getZhit();
00108      m_entra = (*it_hit) -> getEntra();
00109      m_chisqadd = 0.0;
00110      m_tof = (*it_hit) -> getTof();
00111 
00112      m_Dr = (*it_hit) -> getDrExcl();
00113      m_Fi0 = (*it_hit) -> getFi0Excl();
00114      m_Cpa = (*it_hit) -> getCpaExcl();
00115      m_Dz = (*it_hit) -> getDzExcl();
00116      m_Tanl = (*it_hit) -> getTanlExcl();
00117 
00118      // the following is for cm to mm
00119      m_docaInc *= m_df;
00120      m_docaExc *= m_df;
00121      m_dmeas *= m_df;
00122      m_errdmeas *= m_df;
00123      m_zhit *= m_df;
00124      m_qhit *= m_qf;
00125 
00126      m_resiInc = fabs(m_dmeas) - fabs(m_docaInc);
00127      if( 0 == m_lr )   m_resilrInc = -1.0 * m_resiInc;
00128      else              m_resilrInc = m_resiInc;
00129 
00130      m_resiExc = fabs(m_dmeas) - fabs(m_docaExc);
00131      if( 0 == m_lr )   m_resilrExc = -1.0 * m_resiExc;
00132      else              m_resilrExc = m_resiExc;
00133 
00134 }
00135 

Generated on Tue Nov 29 23:12:48 2016 for BOSS_7.0.2 by  doxygen 1.4.7