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