18 MsgStream log(
msgSvc(), name() );
19 log << MSG::INFO <<
"Booking Histograms" << endreq;
22 NTuplePtr nt1(
ntupleSvc(),
"FILE208/ExtTrk");
23 if ( nt1 ) m_tuple1 = nt1;
25 m_tuple1 =
ntupleSvc()->book (
"FILE208/ExtTrk", CLID_RowWiseTuple,
"ExtTrack parameter");
27 status = m_tuple1->addItem(
"tof1",m_tof1);
28 status = m_tuple1->addItem(
"tof1Path",m_tof1Path);
29 status = m_tuple1->addItem(
"tof1PosSigmaAlongX",m_tof1PosSigmaAlongX);
30 status = m_tuple1->addItem(
"xTof1Pos",m_xTof1Pos);
31 status = m_tuple1->addItem(
"yTof1Pos",m_yTof1Pos);
32 status = m_tuple1->addItem(
"zTof1Pos",m_zTof1Pos);
33 status = m_tuple1->addItem(
"emTof1_11",m_emTof1_11);
34 status = m_tuple1->addItem(
"emTof1_33",m_emTof1_33);
35 status = m_tuple1->addItem(
"emTof1_55",m_emTof1_55);
36 status = m_tuple1->addItem(
"emTof1_66",m_emTof1_66);
37 status = m_tuple1->addItem(
"emTof1_23",m_emTof1_23);
38 status = m_tuple1->addItem(
"emTof1_35",m_emTof1_35);
41 log << MSG::ERROR <<
" Cannot book N-tuple:" << long(m_tuple1) << endmsg;
45 log << MSG::INFO <<
"Finished booking NTuples" << endmsg;
48 return StatusCode::SUCCESS;
55 MsgStream log(
msgSvc(), name());
56 SmartDataPtr<RecExtTrackCol> extTracks(eventSvc(),
"/Event/Recon/RecExtTrackCol");
59 log << MSG::ERROR <<
"Unable to retrieve RecExtTrackCol" << endreq;
60 return StatusCode::FAILURE;
62 log << MSG::DEBUG <<
"RecExtTrackCol retrieved of size "<< extTracks->size() << endreq;
63 for(RecExtTrackCol::iterator it=extTracks->begin(); it!=extTracks->end(); it++)
67 m_tof1Path=(*it)->tof1Path();
68 m_tof1PosSigmaAlongX=(*it)->tof1PosSigmaAlongX();
69 m_xTof1Pos = (*it)->tof1Position().x();
70 m_yTof1Pos = (*it)->tof1Position().y();
71 m_zTof1Pos = (*it)->tof1Position().z();
72 m_emTof1_11 = (*it)->tof1ErrorMatrix().fast(1,1);
73 m_emTof1_33 = (*it)->tof1ErrorMatrix().fast(3,3);
74 m_emTof1_55 = (*it)->tof1ErrorMatrix().fast(5,5);
75 m_emTof1_66 = (*it)->tof1ErrorMatrix().fast(6,6);
76 m_emTof1_23 = (*it)->tof1ErrorMatrix().fast(2,3);
77 m_emTof1_35 = (*it)->tof1ErrorMatrix().fast(3,5);
79 StatusCode status1 = m_tuple1->write();
80 if ( status1.isFailure() ) {
81 log << MSG::ERROR <<
"Cannot fill Ntuple1" << endreq;
85 return StatusCode::SUCCESS;