Belle II Software development
TrackFitMomentumRange.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <framework/logging/Logger.h>
11
12#include <TObject.h>
13#include <map>
14
15namespace Belle2 {
26 class TrackFitMomentumRange: public TObject {
27
28 public:
29
34
39 void setMomentumRange(const int pdg, const float momentum)
40 {
41 m_pThreshold.insert(std::pair<int, float>(pdg, momentum));
42 }
43
47 float getMomentumRange(int pdg) const
48 {
49 std::map<int, float>::const_iterator it = m_pThreshold.find(pdg);
50 if (it != m_pThreshold.end()) {
51 return it->second;
52 } else {
53 B2FATAL("Momentum threshold for pdg " << pdg << " not found");
54 }
55 }
56
57 private:
60 std::map<int, float> m_pThreshold;
61
63 };
65}
The payload containing the momentum threshold to disable the particle hypothesis in the track fit.
TrackFitMomentumRange()
Default constructor.
void setMomentumRange(const int pdg, const float momentum)
Set the momentum threshold for the pdg particle hypothesis (infinite means always enabled)
ClassDef(TrackFitMomentumRange, 1)
ClassDef, necessary for ROOT.
std::map< int, float > m_pThreshold
The p threshold that is used to determine if you want to fit the particle hypothesis,...
float getMomentumRange(int pdg) const
Get the momentum threshold for the pdg particle hypothesis (100.
Abstract base class for different kinds of events.