129 {
130
131 MsgStream log(
msgSvc(),
"RecMdcKalHelixSegCnv");
132 log << MSG::DEBUG << "RecMdcKalHelixSegCnv::DataObjectToTObject" << endreq;
133
135 if (!mdcHitColTds) {
136 log << MSG::ERROR << "Could not downcast to RecMdcKalHelixSegCol" << endreq;
137 return StatusCode::FAILURE;
138 }
139
140 DataObject *evt;
142 if (evt==NULL) {
143 log << MSG::ERROR << "Could not get ReconEvent in TDS " << endreq;
144 return StatusCode::FAILURE;
145 }
146
148 if (!devtTds) {
149 log << MSG::ERROR << "RecMdcKalHelixSegCnv:Could not downcast to TDS ReconEvent" << endreq;
150 }
151
152 IOpaqueAddress *addr;
153
156
158 if (!m_recMdcKalHelixSegCol) return StatusCode::SUCCESS;
160
161 RecMdcKalHelixSegCol::const_iterator recMdcKalHelixSeg;
162 int nSeg=0;
163 for (recMdcKalHelixSeg = mdcHitColTds->begin(); recMdcKalHelixSeg != mdcHitColTds->end(); recMdcKalHelixSeg++) {
164 Int_t trackId =(*recMdcKalHelixSeg)->getTrackId();
165 Int_t flagLR = (*recMdcKalHelixSeg)->getFlagLR();
166 UInt_t mdcId = (*recMdcKalHelixSeg)->getMdcId().get_value();
167 Double_t tdc = (*recMdcKalHelixSeg)->getTdc();
168 Double_t adc = (*recMdcKalHelixSeg)->getAdc();
169 Double_t zhit = (*recMdcKalHelixSeg)->getZhit();
170 Double_t tof = (*recMdcKalHelixSeg)->getTof();
171 Double_t docaIncl = (*recMdcKalHelixSeg)->getDocaIncl();
172 Double_t docaExcl = (*recMdcKalHelixSeg)->getDocaExcl();
173 Double_t driftDist= (*recMdcKalHelixSeg)->getDD();
174 Double_t entra = (*recMdcKalHelixSeg)->getEntra();
175 Double_t driftT = (*recMdcKalHelixSeg)->getDT();
176
177
178
179
180
181
182
183
184
185
186
187 HepVector helixIncl_vct = (*recMdcKalHelixSeg)->getHelixIncl();
188 HepVector helixExcl_vct = (*recMdcKalHelixSeg)->getHelixExcl();
189
190
191
192 Double_t helixIncl[5], helixExcl[5];
193 for(Int_t i=0; i<5; i++){
194 helixIncl[i] = helixIncl_vct[i];
195 helixExcl[i] = helixExcl_vct[i];
196 }
197
198
199
200
201
202
203
205
206
208 recMdcKalHelixSegRoot->
setFlagLR( flagLR );
210 recMdcKalHelixSegRoot->
setTdc( tdc );
211 recMdcKalHelixSegRoot->
setAdc( adc );
212 recMdcKalHelixSegRoot->
setZhit( zhit );
213 recMdcKalHelixSegRoot->
setTof( tof );
216 recMdcKalHelixSegRoot->
setDD( driftDist );
217 recMdcKalHelixSegRoot->
setEntra( entra );
218 recMdcKalHelixSegRoot->
setDT( driftT );
219
220
221
222
223
224
225
226
227
228
229
232
233
234
235 log<<MSG::INFO<<
" recMdcKalHelixSegRoot.dd: "<<recMdcKalHelixSegRoot->
getDD()
236 <<
" recMdcKalHelixSegRoot.entra: "<<recMdcKalHelixSegRoot->
getEntra()
237 <<endreq;
238
240 nSeg++;
241 }
242
243 return StatusCode::SUCCESS;
244}
ObjectVector< RecMdcKalHelixSeg > RecMdcKalHelixSegCol
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.
const Double_t getEntra(void) const
void setEntra(Double_t entra)
void setAdc(Double_t adc)
void setTof(Double_t tof)
void setHelixIncl(const Double_t helix[5])
void setDocaExcl(Double_t docaexcl)
void setZhit(Double_t zhit)
void setDocaIncl(Double_t docaincl)
void setMdcId(UInt_t mdcid)
void setTrackId(Int_t trkid)
void setDT(Double_t driftT)
void setHelixExcl(const Double_t helix[5])
const Double_t getDD(void) const
void setTdc(Double_t tdc)
void addRecMdcKalHelixSeg(TRecMdcKalHelixSeg *Track)
void clearRecMdcKalHelixSegCol()
const TObjArray * getRecMdcKalHelixSegCol() const
_EXTERN_ std::string Event