156 {
157
158 MsgStream log(
msgSvc(),
"MucTrackCnv");
159 log << MSG::DEBUG << "MucTrackCnv::DataObjectToTObject" << endreq;
160 StatusCode sc=StatusCode::SUCCESS;
161
163 if (!mucTrackColTds) {
164 log << MSG::ERROR << "Could not downcast to MucTrackCol" << endreq;
165 return StatusCode::FAILURE;
166 }
167
168 DataObject *evt;
170 if (evt==NULL) {
171 log << MSG::ERROR << "Could not get DstEvent in TDS " << endreq;
172 return StatusCode::FAILURE;
173 }
175 if (!devtTds) {
176 log << MSG::ERROR << "MucTrackCnv:Could not downcast to TDS DigiEvent" << endreq;
177 }
178 IOpaqueAddress *addr;
179
182
184 if (!m_mucTrackCol) return sc;
186 DstMucTrackCol::const_iterator mucTrackTds;
187
188 for (mucTrackTds = mucTrackColTds->begin(); mucTrackTds != mucTrackColTds->end(); mucTrackTds++) {
189 Int_t trackId = (*mucTrackTds)->trackId();
190 Int_t id = (*mucTrackTds)-> id();
191 Int_t st = (*mucTrackTds)->status();
192 Int_t type = (*mucTrackTds)->type();
193
194 Int_t startPart = (*mucTrackTds)->startPart();
195 Int_t endPart = (*mucTrackTds)->endPart();
196 Int_t brLastLayer = (*mucTrackTds)->brLastLayer();
197 Int_t ecLastLayer = (*mucTrackTds)->ecLastLayer();
198 Int_t numHits = (*mucTrackTds)->numHits();
199 Int_t numLayers = (*mucTrackTds)->numLayers();
200 Int_t maxHitsInLayer = (*mucTrackTds)->maxHitsInLayer();
201
202 Double_t depth = (*mucTrackTds)->depth();
203 Double_t chi2 = (*mucTrackTds)->chi2();
204 Int_t dof = (*mucTrackTds)->dof();
205 Double_t rms = (*mucTrackTds)->rms();
206
207 Double_t xPos = (*mucTrackTds)->xPos() ;
208 Double_t yPos = (*mucTrackTds)->yPos() ;
209 Double_t zPos = (*mucTrackTds)->zPos() ;
210
211 Double_t xPosSigma = (*mucTrackTds)->xPosSigma() ;
212 Double_t yPosSigma = (*mucTrackTds)->yPosSigma() ;
213 Double_t zPosSigma = (*mucTrackTds)->zPosSigma() ;
214
215 Double_t px = (*mucTrackTds)->px() ;
216 Double_t py = (*mucTrackTds)->py() ;
217 Double_t pz = (*mucTrackTds)->pz() ;
218
219 Double_t distance = (*mucTrackTds)->distance();
220 Double_t deltaphi = (*mucTrackTds)->deltaPhi();
221
222 Double_t krechi2 = (*mucTrackTds)->kalRechi2();
223 Int_t kdof = (*mucTrackTds)->kaldof();
224 Double_t kdepth = (*mucTrackTds)->kaldepth();
225 Int_t kbrlay = (*mucTrackTds)->kalbrLastLayer();
226 Int_t keclay = (*mucTrackTds)->kalecLastLayer();
227
228
229
230
232
233
235 mucTrackRoot->
setId(
id );
238
246
249 mucTrackRoot->
setDof( dof );
250 mucTrackRoot->
setRms( rms );
251
255
259
260 mucTrackRoot->
setPx( px );
261 mucTrackRoot->
setPy( py );
262 mucTrackRoot->
setPz( pz );
263
266
272
273
274
276 }
277
278 return StatusCode::SUCCESS;
279}
ObjectVector< DstMucTrack > DstMucTrackCol
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 clearMucTrackCol()
clear the whole array
void addMucTrack(TMucTrack *Track)
Add a MucTrack into the TOF Data collection.
const TObjArray * getMucTrackCol() const
retrieve the whole TObjArray of MucTrack Data
void setNumHits(Int_t numHits)
void setTrackId(Int_t trackId)
void setkalecLastLayer(Int_t ec)
void setEndPart(Int_t part)
void setBrLastLayer(Int_t layer)
void setDeltaPhi(double dphi)
void setXPosSigma(Double_t x)
void setMaxHitsInLayer(Int_t maxHits)
void setkalRechi2(Double_t ch)
void setYPosSigma(Double_t y)
void setkalDepth(Double_t de)
void setDepth(Double_t depth)
void setStartPart(Int_t part)
void setChi2(Double_t chi2)
void setkalbrLastLayer(Int_t br)
void setEcLastLayer(Int_t layer)
void setRms(Double_t rms)
void setDistance(double dist)
void setZPosSigma(Double_t z)
void setNumLayers(Int_t numLayers)
_EXTERN_ std::string Event