218 {
219
220 MsgStream log(
msgSvc(),
"ExtTrackCnv");
221 log << MSG::DEBUG << "ExtTrackCnv::DataObjectToTObject" << endreq;
222 StatusCode sc=StatusCode::SUCCESS;
223
225 if (!extTrackColTds) {
226 log << MSG::ERROR << "Could not downcast to DstExtTrackCol" << endreq;
227 return StatusCode::FAILURE;
228 }
229
230 DataObject *evt;
233 log << MSG::ERROR << "Could not get ReconEvent in TDS " << endreq;
234 return StatusCode::FAILURE;
235 }
236
238 if (!devtTds) {
239 log << MSG::ERROR << "ExtTrackCnv:Could not downcast to TDS Dst Event" << endreq;
240 }
241 IOpaqueAddress *addr;
242
245
247
248 if (!m_extTrackCol) return sc;
249
251 DstExtTrackCol::const_iterator extTrackTds;
252
253 for (extTrackTds = extTrackColTds->begin(); extTrackTds != extTrackColTds->end(); extTrackTds++) {
254
255 Int_t trackId = (*extTrackTds)->GetTrackId();
256
257 Double_t p1x = (*extTrackTds)->tof1Position().x();
258 Double_t p1y = (*extTrackTds)->tof1Position().y();
259 Double_t p1z = (*extTrackTds)->tof1Position().z();
260 Double_t m1x = (*extTrackTds)->tof1Momentum().x();
261 Double_t m1y = (*extTrackTds)->tof1Momentum().y();
262 Double_t m1z = (*extTrackTds)->tof1Momentum().z();
263
264 TString v1s = (*extTrackTds)->tof1VolumeName() ;
265 Int_t v1n = (*extTrackTds)->tof1VolumeNumber() ;
266 Double_t tof1= (*extTrackTds)->tof1();
267 Double_t tof1p = (*extTrackTds)->tof1Path();
268 Double_t z1 = (*extTrackTds)->tof1PosSigmaAlongZ();
269 Double_t t1 = (*extTrackTds)->tof1PosSigmaAlongT();
270 Double_t x1 = (*extTrackTds)->tof1PosSigmaAlongX();
271 Double_t y1 = (*extTrackTds)->tof1PosSigmaAlongY();
272 Double_t e1m[6][6];
273 HepSymMatrix e1mTds = (*extTrackTds)->tof1ErrorMatrix();
274 for (int i = 0;i<6 ;i++ )
275 for (int j= 0;j<6 ;j++ )
276 e1m[i][j] = e1mTds[i][j];
277
278
279 Double_t p2x = (*extTrackTds)->tof2Position().x();
280 Double_t p2y = (*extTrackTds)->tof2Position().y();
281 Double_t p2z = (*extTrackTds)->tof2Position().z();
282 Double_t m2x = (*extTrackTds)->tof2Momentum().x();
283 Double_t m2y = (*extTrackTds)->tof2Momentum().y();
284 Double_t m2z = (*extTrackTds)->tof2Momentum().z();
285
286 TString v2s = (*extTrackTds)->tof2VolumeName() ;
287 Int_t v2n = (*extTrackTds)->tof2VolumeNumber() ;
288 Double_t tof2= (*extTrackTds)->tof2();
289 Double_t tof2p = (*extTrackTds)->tof2Path();
290 Double_t z2 = (*extTrackTds)->tof2PosSigmaAlongZ();
291 Double_t t2 = (*extTrackTds)->tof2PosSigmaAlongT();
292 Double_t x2 = (*extTrackTds)->tof2PosSigmaAlongX();
293 Double_t y2 = (*extTrackTds)->tof2PosSigmaAlongY();
294 Double_t e2m[6][6];
295 HepSymMatrix e2mTds = (*extTrackTds)->tof2ErrorMatrix();
296 for (int i = 0;i<6 ;i++ )
297 for (int j= 0;j<6 ;j++ )
298 e2m[i][j] = e2mTds[i][j];
299
300 Double_t pEx = (*extTrackTds)->emcPosition().x();
301 Double_t pEy = (*extTrackTds)->emcPosition().y();
302 Double_t pEz = (*extTrackTds)->emcPosition().z();
303 Double_t mEx = (*extTrackTds)->emcMomentum().x();
304 Double_t mEy = (*extTrackTds)->emcMomentum().y();
305 Double_t mEz = (*extTrackTds)->emcMomentum().z();
306
307 TString vEs = (*extTrackTds)->emcVolumeName() ;
308 Int_t vEn = (*extTrackTds)->emcVolumeNumber() ;
309
310 Double_t theta = (*extTrackTds)->emcPosSigmaAlongTheta();
311 Double_t phi = (*extTrackTds)->emcPosSigmaAlongPhi();
312
313 Double_t eEm[6][6];
314 HepSymMatrix eEmTds = (*extTrackTds)->emcErrorMatrix();
315 for (int i = 0;i<6 ;i++ )
316 for (int j= 0;j<6 ;j++ )
317 eEm[i][j] = eEmTds[i][j];
318 Double_t emcPath=(*extTrackTds)->emcPath();
319
320
321 Double_t pMx = (*extTrackTds)->mucPosition().x();
322 Double_t pMy = (*extTrackTds)->mucPosition().y();
323 Double_t pMz = (*extTrackTds)->mucPosition().z();
324 Double_t mMx = (*extTrackTds)->mucMomentum().x();
325 Double_t mMy = (*extTrackTds)->mucMomentum().y();
326 Double_t mMz = (*extTrackTds)->mucMomentum().z();
327
328 TString vMs = (*extTrackTds)->mucVolumeName() ;
329 Int_t vMn = (*extTrackTds)->mucVolumeNumber() ;
330
331 Double_t zM = (*extTrackTds)->mucPosSigmaAlongZ();
332 Double_t tM = (*extTrackTds)->mucPosSigmaAlongT();
333 Double_t xM = (*extTrackTds)->mucPosSigmaAlongX();
334 Double_t yM = (*extTrackTds)->mucPosSigmaAlongY();
335
336 Double_t eMm[6][6];
337 HepSymMatrix eMmTds = (*extTrackTds)->mucErrorMatrix();
338 for (int i = 0;i<6 ;i++ )
339 for (int j= 0;j<6 ;j++ )
340 eMm[i][j]= eMmTds[i][j];
341
342
343
344
345
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
376
383
386
389
394
396
403
406
409
414
416
423
426
429
432
439
442
447
449
451 }
452
453 return StatusCode::SUCCESS;
454}
ObjectVector< DstExtTrack > DstExtTrackCol
static TDstEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
IDataProviderSvc * m_eds
pointer to eventdataservice
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)
Convert the transient object to the requested representation.
void addExtTrack(TExtTrack *Track)
Add a ExtTrack into the Ext Data collection.
void clearExtTrackCol()
clear the whole array
const TObjArray * getExtTrackCol() const
retrieve the whole TObjArray of Ext Data
void SetTof2MomentumY(const Double_t Tof2MomentumY)
void SetTof2(const Double_t Tof2)
void SetTof1PosSigmaAlongZ(const Double_t Tof1PosSigmaAlongZ)
void SetTof1PosSigmaAlongX(const Double_t Tof1PosSigmaAlongX)
void SetTof2MomentumX(const Double_t Tof2MomentumX)
void SetEmcMomentumY(const Double_t EmcMomentumY)
void SetMucMomentumY(const Double_t MucMomentumY)
void SetMucVolumeName(const TString MucVolumeName)
void SetTof1MomentumX(const Double_t Tof1MomentumX)
void SetEmcVolumeNumber(const Int_t EmcVolumeNumber)
void SetTof1VolumeNumber(const Int_t Tof1VolumeNumber)
void SetTof1PositionY(const Double_t Tof1PositionY)
void SetTof1PosSigmaAlongY(const Double_t Tof1PosSigmaAlongY)
void SetEmcErrorMatrix(const Double_t EmcErrorMatrix[6][6])
void SetEmcPositionX(const Double_t EmcPositionX)
void SetMucVolumeNumber(const Int_t MucVolumeNumber)
void SetMucErrorMatrix(const Double_t MucErrorMatrix[6][6])
void SetTof1PosSigmaAlongT(const Double_t Tof1PosSigmaAlongT)
void SetMucPosSigmaAlongX(const Double_t MucPosSigmaAlongX)
void SetEmcMomentumZ(const Double_t EmcMomentumZ)
void SetTof1Path(const Double_t Tof1Path)
void SetEmcMomentumX(const Double_t EmcMomentumX)
void SetTof2VolumeName(const TString Tof2VolumeName)
void SetTof1(const Double_t Tof1)
void SetTof2PosSigmaAlongY(const Double_t Tof2PosSigmaAlongY)
void SetMucPosSigmaAlongY(const Double_t MucPosSigmaAlongY)
void SetTof2ErrorMatrix(const Double_t Tof2ErrorMatrix[6][6])
void SetMucPositionX(const Double_t MucPositionX)
void SetTof2Path(const Double_t Tof2Path)
void SetTof2PosSigmaAlongZ(const Double_t Tof2PosSigmaAlongZ)
void SetMucPosSigmaAlongT(const Double_t MucPosSigmaAlongT)
void SetMucMomentumZ(const Double_t MucMomentumZ)
void SetTof1PositionZ(const Double_t Tof1PositionZ)
void SetMucPosSigmaAlongZ(const Double_t MucPosSigmaAlongZ)
void SetTof2PosSigmaAlongX(const Double_t Tof2PosSigmaAlongX)
void SetTrackId(const Int_t trackId)
void SetEmcPositionZ(const Double_t EmcPositionZ)
void SetTof2PositionZ(const Double_t Tof2PositionZ)
void SetTof1PositionX(const Double_t Tof1PositionX)
void SetTof2PosSigmaAlongT(const Double_t Tof2PosSigmaAlongT)
void SetTof2VolumeNumber(const Int_t Tof2VolumeNumber)
void SetEmcVolumeName(const TString EmcVolumeName)
void SetTof1MomentumY(const Double_t Tof1MomentumY)
void SetTof2PositionY(const Double_t Tof2PositionY)
void SetMucMomentumX(const Double_t MucMomentumX)
void SetMucPositionZ(const Double_t MucPositionZ)
void SetEmcPath(Double_t path)
void SetTof1ErrorMatrix(const Double_t Tof1ErrorMatrix[6][6])
void SetTof2MomentumZ(const Double_t Tof2MomentumZ)
void SetTof1MomentumZ(const Double_t Tof1MomentumZ)
void SetEmcPosSigmaAlongTheta(const Double_t EmcPosSigmaAlongTheta)
void SetTof2PositionX(const Double_t Tof2PositionX)
void SetTof1VolumeName(const TString Tof1VolumeName)
void SetEmcPositionY(const Double_t EmcPositionY)
void SetMucPositionY(const Double_t MucPositionY)
void SetEmcPosSigmaAlongPhi(const Double_t EmcPosSigmaAlongPhi)
_EXTERN_ std::string Event