Belle II Software development
SVDPositionErrorScaleFactorImporterModule.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
12#include <framework/core/Module.h>
13#include <framework/datastore/StoreArray.h>
14#include <framework/database/Database.h>
15#include <framework/database/IntervalOfValidity.h>
16
17#include <svd/dataobjects/SVDHistograms.h>
18#include <svd/dataobjects/SVDCluster.h>
19#include <svd/dataobjects/SVDTrueHit.h>
20
21#include <string>
22#include <TFile.h>
23#include <TTree.h>
24#include <TBranch.h>
25#include <TH1F.h>
26
27namespace Belle2 {
37
38 public:
39
44
46 virtual void initialize() override;
47
49 virtual void beginRun() override;
50
52 virtual void event() override;
53
59 virtual void endRun() override;
60
61 private:
62
63 /* user-defined parameters */
64 std::string m_rootFileName;
66 std::string m_posAlgorithm = "CoGOnly";
68 bool m_noOutliers = false;
70 float m_min = -10;
71 float m_max = 10;
72 float m_nBins = 100;
73 std::string m_uniqueID = "PositionErrorScaleFactors_TEST";
78 //* ROOT file related parameters
79 TFile* m_rootFilePtr = nullptr;
80 TTree* m_tree = nullptr;
82 //tree variables
83 int m_exp = -1;
84 int m_run = -1;
85 int m_layer = -1;
86 int m_ladder = -1;
87 int m_sensor = -1;
88 int m_side = -1;
89 int m_size = -1;
90 float m_clsCharge = -1;
91 float m_clsTime = -1;
92 float m_clsPos = -1;
93 float m_clsErr = -1;
94 float m_clsResid = -1;
95 float m_clsPull = -1;
100 double oneSigma(TH1F*);
101
102 //CLUSTER PULLS
109 const int maxSize = 5;
110 TH1F* m_hL3Pulls[5][2] = {};
111 TH1F* m_hFWPulls[5][2] = {};
112 TH1F* m_hBWPulls[5][2] = {};
113 TH1F* m_hORPulls[5][2] = {};
115 };
117}
118
Base class for Modules.
Definition: Module.h:72
template class for SVd histograms
Definition: SVDHistograms.h:24
Module that produces a localdb with position error scale factors for different position algoritms.
SVDHistograms< TH1F > * m_hClsPullSize1
cluster size 1, position error scale factor histo
TTree * m_tree
pointer at tree containing the mean and RMS of calibration constants
TH1F * m_hFWPulls[5][2]
cumulative FW pulls histograms [size][side]
TH1F * m_hORPulls[5][2]
cumulative ORIGAMI pulls histograms [size][side]
virtual void initialize() override
check presence of data objects
bool m_noOutliers
if True removes outliers from scale factor computation
SVDHistograms< TH1F > * m_hClsPullSize5
cluster size 5, position error scale factor histo
virtual void endRun() override
create cumulative histograms, compute scale factors, create payloads and import it to a localdb,...
SVDPositionErrorScaleFactorImporterModule()
Constructor: Sets the description, the properties and the parameters of the module.
SVDHistograms< TH1F > * m_hClsPullSize3
cluster size 3, position error scale factor histo
virtual void beginRun() override
initialize the TTrees and create histograms
TH1F * m_hL3Pulls[5][2]
cumulative L3 pulls histograms [size][side]
SVDHistograms< TH1F > * m_hClsPullSize2
cluster size 2, position error scale factor histo
SVDHistograms< TH1F > * m_hClsPullSize4
cluster size 4, position error scale factor histo
TH1F * m_hBWPulls[5][2]
cumulative BW pulls histograms [size][side]
double oneSigma(TH1F *)
computes the scale factor by requiring that 68% of the pull distribution is between ±1
TFile * m_rootFilePtr
pointer at root file used for storing histograms
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.