Belle II Software development
PXDValidationAlgorithm.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#include <calibration/CalibrationAlgorithm.h>
11#include <vector>
12
13#include <TH1F.h>
14#include <TH2F.h>
15
16
17namespace Belle2 {
26 public:
27
30
32 virtual ~PXDValidationAlgorithm() override;
33
36
39
42
45
47 void setBoundaries(const std::vector<Calibration::ExpRun>& boundaries) {m_requestedBoundaries = boundaries;}
48
50 std::vector<Calibration::ExpRun> getBoundaries() const {return m_requestedBoundaries;}
51
52 protected:
53
55 virtual EResult calibrate() override;
56
58 virtual bool isBoundaryRequired(const Calibration::ExpRun& /*currentRun*/) override;
59
61 // We reset the temporary boundaries list to be the same as the requested one.
62 virtual void boundaryFindingSetup(std::vector<Calibration::ExpRun> /*runs*/, int /* iteration = 0*/) override
63 {
65 };
66
67 private:
68
70 std::vector<Calibration::ExpRun> m_requestedBoundaries;
71
73 std::shared_ptr<TFile> m_file;
74
76 std::shared_ptr<TTree> m_tree;
77
79 int m_exp;
80
82 int m_run;
83
85 std::vector<unsigned short> m_pxdid;
86
88 std::vector<unsigned short> m_uBin;
89
91 std::vector<unsigned short> m_vBin;
92
94 std::vector<unsigned long> m_nTrackPoints;
95
97 std::vector<unsigned long> m_nTrackClusters;
98
100 std::vector<unsigned long> m_nSelTrackPoints;
101
103 std::vector<unsigned long> m_nSelTrackClusters;
104
106 std::vector<float> m_d0;
107
109 std::vector<float> m_z0;
110
112 TH1F* m_hD0;
113
115 TH1F* m_hZ0;
116
119
122
125
128
129 };
130
131} // namespace Belle2
132
133
std::vector< Calibration::ExpRun > m_boundaries
When using the boundaries functionality from isBoundaryRequired, this is used to store the boundaries...
EResult
The result of calibration.
CalibrationAlgorithm(const std::string &collectorModuleName)
Constructor - sets the prefix for collected objects (won't be accesses until execute(....
TH1F * m_hD0
Histogram of corrected d0 for each 2-track event.
TH2F * m_hTrackPointsLayer2
Histogram of intersection points for layer 2.
TH2F * m_hTrackClustersLayer1
Histogram of track matched clusters for layer 1.
TH2F * m_hTrackPointsLayer1
Histogram of intersection points for layer 1.
std::vector< unsigned long > m_nTrackClusters
Vector of number of track matched clusters.
virtual void boundaryFindingSetup(std::vector< Calibration::ExpRun >, int) override
What we do before isBoundaryRequired gets called.
virtual ~PXDValidationAlgorithm() override
Destructor.
std::vector< Calibration::ExpRun > getBoundaries() const
getter for current boundaries
TH2F * m_hTrackClustersLayer2
Histogram of track matched clusters for layer 2.
std::vector< unsigned long > m_nTrackPoints
Vector of number of track points.
void setBoundaries(const std::vector< Calibration::ExpRun > &boundaries)
Setter for boundaries.
std::vector< float > m_z0
Vector of delta z0 over sqrt(2)
bool saveD0Z0
Flag to save delta d0 (z0) over sqrt(2) to TTree;.
std::vector< unsigned long > m_nSelTrackPoints
Vector of number of track points outside of defective pixels.
PXDValidationAlgorithm()
Constructor set the prefix to PXDValidationAlgorithm.
int minTrackPoints
Minimum number of track points per sensor.
std::shared_ptr< TFile > m_file
Pointer for TFile.
bool save2DHists
Flag to save 2D histograms for efficiency;.
std::vector< unsigned short > m_uBin
Vector of uBin.
std::vector< float > m_d0
Vector of delta d0 over sqrt(2)
virtual EResult calibrate() override
Run algo on data.
int binsD0Z0
Bin size for d0/z0 histogram.
std::vector< unsigned long > m_nSelTrackClusters
Vector of number of track clusters outside of defective pixels.
std::vector< unsigned short > m_vBin
Vector of vBin.
std::shared_ptr< TTree > m_tree
Pointer for TTree of the validation info.
std::vector< Calibration::ExpRun > m_requestedBoundaries
During findPayloadBoundaries and isBoundaryRequired this is used to define the boundaries we want.
virtual bool isBoundaryRequired(const Calibration::ExpRun &) override
Decide if a run should be a payload boundary. Only used in certain Python Algorithm Starategies.
TH1F * m_hZ0
Histogram of corrected z0 for each 2-track event.
std::vector< unsigned short > m_pxdid
Vector of PXD module id (DHE id)
Abstract base class for different kinds of events.