Belle II Software  release-08-01-10
ClassMnemomics.h
Go to the documentation of this file.
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 <tracking/trackFindingCDC/utilities/WeightedRelation.h>
11 
12 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
13 
14 #include <string>
15 
23 namespace Belle2 {
28  namespace TrackFindingCDC {
29 
30  class CDCWireHit;
31  class CDCWireHitCluster;
32  class CDCFacet;
33  class CDCSegment2D;
34  class CDCSegmentPair;
35  class CDCAxialSegmentPair;
36  class CDCSegmentTriple;
37  class CDCTrack;
38 
40  inline std::string getClassMnemomicParameterName(const CDCWireHit* dispatchTag __attribute__((unused)))
41  {
42  return "wireHit";
43  }
44 
46  inline std::string getClassMnemomicParameterDescription(const CDCWireHit* dispatchTag __attribute__((unused)))
47  {
48  return "wire hit";
49  }
50 
52  inline std::string getClassMnemomicParameterName(const CDCWireHitCluster* dispatchTag __attribute__((unused)))
53  {
54  return "cluster";
55  }
56 
58  inline std::string getClassMnemomicParameterDescription(const CDCWireHitCluster* dispatchTag __attribute__((unused)))
59  {
60  return "wire hit cluster";
61  }
62 
64  inline std::string getClassMnemomicParameterName(const CDCFacet* dispatchTag __attribute__((unused)))
65  {
66  return "facet";
67  }
68 
70  inline std::string getClassMnemomicParameterDescription(const CDCFacet* dispatchTag __attribute__((unused)))
71  {
72  return "facet";
73  }
74 
76  inline std::string getClassMnemomicParameterName(const CDCSegment2D* dispatchTag __attribute__((unused)))
77  {
78  return "segment";
79  }
80 
82  inline std::string getClassMnemomicParameterDescription(const CDCSegment2D* dispatchTag __attribute__((unused)))
83  {
84  return "segment";
85  }
86 
88  inline std::string getClassMnemomicParameterName(const CDCSegmentPair* dispatchTag __attribute__((unused)))
89  {
90  return "segmentPair";
91  }
92 
94  inline std::string getClassMnemomicParameterDescription(const CDCSegmentPair* dispatchTag __attribute__((unused)))
95  {
96  return "segment pair";
97  }
98 
100  inline std::string getClassMnemomicParameterName(const CDCAxialSegmentPair* dispatchTag __attribute__((unused)))
101  {
102  return "axialSegmentPair";
103  }
104 
106  inline std::string getClassMnemomicParameterDescription(const CDCAxialSegmentPair* tag __attribute__((unused)))
107  {
108  return "axial segment pair";
109  }
110 
112  inline std::string getClassMnemomicParameterName(const CDCSegmentTriple* dispatchTag __attribute__((unused)))
113  {
114  return "segmentTriple";
115  }
116 
118  inline std::string getClassMnemomicParameterDescription(const CDCSegmentTriple* dispatchTag __attribute__((unused)))
119  {
120  return "segment triple";
121  }
122 
124  inline std::string getClassMnemomicParameterName(const CDCTrack* dispatchTag __attribute__((unused)))
125  {
126  return "track";
127  }
128 
130  inline std::string getClassMnemomicParameterDescription(const CDCTrack* dispatchTag __attribute__((unused)))
131  {
132  return "track";
133  }
134 
136  template <class T>
137  inline std::string getClassMnemomicParameterName(const WeightedRelation<T>* dispatchTag __attribute__((unused)))
138  {
139  return getClassMnemomicParameterName((T*)(nullptr)) + "Relation";
140  }
141 
143  template <class T>
144  inline std::string getClassMnemomicParameterDescription(const WeightedRelation<T>* dispatchTag __attribute__((unused)))
145  {
146  return getClassMnemomicParameterDescription((T*)(nullptr)) + " relation";
147  }
148 
150  template <class From, class To>
151  inline std::string getClassMnemomicParameterName(const WeightedRelation<From, To>* dispatchTag __attribute__((unused)))
152  {
153  return prefixed(getClassMnemomicParameterName((From*)(nullptr)) + "To",
154  getClassMnemomicParameterName((To*)(nullptr)) + "Relation");
155  }
156 
158  template <class From, class To>
159  inline std::string getClassMnemomicParameterDescription(const WeightedRelation<From, To>* dispatchTag __attribute__((unused)))
160  {
161  return getClassMnemomicParameterDescription((From*)(nullptr)) + " to " +
162  getClassMnemomicParameterDescription((To*)(nullptr)) + " relation";
163  }
164 
165  }
167 }
Class representing a pair of reconstructed axial segements in adjacent superlayer.
Class representing a triple of neighboring oriented wire with additional trajectory information.
Definition: CDCFacet.h:32
A reconstructed sequence of two dimensional hits in one super layer.
Definition: CDCSegment2D.h:39
Class representing a pair of one reconstructed axial segement and one stereo segment in adjacent supe...
Class representing a triple of reconstructed segements in adjacent superlayer.
Class representing a sequence of three dimensional reconstructed hits.
Definition: CDCTrack.h:41
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:55
Type for two related objects with a weight.
std::string getClassMnemomicParameterDescription(const RecoTrack *dispatchTag)
Returns a short description for class RecoTrack to be used in descriptions of parameters.
std::string getClassMnemomicParameterName(const RecoTrack *dispatchTag)
Returns a short name for class RecoTrack to be used in names of parameters.
Abstract base class for different kinds of events.