Belle II Software  release-05-02-19
BasicClusterVarSet.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - 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 <tracking/trackFindingCDC/varsets/VarSet.h>
13 #include <tracking/trackFindingCDC/varsets/VarNames.h>
14 
15 namespace Belle2 {
20  namespace TrackFindingCDC {
21  class CDCWireHitCluster;
22 
24  static constexpr char const* const basicClusterNames[] = {
25  "is_stereo",
26  "superlayer_id",
27  "size",
28 
29  "total_number_of_neighbors",
30  "mean_number_of_neighbors",
31 
32  "total_drift_length",
33  "mean_drift_length",
34  "variance_drift_length",
35 
36  "total_inner_distance",
37  "mean_inner_distance",
38  "distance_to_superlayer_center",
39 
40  "total_adc_count",
41  "mean_adc_count",
42  "variance_adc_count",
43  };
44 
46  struct BasicClusterVarNames : public VarNames<CDCWireHitCluster> {
47 
49  static const size_t nVars = size(basicClusterNames);
50 
52  static constexpr char const* getName(int iName)
53  {
54  return basicClusterNames[iName];
55  }
56  };
57 
62  class BasicClusterVarSet : public VarSet<BasicClusterVarNames> {
63 
64  public:
66  bool extract(const CDCWireHitCluster* ptrCluster) final;
67  };
68  }
70 }
Belle2::TrackFindingCDC::BasicClusterVarNames::getName
static constexpr char const * getName(int iName)
Getter for the name at the given index.
Definition: BasicClusterVarSet.h:60
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::BasicClusterVarSet::extract
bool extract(const CDCWireHitCluster *ptrCluster) final
Generate and assign the contained variables.
Definition: BasicClusterVarSet.cc:25
Belle2::TrackFindingCDC::BasicClusterVarSet
Class to compute floating point variables from a wire hit cluster which can be recorded as a flat TNt...
Definition: BasicClusterVarSet.h:70
Belle2::TrackFindingCDC::CDCWireHitCluster
An aggregation of CDCWireHits.
Definition: CDCWireHitCluster.h:31
Belle2::TrackFindingCDC::VarSet
Generic class that generates some named float values from a given object.
Definition: VarSet.h:46
Belle2::TrackFindingCDC::BasicClusterVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: BasicClusterVarSet.h:57