178 {
179
180 MsgStream log(
msgSvc(),
"RecMucTrackCnv");
181 log << MSG::DEBUG << "RecMucTrackCnv::DataObjectToTObject" << endreq;
182 StatusCode sc=StatusCode::SUCCESS;
183
185 if (!mucTrackColTds) {
186 log << MSG::ERROR << "Could not downcast to RecMucTrackCol" << endreq;
187 return StatusCode::FAILURE;
188 }
189
190 DataObject *evt;
192 if (evt==NULL) {
193 log << MSG::ERROR << "Could not get RecEvent in TDS " << endreq;
194 return StatusCode::FAILURE;
195 }
197 if (!devtTds) {
198 log << MSG::ERROR << "RecMucTrackCnv:Could not downcast to TDS DigiEvent" << endreq;
199 }
200 IOpaqueAddress *addr;
201
204
206 if (!m_recMucTrackCol) return sc;
208 RecMucTrackCol::const_iterator mucTrackTds;
209
210 for (mucTrackTds = mucTrackColTds->begin(); mucTrackTds != mucTrackColTds->end(); mucTrackTds++) {
211 Int_t trackId = (*mucTrackTds)->trackId();
212 Int_t id = (*mucTrackTds)-> id();
213 Int_t st = (*mucTrackTds)->status();
214 Int_t type = (*mucTrackTds)->type();
215
216 Int_t startPart = (*mucTrackTds)->startPart();
217 Int_t endPart = (*mucTrackTds)->endPart();
218 Int_t brLastLayer = (*mucTrackTds)->brLastLayer();
219 Int_t ecLastLayer = (*mucTrackTds)->ecLastLayer();
220 Int_t numHits = (*mucTrackTds)->numHits();
221 Int_t numLayers = (*mucTrackTds)->numLayers();
222 Int_t maxHitsInLayer = (*mucTrackTds)->maxHitsInLayer();
223
224 Double_t depth = (*mucTrackTds)->depth();
225 Double_t chi2 = (*mucTrackTds)->chi2();
226 Int_t dof = (*mucTrackTds)->dof();
227 Double_t rms = (*mucTrackTds)->rms();
228
229 Double_t xPos = (*mucTrackTds)->xPos() ;
230 Double_t yPos = (*mucTrackTds)->yPos() ;
231 Double_t zPos = (*mucTrackTds)->zPos() ;
232
233 Double_t xPosSigma = (*mucTrackTds)->xPosSigma() ;
234 Double_t yPosSigma = (*mucTrackTds)->yPosSigma() ;
235 Double_t zPosSigma = (*mucTrackTds)->zPosSigma() ;
236
237 Double_t distance = (*mucTrackTds)->distance();
238 Double_t deltaphi = (*mucTrackTds)->deltaPhi();
239
240 Double_t px = (*mucTrackTds)->px() ;
241 Double_t py = (*mucTrackTds)->py() ;
242 Double_t pz = (*mucTrackTds)->pz() ;
243
244
245 vector<Int_t> vecHits = (*mucTrackTds)->getVecHits();
246 vector<Int_t> expHits = (*mucTrackTds)->getExpHits();
247 vector<Float_t> distHits = (*mucTrackTds)->getDistHits();
248
249 Double_t krechi2 = (*mucTrackTds)->kalRechi2();
250 Int_t kdof = (*mucTrackTds)->kaldof();
251 Double_t kdepth = (*mucTrackTds)->kaldepth();
252 Int_t kbrlay = (*mucTrackTds)->kalbrLastLayer();
253 Int_t keclay = (*mucTrackTds)->kalecLastLayer();
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
272
273
275 mucTrackRoot->
setId(
id );
278
286
289 mucTrackRoot->
setDof( dof );
290 mucTrackRoot->
setRms( rms );
291
295
299
302
303
304
305 mucTrackRoot->
setPx( px );
306 mucTrackRoot->
setPy( py );
307 mucTrackRoot->
setPz( pz );
308
312
313
319
321 }
322
323 return StatusCode::SUCCESS;
324}
ObjectVector< RecMucTrack > RecMucTrackCol
static TRecTrackEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
RecTrackCnv * getRecTrackCnv()
IDataProviderSvc * m_eds
pointer to eventdataservice
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)
Convert the transient object to the requested representation.
void setRms(Double_t rms)
void setMaxHitsInLayer(Int_t maxHits)
void setkalbrLastLayer(Int_t br)
void setEcLastLayer(Int_t layer)
void setDistHits(vector< Float_t > &distHits)
void setExpHits(vector< Int_t > &expHits)
void setVecHits(vector< Int_t > &vecHits)
void setYPosSigma(Double_t y)
void setkalecLastLayer(Int_t ec)
void setStartPart(Int_t part)
void setNumHits(Int_t numHits)
void setBrLastLayer(Int_t layer)
void setDeltaPhi(Double_t dphi)
void setEndPart(Int_t part)
void setTrackId(Int_t trackId)
void setkalRechi2(Double_t ch)
void setNumLayers(Int_t numLayers)
void setDepth(Double_t depth)
void setXPosSigma(Double_t x)
void setChi2(Double_t chi2)
void setZPosSigma(Double_t z)
void setkalDepth(Double_t de)
void setDistance(Double_t dist)
void addMucTrack(TRecMucTrack *Track)
Add a MucTrack into the TOF Data collection.
void clearMucTrackCol()
clear the whole array
const TObjArray * getMucTrackCol() const
retrieve the whole TObjArray of MucTrack Data
_EXTERN_ std::string Event