147 {
148
149 MsgStream log(
msgSvc(),
"TofTrackCnv");
150 log << MSG::DEBUG << "TofTrackCnv::DataObjectToTObject" << endreq;
151 StatusCode sc=StatusCode::SUCCESS;
152
154 if (!tofTrackColTds) {
155 log << MSG::ERROR << "Could not downcast to DstTofTrackCol" << endreq;
156 return StatusCode::FAILURE;
157 }
158
159 DataObject *evt;
162 log << MSG::ERROR << "Could not get DstEvent in TDS " << endreq;
163 return StatusCode::FAILURE;
164 }
165
167 if (!devtTds) {
168 log << MSG::ERROR << "TofTrackCnv:Could not downcast to TDS ReconEvent" << endreq;
169 }
170 IOpaqueAddress *addr;
171
174
176 if (!m_tofTrackCol) return sc;
178 DstTofTrackCol::const_iterator tofTrackTds;
179
180 for (tofTrackTds = tofTrackColTds->begin(); tofTrackTds != tofTrackColTds->end(); tofTrackTds++) {
181
182 Int_t tofTrackID = (*tofTrackTds)->tofTrackID();
183 Int_t trackID = (*tofTrackTds)->trackID();
184 Int_t tofID = (*tofTrackTds)->tofID();
185 Int_t strip = (*tofTrackTds)->strip();
186 UInt_t status = (*tofTrackTds)->status();
187 Double_t path = (*tofTrackTds)->path();
188 Double_t zrhit = (*tofTrackTds)->zrhit();
189 Double_t ph = (*tofTrackTds)->ph();
190 Double_t tof = (*tofTrackTds)->tof();
191 Double_t errtof = (*tofTrackTds)->errtof();
192 Double_t beta = (*tofTrackTds)->beta();
193 Double_t texpElectron = (*tofTrackTds)->texpElectron();
194 Double_t texpMuon = (*tofTrackTds)->texpMuon();
195 Double_t texpPion = (*tofTrackTds)->texpPion();
196 Double_t texpKaon = (*tofTrackTds)->texpKaon();
197 Double_t texpProton = (*tofTrackTds)->texpProton();
198 Double_t toffsetElectron = (*tofTrackTds)->toffsetElectron();
199 Double_t toffsetMuon = (*tofTrackTds)->toffsetMuon();
200 Double_t toffsetPion = (*tofTrackTds)->toffsetPion();
201 Double_t toffsetKaon = (*tofTrackTds)->toffsetKaon();
202 Double_t toffsetProton = (*tofTrackTds)->toffsetProton();
203 Double_t toffsetAntiProton = (*tofTrackTds)->toffsetAntiProton();
204 Double_t sigmaElectron = (*tofTrackTds)->sigmaElectron();
205 Double_t sigmaMuon = (*tofTrackTds)->sigmaMuon();
206 Double_t sigmaPion = (*tofTrackTds)->sigmaPion();
207 Double_t sigmaKaon = (*tofTrackTds)->sigmaKaon();
208 Double_t sigmaProton = (*tofTrackTds)->sigmaProton();
209 Double_t sigmaAntiProton = (*tofTrackTds)->sigmaAntiProton();
210 Int_t quality = (*tofTrackTds)->quality();
211 Double_t t0 = (*tofTrackTds)->t0();
212 Double_t errt0 = (*tofTrackTds)->errt0();
213 Double_t errz = (*tofTrackTds)->errz();
214 Double_t phi = (*tofTrackTds)->phi();
215 Double_t errphi = (*tofTrackTds)->errphi();
216 Double_t
energy = (*tofTrackTds)->energy();
217 Double_t errenergy = (*tofTrackTds)->errenergy();
218
220
222
223
230 tofTrackRoot->
setPh(ph);
231 tofTrackRoot->
setTof(tof);
252 tofTrackRoot->
setT0(t0);
255 tofTrackRoot->
setPhi(phi);
259
261 }
262
263 return StatusCode::SUCCESS;
264}
ObjectVector< DstTofTrack > DstTofTrackCol
************Class m_ypar INTEGER m_KeyWgt INTEGER m_KeyIHVP INTEGER m_KeyGPS INTEGER m_IsBeamPolarized INTEGER m_EvtGenInterface DOUBLE PRECISION m_Emin DOUBLE PRECISION m_sphot DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_q2 DOUBLE PRECISION m_PolBeam2 DOUBLE PRECISION m_xErrPb *COMMON c_KK2f $ !CMS energy average $ !Spin Polarization vector first beam $ !Spin Polarization vector second beam $ !Beam energy spread[GeV] $ !minimum hadronization energy[GeV] $ !input READ never touch them !$ !debug facility $ !maximum weight $ !inverse alfaQED $ !minimum real photon energy
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 clearTofTrackCol()
clear the whole array
const TObjArray * getTofTrackCol() const
retrieve the whole TObjArray of TofTrack Data
void addTofTrack(TTofTrack *Track)
Add a TofTrack into the TOF Data collection.
void setSigmaElectron(Double_t se)
void setSigmaKaon(Double_t sk)
void setSigmaMuon(Double_t smu)
void setToffsetMuon(Double_t tomu)
void setToffsetPion(Double_t topi)
void setPhi(Double_t phi)
void setEnergy(Double_t energy)
void setToffsetProton(Double_t top)
void setToffsetAntiProton(Double_t topb)
void setTexpKaon(Double_t texpk)
void setTof(Double_t tof)
void setBeta(Double_t beta)
void setToffsetKaon(Double_t tok)
void setTexpProton(Double_t texpp)
void setSigmaPion(Double_t spi)
void setTexpMuon(Double_t texpmu)
void setSigmaProton(Double_t sp)
void setZrHit(Double_t zrhit)
void setTofTrackID(Int_t tofTrackID)
void setErrT0(Double_t errt0)
void setErrZ(Double_t errz)
void setQuality(Int_t quality)
void setStatus(UInt_t status)
void setTrackID(Int_t trackID)
void setTexpPion(Double_t texppi)
void setToffsetElectron(Double_t toe)
void setTofID(Int_t tofID)
void setTexpElectron(Double_t texpe)
void setSigmaAntiProton(Double_t spb)
void setErrPhi(Double_t errphi)
void setErrTof(Double_t etof)
void setPath(Double_t path)
void setErrEnergy(Double_t errenergy)
_EXTERN_ std::string Event