Belle II Software development
PXDStateTruthVarSet.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/trackFindingCDC/varsets/VarSet.h>
11#include <tracking/trackFindingCDC/varsets/VarNames.h>
12
13#include <framework/datastore/StoreObjPtr.h>
14
15#include <tracking/ckf/pxd/filters/states/BasePXDStateFilter.h>
16#include <tracking/ckf/pxd/utilities/PXDMCUtil.h>
17
18namespace Belle2 {
23 class EventMetaData;
24
26 constexpr
27 static char const* const pxdStateTruthVarNames[] = {
28 "truth",
29 "truth_position_x",
30 "truth_position_y",
31 "truth_position_z",
32 "truth_momentum_x",
33 "truth_momentum_y",
34 "truth_momentum_z",
35 "truth_event_id",
36 "truth_seed_number"
37 };
38
40 class PXDStateTruthVarNames : public TrackFindingCDC::VarNames<BasePXDStateFilter::Object> {
41
42 public:
44 static const size_t nVars = TrackFindingCDC::size(pxdStateTruthVarNames);
45
47 constexpr
48 static char const* getName(int iName)
49 {
50 return pxdStateTruthVarNames[iName];
51 }
52 };
53
58 class PXDStateTruthVarSet : public TrackFindingCDC::VarSet<PXDStateTruthVarNames> {
59
60 public:
62 virtual bool extract(const BasePXDStateFilter::Object* result) override;
63
65 void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) override;
66
67 private:
70
73
76
81 double m_BackgroundFraction = 0.001;
82 };
83
84}
Store event, run, and experiment numbers.
Class bundling all helper functions for the MC information used in the PXD CKF.
Definition PXDMCUtil.h:23
The Module parameter list class.
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)
Get the name of the column.
Var set used in the VXD-CDC-Merger for calculating the probability of a VXD-CDC-track match,...
double m_BackgroundFraction
Fraction of background to use in case m_UseFractionOfBackground is true The default value of 0....
MCUtil m_mcUtil
MC information used in the PXD CKF.
virtual bool extract(const BasePXDStateFilter::Object *result) override
Generate and assign the variables from the object.
StoreObjPtr< EventMetaData > m_eventMetaData
Pointer to the object containing event number etc.
bool m_UseFractionOfBackground
Only use a fraction of background events for recording for MVA training.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters to the outside world.
Type-safe access to single objects in the data store.
Definition StoreObjPtr.h:96
std::pair< const std::vector< TrackFindingCDC::WithWeight< const CKFToPXDState * > >, CKFToPXDState * > Object
Definition Filter.dcl.h:35
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
static constexpr char const *const pxdStateTruthVarNames[]
Names of the variables to be generated.
Abstract base class for different kinds of events.