Belle II Software  release-05-01-25
EFitPos.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <stdexcept>
13 #include <string>
14 
15 namespace Belle2 {
20  namespace TrackFindingCDC {
21 
23  enum class EFitPos {
25  c_WirePos = 0,
26 
28  c_RLDriftCircle = 1,
29 
31  c_RecoPos = 2
32  };
33 
38  inline EFitPos getFitPos(const std::string& fitPosString)
39  {
40  if (fitPosString == std::string("recoPos")) {
41  return EFitPos::c_RecoPos;
42  } else if (fitPosString == std::string("rlDriftCircle")) {
43  return EFitPos::c_RLDriftCircle;
44  } else if (fitPosString == std::string("wirePos")) {
45  return EFitPos::c_WirePos;
46  } else {
47  throw std::invalid_argument("Unexpected fit postion string : '" + fitPosString + "'");
48  }
49  }
50 
51  }
53 }
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19