Belle II Software development
SVDChargeSharingAnalysisModule.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/StoreArray.h>
13#include <svd/dataobjects/SVDCluster.h>
14#include <mdst/dataobjects/Track.h>
15#include <mdst/dataobjects/TrackFitResult.h>
16#include <tracking/dataobjects/RecoTrack.h>
17#include <TH1F.h>
18#include <TH2F.h>
19#include <TFile.h>
20#include <TList.h>
21#include <TCanvas.h>
22
23namespace Belle2 {
33
34 public:
35
38
40 virtual ~SVDChargeSharingAnalysisModule() override;
41
43 virtual void initialize() override;
44
46 virtual void event() override;
47
49 virtual void terminate() override;
50
51
52 private:
53
54 // Input, output.
55 TFile* m_outputRootFile = nullptr;
56 std::string m_outputDirName;
59 // Module parameters.
60 bool m_useTrackInfo = true;
62 // Store arrays.
68 // Constants related to SVD geometry.
69 static const int m_nLayers = 4;
70 static const int m_nSides = 2;
71 static const int m_nClSizes = 3;
72 static const int m_nSensorTypes = 4;
74 std::string m_nameSensorTypes[m_nSensorTypes] = {"L3", "Origami", "BWD", "FWD"};
75 int m_nSensorsOnLayer[m_nLayers] = {2, 3, 4, 5};
77 // Histogram related parameters.
78 const Double_t m_ADUEquivalent = 375.;
79 const Int_t m_nBins = 270;
80 const Double_t m_minCharge = 0.;
81 const Double_t m_maxCharge = m_nBins * m_ADUEquivalent;
83 // tracks.
84 TH1F* h_nTracks = nullptr;
85 TH1F* h_TracksPvalue = nullptr;
86 TH1F* h_TracksMomentum = nullptr;
87 TH1F* h_TracksnSVDhits = nullptr;
89 // Cluster charge.
90 TH1F* h_clCharge[m_nSensorTypes][m_nSides][m_nClSizes] = {{{nullptr}}};
95 // Cluster size.
96 TH1F* h_clSize[m_nSensorTypes][m_nSides] = {{nullptr}};
99 TH2F* h_clSizeVsSNR[m_nSensorTypes][m_nSides] = {{nullptr}};
101 // cluster SNR.
102 TH1F* h_clSNR[m_nSensorTypes][m_nSides][m_nClSizes] = {{{nullptr}}};
106 // histogram lists.
108 TList* m_histoList_Tracks = nullptr;
109
115 TList* m_histoList_clSize[m_nSensorTypes] = {nullptr};
120 TList* m_histoList_clSNR[m_nSensorTypes] = {nullptr};
124 // utility methods
126 TH1F* createHistogram1D(const char* name, const char* title,
127 Int_t nbins, Double_t min, Double_t max,
128 const char* xtitle, const char* ytitle, TList* histoList = nullptr);
129
131 TH2F* createHistogram2D(const char* name, const char* title,
132 Int_t nbinsX, Double_t minX, Double_t maxX,
133 const char* titleX,
134 Int_t nbinsY, Double_t minY, Double_t maxY,
135 const char* titleY, TList* histoList);
137 TCanvas* comparisonPlot(TH1F* h1, TH1F* h2, TH1F* h3);
138 };
140}
Base class for Modules.
Definition: Module.h:72
Module for monitoring DSSD cluster charge deposition in regard of capacitive charge sharing between a...
TList * m_histoList_clSize[m_nSensorTypes]
SVDCluster size histogram list.
TH2F * h_clSNRVsIncidentAngle[m_nSensorTypes][m_nSides][m_nClSizes]
SVDCluster SNR vs.
SVDChargeSharingAnalysisModule()
Constructor: Sets the description, the properties and the parameters of the module.
TH2F * h_clChargeVsIncidentAngle[m_nSensorTypes][m_nSides][m_nClSizes]
SVDCluster charge vs.
const Double_t m_ADUEquivalent
Nominal ADUEquivalent, this is just a parameter for histogram bining.
TList * m_histoList_clSizeVsIncidentAngle[m_nSensorTypes]
SVDCluster size vs.
TList * m_histoList_clSNRVsMomentum[m_nSensorTypes]
SVDCluster SNR vs.
TH2F * h_clSizeVsIncidentAngle[m_nSensorTypes][m_nSides]
SVDCluster size vs.
TList * m_histoList_clSNR[m_nSensorTypes]
SVDCluster SNR histogram list.
TH1F * h_clSNR[m_nSensorTypes][m_nSides][m_nClSizes]
SVDCluster SNR.
virtual void initialize() override
Initialize the SVDChargeSharingAnalysi module.
TH1F * h_TracksnSVDhits
Number of SVDhits for a track.
std::string m_outputRootFileName
root output file name.
StoreArray< SVDCluster > m_svdClusters
SVD clusters store array.
virtual void event() override
Core method, called for each processed event.
TH2F * createHistogram2D(const char *name, const char *title, Int_t nbinsX, Double_t minX, Double_t maxX, const char *titleX, Int_t nbinsY, Double_t minY, Double_t maxY, const char *titleY, TList *histoList)
2D histogram creator.
TList * m_histoList_clSNRVsIncidentAngle[m_nSensorTypes]
SVDCluster SNR vs.
StoreArray< TrackFitResult > m_tfr
Track Fit Result store array.
TList * m_histoList_clChargeVsMomentum[m_nSensorTypes]
SVDCluster charge vs.
TH2F * h_clSizeVsMomentum[m_nSensorTypes][m_nSides]
SVDCluster size vs.
bool m_useTrackInfo
True if using clusters related to tracks.
static const int m_nLayers
Number of SVD layers.
TH2F * h_clSizeVsSNR[m_nSensorTypes][m_nSides]
SVDCluster size vs.
virtual void terminate() override
Summary method, called after processing of all events.
int m_nSensorsOnLayer[m_nLayers]
Total number of DSSDs on L3,4,5,6.
TH2F * h_clChargeVsSNR[m_nSensorTypes][m_nSides][m_nClSizes]
SVDCluster charge vs.
TList * m_histoList_clSizeVsSNR[m_nSensorTypes]
SVDCluster size vs.
TH1F * h_clCharge[m_nSensorTypes][m_nSides][m_nClSizes]
SVDCluster charge.
virtual ~SVDChargeSharingAnalysisModule() override
Default destructor.
const Double_t m_minCharge
Minimum charge in histogram.
TList * m_histoList_clCharge[m_nSensorTypes]
SVDCluster charge histogram list.
TList * m_histoList_clChargeVsIncidentAngle[m_nSensorTypes]
SVDCluster charge vs.
std::string m_nameSensorTypes[m_nSensorTypes]
Sensor type names.
static const int m_nClSizes
Distinction between clSize=1, clSize=2 & clSize>=3.
StoreArray< RecoTrack > m_recoTracks
SVD RecoTracks store array.
TH1F * h_clSize[m_nSensorTypes][m_nSides]
SVDCluster size.
TCanvas * comparisonPlot(TH1F *h1, TH1F *h2, TH1F *h3)
Used to compare charge histograms for different cluster sizes.
TList * m_histoList_clChargeVsSNR[m_nSensorTypes]
SVDCluster charge vs.
TH2F * h_clSNRVsMomentum[m_nSensorTypes][m_nSides][m_nClSizes]
SVDCluster SNR vs.
TH1F * createHistogram1D(const char *name, const char *title, Int_t nbins, Double_t min, Double_t max, const char *xtitle, const char *ytitle, TList *histoList=nullptr)
1D histogram creator.
StoreArray< Track > m_Tracks
SVD Tracks strore array.
TList * m_histoList_clSizeVsMomentum[m_nSensorTypes]
SVDCluster size vs.
TH2F * h_clChargeVsMomentum[m_nSensorTypes][m_nSides][m_nClSizes]
SVDCluster charge vs.
TList * m_histoList_Tracks
List of all histograms concerning track information: nTracks, Track P Value, momentum and SVD hits.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.