49 {
50 MsgStream log(
msgSvc(), name());
51 SmartDataPtr<RecMdcDedxCol> mdcDedx(eventSvc(),"/Event/Recon/RecMdcDedxCol");
52 if( ! mdcDedx )
53 {
54 log << MSG::ERROR << "Unable to retrieve RecMdcDedxCol" << endreq;
55 return StatusCode::FAILURE;
56 } else {
57 log << MSG::DEBUG << "RecMdcDedxCol retrieved of size "<< mdcDedx->size() << endreq;
58 int i = 0;
59 for(RecMdcDedxCol::iterator it=mdcDedx->begin(); it!=mdcDedx->end(); it++,i++)
60 { m_dedx = (*it)->probPH();
61 pid_dedx m_pid_dedx = (*it)->particleType();
62 m_parttype = (int)m_pid_dedx;
63
64 if((m_pid_dedx !=
electron) && (m_pid_dedx !=
muon) && (m_pid_dedx !=
pion)&& (m_pid_dedx !=
kaon)&& (m_pid_dedx !=
proton) )
continue;
65 m_chidedx = (*it)->chi(m_parttype);
66 m_chidedxE = (*it)->chiE();
67 m_chidedxMu = (*it)->chiMu();
68 m_chidedxPi = (*it)->chiPi();
69 m_chidedxK = (*it)->chiK();
70 m_chidedxP = (*it)->chiP();
71
72 log << MSG::INFO << "particle chi="<< m_chidedx <<endreq;
73 log << MSG::INFO << "m_dedx="<<m_dedx<<endreq;
74 log << MSG::INFO << " m_parttype="<< m_parttype<<endreq;
75 StatusCode status1 = m_tuple1->write();
76 if ( status1.isFailure() ) {
77 log << MSG::ERROR << "Cannot fill Ntuple1" << endreq;
78 }
79
80 }
81 }
82 return StatusCode::SUCCESS;
83}