146 {
147
148 MsgStream log(
msgSvc(),
"TofTrackCnv");
149 log << MSG::DEBUG << "TofTrackCnv::DataObjectToTObject" << endreq;
150 StatusCode sc=StatusCode::SUCCESS;
151
153 if (!tofTrackColTds) {
154 log << MSG::ERROR << "Could not downcast to DstTofTrackCol" << endreq;
155 return StatusCode::FAILURE;
156 }
157
158 DataObject *evt;
160 if (evt==NULL) {
161 log << MSG::ERROR << "Could not get DstEvent in TDS " << endreq;
162 return StatusCode::FAILURE;
163 }
164
166 if (!devtTds) {
167 log << MSG::ERROR << "TofTrackCnv:Could not downcast to TDS ReconEvent" << endreq;
168 }
169 IOpaqueAddress *addr;
170
173
175 if (!m_tofTrackCol) return sc;
177 DstTofTrackCol::const_iterator tofTrackTds;
178
179 for (tofTrackTds = tofTrackColTds->begin(); tofTrackTds != tofTrackColTds->end(); tofTrackTds++) {
180
181 Int_t tofTrackID = (*tofTrackTds)->tofTrackID();
182 Int_t trackID = (*tofTrackTds)->trackID();
183 Int_t tofID = (*tofTrackTds)->tofID();
184 UInt_t status = (*tofTrackTds)->status();
185 Double_t path = (*tofTrackTds)->path();
186 Double_t zrhit = (*tofTrackTds)->zrhit();
187 Double_t ph = (*tofTrackTds)->ph();
188 Double_t tof = (*tofTrackTds)->tof();
189 Double_t errtof = (*tofTrackTds)->errtof();
190 Double_t beta = (*tofTrackTds)->beta();
191 Double_t texpElectron = (*tofTrackTds)->texpElectron();
192 Double_t texpMuon = (*tofTrackTds)->texpMuon();
193 Double_t texpPion = (*tofTrackTds)->texpPion();
194 Double_t texpKaon = (*tofTrackTds)->texpKaon();
195 Double_t texpProton = (*tofTrackTds)->texpProton();
196 Double_t toffsetElectron = (*tofTrackTds)->toffsetElectron();
197 Double_t toffsetMuon = (*tofTrackTds)->toffsetMuon();
198 Double_t toffsetPion = (*tofTrackTds)->toffsetPion();
199 Double_t toffsetKaon = (*tofTrackTds)->toffsetKaon();
200 Double_t toffsetProton = (*tofTrackTds)->toffsetProton();
201 Double_t toffsetAntiProton = (*tofTrackTds)->toffsetAntiProton();
202 Double_t sigmaElectron = (*tofTrackTds)->sigmaElectron();
203 Double_t sigmaMuon = (*tofTrackTds)->sigmaMuon();
204 Double_t sigmaPion = (*tofTrackTds)->sigmaPion();
205 Double_t sigmaKaon = (*tofTrackTds)->sigmaKaon();
206 Double_t sigmaProton = (*tofTrackTds)->sigmaProton();
207 Double_t sigmaAntiProton = (*tofTrackTds)->sigmaAntiProton();
208 Int_t quality = (*tofTrackTds)->quality();
209 Double_t t0 = (*tofTrackTds)->t0();
210 Double_t errt0 = (*tofTrackTds)->errt0();
211 Double_t errz = (*tofTrackTds)->errz();
212 Double_t phi = (*tofTrackTds)->phi();
213 Double_t errphi = (*tofTrackTds)->errphi();
214 Double_t
energy = (*tofTrackTds)->energy();
215 Double_t errenergy = (*tofTrackTds)->errenergy();
216
218
219
220
227 tofTrackRoot->
setPh(ph);
228 tofTrackRoot->
setTof(tof);
249 tofTrackRoot->
setT0(t0);
252 tofTrackRoot->
setPhi(phi);
256
258 }
259
260 return StatusCode::SUCCESS;
261}
ObjectVector< DstTofTrack > DstTofTrackCol
************Class m_ypar INTEGER m_KeyWgt INTEGER m_nphot 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