Belle II Software development
EFitPos.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 <stdexcept>
11#include <string>
12
13namespace Belle2 {
18 namespace TrackFindingCDC {
19
21 enum class EFitPos {
23 c_WirePos = 0,
24
26 c_RLDriftCircle = 1,
27
29 c_RecoPos = 2
30 };
31
36 inline EFitPos getFitPos(const std::string& fitPosString)
37 {
38 if (fitPosString == std::string("recoPos")) {
39 return EFitPos::c_RecoPos;
40 } else if (fitPosString == std::string("rlDriftCircle")) {
41 return EFitPos::c_RLDriftCircle;
42 } else if (fitPosString == std::string("wirePos")) {
43 return EFitPos::c_WirePos;
44 } else {
45 throw std::invalid_argument("Unexpected fit position string : '" + fitPosString + "'");
46 }
47 }
48
49 }
51}
Abstract base class for different kinds of events.