Belle II Software development
HitGapAxialSegmentPairVarSet.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 <tracking/trackingUtilities/varsets/VarSet.h>
11#include <tracking/trackingUtilities/varsets/VarNames.h>
12
13namespace Belle2 {
18 namespace TrackingUtilities {
20 }
21 namespace TrackFindingCDC {
22
24 constexpr
25 static char const* const hitGapAxialSegmentPairVarNames[] = {
26 "delta_hit_pos_phi",
27 "delta_hit_mom_phi",
28 "delta_hit_alpha",
29
30 "hit_distance",
31 "hit_long_distance",
32 "delta_hit_distance",
33
34 "from_hit_forward",
35 "to_hit_forward",
36 "hit_forward",
37 "hit_ptolemy",
38 };
39
41 struct HitGapAxialSegmentPairVarNames : public TrackingUtilities::VarNames<TrackingUtilities::CDCAxialSegmentPair > {
42
44 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
45 // at least tell cppcheck that everything is fine
46 // cppcheck-suppress duplInheritedMember
47 static const size_t nVars = TrackingUtilities::size(hitGapAxialSegmentPairVarNames);
48
50 static constexpr char const* getName(int iName)
51 {
52 return hitGapAxialSegmentPairVarNames[iName];
53 }
54 };
55
60 class HitGapAxialSegmentPairVarSet : public TrackingUtilities::VarSet<HitGapAxialSegmentPairVarNames> {
61
62 public:
64 bool extract(const TrackingUtilities::CDCAxialSegmentPair* ptrAxialSegmentPair) override;
65 };
66 }
68}
Class to compute floating point variables from a segment relation which can be recorded as a flat TNt...
bool extract(const TrackingUtilities::CDCAxialSegmentPair *ptrAxialSegmentPair) override
Generate and assign the contained variables.
Class representing a pair of reconstructed axial segments in adjacent superlayer.
Class that specifies the names of the variables.
Definition VarNames.h:21
Generic class that generates some named float values from a given object.
Definition VarSet.h:36
Abstract base class for different kinds of events.
static const size_t nVars
Number of variables to be generated.
static constexpr char const * getName(int iName)
Getter for the name at the given index.