126 {
127 setFilterPassed(false);
128 MsgStream log(
msgSvc(), name());
129 StatusCode sc = StatusCode::SUCCESS;
130
131
132 SmartDataPtr<EventNavigator> navigator (eventSvc(),"/Event/Navigator");
133 if( ! navigator ) {
134 log << MSG::WARNING<< " Unable to retrieve EventNavigator" << endreq;
135 m_rawData = true;
136 }
137 SmartDataPtr<RecMdcTrackCol> recMdcTrackCol(eventSvc(), "/Event/Recon/RecMdcTrackCol");
138 SmartDataPtr<RecMdcHitCol> recMdcHitCol(eventSvc(), "/Event/Recon/RecMdcHitCol");
139
140
141 if(m_hist){
142 sc = fillInit();
143 if ( sc!=StatusCode::SUCCESS ) {
144 return StatusCode::FAILURE;
145 }
146 }
147 if (m_mc){
148
149 SmartDataPtr<Event::McParticleCol> mcParticles(eventSvc(),"/Event/MC/McParticleCol");
150 SmartDataPtr<Event::MdcMcHitCol> mcHit(eventSvc(),"/Event/MC/MdcMcHitCol");
151 if( ! mcParticles ) {
152 log << MSG::WARNING<< " Unable to retrieve McParticleCol" << endreq;
153 }else{
154
155 t_mcTkNum = 0;
156 McParticleCol::iterator it= mcParticles->begin();
157 log <<MSG::INFO << "mcParticles size = "<<mcParticles->size() << endreq;
158 for(; it!= mcParticles->end(); it++ ) {
159
160 t_mcTkNum++;
161 }
162 }
163 }
164 t_mcTkNum = 0;
165 t_recTkNum = 0;
166
167
168 if (!recMdcTrackCol){
169 log << MSG::WARNING<< " Unable to retrieve recMdcTrackCol" << endreq;
170 return StatusCode::SUCCESS;
171 }
172 t_recTkNum = recMdcTrackCol->size();
173
174
175 RecMdcTrackCol::iterator it = recMdcTrackCol->begin();
176 for(;it != recMdcTrackCol->end(); it++ ) {
177 if ( m_mc && navigator ) {
179 t_mcTkNum = particles.size();
181
182 if ( sc!=StatusCode::SUCCESS ) return StatusCode::FAILURE;
183 }
184 sc = fillRecTrack(*it, t_mcTkNum, t_recTkNum);
185 t_nTk++;
186 if ( sc!=StatusCode::SUCCESS ) return StatusCode::FAILURE;
187 }
188
189
190 fillRecHits(*recMdcHitCol);
191
192
193 if(m_hist){fillEvent();}
194
195 return StatusCode::SUCCESS;
196}
std::vector< const RecMdcTrack * > RecMdcTrackVector
std::vector< const Event::McParticle * > McParticleVector