Belle II Software  release-08-01-10
EWirePositionToCDC.cc
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 #include <tracking/trackFindingCDC/topology/EWirePositionToCDC.h>
9 
10 using namespace Belle2;
11 using namespace TrackFindingCDC;
12 
13 CDC::CDCGeometryPar::EWirePosition TrackFindingCDC::toCDC(EWirePosition wirePosition)
14 {
15  if (wirePosition == EWirePosition::c_Base) {
16  return CDC::CDCGeometryPar::EWirePosition::c_Base;
17  } else if (wirePosition == EWirePosition::c_Misaligned) {
18  return CDC::CDCGeometryPar::EWirePosition::c_Misaligned;
19  } else if (wirePosition == EWirePosition::c_Aligned) {
20  return CDC::CDCGeometryPar::EWirePosition::c_Aligned;
21  }
22  B2ERROR("Unexpected EWirePosition");
23  return CDC::CDCGeometryPar::EWirePosition::c_Base;
24 }
25 
26 EWirePosition TrackFindingCDC::fromCDC(CDC::CDCGeometryPar::EWirePosition wirePosSet)
27 {
28  if (wirePosSet == CDC::CDCGeometryPar::EWirePosition::c_Base) {
29  return EWirePosition::c_Base;
30  } else if (wirePosSet == CDC::CDCGeometryPar::EWirePosition::c_Misaligned) {
31  return EWirePosition::c_Misaligned;
32  } else if (wirePosSet == CDC::CDCGeometryPar::EWirePosition::c_Aligned) {
33  return EWirePosition::c_Aligned;
34  }
35  B2ERROR("Unexpected EWirePosition");
36  return EWirePosition::c_Base;
37 }
EWirePosition
Wire position set.
Abstract base class for different kinds of events.