125 {
126
127 MsgStream log(
msgSvc(),
"EmcTrackCnv");
128 log << MSG::DEBUG << "EmcTrackCnv::DataObjectToTObject" << endreq;
129 StatusCode sc=StatusCode::SUCCESS;
130
132 if (!emcTrackColTds) {
133 log << MSG::ERROR << "Could not downcast to EmcTrackCol" << endreq;
134 return StatusCode::FAILURE;
135 }
136
137 DataObject *evt;
140 log << MSG::ERROR << "Could not get DstEvent in TDS " << endreq;
141 return StatusCode::FAILURE;
142 }
144 if (!devtTds) {
145 log << MSG::ERROR << "EmcTrackCnv:Could not downcast to TDS DstEvent" << endreq;
146 }
147 IOpaqueAddress *addr;
148
151
153 if (!m_emcTrackCol) return sc;
155 DstEmcShowerCol::const_iterator emcTrackTds;
156
157 for (emcTrackTds = emcTrackColTds->begin(); emcTrackTds != emcTrackColTds->end(); emcTrackTds++) {
158 Int_t trackId = (*emcTrackTds)->trackId();
159 Int_t numHits = (*emcTrackTds)->numHits();
160 Int_t status =(*emcTrackTds)->status();
161 Int_t cellId =(*emcTrackTds)->cellId();
162 Int_t module =(*emcTrackTds)->module();
163 Double_t
x = (*emcTrackTds)->x();
164 Double_t
y = (*emcTrackTds)->y();
165 Double_t z = (*emcTrackTds)->z();
166 Double_t dtheta =(*emcTrackTds)->dtheta();
167 Double_t dphi =(*emcTrackTds)->dphi();
168 Double_t
energy = (*emcTrackTds)->energy();
169 Double_t dE = (*emcTrackTds)->dE();
170 Double_t eSeed = (*emcTrackTds)->eSeed();
171 Double_t e3x3 = (*emcTrackTds)->e3x3();
172 Double_t e5x5 = (*emcTrackTds)->e5x5();
173 Double_t
time = (*emcTrackTds)->time();
174 Double_t secondMoment = (*emcTrackTds)->secondMoment();
175 Double_t latMoment = (*emcTrackTds)->latMoment();
176 Double_t a20Moment = (*emcTrackTds)->a20Moment();
177 Double_t a42Moment = (*emcTrackTds)->a42Moment();
178
179 HepSymMatrix matrix = (*emcTrackTds)->errorMatrix();
180 Double_t err[6];
181 err[0] = matrix[0][0];
182 err[1] = matrix[1][1];
183 err[2] = matrix[2][2];
184 err[3] = matrix[0][1];
185 err[4] = matrix[0][2];
186 err[5] = matrix[1][2];
187
189
190
191
197 emcTrackRoot->
setX( x );
198 emcTrackRoot->
setY(
y );
199 emcTrackRoot->
setZ( z );
201 emcTrackRoot->
setDE( dE );
212 emcTrackRoot->
setErr( err );
213
215 }
216
217 return StatusCode::SUCCESS;
218}
ObjectVector< DstEmcShower > DstEmcShowerCol
************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 addEmcTrack(TEmcTrack *Track)
Add a TkrTrack into the Emc data collection.
const TObjArray * getEmcTrackCol() const
retrieve the whole TObjArray of EmcTrack Data
void clearEmcTrackCol()
clear the whole array (necessary because of the consts-s)
void setTrackId(const Int_t trackId)
void setA20Moment(const Double_t a20Moment)
void setEnergy(const Double_t e)
void setESeed(const Double_t eSeed)
void setNumHits(const Int_t hit)
void setDtheta(const Double_t dt)
void setX(const Double_t x)
void setErr(const Double_t err[6])
void setModule(const Int_t mod)
void setSecondMoment(const Double_t secondMoment)
void setDE(const Double_t de)
void setY(const Double_t y)
void setA42Moment(const Double_t a42Moment)
void setZ(const Double_t z)
void setTime(const Double_t time)
void setCellId(const Int_t id)
void setE3x3(const Double_t e3x3)
void setE5x5(const Double_t e5x5)
void setStatus(const Int_t st)
void setLatMoment(const Double_t latMoment)
void setDphi(const Double_t dpi)
_EXTERN_ std::string Event