Belle II Software development
BasicFacetVarSet.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 {
19 class CDCFacet;
20 }
21 namespace TrackFindingCDC {
22
24 constexpr
25 static char const* const basicFacetVarNames[] = {
26 "superlayer_id",
27
28 // "start_layer_id",
29 "start_drift_length",
30 "start_drift_length_sigma",
31
32 // "middle_layer_id",
33 "middle_drift_length",
34 "middle_drift_length_sigma",
35
36 // "end_layer_id",
37 "end_drift_length",
38 "end_drift_length_sigma",
39
40 "oclock_delta",
41 "twist",
42 "cell_extend",
43 "n_crossing",
44
45 "alpha",
46 };
47
49 struct BasicFacetVarNames : public TrackingUtilities::VarNames<const TrackingUtilities::CDCFacet> {
50
52 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
53 // at least tell cppcheck that everything is fine
54 // cppcheck-suppress duplInheritedMember
55 static const size_t nVars = TrackingUtilities::size(basicFacetVarNames);
56
58 static constexpr char const* getName(int iName)
59 {
60 return basicFacetVarNames[iName];
61 }
62 };
63
68 class BasicFacetVarSet : public TrackingUtilities::VarSet<BasicFacetVarNames> {
69
70 public:
72 bool extract(const TrackingUtilities::CDCFacet* ptrFacet) final;
73 };
74 }
76}
Class to compute floating point variables from a facet which can be recorded as a flat TNtuple or ser...
bool extract(const TrackingUtilities::CDCFacet *ptrFacet) final
Generate and assign the contained variables.
Class representing a triple of neighboring oriented wire with additional trajectory information.
Definition CDCFacet.h:32
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.
Vehicle class to transport the variable names.
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.