157 {
158 int irc = -1;
162 if (!(recTrk)->isMdcKalTrackValid()) return irc;
165 double ptrk=mdcKalTrk->
p();
166
168
169 m_pt=mdcKalTrk->
pxy();
170 m_pt = m_pt*mdcTrk->
charge();
171
172
178
179 m_energy = emcTrk->
energy();
180 m_eseed = emcTrk->
eSeed();
181 m_e3x3 = emcTrk->
e3x3();
182 m_e5x5 = emcTrk->
e5x5();
183
184 double m_emc_theta = emcTrk->
theta();
185 double m_emc_phi = emcTrk->
phi();
186
188 double m_ext_theta = mc.theta();
189 double m_ext_phi = mc.phi();
190
191
192 m_delta_theta = m_emc_theta - m_ext_theta;
193 m_delta_phi = m_emc_phi - m_ext_phi;
194 if(m_delta_phi>1) m_delta_phi=m_delta_phi-6.283;
195 if(m_delta_phi<-1) m_delta_phi=m_delta_phi+6.283;
196
197
202
203 if(emcTrk->
energy() <= 0)
return irc;
204
205
206
207
208
209
210
211
212
213
214
215 params_emc1[0] =m_ptrk;
216 params_emc1[1] =m_pt;
217 params_emc1[2] =m_energy;
218 params_emc1[3] =m_eseed;
219 params_emc1[4] =m_e3x3;
220 params_emc1[5] =m_e5x5;
221 params_emc1[6] =m_secondmoment;
222 params_emc1[7] =m_latmoment;
223 params_emc1[8] =m_a20moment;
224 params_emc1[9] =m_a42moment;
225 params_emc1[10] =m_delta_theta;
226 params_emc1[11] =m_delta_phi;
227
228 m_val_emc = m_mlp_emc->Evaluate(0,params_emc1);
229 int pindex = int((m_ptrk-0.2)/0.1);
230 int bindex = int((m_val_emc-0.5)/0.01);
231 if(bindex>300||bindex<0) return irc;
232 if(pindex>17) pindex=17;
233 if(pindex<0) pindex=0;
234
235 m_prob[0] = m_e_h[pindex][bindex];
236 m_prob[1] = m_m_h[pindex][bindex];
237 m_prob[2] = m_p_h[pindex][bindex];
238 m_prob[3] = m_p_h[pindex][bindex];
239 m_prob[4] = m_p_h[pindex][bindex];
240 for(int i =0; i<5; i++) {
241 if(m_prob[i]==0) m_prob[i] = 0.001;
242 }
243
244 float ppp[5];
245 for(int i=0; i<5; i++) {
246 ppp[i]=0;
247 }
248 for(int j=0; j<=bindex; j++) {
249 ppp[0]+= m_e_h[pindex][j];
250 ppp[1]+= m_m_h[pindex][j];
251 ppp[2]+= m_p_h[pindex][j];
252 }
253 for(int i=0; i<3; i++) {
254 ppp[i]=ppp[i]*0.01;
255 if(ppp[i]>0&&ppp[i]<1) {
256 CALG(ppp[i],m_chi[i]);
257 }
258 if(ppp[i]<=0||ppp[i]>=1) m_chi[i]=-99;
259 }
260
261 m_chi[3]=m_chi[2];
262 m_chi[4]=m_chi[2];
263
264 m_ndof = 1;
265 irc = 0;
266 return irc;
267}
void CALG(double Px, double &e2)
double secondMoment() const
const Hep3Vector emcPosition() const
const int emcVolumeNumber() const
static void setPidType(PidType pidType)
RecEmcShower * emcShower()
EvtRecTrack * PidTrk() const