Belle II Software development
TrackFilterModule.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
9#pragma once
10
11#include <framework/core/Module.h>
12#include <framework/datastore/SelectSubset.h>
13
14#include <mdst/dataobjects/Track.h>
15
16#include <TFile.h>
17#include <TNtuple.h>
18
19
20namespace Belle2 {
28 class TrackFilterModule : public Module {
29
30 public:
31
36
37
39 virtual void event() override;
40
42 virtual void terminate() override;
43
45 virtual void initialize() override;
46
47 static double m_min_d0;
48 static double m_max_d0;
49 static double m_min_z0;
50 static double m_max_z0;
51 static int m_min_NumHitsPXD;
52 static int m_min_NumHitsSVD;
53 static int m_min_NumHitsCDC;
54 static double m_min_pCM;
55 static double m_min_pT;
56 static double m_min_Pval;
59 std::string m_rootFileName;
60 TFile* m_rootFilePtr = nullptr;
62 private:
63
64 std::string m_inputArrayName;
65 std::string m_outputINArrayName;
71 static bool isSelected(const Track* track);
73 static void fillControlNtuples(const Track* track,
74 bool isSelected);
76 static TNtuple* m_selectedNtpl;
77 static TNtuple* m_rejectedNtpl;
78 };
80}
81
82
83
Base class for Modules.
Definition: Module.h:72
Class to create a subset of a given StoreArray together with the relations with other StoreArrays.
Definition: SelectSubset.h:193
generates a new StoreArray from the input StoreArray which has all specified Tracks removed
std::string m_rootFileName
root file name
static double m_min_z0
z0 minimum value
std::string m_outputOUTArrayName
StoreArray with the NOT selected output tracks.
SelectSubset< Track > m_selectedTracks
selected tracks
std::string m_outputINArrayName
StoreArray with the selected output tracks.
static int m_min_NumHitsCDC
minimum value of CDC hits
static TNtuple * m_selectedNtpl
tuple of selected tracks
static double m_min_Pval
minimum P-value of the track fit
virtual void initialize() override
init the module
static bool m_saveControlNtuples
if true produces a rootfile with control ntupled
virtual void event() override
processes the event
static double m_max_z0
z0 maximum value
static double m_max_d0
d0 maximum value
static bool isSelected(const Track *track)
determine if the track satisfies the selection criteria
virtual void terminate() override
terminates the module
static double m_min_pT
minimum value of the transverse momentum
SelectSubset< Track > m_notSelectedTracks
not selected tracks
static TNtuple * m_rejectedNtpl
tuple of rejected tracks
static int m_min_NumHitsSVD
minimum value of SVD hits
static void fillControlNtuples(const Track *track, bool isSelected)
determine if the track does not satisfies the selection criteria
static int m_min_NumHitsPXD
minimum value of PXD hits
TFile * m_rootFilePtr
pointer at root file used for storing ntuples
std::string m_inputArrayName
StoreArray with the input tracks.
static double m_min_d0
d0 minimum value
static double m_min_pCM
minimum value of the center of mass momentum
TrackFilterModule()
Constructor: Sets the description, the properties and the parameters of the module.
Class that bundles various TrackFitResults.
Definition: Track.h:25
Abstract base class for different kinds of events.