126 {
127
128 MsgStream log(
msgSvc(),
"MdcDedxCnv");
129 log << MSG::DEBUG << "MdcDedxCnv::DataObjectToTObject" << endreq;
130 StatusCode sc=StatusCode::SUCCESS;
131
133 if (!mdcDedxColTds) {
134 log << MSG::ERROR << "Could not downcast to MdcDedxCol" << endreq;
135 return StatusCode::FAILURE;
136 }
137
138 DataObject *evt;
141 log << MSG::ERROR << "Could not get DstEvent in TDS " << endreq;
142 return StatusCode::FAILURE;
143 }
145 if (!devtTds) {
146 log << MSG::ERROR << "MdcDedxCnv:Could not downcast to TDS DstEvent" << endreq;
147 }
148 IOpaqueAddress *addr;
149
152
154 if (!m_mdcDedxCol) return sc;
156 DstMdcDedxCol::const_iterator mdcDedxTds;
157
158 for (mdcDedxTds = mdcDedxColTds->begin(); mdcDedxTds != mdcDedxColTds->end(); mdcDedxTds++) {
159 Int_t trackId = (*mdcDedxTds)->trackId();
160 Int_t particleId = (*mdcDedxTds)->particleId();
161 Int_t status = (*mdcDedxTds)->status();
162 Int_t truncAlg =(*mdcDedxTds)->truncAlg();
163
164
165
166
167
168 Double_t chiE = (*mdcDedxTds)->chi(0);
169 Double_t chiMu = (*mdcDedxTds)->chi(1);
170 Double_t chiPi = (*mdcDedxTds)->chi(2);
171 Double_t chiK = (*mdcDedxTds)->chi(3);
172 Double_t chiP = (*mdcDedxTds)->chi(4);
173
174 Int_t numGoodHits = (*mdcDedxTds)->numGoodHits();
175 Int_t numTotalHits = (*mdcDedxTds)->numTotalHits();
176
177 Double_t probPH = (*mdcDedxTds)->probPH();
178 Double_t normPH = (*mdcDedxTds)->normPH();
179 Double_t errorPH = (*mdcDedxTds)->errorPH();
180 Double_t twentyPH =(*mdcDedxTds)->twentyPH();
181
182
183
184 log << MSG::INFO <<"check Reconstrunction root"<<" particle Id is : "<<particleId
185 <<"track id is : "<<trackId
186 <<" and status is : "<<status<<endreq;
187
188
190
191
196
202
205
210
211
212
213 log << MSG::INFO << "check Reconstrunction root"<<" particle Id is : "<<particleId
214 <<"track id is : "<<trackId
215 <<" and status is : "<<status<<endreq;
216
217
218
220 }
221
222 return StatusCode::SUCCESS;
223}
ObjectVector< DstMdcDedx > DstMdcDedxCol
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.
const TObjArray * getMdcDedxCol() const
retrieve the whole TObjArray of Dedx Data
void clearMdcDedxCol()
clear the whole array
void addMdcDedx(TMdcDedx *Track)
Add a Dedx into the TOF Data collection.
void setChiP(const Double_t chiP)
void setNormPH(const Double_t normPH)
void setChiE(const Double_t chiE)
void setChiMu(const Double_t chiMu)
void setChiPi(const Double_t chiPi)
void setNumTotalHits(const Int_t numTotalHits)
void setParticleId(const Int_t particleId)
void setProbPH(const Double_t probPH)
void setTwentyPH(const Double_t twentyPH)
void setTrackId(const Int_t trackId)
void setStatus(const Int_t status)
void setTruncAlg(const Int_t trunc_alg)
void setChiK(const Double_t chiK)
void setNumGoodHits(const Int_t numGoodHits)
void setErrorPH(const Double_t errorPH)
_EXTERN_ std::string Event