Belle II Software  release-05-02-19
TOPBunchFinderModule.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2018 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Staric *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 // Own include
12 #include <top/modules/TOPBunchFinder/TOPBunchFinderModule.h>
13 #include <top/geometry/TOPGeometryPar.h>
14 #include <top/reconstruction/TOPreco.h>
15 #include <top/reconstruction/TOPtrack.h>
16 #include <top/reconstruction/TOPconfigure.h>
17 #include <top/reconstruction/TOP1Dpdf.h>
18 #include <top/utilities/Chi2MinimumFinder1D.h>
19 
20 // Dataobject classes
21 #include <mdst/dataobjects/Track.h>
22 #include <mdst/dataobjects/TrackFitResult.h>
23 #include <mdst/dataobjects/HitPatternCDC.h>
24 #include <tracking/dataobjects/ExtHit.h>
25 #include <top/dataobjects/TOPDigit.h>
26 #include <mdst/dataobjects/MCParticle.h>
27 #include <top/dataobjects/TOPBarHit.h>
28 #include <reconstruction/dataobjects/CDCDedxLikelihood.h>
29 #include <reconstruction/dataobjects/VXDDedxLikelihood.h>
30 #include <mdst/dataobjects/PIDLikelihood.h>
31 #include <top/dataobjects/TOPRecBunch.h>
32 
33 // framework - DataStore
34 #include <framework/datastore/StoreArray.h>
35 #include <framework/datastore/StoreObjPtr.h>
36 
37 // framework aux
38 #include <framework/gearbox/Const.h>
39 #include <framework/logging/Logger.h>
40 
41 using namespace std;
42 
43 namespace Belle2 {
48  using namespace TOP;
49 
50  //-----------------------------------------------------------------
51  // Register module
52  //-----------------------------------------------------------------
53 
54  REG_MODULE(TOPBunchFinder)
55 
56  //-----------------------------------------------------------------
57  // Implementation
58  //-----------------------------------------------------------------
59 
61  m_bunchTimeSep(0)
62 
63  {
64  // set module description (e.g. insert text)
65  setDescription("A precise event T0 determination w.r.t local time reference of TOP counter. Results available in TOPRecBunch.");
66  setPropertyFlags(c_ParallelProcessingCertified);
67 
68  // Add parameters
69  addParam("numBins", m_numBins, "number of bins of fine search region", 200);
70  addParam("timeRange", m_timeRange,
71  "time range in which to do fine search [ns]", 10.0);
72  addParam("sigmaSmear", m_sigmaSmear,
73  "sigma in [ns] for additional smearing of PDF", 0.0);
74  addParam("minSignal", m_minSignal,
75  "minimal number of signal photons to accept track", 10.0);
76  addParam("minSBRatio", m_minSBRatio,
77  "minimal signal-to-background ratio to accept track", 0.0);
78  addParam("minDERatio", m_minDERatio,
79  "minimal ratio of detected-to-expected photons to accept track", 0.4);
80  addParam("maxDERatio", m_maxDERatio,
81  "maximal ratio of detected-to-expected photons to accept track", 2.5);
82  addParam("minPt", m_minPt, "minimal p_T of the track", 0.3);
83  addParam("maxPt", m_maxPt, "maximal p_T of the track", 6.0);
84  addParam("maxD0", m_maxD0, "maximal absolute value of helix perigee distance", 2.0);
85  addParam("maxZ0", m_maxZ0, "maximal absolute value of helix perigee z coordinate", 4.0);
86  addParam("minNHitsCDC", m_minNHitsCDC, "minimal number of hits in CDC", 20);
87  addParam("useMCTruth", m_useMCTruth,
88  "if true, use MC truth for particle mass instead of the most probable from dEdx",
89  false);
90  addParam("saveHistograms", m_saveHistograms,
91  "if true, save histograms to TOPRecBunch", false);
92  addParam("tau", m_tau,
93  "first order filter time constant [number of events]", 100.0);
94  addParam("fineSearch", m_fineSearch,
95  "if true, do fine search with two-dimensional PDF", true);
96  addParam("correctDigits", m_correctDigits,
97  "if true, subtract bunch time in TOPDigits", true);
98  addParam("subtractRunningOffset", m_subtractRunningOffset,
99  "if true and correctDigits = True, subtract running offset in TOPDigits "
100  "when running in HLT mode. It must be set to false when running calibration.",
101  true);
102  addParam("bunchesPerSSTclk", m_bunchesPerSSTclk,
103  "number of bunches per SST clock period", 24);
104  addParam("usePIDLikelihoods", m_usePIDLikelihoods,
105  "use PIDLikelihoods instead of DedxLikelihoods (only if run on cdst files)",
106  false);
107  }
108 
109 
110  void TOPBunchFinderModule::initialize()
111  {
112  // input collections
113 
114  m_topDigits.isRequired();
115  m_topRawDigits.isOptional();
116  m_tracks.isRequired();
117  StoreArray<ExtHit> extHits;
118  extHits.isRequired();
119  m_initialParticles.isOptional();
120 
121  if (m_useMCTruth) {
122  StoreArray<MCParticle> mcParticles;
123  mcParticles.isRequired();
124  StoreArray<TOPBarHit> barHits;
125  barHits.isRequired();
126  } else {
127  if (m_usePIDLikelihoods) {
128  StoreArray<PIDLikelihood> pidLikelihoods;
129  pidLikelihoods.isRequired();
130  } else {
131  StoreArray<CDCDedxLikelihood> cdcDedxLikelihoods;
132  cdcDedxLikelihoods.isRequired();
133  StoreArray<VXDDedxLikelihood> vxdDedxLikelihoods;
134  vxdDedxLikelihoods.isOptional();
135  }
136  }
137 
138  // output
139 
140  m_recBunch.registerInDataStore();
141  m_timeZeros.registerInDataStore();
142  m_timeZeros.registerRelationTo(extHits);
143  m_eventT0.registerInDataStore(); // usually it is already registered in tracking
144 
145  // Configure TOP detector for reconstruction
146 
147  TOPconfigure config;
148 
149  // bunch separation in time
150 
151  const auto* geo = TOPGeometryPar::Instance()->getGeometry();
152  m_bunchTimeSep = geo->getNominalTDC().getSyncTimeBase() / m_bunchesPerSSTclk;
153 
154  // prior probabilities: from generic BBbar simulation
155  // - MCParticles with reconstructed track and at least 5 detected Cherenkov photons
156 
157  m_priors[11] = 0.062; // electrons
158  m_priors[13] = 0.086; // muons
159  m_priors[211] = 0.734; // pions
160  m_priors[321] = 0.106; // kaons
161  m_priors[2212] = 0.013; // protons
162  m_priors[1000010020] = 0; // deuterons
163 
164  double s = 0;
165  for (const auto& prior : m_priors) s += prior.second;
166  for (auto& prior : m_priors) prior.second /= s;
167 
168  if (not m_commonT0.isValid()) {
169  B2ERROR("Common T0 calibration payload requested but not available");
170  return;
171  }
172 
173  // auto detection of HLT/express reco mode via status of common T0 payload:
174  // c_Default -> HLT/express reco mode
175  // c_Calibrated -> data processing mode
176  // c_Unusable -> HLT/express reco mode
177  // c_roughlyCalibrated -> HLT/express reco mode
178  if (m_commonT0->isCalibrated()) {
179  m_HLTmode = false;
180  m_runningOffset = 0; // since digits are already commonT0 calibrated
181  m_runningError = m_commonT0->getT0Error();
182  } else if (m_commonT0->isRoughlyCalibrated()) {
183  m_HLTmode = true;
184  m_runningOffset = m_commonT0->getT0(); // since digits are not commonT0 calibrated
185  m_runningError = m_commonT0->getT0Error();
186  } else {
187  m_HLTmode = true;
188  m_runningOffset = 0;
189  m_runningError = m_bunchTimeSep / sqrt(12.0);
190  }
191 
192  if (m_HLTmode) {
193  B2INFO("TOPBunchFinder: running in HLT/express reco mode");
194  } else {
195  B2INFO("TOPBunchFinder: running in data processing mode");
196  }
197 
198  }
199 
200 
201  void TOPBunchFinderModule::beginRun()
202  {
203  StoreObjPtr<EventMetaData> evtMetaData;
204 
205  if (not m_commonT0.isValid()) {
206  B2FATAL("Common T0 calibration payload requested but not available for run "
207  << evtMetaData->getRun()
208  << " of experiment " << evtMetaData->getExperiment());
209  }
210 
211  }
212 
213 
214  void TOPBunchFinderModule::event()
215  {
216 
217  m_processed++;
218 
219  // define output for the reconstructed bunch
220 
221  if (!m_recBunch.isValid()) {
222  m_recBunch.create();
223  } else {
224  m_recBunch->clearReconstructed();
225  }
226  m_timeZeros.clear();
227 
228  if (!m_eventT0.isValid()) m_eventT0.create();
229 
230  // set MC truth if available
231 
232  if (m_initialParticles.isValid()) {
233  double simTime = m_initialParticles->getTime();
234  int simBunchNumber = round(simTime / m_bunchTimeSep);
235  m_recBunch->setSimulated(simBunchNumber, simTime);
236  }
237 
238  // set revo9 counter from the first raw digit if available (all should be the same)
239 
240  if (m_topRawDigits.getEntries() > 0) {
241  const auto* rawDigit = m_topRawDigits[0];
242  m_recBunch->setRevo9Counter(rawDigit->getRevo9Counter());
243  }
244 
245  // create reconstruction object and set various options
246 
247  int Nhyp = 1;
248  double pionMass = Const::pion.getMass();
249  int pionPDG = Const::pion.getPDGCode();
250  TOPreco reco(Nhyp, &pionMass, &pionPDG);
251  reco.setPDFoption(TOPreco::c_Rough);
252 
253  // add photon hits to reconstruction object
254 
255  for (const auto& digit : m_topDigits) {
256  if (digit.getHitQuality() == TOPDigit::c_Good)
257  reco.addData(digit.getModuleID(), digit.getPixelID(), digit.getTime(),
258  digit.getTimeError());
259  }
260 
261  // counters and temporary containers
262 
263  int numTrk = 0;
264  m_nodEdxCount = 0;
265  std::vector<TOPtrack> topTracks;
266  std::vector<double> masses;
267  std::vector<int> pdgCodes;
268  std::vector<TOP1Dpdf> top1Dpdfs;
269  std::vector<int> numPhotons;
270  std::vector<Chi2MinimumFinder1D> finders;
271 
272  // loop over reconstructed tracks, make a selection and push to containers
273 
274  for (const auto& track : m_tracks) {
275  TOPtrack trk(&track);
276  if (!trk.isValid()) continue;
277 
278  // track selection
279  const auto* fitResult = track.getTrackFitResultWithClosestMass(Const::pion);
280  if (not fitResult) {
281  B2ERROR("No TrackFitResult available. Must be a bug somewhere.");
282  continue;
283  }
284  if (fitResult->getHitPatternCDC().getNHits() < m_minNHitsCDC) continue;
285  if (fabs(fitResult->getD0()) > m_maxD0) continue;
286  if (fabs(fitResult->getZ0()) > m_maxZ0) continue;
287  auto pt = fitResult->getTransverseMomentum();
288  if (pt < m_minPt or pt > m_maxPt) continue;
289 
290  // determine most probable particle mass
291  double mass = 0;
292  int pdg = 0;
293  if (m_useMCTruth) {
294  if (!trk.getMCParticle()) continue;
295  if (!trk.getBarHit()) continue;
296  mass = trk.getMCParticle()->getMass();
297  pdg = trk.getMCParticle()->getPDG();
298  } else {
299  auto chargedStable = getMostProbable(track);
300  mass = chargedStable.getMass();
301  pdg = chargedStable.getPDGCode();
302  }
303 
304  // reconstruct (e.g. set PDF internally)
305  reco.setMass(mass, pdg);
306  reco.reconstruct(trk);
307  if (reco.getFlag() != 1) continue; // track is not in the acceptance of TOP
308  numTrk++;
309 
310  // one dimensional PDF with bin size of ~0.5 ns
311  TOP1Dpdf pdf1d(reco, m_topDigits, trk.getModuleID(), 0.5);
312 
313  // do further track selection
314  double expSignal = pdf1d.getExpectedSignal();
315  double expBG = pdf1d.getExpectedBG();
316  double expPhot = expSignal + expBG;
317  double numPhot = pdf1d.getNumOfPhotons();
318  if (expSignal < m_minSignal) continue;
319  if (expSignal < m_minSBRatio * expBG) continue;
320  if (numPhot < m_minDERatio * expPhot) continue;
321  if (numPhot > m_maxDERatio * expPhot) continue;
322 
323  topTracks.push_back(trk);
324  masses.push_back(mass);
325  pdgCodes.push_back(pdg);
326  top1Dpdfs.push_back(pdf1d);
327  numPhotons.push_back(reco.getNumOfPhotons());
328  }
329  m_recBunch->setNumTracks(numTrk, topTracks.size(), m_nodEdxCount);
330  if (topTracks.empty()) return;
331 
332  // determine search region
333 
334  double minT0 = top1Dpdfs[0].getMinT0();
335  double maxT0 = top1Dpdfs[0].getMaxT0();
336  double binSize = top1Dpdfs[0].getBinSize();
337  for (const auto& pdf : top1Dpdfs) {
338  minT0 = std::min(minT0, pdf.getMinT0());
339  maxT0 = std::max(maxT0, pdf.getMaxT0());
340  }
341  int numBins = (maxT0 - minT0) / binSize;
342  maxT0 = minT0 + binSize * numBins;
343 
344  // find rough T0
345 
346  for (const auto& pdf : top1Dpdfs) {
347  finders.push_back(Chi2MinimumFinder1D(numBins, minT0, maxT0));
348  auto& finder = finders.back();
349  const auto& bins = finder.getBinCenters();
350  for (unsigned i = 0; i < bins.size(); i++) {
351  double t0 = bins[i];
352  finder.add(i, -2 * pdf.getLogL(t0));
353  }
354  }
355  auto roughFinder = finders[0];
356  for (size_t i = 1; i < finders.size(); i++) {
357  roughFinder.add(finders[i]);
358  }
359 
360  const auto& t0Rough = roughFinder.getMinimum();
361  if (m_saveHistograms) {
362  m_recBunch->addHistogram(roughFinder.getHistogram("chi2_rough_",
363  "rough T0; t_{0} [ns]; -2 log L"));
364  }
365  if (t0Rough.position < minT0 or t0Rough.position > maxT0 or !t0Rough.valid) {
366  B2DEBUG(100, "Rough T0 finder: returning invalid or out of range T0");
367  return;
368  }
369 
370  auto T0 = t0Rough;
371 
372  // find precise T0
373 
374  if (m_fineSearch) {
375  finders.clear();
376  numPhotons.clear();
377 
378  const auto& tdc = TOPGeometryPar::Instance()->getGeometry()->getNominalTDC();
379  double timeMin = tdc.getTimeMin() + t0Rough.position;
380  double timeMax = tdc.getTimeMax() + t0Rough.position;
381  double t0min = t0Rough.position - m_timeRange / 2;
382  double t0max = t0Rough.position + m_timeRange / 2;
383 
384  for (size_t itrk = 0; itrk < topTracks.size(); itrk++) {
385  finders.push_back(Chi2MinimumFinder1D(m_numBins, t0min, t0max));
386  auto& trk = topTracks[itrk];
387  auto mass = masses[itrk];
388  auto pdg = pdgCodes[itrk];
389  reco.setMass(mass, pdg);
390  reco.reconstruct(trk);
391  numPhotons.push_back(reco.getNumOfPhotons());
392  if (reco.getFlag() != 1) {
393  B2ERROR("TOPBunchFinder: track is not in the acceptance -> must be a bug");
394  continue;
395  }
396  auto& finder = finders.back();
397  const auto& binCenters = finder.getBinCenters();
398  for (unsigned i = 0; i < binCenters.size(); i++) {
399  double t0 = binCenters[i];
400  finder.add(i, -2 * reco.getLogL(t0, timeMin, timeMax, m_sigmaSmear));
401  }
402  }
403 
404  if (finders.size() == 0) return; // just in case
405  auto finder = finders[0];
406  for (size_t i = 1; i < finders.size(); i++) {
407  finder.add(finders[i]);
408  }
409 
410  const auto& t0Fine = finder.getMinimum();
411  if (m_saveHistograms) {
412  m_recBunch->addHistogram(finder.getHistogram("chi2_fine_",
413  "precise T0; t_{0} [ns]; -2 log L"));
414  }
415  if (t0Fine.position < t0min or t0Fine.position > t0max or !t0Fine.valid) {
416  B2DEBUG(100, "Fine T0 finder: returning invalid or out of range T0");
417  return;
418  }
419 
420  T0 = t0Fine;
421  }
422 
423  // bunch time and current offset
424 
425  int bunchNo = lround(T0.position / m_bunchTimeSep); // round to nearest integer
426  double offset = T0.position - m_bunchTimeSep * bunchNo;
427  if (not m_commonT0->isCalibrated()) { // auto set offset range
428  double deltaOffset = offset - m_runningOffset;
429  if (fabs(deltaOffset + m_bunchTimeSep) < fabs(deltaOffset)) {
430  offset += m_bunchTimeSep;
431  bunchNo--;
432  } else if (fabs(deltaOffset - m_bunchTimeSep) < fabs(deltaOffset)) {
433  offset -= m_bunchTimeSep;
434  bunchNo++;
435  }
436  }
437  double error = T0.error;
438 
439  // averaging with first order filter (with adoptable time constant)
440 
441  double tau = 10 + m_success / 2; // empirically with toy MC
442  if (tau > m_tau) tau = m_tau;
443  double a = exp(-1.0 / tau);
444  m_runningOffset = a * m_runningOffset + (1 - a) * offset;
445  double err1 = a * m_runningError;
446  double err2 = (1 - a) * error;
447  m_runningError = sqrt(err1 * err1 + err2 * err2);
448 
449  // store the results
450 
451  double bunchTime = bunchNo * m_bunchTimeSep;
452  m_recBunch->setReconstructed(bunchNo, bunchTime, offset, error,
453  m_runningOffset, m_runningError, m_fineSearch);
454  m_eventT0->addTemporaryEventT0(EventT0::EventT0Component(bunchTime, error,
455  Const::TOP, "bunchFinder"));
456  m_success++;
457 
458  // store T0 of single tracks relative to bunchTime
459 
460  if (finders.size() == topTracks.size()) {
461  for (size_t itrk = 0; itrk < topTracks.size(); itrk++) {
462  const auto& trk = topTracks[itrk];
463  auto& finder = finders[itrk];
464  const auto& t0trk = finder.getMinimum();
465  auto* timeZero = m_timeZeros.appendNew(trk.getModuleID(),
466  t0trk.position - bunchTime,
467  t0trk.error, numPhotons[itrk]);
468  timeZero->setAssumedMass(masses[itrk]);
469  if (not t0trk.valid) timeZero->setInvalid();
470  timeZero->addRelationTo(trk.getExtHit());
471 
472  if (m_saveHistograms) {
473  std::string num = std::to_string(itrk);
474  auto chi2 = finder.getHistogram("chi2_" + num,
475  "precise T0 single track; t_{0} [ns]; -2 log L");
476  auto pdf = top1Dpdfs[itrk].getHistogram("pdf1D_" + num,
477  "PDF projected to time axis; time [ns]");
478  TH1F hits(("hits_" + num).c_str(),
479  "time distribution of hits (t0-subtracted); time [ns]",
480  pdf.GetNbinsX(), pdf.GetXaxis()->GetXmin(), pdf.GetXaxis()->GetXmax());
481  for (const auto& digit : m_topDigits) {
482  if (digit.getModuleID() != trk.getModuleID()) continue;
483  if (digit.getHitQuality() != TOPDigit::c_Good) continue;
484  hits.Fill(digit.getTime() - t0trk.position);
485  }
486  timeZero->setHistograms(chi2, pdf, hits);
487  }
488  }
489  }
490 
491  // correct time in TOPDigits
492 
493  if (m_correctDigits) {
494  for (auto& digit : m_topDigits) {
495  digit.subtractT0(bunchTime);
496  digit.addStatus(TOPDigit::c_EventT0Subtracted);
497  if (m_HLTmode and m_subtractRunningOffset) {
498  digit.subtractT0(m_runningOffset);
499  double err = digit.getTimeError();
500  digit.setTimeError(sqrt(err * err + m_runningError * m_runningError));
501  digit.addStatus(TOPDigit::c_BunchOffsetSubtracted);
502  }
503  }
504  }
505 
506  }
507 
508 
509  void TOPBunchFinderModule::terminate()
510  {
511  B2RESULT("TOPBunchFinder: event T0 determined for " << m_success << "/"
512  << m_processed << " events");
513  }
514 
515 
516  Const::ChargedStable TOPBunchFinderModule::getMostProbable(const Track& track)
517  {
518 
519  std::vector<double> logL;
520  std::vector<double> priors;
521 
522  if (m_usePIDLikelihoods) {
523  const auto* pid = track.getRelated<PIDLikelihood>();
524  if (!pid) {
525  m_nodEdxCount++;
526  return Const::pion;
527  }
528  auto subset = Const::PIDDetectorSet(Const::SVD);
529  subset += Const::PIDDetectorSet(Const::CDC);
530  for (const auto& type : Const::chargedStableSet) {
531  logL.push_back(pid->getLogL(type, subset));
532  priors.push_back(m_priors[abs(type.getPDGCode())]);
533  }
534  } else {
535  const auto* cdcdedx = track.getRelated<CDCDedxLikelihood>();
536  const auto* vxddedx = track.getRelated<VXDDedxLikelihood>();
537  if (!cdcdedx and !vxddedx) {
538  m_nodEdxCount++;
539  return Const::pion;
540  }
541  for (const auto& type : Const::chargedStableSet) {
542  if (cdcdedx and vxddedx) {
543  logL.push_back(cdcdedx->getLogL(type) + vxddedx->getLogL(type));
544  } else if (cdcdedx) {
545  logL.push_back(cdcdedx->getLogL(type));
546  } else {
547  logL.push_back(vxddedx->getLogL(type));
548  }
549  priors.push_back(m_priors[abs(type.getPDGCode())]);
550  }
551  }
552 
553  // get maximal logL
554  auto logL_max = logL[0];
555  for (auto x : logL) {
556  if (x > logL_max) logL_max = x;
557  }
558 
559  // calculate probabilities, normalizaton is not needed
560  std::vector<double> probability(logL.size());
561  for (unsigned i = 0; i < logL.size(); ++i) {
562  probability[i] = exp(logL[i] - logL_max) * priors[i];
563  }
564 
565  // find most probable
566  unsigned i0 = 0;
567  for (unsigned i = 0; i < probability.size(); ++i) {
568  if (probability[i] > probability[i0]) i0 = i;
569  }
570  return Const::chargedStableSet.at(i0);
571 
572  }
573 
575 } // end Belle2 namespace
576 
Belle2::TOP::TOP1Dpdf::getExpectedBG
double getExpectedBG() const
Returns expected number of background photons.
Definition: TOP1Dpdf.h:95
Belle2::TOP::TOPreco::getFlag
int getFlag()
Return status.
Definition: TOPreco.cc:278
Belle2::StoreArray::registerRelationTo
bool registerRelationTo(const StoreArray< TO > &toArray, DataStore::EDurability durability=DataStore::c_Event, DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut, const std::string &namedRelation="") const
Register a relation to the given StoreArray.
Definition: StoreArray.h:150
Belle2::TOP::TOPreco::getNumOfPhotons
int getNumOfPhotons()
Return number of measured photons.
Definition: TOPreco.cc:297
Belle2::TOP::TOPreco::reconstruct
void reconstruct(const TOPtrack &trk, int pdg=0)
Run reconstruction for a given track.
Definition: TOPreco.cc:268
Belle2::CDCDedxLikelihood
Container for likelihoods obtained by the CDC dE/dx PID (CDCDedxPIDModule).
Definition: CDCDedxLikelihood.h:34
REG_MODULE
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:652
Belle2::TOP::TOPtrack
Class to hold reconstructed track, interface to fortran.
Definition: TOPtrack.h:42
Belle2::TOP::TOP1Dpdf::getNumOfPhotons
int getNumOfPhotons() const
Returns number of photons.
Definition: TOP1Dpdf.h:83
Belle2::TOP::TOPtrack::getBarHit
const TOPBarHit * getBarHit() const
Return bar hit of MC particle assigned to this track (if any)
Definition: TOPtrack.h:248
Belle2::TOP::TOPtrack::isValid
bool isValid() const
Check if track is properly defined.
Definition: TOPtrack.h:87
Belle2::PIDLikelihood
Class to collect log likelihoods from TOP, ARICH, dEdx, ECL and KLM aimed for output to mdst includes...
Definition: PIDLikelihood.h:37
Belle2::TOP::Chi2MinimumFinder1D
Minimum finder using tabulated chi^2 values in one dimension.
Definition: Chi2MinimumFinder1D.h:37
Belle2::TOP::TOPreco::addData
int addData(int moduleID, int pixelID, double time, double timeError)
Add data.
Definition: TOPreco.cc:214
Belle2::TOP::TOPtrack::getModuleID
int getModuleID() const
Return module ID.
Definition: TOPtrack.h:217
Belle2::EventT0::EventT0Component
Structure for storing the extracted event t0s together with its detector and its uncertainty.
Definition: EventT0.h:44
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2::TOP::TOPtrack::getMCParticle
const MCParticle * getMCParticle() const
Return MC particle assigned to this track (if any)
Definition: TOPtrack.h:242
Belle2::Const::RestrictedDetectorSet
A class for sets of detector IDs whose content is limited to restricted set of valid detector IDs.
Definition: Const.h:172
Belle2::TOP::TOPreco
TOP reconstruction: this class provides interface to fortran code.
Definition: TOPreco.h:36
Belle2::TOP::TOPreco::setMass
void setMass(double mass, int pdg)
Set mass of the particle hypothesis (overrides settings in the constructor)
Definition: TOPreco.cc:172
Belle2::TOP::TOPreco::getLogL
double getLogL(int i=0)
Return log likelihood for i-th mass hypothesis.
Definition: TOPreco.cc:303
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPBunchFinderModule
Bunch finder: searches for the bunch crossing where the interaction happened using track-based TOP li...
Definition: TOPBunchFinderModule.h:45
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::VXDDedxLikelihood
Container for likelihoods obtained by the VXD dE/dx PID (VXDDedxPIDModule).
Definition: VXDDedxLikelihood.h:34
Belle2::MCParticle::getPDG
int getPDG() const
Return PDG code of particle.
Definition: MCParticle.h:123
Belle2::TOP::TOPconfigure
Configure TOP geometry for reconstruction: provides interface to fortran code.
Definition: TOPconfigure.h:36
Belle2::MCParticle::getMass
float getMass() const
Return the particle mass in GeV.
Definition: MCParticle.h:146
Belle2::TOP::TOP1Dpdf
Binned one dimensional PDF (a projection of PDF to time axis)
Definition: TOP1Dpdf.h:39
Belle2::TOP::TOP1Dpdf::getExpectedSignal
double getExpectedSignal() const
Returns expected number of signal photons.
Definition: TOP1Dpdf.h:89
Belle2::Const::ChargedStable
Provides a type-safe way to pass members of the chargedStableSet set.
Definition: Const.h:465
Belle2::Track
Class that bundles various TrackFitResults.
Definition: Track.h:35
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::TOP::TOPreco::setPDFoption
void setPDFoption(PDFoption opt, int NP=0, int NC=0)
Sets PDF option.
Definition: TOPreco.cc:196