91 {
92
93 MsgStream log(
msgSvc(), name());
94 log << MSG::INFO << "in execute()" << endreq;
95
96 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),"/Event/EventHeader");
97 m_runNo=eventHeader->runNumber();
98 m_event=eventHeader->eventNumber();
99 log << MSG::DEBUG <<"run, evtnum = "
100 << m_runNo << " , "
101 << m_event <<endreq;
102
103
105
106 SmartDataPtr<DQAEvent::DQAEvent> dqaevt(eventSvc(), "/Event/DQATag");
107 if ( dqaevt ) {
108 log << MSG::INFO << "success get DQAEvent" << endreq;
109 } else {
110 log << MSG::ERROR << "Error accessing DQAEvent" << endreq;
111 return StatusCode::FAILURE;
112 }
113
114 log << MSG::DEBUG << "event tag = " << dqaevt->EventTag() << endreq;
115
116
117 if ( dqaevt->Bhabha() ) {
118 log << MSG::INFO << "Bhabha event" << endreq;
120 for(int i = 0; i < evtRecEvent->totalCharged(); i++){
122 log << MSG::DEBUG << i << " " << (*itTrk)->partId() << " "
123 << (*itTrk)->quality() << endreq;
124
125
126
127
128 if ( !(*itTrk)->isElectron() ) continue;
129
130
131
132
133
134
135 int qual = (*itTrk)->quality();
136 if ( qual != 0 && qual != 2) continue;
137
139 if ( mdcTrk->
charge() > 0 ) {
140 log << MSG::DEBUG << "is electron" << endreq;
141 } else {
142 log << MSG::DEBUG << "is positron" << endreq;
143 }
144 double x0 =mdcTrk->
x();
145 double y0 =mdcTrk->
y();
146 double z0 =mdcTrk->
z();
147 double Rxy=sqrt(x0*x0+y0*y0);
148
149 TH1 *h(0);
150 if (m_thsvc->getHist("/DQAHist/MDC/hrxy", h).isSuccess()) {
151 h->Fill(Rxy);
152 } else {
153 log << MSG::ERROR << "Couldn't retrieve hrxy" << endreq;
154 }
155 if (m_thsvc->getHist("/DQAHist/MDC/hz", h).isSuccess()) {
156 h->Fill(z0);
157 } else {
158 log << MSG::ERROR << "Couldn't retrieve hz" << endreq;
159 }
160 }
161 }
162
163 m_tuple->write();
164
165 return StatusCode::SUCCESS;
166
167}
EvtRecTrackCol::iterator EvtRecTrackIterator
_EXTERN_ std::string EvtRecEvent
_EXTERN_ std::string EvtRecTrackCol