BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
ValidRecExtTrackAlg Class Reference

#include <ValidRecExtTrackAlg.h>

+ Inheritance diagram for ValidRecExtTrackAlg:

Public Member Functions

 ValidRecExtTrackAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 
 ValidRecExtTrackAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 

Detailed Description

Constructor & Destructor Documentation

◆ ValidRecExtTrackAlg() [1/2]

ValidRecExtTrackAlg::ValidRecExtTrackAlg ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 9 of file ValidRecExtTrackAlg.cxx.

9 :
10 Algorithm(name, pSvcLocator) {
11
12 m_tuple1 = 0;
13}

◆ ValidRecExtTrackAlg() [2/2]

ValidRecExtTrackAlg::ValidRecExtTrackAlg ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Member Function Documentation

◆ execute() [1/2]

StatusCode ValidRecExtTrackAlg::execute ( )

Definition at line 54 of file ValidRecExtTrackAlg.cxx.

54 {
55 MsgStream log(msgSvc(), name());
56 SmartDataPtr<RecExtTrackCol> extTracks(eventSvc(),"/Event/Recon/RecExtTrackCol");
57 if( ! extTracks )
58 {
59 log << MSG::ERROR << "Unable to retrieve RecExtTrackCol" << endreq;
60 return StatusCode::FAILURE;
61 } else {
62 log << MSG::DEBUG << "RecExtTrackCol retrieved of size "<< extTracks->size() << endreq;
63 for(RecExtTrackCol::iterator it=extTracks->begin(); it!=extTracks->end(); it++)
64 {
65
66 m_tof1=(*it)->tof1();
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);
78
79 StatusCode status1 = m_tuple1->write();
80 if ( status1.isFailure() ) {
81 log << MSG::ERROR << "Cannot fill Ntuple1" << endreq;
82 }
83 }
84 }
85 return StatusCode::SUCCESS;
86}

◆ execute() [2/2]

StatusCode ValidRecExtTrackAlg::execute ( )

◆ finalize() [1/2]

StatusCode ValidRecExtTrackAlg::finalize ( )

Definition at line 89 of file ValidRecExtTrackAlg.cxx.

89 {
90
91 MsgStream log(msgSvc(), name());
92 log << MSG::INFO << "Finalizing..." << endreq;
93
94}

◆ finalize() [2/2]

StatusCode ValidRecExtTrackAlg::finalize ( )

◆ initialize() [1/2]

StatusCode ValidRecExtTrackAlg::initialize ( )

Definition at line 15 of file ValidRecExtTrackAlg.cxx.

15 {
16
17 StatusCode status;
18 MsgStream log( msgSvc(), name() );
19 log << MSG::INFO << "Booking Histograms" << endreq;
20
21 // Book N-tuple 1
22 NTuplePtr nt1(ntupleSvc(), "FILE208/ExtTrk");
23 if ( nt1 ) m_tuple1 = nt1;
24 else {
25 m_tuple1 = ntupleSvc()->book ("FILE208/ExtTrk", CLID_RowWiseTuple, "ExtTrack parameter");
26 if ( m_tuple1 ) {
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);
39 }
40 else { // did not manage to book the N tuple....
41 log << MSG::ERROR << " Cannot book N-tuple:" << long(m_tuple1) << endmsg;
42 //return StatusCode::FAILURE;
43 }
44 }
45 log << MSG::INFO << "Finished booking NTuples" << endmsg;
46
47
48 return StatusCode::SUCCESS;
49
50
51}

◆ initialize() [2/2]

StatusCode ValidRecExtTrackAlg::initialize ( )

The documentation for this class was generated from the following files: