1#include "MdcAlignAlg/MdcAliEvent.h"
3#include "GaudiKernel/MsgStream.h"
4#include "GaudiKernel/IMessageSvc.h"
5#include "GaudiKernel/StatusCode.h"
6#include "GaudiKernel/ISvcLocator.h"
7#include "GaudiKernel/Bootstrap.h"
8#include "GaudiKernel/SmartDataPtr.h"
9#include "GaudiKernel/IDataProviderSvc.h"
10#include "GaudiKernel/PropertyMgr.h"
12#include "BesTimerSvc/IBesTimerSvc.h"
13#include "BesTimerSvc/BesTimerSvc.h"
15#include "EventModel/Event.h"
16#include "RawEvent/RawDataUtil.h"
17#include "EventModel/Event.h"
19#include "MdcCalibFunSvc/IMdcCalibFunSvc.h"
20#include "MdcCalibFunSvc/MdcCalibFunSvc.h"
22#include "EvTimeEvent/RecEsTime.h"
23#include "MdcRecEvent/RecMdcTrack.h"
24#include "MdcRecEvent/RecMdcKalTrack.h"
25#include "MdcRecEvent/RecMdcHit.h"
26#include "ReconEvent/ReconEvent.h"
28#include "Identifier/Identifier.h"
29#include "Identifier/MdcID.h"
38 Gaudi::svcLocator()->service(
"MessageSvc",
msgSvc);
39 MsgStream log(
msgSvc,
"MdcAliEvent");
40 log << MSG::INFO <<
"MdcAliEvent::setRecEvent" << endreq;
42 IDataProviderSvc* eventSvc = NULL;
43 Gaudi::svcLocator()->service(
"EventDataSvc", eventSvc);
46 SmartDataPtr<RecEsTimeCol> aevtimeCol(eventSvc,
"/Event/Recon/RecEsTimeCol");
47 if( ! aevtimeCol || (aevtimeCol->size()==0) ){
51 RecEsTimeCol::iterator iter_evt = aevtimeCol->begin();
52 for(; iter_evt!=aevtimeCol->end(); iter_evt++){
53 m_tes = (*iter_evt)->getTest();
54 m_esFlag = (*iter_evt)->getStat();
60 for(
int iEs=0; iEs<m_param.
nEsFlag; iEs++){
61 if(m_esFlag == m_param.
esFlag[iEs]){
66 if( flagTes && (m_tes > m_param.
tesMin) && (m_tes < m_param.
tesMax) ) m_esCutFg =
true;
68 SmartDataPtr<RecMdcTrackCol> newtrkCol(eventSvc,
"/Event/Recon/RecMdcTrackCol");
70 log << MSG::ERROR <<
"Could not find RecMdcTrackCol" << endreq;
71 return ( StatusCode::FAILURE );
76 RecMdcTrackCol::iterator it_trk = newtrkCol->begin();
77 for(; it_trk != newtrkCol->end(); it_trk++){
79 rectrk -> setRecTrk(it_trk);
80 m_rectrk.push_back(rectrk);
84 log << MSG::WARNING <<
"RecTrack ntrk = " << i << endreq;
86 return StatusCode::SUCCESS;
91 Gaudi::svcLocator()->service(
"MessageSvc",
msgSvc);
92 MsgStream log(
msgSvc,
"MdcAliEvent");
93 log << MSG::INFO <<
"MdcAliEvent::setKalEvent" << endreq;
95 IDataProviderSvc* eventSvc = NULL;
96 Gaudi::svcLocator()->service(
"EventDataSvc", eventSvc);
99 SmartDataPtr<RecEsTimeCol> aevtimeCol(eventSvc,
"/Event/Recon/RecEsTimeCol");
100 if( ! aevtimeCol || (aevtimeCol->size()==0) ){
104 RecEsTimeCol::iterator iter_evt = aevtimeCol->begin();
105 for(; iter_evt!=aevtimeCol->end(); iter_evt++){
106 m_tes = (*iter_evt)->getTest();
107 m_esFlag = (*iter_evt)->getStat();
112 bool flagTes =
false;
113 for(
int iEs=0; iEs<m_param.
nEsFlag; iEs++){
114 if(m_esFlag == m_param.
esFlag[iEs]){
119 if( flagTes && (m_tes > m_param.
tesMin) && (m_tes < m_param.
tesMax) ) m_esCutFg =
true;
121 SmartDataPtr<RecMdcKalTrackCol> kaltrkCol(eventSvc,
"/Event/Recon/RecMdcKalTrackCol");
123 log << MSG::FATAL <<
"Could not find RecMdcKalTrackCol" << endreq;
124 return StatusCode::FAILURE;
129 RecMdcKalTrackCol::iterator iter_trk = kaltrkCol->begin();
130 for(; iter_trk != kaltrkCol->end(); iter_trk++) {
132 rectrk -> setKalTrk(iter_trk);
133 m_rectrk.push_back(rectrk);
137 log << MSG::INFO <<
"KalTrack ntrk = " << i << endreq;
139 return StatusCode::SUCCESS;
144 for(i=0; i<m_rectrk.size(); i++){