126 {
127
128 MsgStream log(
msgSvc(),
"CgemDedxCnv");
129 log << MSG::DEBUG << "CgemDedxCnv::DataObjectToTObject" << endreq;
130 StatusCode sc=StatusCode::SUCCESS;
131
133 if (!cgemDedxColTds) {
134 log << MSG::ERROR << "Could not downcast to CgemDedxCol" << endreq;
135 return StatusCode::FAILURE;
136 }
137
138 DataObject *evt;
140 if (evt==NULL) {
141 log << MSG::ERROR << "Could not get DstEvent in TDS " << endreq;
142 return StatusCode::FAILURE;
143 }
145 if (!devtTds) {
146 log << MSG::ERROR << "CgemDedxCnv:Could not downcast to TDS DstEvent" << endreq;
147 }
148 IOpaqueAddress *addr;
149
152
154 if (!m_cgemDedxCol) return sc;
156 DstCgemDedxCol::const_iterator cgemDedxTds;
157
158 for (cgemDedxTds = cgemDedxColTds->begin(); cgemDedxTds != cgemDedxColTds->end(); cgemDedxTds++) {
159 Int_t trackId = (*cgemDedxTds)->trackId();
160 Int_t particleId = (*cgemDedxTds)->particleId();
161 Int_t status = (*cgemDedxTds)->status();
162 Int_t truncAlg =(*cgemDedxTds)->truncAlg();
163
164
165
166
167
168 Double_t chiE = (*cgemDedxTds)->chi(0);
169 Double_t chiMu = (*cgemDedxTds)->chi(1);
170 Double_t chiPi = (*cgemDedxTds)->chi(2);
171 Double_t chiK = (*cgemDedxTds)->chi(3);
172 Double_t chiP = (*cgemDedxTds)->chi(4);
173
174 Int_t numGoodHits = (*cgemDedxTds)->numGoodHits();
175 Int_t numTotalHits = (*cgemDedxTds)->numTotalHits();
176
177 Double_t probPH = (*cgemDedxTds)->probPH();
178 Double_t normPH = (*cgemDedxTds)->normPH();
179 Double_t errorPH = (*cgemDedxTds)->errorPH();
180 Double_t twentyPH =(*cgemDedxTds)->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< DstCgemDedx > DstCgemDedxCol
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 setParticleId(const Int_t particleId)
void setChiPi(const Double_t chiPi)
void setTruncAlg(const Int_t trunc_alg)
void setChiK(const Double_t chiK)
void setChiE(const Double_t chiE)
void setChiP(const Double_t chiP)
void setChiMu(const Double_t chiMu)
void setNumTotalHits(const Int_t numTotalHits)
void setStatus(const Int_t status)
void setTwentyPH(const Double_t twentyPH)
void setProbPH(const Double_t probPH)
void setTrackId(const Int_t trackId)
void setNormPH(const Double_t normPH)
void setNumGoodHits(const Int_t numGoodHits)
void setErrorPH(const Double_t errorPH)
void clearCgemDedxCol()
clear the whole array
const TObjArray * getCgemDedxCol() const
retrieve the whole TObjArray of Dedx Data
void addCgemDedx(TCgemDedx *Track)
Add a Dedx into the TOF Data collection.
_EXTERN_ std::string Event