141 {
142 MsgStream log(
msgSvc(),
"RecCgemDedxCnv");
143 log << MSG::DEBUG << "RecCgemDedxCnv::DataObjectToTObject" << endreq;
144 StatusCode sc=StatusCode::SUCCESS;
145
147 if (!recCgemDedxCol) {
148 log << MSG::ERROR << "Could not downcast to RecCgemDedxCol" << endreq;
149 return StatusCode::FAILURE;
150 }
151
152 DataObject *evt;
154 if (evt==NULL) {
155 log << MSG::ERROR << "Could not get RecEvent in TDS " << endreq;
156 return StatusCode::FAILURE;
157 }
159 if (!devtTds) {
160 log << MSG::ERROR << "RecCgemDedxCnv:Could not downcast to TDS RecEvent" << endreq;
161 }
162 IOpaqueAddress *addr;
163
166
168 if (!m_recCgemDedxCol) return sc;
170 RecCgemDedxCol::const_iterator recCgemDedx;
171
172 for (recCgemDedx = recCgemDedxCol->begin(); recCgemDedx != recCgemDedxCol->end(); recCgemDedx++) {
173 Int_t trackId = (*recCgemDedx)->trackId();
174 Int_t particleId = (*recCgemDedx)->particleId();
175 Int_t status = (*recCgemDedx)->status();
176 Int_t truncAlg = (*recCgemDedx)->truncAlg();
177
178
179
180 Double_t dedxHit = (*recCgemDedx)->getDedxHit();
181 Double_t dedxEsat = (*recCgemDedx)->getDedxEsat();
182 Double_t dedxNoRun = (*recCgemDedx)->getDedxNoRun();
183 Double_t dedxMoment = (*recCgemDedx)->getDedxMoment();
184
185
186 Double_t chiE = (*recCgemDedx)->chi(0);
187 Double_t chiMu = (*recCgemDedx)->chi(1);
188 Double_t chiPi = (*recCgemDedx)->chi(2);
189 Double_t chiK = (*recCgemDedx)->chi(3);
190 Double_t chiP = (*recCgemDedx)->chi(4);
191
192 Int_t numGoodHits = (*recCgemDedx)->numGoodHits();
193 Int_t numTotalHits = (*recCgemDedx)->numTotalHits();
194
195 Double_t probPH = (*recCgemDedx)->probPH();
196 Double_t normPH = (*recCgemDedx)->normPH();
197 Double_t errorPH = (*recCgemDedx)->errorPH();
198 Double_t twentyPH = (*recCgemDedx)->twentyPH();
199
200
201
202 double dedxExpect[5],sigmaDedx[5],pidProb[5],chi[5];
203 for (int i=0; i<5; i++){
204 chi[i] = (*recCgemDedx)->chi(i);
205 dedxExpect[i] = (*recCgemDedx)->getDedxExpect(i);
206 sigmaDedx[i] = (*recCgemDedx)->getSigmaDedx(i);
207 pidProb[i] = (*recCgemDedx)->getPidProb(i);
208 }
209
210
212
213
218 log << MSG::INFO<<"check Reconstrunction root"<<" particle Id is : "<<particleId
219 <<"track id is : "<<trackId
220 <<" and status is : "<<status<<endreq;
221
222 recCgemDedxRoot->
setChiE(chiE);
225 recCgemDedxRoot->
setChiK(chiK);
226 recCgemDedxRoot->
setChiP(chiP);
227
230
235
236 recCgemDedxRoot->
setChi(chi);
240
245
246
247 log << MSG::INFO<<"check Reconstrunction root"<<" particle Id is : "<<particleId
248 <<"track id is : "<<trackId
249 <<" and status is : "<<status<<endreq;
250
251
252
253
255 }
256
257 return StatusCode::SUCCESS;
258}
ObjectVector< RecCgemDedx > RecCgemDedxCol
static TRecTrackEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
RecTrackCnv * getRecTrackCnv()
IDataProviderSvc * m_eds
pointer to eventdataservice
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)
Convert the transient object to the requested representation.
void setDedxHit(const Double_t dedx_hit)
void setChiE(const Double_t chiE)
void setChiP(const Double_t chiP)
void setChiPi(const Double_t chiPi)
void setChiMu(const Double_t chiMu)
void setDedxNoRun(const Double_t dedx_norun)
void setParticleId(const Int_t particleId)
void setTrackId(const Int_t trackId)
void setNumGoodHits(const Int_t numGoodHits)
void setChiK(const Double_t chiK)
void setTruncAlg(const Int_t trunc_alg)
void setTwentyPH(const Double_t twentyPH)
void setSigmaDedx(double *sigma_dedx)
void setDedxMoment(const Double_t dedx_momentum)
void setStatus(const Int_t status)
void setNumTotalHits(const Int_t numTotalHits)
void setPidProb(double *pid_prob)
void setErrorPH(const Double_t errorPH)
void setNormPH(const Double_t normPH)
void setDedxEsat(const Double_t dedx_esat)
void setProbPH(const Double_t probPH)
void setDedxExpect(double *dedx_exp)
void clearRecCgemDedxCol()
clear the whole array
void addRecCgemDedx(TRecCgemDedx *Track)
Add a Dedx into the TOF Data collection.
const TObjArray * getRecCgemDedxCol() const
retrieve the whole TObjArray of Dedx Data
_EXTERN_ std::string Event