Belle II Software  release-05-01-25
B2BIIFixMdstModule_muid.cc
1 // -*- C++ -*-
2 //
3 // Package: B2BIIFixMdst
4 // Module: B2BIIFixMdst_muid
5 //
6 // Description: Probability density provider.
7 //
8 // Usage: This is the class definition of the object that provides
9 // the probability densities used in muon / hadron discrimination.
10 //
11 // Author: Leo Piilonen
12 // Created: 31-Jan-2001
13 //
14 // $Id: B2BIIFixMdst_muid.cc 9944 2006-11-29 07:36:07Z katayama $
15 //
16 // Revision history
17 //
18 // $Log$
19 //
20 // Revision 2.0 2015/03/11 tkeck
21 // Conversion to Belle II
22 //
23 // Revision 1.1 2002/08/13 05:18:45 hitoshi
24 // muid_user is absorped in B2BIIFixMdst (by Piilonen).
25 //
26 // Revision 1.00 2002/08/08 14:00:00 piilonen
27 // Copied from muid_user
28 //
29 // my include file -- should always be first!
30 
31 #include <b2bii/modules/B2BIIMdstInput/B2BIIFixMdstModule.h>
32 #include "belle_legacy/panther/panther.h"
33 #include "belle_legacy/tables/mdst.h"
34 #include "belle_legacy/tables/belletdf.h"
35 #include "belle_legacy/belleutil/belutil.h"
36 
37 // system include files
38 #include <cmath>
39 #include <algorithm>
40 #include <vector>
41 #include <string>
42 #include <iostream>
43 #include <fstream>
44 #include <cstdio>
45 
46 namespace Belle2 {
53  const double MuidProb::kRchisqMax = 10.0 ;
54  const double MuidProb::kEEclMax = 1.0 ;
55  const double MuidProb::kPTrkMax = 5.0 ;
56 
57 // Start of muid routines in B2BIIFixMdst __________________________________
58 
60  {
61 
62  m_old_expno = (m_expno != 0) ? m_expno : 5; // expt #5, by default
64  if (m_mapped_expno > 0) {
65  m_muonprob = new MuidProb("muon", m_mapped_expno);
66  m_pionprob = new MuidProb("pion", m_mapped_expno);
67  m_kaonprob = new MuidProb("kaon", m_mapped_expno);
68 
69  B2INFO("%B2BIIFixMdst muid is initialized by basf with"
70  << std::endl << " Endcap_MX_layer = " << m_eklm_max_layer
71  << ((m_eklm_max_layer == 0) ?
72  " ==> use value in data file" : "")
73  << ((m_eklm_max_layer == 13) ? " (if possible)" : "")
74  << std::endl << " UseECL = "
75  << ((m_use_ecl == 0) ? "false" : "true")
76  << std::endl << " ExpNo = " << m_expno
77  << ((m_expno == 0) ?
78  " ==> use value in data file" : ""));
79  } else {
80  B2INFO("%B2BIIFixMdst muid is disabled by user (ExpNo = "
81  << m_expno << " is negative)");
82  }
83 
84  return;
85 
86  }
87 
89  {
90 
91  if (m_mapped_expno > 0) {
92  delete m_muonprob;
93  delete m_pionprob;
94  delete m_kaonprob;
95  }
96 
97  return;
98 
99  }
100 
101  void B2BIIFixMdstModule::Muid_begin_run(int expmc, int exp, int run)
102  {
103 
104  if (m_mapped_expno > 0) {
105  int expno = (m_expno != 0) ? m_expno : exp;
106  if (expno != m_old_expno) {
107  B2INFO("Reading DB constants for "
108  << ((expmc == 1) ? "data" : "MC") << ", Exp #" << expno
109  << ", Run #" << run);
110  m_old_expno = expno;
112  m_muonprob->readDB("muon", m_mapped_expno);
113  m_pionprob->readDB("pion", m_mapped_expno);
114  m_kaonprob->readDB("kaon", m_mapped_expno);
115  }
116  }
117 
118  return;
119 
120  }
121 
123  {
124 
125  return;
126 
127  }
128 
130  {
131 
132  Belle::Mdst_klm_mu_ex_Manager& muexMgr = Belle::Mdst_klm_mu_ex_Manager::get_manager();
133  // In well formed C++ references must always be legal but panther sometimes
134  // returns references to NULL. To catch this reliably we check the address
135  // of the reference and to make sure the compiler does not optimize this
136  // away we cast to a void pointer first so he doesn't know it's the address
137  // of a reference anymore.
138  if ((void*)&muexMgr == NULL) {
139  B2ERROR("%B2BIIFixMdst muid did not find Belle::Mdst_klm_mu_ex table "
140  << "in this event, which implies" << std::endl
141  << " that muid_set and muid_dec were not run yet. "
142  << "Required order of modules is " << std::endl
143  << " ... muid_set muid_dec ... rec2mdst ... B2BIIFixMdst ..."
144  << std::endl << " This program is terminated.");
145  exit(-1);
146  }
147  Belle::Mdst_ecl_trk_Manager& eclTrkMgr = Belle::Mdst_ecl_trk_Manager::get_manager();
148  Belle::Mdst_ecl_trk_Index eclTrkIdx = eclTrkMgr.index("trk");
149  eclTrkIdx.update();
150 
151 // For each Belle::Mdst_klm_mu_ex, refigure the likelihoods by using the
152 // most up-to-date probability density functions of muons, pions, and
153 // kaons for the KLM range and reduced chi-squared. Optionally, fold
154 // in the probability density function of muons, pions, and kaons for
155 // the ECL energy associated with the corresponding charged track.
156 // The chain of pointers among panther tables is a little byzantine.
157 
158  for (std::vector<Belle::Mdst_klm_mu_ex>::iterator iMuex = muexMgr.begin();
159  iMuex < muexMgr.end(); ++iMuex) {
160  Belle::Mdst_charged& chg = iMuex->pMDST_Charged();
161  Belle::Mdst_muid& muid = chg.muid();
162  int ECMaxLyr = (muid.quality() & 0x400000) ? 1 : 0;
163  if (m_eklm_max_layer == 11) {
164  ECMaxLyr = 1;
165  } else {
166  if ((m_eklm_max_layer == 13) && (ECMaxLyr == 0)) {
167  ECMaxLyr = 0;
168  }
169  }
170  double px = chg.px();
171  double py = chg.py();
172  double pz = chg.pz();
173  double p = sqrt(px * px + py * py + pz * pz);
174  double muon = iMuex->Muon_likelihood();
175  double pion = iMuex->Pion_likelihood();
176  double kaon = iMuex->Kaon_likelihood();
177  double miss = iMuex->Miss_likelihood();
178  double junk = iMuex->Junk_likelihood();
179  int outcome = iMuex->Outcome();
180  int lyrPasMax = iMuex->Layer_trk_brl() +
181  iMuex->Layer_trk_end() + 1;
182  int lyrPicMax = iMuex->Layer_hit_brl();
183  if (iMuex->Layer_hit_end() != -1) {
184  lyrPicMax = iMuex->Layer_trk_brl() +
185  iMuex->Layer_hit_end() + 1;
186  }
187  int lyrDiff = lyrPasMax - lyrPicMax;
188  int lyrExt = iMuex->Layer_trk_brl();
189  if ((outcome == 2) || (outcome == 4)) {
190  lyrExt = iMuex->Layer_trk_end();
191  if ((ECMaxLyr == 1) && (lyrExt > 11)) {
192  outcome = 4; // unconditionally an escape from endcap
193  lyrExt = 11;
194  int lyrEnd = std::min(iMuex->Layer_hit_end(), 11);
195  lyrPasMax = iMuex->Layer_trk_brl() + lyrExt + 1;
196  lyrPicMax = iMuex->Layer_trk_brl() + lyrEnd + 1;
197  lyrDiff = lyrPasMax - lyrPicMax;
198  }
199  }
200  int nPoints = iMuex->N_hits() * 2;
201  double rChi2 = 1.0E10;
202  if (nPoints > 0) {
203  rChi2 = iMuex->Chi_2() / nPoints;
204  }
205 
206  if (outcome > 0) {
207  muon = m_muonprob->prob(ECMaxLyr, outcome, lyrExt, lyrDiff, rChi2);
208  pion = m_pionprob->prob(ECMaxLyr, outcome, lyrExt, lyrDiff, rChi2);
209  kaon = m_kaonprob->prob(ECMaxLyr, outcome, lyrExt, lyrDiff, rChi2);
210  double denom = muon + pion + kaon;
211  if (denom < 1.0E-10) {
212  denom = 1.0;
213  muon = pion = kaon = 0.0;
214  junk = 1.0; // should happen very rarely
215  }
216  muon /= denom;
217  pion /= denom;
218  kaon /= denom;
219  }
220  if (m_use_ecl) {
221  Belle::Mdst_trk& trk = chg.trk();
222  std::vector<Belle::Mdst_ecl_trk> eclTrk = point_from(trk.get_ID(), eclTrkIdx);
223  std::vector<Belle::Mdst_ecl_trk>::iterator iEclTrk = eclTrk.begin();
224  if (iEclTrk != eclTrk.end()) {
225  Belle::Mdst_ecl& ecl = iEclTrk->ecl();
226  if (ecl) {
227  if (ecl.match() >= 1) {
228  double eEcl = ecl.energy();
229  if ((eEcl > 0.0) && (p > 0.25)) {
230  double muonE = m_muonprob->probECL(eEcl, p);
231  double pionE = m_pionprob->probECL(eEcl, p);
232  double kaonE = m_kaonprob->probECL(eEcl, p);
233  double denom = muonE + pionE + kaonE;
234  if (denom > 1.0E-10) {
235  if (miss + junk > 0.0) {
236  muon = muonE;
237  pion = pionE;
238  kaon = kaonE;
239  miss = 0.0;
240  junk = 0.0;
241  outcome = 5;
242  } else {
243  if (nPoints == 0) {
244  muon *= muonE;
245  pion *= pionE;
246  kaon *= kaonE;
247  }
248  }
249  }
250  denom = muon + pion + kaon;
251  if (denom < 1.0E-10) {
252  denom = 1.0;
253  muon = pion = kaon = 0.0;
254  junk = 1.0; // should happen very rarely
255  }
256  muon /= denom;
257  pion /= denom;
258  kaon /= denom;
259  } // if ( (eEcl > 0.0) && (p > 0.25) )
260  } // if ( ecl.match() >= 1 )
261  } // if ( ecl )
262  } // if ( iEclTrk != eclTrk.end() )
263  } // if ( m_use_ecl )
264 
265  iMuex->Muon_likelihood(muon);
266  iMuex->Pion_likelihood(pion);
267  iMuex->Kaon_likelihood(kaon);
268  iMuex->Miss_likelihood(miss);
269  iMuex->Junk_likelihood(junk);
270  iMuex->Outcome(outcome);
271 
272  } // for iMuex loop
273 
274  return;
275 
276  }
277 
278 // End of muid routines in B2BIIFixMdst ____________________________________
279 
280 // Start of class MuidProb _____________________________________________
281 
282 // Default constructor: open database file and read in the tables
283 
284  MuidProb::MuidProb(const char* dbtemplate, int& expNo)
285  {
286 
287  readDB(dbtemplate, expNo);
288 
289  }
290 
291  void MuidProb::readDB(const char* dbtemplate, int& expNo)
292  {
293 
294  double dx; // bin size
295 
296  if (expNo == 0) return; // do nothing if pdf file was not found previously
297 
298  if ((expNo < 5) || ((expNo & 1) == 0)) {
299  expNo = 5; // Runs 1-4 and all even-numbered runs map to Exp #5
300  }
301 
302  char dbname[] = "muid_xxxx_e000000.dat";
303  std::string pathname = "";
304  bool tmp = Belle::set_belfnm_verbose(false);
305  while ((pathname == "") && (expNo >= 5)) {
306  std::sprintf(dbname, "%s%s%s%06d%s", "muid_", dbtemplate,
307  "_e", expNo, ".dat");
308  pathname = Belle::belfnm(dbname, 0, "share/belle_legacy/data-files/muid");
309  expNo -= 2;
310  }
311  (void)Belle::set_belfnm_verbose(tmp);
312  expNo += 2;
313  if (pathname == "") {
314  B2ERROR("%MuidProb: Failed to open database file."
315  << "Module B2BIIFixMdst muid will do nothing.");
316  expNo = 0;
317  return;
318  }
319 
320  std::ifstream probDB;
321  char ident[90];
322  probDB.open(pathname.c_str());
323  probDB.get(ident, 80, '\n');
324  B2INFO("%MuidProb: Reading file " << pathname
325  << std::endl << "%MuidProb: " << ident
326  << std::endl << "%MuidProb: ");
327 
328  for (int l = 0; l < 2; l++) {
329  B2INFO("range ");
330  for (int k = 0; k < 4; k++) {
331  for (int j = 0; j < 15; j++) {
332  for (int i = 0; i < kRange; i++) {
333  probDB >> fRange[l][k][j][i];
334  }
335  }
336  }
337  B2INFO("chi**2 ");
338  dx = kRchisqMax / kRchisq;
339  for (int k = 0; k < 4; k++) {
340  for (int i = 0; i < kRchisq; i++) {
341  probDB >> fRchisq[l][k][i];
342  }
343  spline(kRchisq, dx, &fRchisq[l][k][0], &fRchisqD1[l][k][0],
344  &fRchisqD2[l][k][0], &fRchisqD3[l][k][0]);
345  }
346  for (int k = 0; k < 4; k++) {
347  for (int j = 0; j < 15; j++) {
348  probDB >> fRchisqN[l][k][j];
349  }
350  }
351  }
352  B2INFO("eEcl ");
353  dx = kEEclMax / kEEcl;
354  for (int k = 0; k < kPTrk; k++) {
355  double probSum = 0.0; // normalization denominator
356  for (int i = 0; i < kEEcl; i++) {
357  probDB >> fEEcl[k][i];
358  probSum += fEEcl[k][i];
359  }
360  fEEcl[k][kEEcl] = 1.0 - probSum; // overflow bin
361  if (fEEcl[k][kEEcl] < 0.0) { fEEcl[k][kEEcl] = 0.0; }
362  if (fEEcl[k][kEEcl] > 1.0) { fEEcl[k][kEEcl] = 1.0; }
363  spline(kEEcl, dx, &fEEcl[k][0], &fEEclD1[k][0],
364  &fEEclD2[k][0], &fEEclD3[k][0]);
365  }
366 
367  probDB.close();
368 
369  }
370 
371 //____________________________________________________________________________
372 
373  void MuidProb::spline(int n, double dx, double Y[], double B[],
374  double C[], double D[])
375  {
376 
377  // Generate the spline interpolation coefficients B, C, D to smooth out a
378  // binned histogram. Restrictions: equal-size bins. more than 3 bins.
379 
380  D[0] = dx; // let's do it!
381  C[1] = (Y[1] - Y[0]) / dx;
382  for (int i = 1; i < n - 1; i++) {
383  D[i] = dx;
384  B[i] = dx * 4.0;
385  C[i + 1] = (Y[i + 1] - Y[i]) / dx;
386  C[i] = C[i + 1] - C[i];
387  }
388  B[0] = -dx;
389  B[n - 1] = -dx;
390  C[0] = (C[2] - C[1]) / 6.0;
391  C[n - 1] = -(C[n - 2] - C[n - 3]) / 6.0;
392  for (int i = 1; i < n; i++) {
393  double temp = dx / B[i - 1];
394  B[i] -= temp * dx;
395  C[i] -= temp * C[i - 1];
396  }
397  C[n - 1] /= B[n - 1];
398  for (int i = n - 2; i >= 0; i--) {
399  C[i] = (C[i] - D[i] * C[i + 1]) / B[i];
400  }
401  B[n - 1] = (Y[n - 1] - Y[n - 2]) / dx + (C[n - 2] + C[n - 1] * 2.0) * dx;
402  for (int i = 0; i < n - 1; i++) {
403  B[i] = (Y[i + 1] - Y[i]) / dx - (C[i + 1] + C[i] * 2.0) * dx;
404  D[i] = (C[i + 1] - C[i]) / dx;
405  C[i] = C[i] * 3.0;
406  }
407  C[n - 1] = C[n - 1] * 3.0;
408  D[n - 1] = D[n - 2];
409  }
410 
411 //____________________________________________________________________________
412 
413  double MuidProb::prob(int ECMaxLyr, int outcome,
414  int lyr_ext, int lyr_dif, double chi2_red) const
415  {
416 
417  // ECMaxLyr: 0 if Endcap_MX_layer == 13; 1 if Endcap_MX_layer == 11
418  // outcome: 0=??, 1=Barrel Stop, 2=Endcap Stop, 3=Barrel Exit, 4=Endcap Exit
419  // lyr_ext: last layer that Ext track touched
420  // lyr_dif: difference between last Ext layer and last hit layer
421  // chi2_red: reduced chi**2 of the transverse deviations of all associated
422  // hits from the corresponding Ext track crossings
423 
424  return probRange(ECMaxLyr, outcome, lyr_ext, lyr_dif) *
425  probRchisq(ECMaxLyr, outcome, lyr_ext, chi2_red);
426 
427  }
428 
429 //____________________________________________________________________________
430 
431  double MuidProb::probRange(int ECMaxLyr, int outcome, int lyr_ext,
432  int lyr_dif) const
433  {
434 
435 
436  // ECMaxLyr: 0 if max endcap layer is 13; 1 if it's 11.
437  // outcome: 0=??, 1=Barrel Stop, 2=Endcap Stop, 3=Barrel Exit, 4=Endcap Exit
438  // lyr_ext: last layer that Ext track touched
439  // lyr_dif: difference between last Ext layer and last hit layer
440 
441  if (outcome <= 0) { return 0.0; }
442  if (outcome > 4) { return 0.0; }
443  if (lyr_ext < 0) { return 0.0; }
444  if (lyr_ext > 14) { return 0.0; }
445  if (lyr_dif < 0) { return 0.0; }
446  if (lyr_dif >= kRange) { lyr_dif = kRange - 1; }
447 
448  return fRange[ECMaxLyr][outcome - 1][lyr_ext][lyr_dif];
449 
450  }
451 
452 //____________________________________________________________________________
453 
454  double MuidProb::probRchisq(int ECMaxLyr, int outcome, int lyr_ext,
455  double chi2_red) const
456  {
457 
458  // ECMaxLyr: 0 if max endcap layer is 13; 1 if it's 11.
459  // outcome: 0=??, 1=Barrel Stop, 2=Endcap Stop, 3=Barrel Exit, 4=Endcap Exit
460  // lyr_ext: last layer that Ext track touched
461  // chi2_red: reduced chi**2 of the transverse deviations of all associated
462  // hits from the corresponding Ext track crossings
463 
464  // Extract the probability density for a particular value of reduced
465  // chi-squared by spline interpolation of the binned histogram values.
466  // This avoids binning artifacts that were seen when the histogram
467  // was sampled directly.
468 
469  if (outcome <= 0) { return 0.0; }
470  if (outcome > 4) { return 0.0; }
471  if (lyr_ext < 0) { return 0.0; }
472  if (lyr_ext > 14) { return 0.0; }
473  if (chi2_red < 0.0) { return 0.0; }
474 
475  double prob;
476  double area = fRchisqN[ECMaxLyr][outcome - 1][lyr_ext];
477  if (chi2_red >= kRchisqMax) {
478  prob = area * fRchisq[ECMaxLyr][outcome - 1][kRchisq - 1] + (1.0 - area);
479  } else {
480  int i = (int)(chi2_red / (kRchisqMax / kRchisq));
481  double dx = chi2_red - i * (kRchisqMax / kRchisq);
482  prob = fRchisq[ECMaxLyr][outcome - 1][i] +
483  dx * (fRchisqD1[ECMaxLyr][outcome - 1][i] +
484  dx * (fRchisqD2[ECMaxLyr][outcome - 1][i] +
485  dx * fRchisqD3[ECMaxLyr][outcome - 1][i]));
486  prob = (prob < 0.0) ? 0.0 : area * prob;
487  }
488  return prob;
489  }
490 
491 //____________________________________________________________________________
492 
493  double MuidProb::probECL(double eEcl, double p) const
494  {
495 
496  // eEcl: ECL energy (GeV)
497  // p: CDC momentum (GeV/c)
498 
499  double prob;
500  int jTrk = (p < kPTrkMax) ? (int)(p / (kPTrkMax / kPTrk)) : kPTrk - 1;
501  if (eEcl >= kEEclMax) {
502  prob = fEEcl[jTrk][kEEcl]; // overflow bin
503  } else {
504  int i = (int)(eEcl / (kEEclMax / kEEcl));
505  double dx = eEcl - i * (kEEclMax / kEEcl);
506  prob = fEEcl[jTrk][i] +
507  dx * (fEEclD1[jTrk][i] +
508  dx * (fEEclD2[jTrk][i] +
509  dx * fEEclD3[jTrk][i]));
510  if (prob < 0.0) { prob = 0.0; } // don't let spline fit go negative
511  }
512  return prob;
513 
514  }
515 
516 // End of class MuidProb _______________________________________________
517 
519 } // namespace Belle
Belle2::MuidProb::fEEclD1
double fEEclD1[kPTrk][kEEcl+1]
First derivatives of ECL energy pdf.
Definition: B2BIIFixMdstModule.h:316
Belle2::B2BIIFixMdstModule::m_mapped_expno
int m_mapped_expno
Mapped value of m_old_exp_no.
Definition: B2BIIFixMdstModule.h:193
Belle2::MuidProb::kRchisq
static const int kRchisq
Array size of reduced chi-squared.
Definition: B2BIIFixMdstModule.h:293
Belle2::MuidProb::fRchisqD1
double fRchisqD1[2][4][kRchisq+1]
First derivatives of Reduced chi-squared pdf.
Definition: B2BIIFixMdstModule.h:312
Belle2::MuidProb::spline
void spline(int, double, double *, double *, double *, double *)
Generate the spline interpolation coefficients to smooth out a binned histogram.
Definition: B2BIIFixMdstModule_muid.cc:373
Belle2::B2BIIFixMdstModule::m_kaonprob
MuidProb * m_kaonprob
Pointer to kaons' prob-density object.
Definition: B2BIIFixMdstModule.h:197
Belle2::B2BIIFixMdstModule::Muid_event
void Muid_event(void)
Called for each event.
Definition: B2BIIFixMdstModule_muid.cc:129
Belle2::MuidProb::fEEclD3
double fEEclD3[kPTrk][kEEcl+1]
Third derivatives of ECL energy pdf.
Definition: B2BIIFixMdstModule.h:318
Belle2::MuidProb::probRange
double probRange(int, int, int, int) const
Compute probability density for range.
Definition: B2BIIFixMdstModule_muid.cc:431
Belle2::MuidProb::kEEclMax
static const double kEEclMax
Overflow value of ECL energy.
Definition: B2BIIFixMdstModule.h:300
Belle2::MuidProb::fRchisq
double fRchisq[2][4][kRchisq+1]
Reduced chi-squared pdf.
Definition: B2BIIFixMdstModule.h:310
Belle2::MuidProb::readDB
void readDB(const char *, int &)
Read in probability density functions from database.
Definition: B2BIIFixMdstModule_muid.cc:291
Belle2::MuidProb::fRange
double fRange[2][4][15][kRange]
Range pdf.
Definition: B2BIIFixMdstModule.h:309
Belle2::B2BIIFixMdstModule::m_muonprob
MuidProb * m_muonprob
Pointer to muons' prob-density object.
Definition: B2BIIFixMdstModule.h:195
Belle2::MuidProb
Class computes probability density for Muid calculation.
Definition: B2BIIFixMdstModule.h:266
Belle2::MuidProb::prob
double prob(int, int, int, int, double) const
Compute probability density.
Definition: B2BIIFixMdstModule_muid.cc:413
Belle2::MuidProb::kRange
static const int kRange
Array size of range.
Definition: B2BIIFixMdstModule.h:292
Belle2::B2BIIFixMdstModule::Muid_begin_run
void Muid_begin_run(const int, const int, const int)
Called for each new run.
Definition: B2BIIFixMdstModule_muid.cc:101
Belle2::B2BIIFixMdstModule::Muid_init
void Muid_init(void)
Initialize the Muid module.
Definition: B2BIIFixMdstModule_muid.cc:59
Belle2::MuidProb::fRchisqD3
double fRchisqD3[2][4][kRchisq+1]
Third derivatives of Reduced chi-squared pdf.
Definition: B2BIIFixMdstModule.h:314
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::B2BIIFixMdstModule::m_use_ecl
int m_use_ecl
parameter UseECL: Use (1) or don't use (0) ECL in muid (default=0)
Definition: B2BIIFixMdstModule.h:180
Belle2::MuidProb::kPTrkMax
static const double kPTrkMax
Overflow value of CDC momentum.
Definition: B2BIIFixMdstModule.h:301
Belle2::MuidProb::fRchisqD2
double fRchisqD2[2][4][kRchisq+1]
Second derivatives of Reduced chi-squared pdf.
Definition: B2BIIFixMdstModule.h:313
Belle2::MuidProb::kEEcl
static const int kEEcl
Array size of ECL energy.
Definition: B2BIIFixMdstModule.h:294
Belle2::B2BIIFixMdstModule::Muid_end_run
void Muid_end_run(void)
Called when the current run ends.
Definition: B2BIIFixMdstModule_muid.cc:122
Belle2::B2BIIFixMdstModule::m_eklm_max_layer
int m_eklm_max_layer
parameter Endcap_MX_layer: Max layer # of KLM endcap (default=11) 0 ==> use same value as was used by...
Definition: B2BIIFixMdstModule.h:178
Belle2::MuidProb::kRchisqMax
static const double kRchisqMax
Overflow value of reduced chi-squared.
Definition: B2BIIFixMdstModule.h:299
Belle2::B2BIIFixMdstModule::m_old_expno
int m_old_expno
Most recently used experiment # in muid.
Definition: B2BIIFixMdstModule.h:192
Belle2::B2BIIFixMdstModule::Muid_term
void Muid_term(void)
Terminate the Muid module.
Definition: B2BIIFixMdstModule_muid.cc:88
Belle2::MuidProb::probRchisq
double probRchisq(int, int, int, double) const
Compute probability density for reduced chi-squared.
Definition: B2BIIFixMdstModule_muid.cc:454
Belle2::MuidProb::fRchisqN
double fRchisqN[2][4][15]
Non-overflow normalization.
Definition: B2BIIFixMdstModule.h:311
Belle2::MuidProb::MuidProb
MuidProb(const char *, int &)
Constructor.
Definition: B2BIIFixMdstModule_muid.cc:284
Belle2::MuidProb::probECL
double probECL(double, double) const
Compute probability density for ECL energy deposit.
Definition: B2BIIFixMdstModule_muid.cc:493
Belle2::B2BIIFixMdstModule::m_pionprob
MuidProb * m_pionprob
Pointer to pions' prob-density object.
Definition: B2BIIFixMdstModule.h:196
Belle2::MuidProb::fEEclD2
double fEEclD2[kPTrk][kEEcl+1]
Second derivatives of ECL energy pdf.
Definition: B2BIIFixMdstModule.h:317
Belle2::MuidProb::kPTrk
static const int kPTrk
Array size of CDC momentum.
Definition: B2BIIFixMdstModule.h:295
Belle2::B2BIIFixMdstModule::m_expno
int m_expno
parameter ExpNo: Experiment number for muid (default=0) 0 ==> use experiment number stored in data fi...
Definition: B2BIIFixMdstModule.h:185
Belle2::MuidProb::fEEcl
double fEEcl[kPTrk][kEEcl+1]
ECL energy pdf.
Definition: B2BIIFixMdstModule.h:315