133 MsgStream log(
msgSvc(), name());
134 SmartDataPtr<RecMdcKalTrackCol> mdcKalTrkCol(eventSvc(),
"/Event/Recon/RecMdcKalTrackCol");
137 log << MSG::ERROR <<
"Unable to retrieve mdcKalTrackCol" << endreq;
138 return StatusCode::FAILURE;
140 for(RecMdcKalTrackCol::iterator iter_trk=mdcKalTrkCol->begin(); iter_trk!=mdcKalTrkCol->end(); iter_trk++) {
141 for(
int jj=0, iii=0; jj<5; jj++){
142 m_nhits[jj] = (*iter_trk)->getNhits(jj);
143 m_zhelix[jj] = (*iter_trk)->getZHelix()[jj];
144 m_zhelixe[jj] = (*iter_trk)->getZHelixE()[jj];
145 m_zhelixmu[jj] = (*iter_trk)->getZHelixMu()[jj];
146 m_zhelixk[jj] = (*iter_trk)->getZHelixK()[jj];
147 m_zhelixp[jj] = (*iter_trk)->getZHelixP()[jj];
148 m_fhelix[jj] = (*iter_trk)->getFHelix()[jj];
149 m_fhelixe[jj] = (*iter_trk)->getFHelixE()[jj];
150 m_fhelixmu[jj] = (*iter_trk)->getFHelixMu()[jj];
151 m_fhelixk[jj] = (*iter_trk)->getFHelixK()[jj];
152 m_fhelixp[jj] = (*iter_trk)->getFHelixP()[jj];
153 m_lhelix[jj] = (*iter_trk)->getLHelix()[jj];
154 m_lhelixe[jj] = (*iter_trk)->getLHelixE()[jj];
155 m_lhelixmu[jj] = (*iter_trk)->getLHelixMu()[jj];
156 m_lhelixk[jj] = (*iter_trk)->getLHelixK()[jj];
157 m_lhelixp[jj] = (*iter_trk)->getLHelixP()[jj];
160 for(
int kk=0; kk<=jj; kk++,iii++) {
161 m_zerror[iii] = (*iter_trk)->getZError()[jj][kk];
162 m_zerrore[iii] = (*iter_trk)->getZErrorE()[jj][kk];
163 m_zerrormu[iii] = (*iter_trk)->getZErrorMu()[jj][kk];
164 m_zerrork[iii] = (*iter_trk)->getZErrorK()[jj][kk];
165 m_zerrorp[iii] = (*iter_trk)->getZErrorP()[jj][kk];
166 m_ferror[iii] = (*iter_trk)->getFError()[jj][kk];
167 m_ferrore[iii] = (*iter_trk)->getFErrorE()[jj][kk];
168 m_ferrormu[iii] = (*iter_trk)->getFErrorMu()[jj][kk];
169 m_ferrork[iii] = (*iter_trk)->getFErrorK()[jj][kk];
170 m_ferrorp[iii] = (*iter_trk)->getFErrorP()[jj][kk];
171 m_lerror[iii] = (*iter_trk)->getLError()[jj][kk];
172 m_lerrore[iii] = (*iter_trk)->getLErrorE()[jj][kk];
173 m_lerrormu[iii] = (*iter_trk)->getLErrorMu()[jj][kk];
174 m_lerrork[iii] = (*iter_trk)->getLErrorK()[jj][kk];
175 m_lerrorp[iii] = (*iter_trk)->getLErrorP()[jj][kk];
180 m_ndf[0][0] = (*iter_trk)->getNdf(0,0);
181 m_ndf[1][0] = (*iter_trk)->getNdf(0,1);
182 m_ndf[2][0] = (*iter_trk)->getNdf(0,2);
183 m_ndf[3][0] = (*iter_trk)->getNdf(0,3);
184 m_ndf[4][0] = (*iter_trk)->getNdf(0,4);
185 m_ndf[0][1] = (*iter_trk)->getNdf(1,0);
186 m_ndf[1][1] = (*iter_trk)->getNdf(1,1);
187 m_ndf[2][1] = (*iter_trk)->getNdf(1,2);
188 m_ndf[3][1] = (*iter_trk)->getNdf(1,3);
189 m_ndf[4][1] = (*iter_trk)->getNdf(1,4);
191 m_stat[0][0] = (*iter_trk)->getStat(0,0);
192 m_stat[1][0] = (*iter_trk)->getStat(0,1);
193 m_stat[2][0] = (*iter_trk)->getStat(0,2);
194 m_stat[3][0] = (*iter_trk)->getStat(0,3);
195 m_stat[4][0] = (*iter_trk)->getStat(0,4);
196 m_stat[0][1] = (*iter_trk)->getStat(1,0);
197 m_stat[1][1] = (*iter_trk)->getStat(1,1);
198 m_stat[2][1] = (*iter_trk)->getStat(1,2);
199 m_stat[3][1] = (*iter_trk)->getStat(1,3);
200 m_stat[4][1] = (*iter_trk)->getStat(1,4);
203 m_fptot = sqrt(1+pow(m_fhelix[4],2))/m_fhelix[2];
204 m_fptote = sqrt(1+pow(m_fhelixe[4],2))/m_fhelixe[2];
205 m_fptotmu = sqrt(1+pow(m_fhelixmu[4],2))/m_fhelixmu[2];
206 m_fptotk = sqrt(1+pow(m_fhelixk[4],2))/m_fhelixk[2];
207 m_fptotp = sqrt(1+pow(m_fhelixp[4],2))/m_fhelixp[2];
209 m_zpt = 1/m_zhelix[2];
210 m_zpte = 1/m_zhelixe[2];
211 m_zptmu = 1/m_zhelixmu[2];
212 m_zptk = 1/m_zhelixk[2];
213 m_zptp = 1/m_zhelixp[2];
215 m_fpt = 1/m_fhelix[2];
216 m_fpte = 1/m_fhelixe[2];
217 m_fptmu = 1/m_fhelixmu[2];
218 m_fptk = 1/m_fhelixk[2];
219 m_fptp = 1/m_fhelixp[2];
221 m_lpt = 1/m_lhelix[2];
222 m_lpte = 1/m_lhelixe[2];
223 m_lptmu = 1/m_lhelixmu[2];
224 m_lptk = 1/m_lhelixk[2];
225 m_lptp = 1/m_lhelixp[2];
227 m_lptot = sqrt(1+pow(m_lhelix[4],2))/m_lhelix[2];
228 m_lptote = sqrt(1+pow(m_lhelixe[4],2))/m_lhelixe[2];
229 m_lptotmu = sqrt(1+pow(m_lhelixmu[4],2))/m_lhelixmu[2];
230 m_lptotk = sqrt(1+pow(m_lhelixk[4],2))/m_lhelixk[2];
231 m_lptotp = sqrt(1+pow(m_lhelixp[4],2))/m_lhelixp[2];
233 m_zptot = sqrt(1+pow(m_zhelix[4],2))/m_zhelix[2];
234 m_zptote = sqrt(1+pow(m_zhelixe[4],2))/m_zhelixe[2];
235 m_zptotmu = sqrt(1+pow(m_zhelixmu[4],2))/m_zhelixmu[2];
236 m_zptotk = sqrt(1+pow(m_zhelixk[4],2))/m_zhelixk[2];
237 m_zptotp = sqrt(1+pow(m_zhelixp[4],2))/m_zhelixp[2];
239 StatusCode sc1 = m_nt1->write();
240 if( sc1.isFailure() ) cout<<
"Ntuple1 filling failed!"<<endl;
243 return StatusCode::SUCCESS;