146 {
147
148 MsgStream log(
msgSvc(),
"TofTrackCnv" );
149 log << MSG::DEBUG << "TofTrackCnv::DataObjectToTObject" << endmsg;
150 StatusCode sc = StatusCode::SUCCESS;
151
153 if ( !tofTrackColTds )
154 {
155 log << MSG::ERROR << "Could not downcast to DstTofTrackCol" << endmsg;
156 return StatusCode::FAILURE;
157 }
158
159 DataObject* evt;
161 if ( evt == NULL )
162 {
163 log << MSG::ERROR << "Could not get DstEvent in TDS " << endmsg;
164 return StatusCode::FAILURE;
165 }
166
167 DstEvent* devtTds = dynamic_cast<DstEvent*>( evt );
168 if ( !devtTds )
169 { log << MSG::ERROR << "TofTrackCnv:Could not downcast to TDS ReconEvent" << endmsg; }
170 IOpaqueAddress* addr;
171
172 m_cnvSvc->getDstCnv()->createRep( evt, addr );
173 TDstEvent* recEvt =
m_cnvSvc->getDstCnv()->getWriteObject();
174
176 if ( !m_tofTrackCol ) return sc;
178
179 DstTofTrackCol::const_iterator tofTrackTds;
180
181 for ( tofTrackTds = tofTrackColTds->begin(); tofTrackTds != tofTrackColTds->end();
182 tofTrackTds++ )
183 {
184
185 Int_t tofTrackID = ( *tofTrackTds )->tofTrackID();
186 Int_t trackID = ( *tofTrackTds )->trackID();
187 Int_t tofID = ( *tofTrackTds )->tofID();
188 Int_t strip = ( *tofTrackTds )->strip();
189 UInt_t status = ( *tofTrackTds )->status();
190 Double_t path = ( *tofTrackTds )->path();
191 Double_t zrhit = ( *tofTrackTds )->zrhit();
192 Double_t ph = ( *tofTrackTds )->ph();
193 Double_t tof = ( *tofTrackTds )->tof();
194 Double_t errtof = ( *tofTrackTds )->errtof();
195 Double_t beta = ( *tofTrackTds )->beta();
196 Double_t texpElectron = ( *tofTrackTds )->texpElectron();
197 Double_t texpMuon = ( *tofTrackTds )->texpMuon();
198 Double_t texpPion = ( *tofTrackTds )->texpPion();
199 Double_t texpKaon = ( *tofTrackTds )->texpKaon();
200 Double_t texpProton = ( *tofTrackTds )->texpProton();
201 Double_t toffsetElectron = ( *tofTrackTds )->toffsetElectron();
202 Double_t toffsetMuon = ( *tofTrackTds )->toffsetMuon();
203 Double_t toffsetPion = ( *tofTrackTds )->toffsetPion();
204 Double_t toffsetKaon = ( *tofTrackTds )->toffsetKaon();
205 Double_t toffsetProton = ( *tofTrackTds )->toffsetProton();
206 Double_t toffsetAntiProton = ( *tofTrackTds )->toffsetAntiProton();
207 Double_t sigmaElectron = ( *tofTrackTds )->sigmaElectron();
208 Double_t sigmaMuon = ( *tofTrackTds )->sigmaMuon();
209 Double_t sigmaPion = ( *tofTrackTds )->sigmaPion();
210 Double_t sigmaKaon = ( *tofTrackTds )->sigmaKaon();
211 Double_t sigmaProton = ( *tofTrackTds )->sigmaProton();
212 Double_t sigmaAntiProton = ( *tofTrackTds )->sigmaAntiProton();
213 Int_t quality = ( *tofTrackTds )->quality();
214 Double_t t0 = ( *tofTrackTds )->t0();
215 Double_t errt0 = ( *tofTrackTds )->errt0();
216 Double_t errz = ( *tofTrackTds )->errz();
217 Double_t phi = ( *tofTrackTds )->phi();
218 Double_t errphi = ( *tofTrackTds )->errphi();
219 Double_t
energy = ( *tofTrackTds )->energy();
220 Double_t errenergy = ( *tofTrackTds )->errenergy();
221
223
224 TTofTrack* tofTrackRoot = new TTofTrack();
225
226
233 tofTrackRoot->
setPh( ph );
234 tofTrackRoot->
setTof( tof );
255 tofTrackRoot->
setT0( t0 );
258 tofTrackRoot->
setPhi( phi );
262
264 }
265
266 return StatusCode::SUCCESS;
267}
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
IDataProviderSvc * m_eds
pointer to eventdataservice
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