Belle II Software development
CDCDedxValidation.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
10#pragma once
11
12#include <framework/core/HistoModule.h>
13#include <framework/datastore/StoreArray.h>
14#include <framework/database/DBObjPtr.h>
15
16#include <mdst/dataobjects/TrackFitResult.h>
17
18#include <cdc/dataobjects/CDCDedxTrack.h>
19#include <cdc/dbobjects/CDCDedxRunGain.h>
20
21#include <TFile.h>
22#include <TH1D.h>
23#include <TList.h>
24#include <TString.h>
25
26namespace Belle2 {
31
40
41 public:
42
48
53
58 virtual void initialize() override;
59
64 virtual void beginRun() override;
65
70 virtual void event() override;
71
76 virtual void endRun() override;
77
82 virtual void terminate() override;
83
84
89 void DefineHistograms(TString level, Int_t iR);
90
95 void FillHistograms(CDCDedxTrack* dedxTrack, const TrackFitResult* mTrack);
96
101 void ExtractHistograms(TString level);
102
107 Bool_t IsSelectedTrack(const TrackFitResult* mTrack);
108
113 void setD0Cut(Double_t value) {fD0Window = value;}
114
119 void setZ0Cut(Double_t value) {fZ0Window = value;}
120
121
122 private:
123
130
132
133 Double_t fD0Window;
134 Double_t fZ0Window;
136 Int_t fiRun;
137
139 Double_t fnBinsdedxLE;
140 Double_t fnBinsdedxUE;
141
142 Int_t fnRuns;
144 Double_t fcRunGain;
145 Double_t fTrkEoverP;
146
147 TFile* fFileOutput = nullptr;
148 TList* fBasic = nullptr;
149 TList* fPRdEdx = nullptr;
150 TList* fPRdEdxinP = nullptr;
151
152 std::string fOutFileName;
153 std::string fCollType;
154
155 std::vector<Double_t> TotMean;
156 std::vector<Double_t> TotMeanE;
157 std::vector<Double_t> TotSigma;
158 std::vector<Double_t> TotSigmaE;
159 std::vector<Int_t> TotRunN;
160
161 std::vector<TH1D*> hdEdx_PR;
163
164 };
165
167}
Debug output for CDCDedxPID module.
std::vector< Double_t > TotMean
Mean of dedx by Fit.
Double_t fnBinsdedxUE
up edge of dedx
void FillHistograms(CDCDedxTrack *dedxTrack, const TrackFitResult *mTrack)
Filling histograms This will fill histogram defined histograms in above function.
TFile * fFileOutput
Write final objects to file for RG.
std::string fOutFileName
name of output ROOT file
Double_t fcRunGain
existing run gain
Int_t fCurrentRunNum
current run number
DBObjPtr< CDCDedxRunGain > m_DBRunGain
Run gain DB object.
Int_t fnRunCounter
Total runs used counter.
void setD0Cut(Double_t value)
d0 Selection set/change d0 while executing this module from external script
TList * fBasic
List of basic histos.
virtual void initialize() override
Initialize This is inherited from base class.
std::vector< TH1D * > hdEdx_PR
histogram array per run
virtual void event() override
function to execute event (event by event) This is inherited from base class
std::vector< Double_t > TotSigma
Sigma of dedx by Fit.
CDCDedxValidationModule()
Default constructor contain list of members with initial values.
TList * fPRdEdxinP
list per run dedx in P histos
Double_t fTrkEoverP
E/p ratio for cut.
virtual void endRun() override
function is called after each event This is inherited from base class
std::vector< Int_t > TotRunN
veector array of runs processed
virtual void terminate() override
Terminate after all data processed This is inherited from base class.
std::vector< Double_t > TotSigmaE
Sigma Error of dedx by Fit.
std::vector< Double_t > TotMeanE
Mean Error of dedx by Fit.
void setZ0Cut(Double_t value)
z0 Selection set/change z0 while executing this module from external script
virtual ~CDCDedxValidationModule()
Default destructor.
virtual void beginRun() override
Function to execute each run This is inherited from base class.
StoreArray< CDCDedxTrack > m_cdcDedxTracks
Data members for objects, cuts and others.
Double_t fnBinsdedxLE
low edge of dedx
TList * fPRdEdx
List of per run dedx histos.
void ExtractHistograms(TString level)
Extracting histogram and some calculation Higher level histograms are filled after each run or full p...
void DefineHistograms(TString level, Int_t iR)
Definition of histograms This contain a list of histogram for validation.
Int_t fnRuns
Number of runs ref.
Int_t fiRun
Current run number.
Int_t fnBinsdedx
nbin of dedx range
std::string fCollType
collision type
Bool_t IsSelectedTrack(const TrackFitResult *mTrack)
Track selection A clean way to implement selections on tracks (so far few only)
Class for accessing objects in the database.
Definition DBObjPtr.h:21
HistoModule()
Constructor.
Definition HistoModule.h:32
Accessor to arrays stored in the data store.
Definition StoreArray.h:113
Values of the result of a track fit with a given particle hypothesis.
Abstract base class for different kinds of events.