CbmRoot
Loading...
Searching...
No Matches
CbmTrdCalibTracker.h
Go to the documentation of this file.
1/* Copyright (C) 2022 Horia Hulubei National Institute of Physics and Nuclear Engineering, Bucharest
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Alexandru Bercuci[committer]*/
4
8
9#ifndef CBMTRDCALIBTRACKER_H
10#define CBMTRDCALIBTRACKER_H
11
12#include "CbmQaCanvas.h"
13#include "CbmQaHist.h"
14
15#include <FairTask.h>
16
17#include <TFolder.h>
18#include <TH1D.h>
19#include <TH1F.h>
20#include <TH1I.h>
21#include <TH2F.h>
22#include <TParameter.h>
23#include <TProfile.h>
24#include <TProfile2D.h>
25
26class CbmDigiManager;
28class CbmMCEventList;
29class CbmMCDataArray;
30class CbmTimeSlice;
31class CbmTrdParSetGeo;
33
34class TClonesArray;
35
43class CbmTrdCalibTracker : public FairTask {
44
45 public:
47 CbmTrdCalibTracker(const char* name = "TrdQaTracker", Int_t verbose = 1);
48
51
53 InitStatus Init() { return ReInit(); }
54
56 InitStatus ReInit();
57
59 void SetParContainers();
60
62 void Finish();
63
65 void Clear(Option_t* /*option*/ = "") {}
66
68 void Exec(Option_t*);
69
72 TFolder& GetQa();
73
74 private:
76 InitStatus GeometryQa();
77
79 void ResolutionQa();
80
82 void DeInit();
83
84
85 // Setup
86
87 Bool_t fIsTrdInSetup{false};
88 Bool_t fIsMcPresent{false};
89
91
96
98 CbmMCEventList* fMcEventList{nullptr}; // list of MC events connected to the current time slice
102
104 TClonesArray* fClusters{nullptr};
105 TClonesArray* fHits{nullptr};
106 TClonesArray* fHitMatches{nullptr};
107
109 TClonesArray* fHitsMc{nullptr};
110
111
112 TFolder fOutFolder{"TrdQaTracker", "TrdQaTracker"};
113 TFolder* fHistFolder{nullptr};
114
115 TParameter<int> fNevents{"nEvents", 0};
116
118 CbmQaHist<TH1D> fh1DresidualU{"h1DresidualU", "Trd1D: Residual U;(U_{reco} - U_{MC})(cm)", 100, -.5, .5};
119 CbmQaHist<TH1D> fh1DresidualV{"h1DresidualV", "Trd1D: Residual V;(V_{reco} - V_{MC})(cm)", 100, -10, 10};
120 CbmQaHist<TH1D> fh1DresidualT{"h1DresidualT", "Trd1D: Residual T;(T_{reco} - T_{MC})(ns)", 100, -50, 50};
121
122 CbmQaHist<TH1D> fh2DresidualX{"h2DresidualX", "Trd2D: Residual X;(X_{reco} - X_{MC})(cm)", 100, -0.05, 0.05};
123 CbmQaHist<TH1D> fh2DresidualY{"h2DresidualY", "Trd2D: Residual Y;(Y_{reco} - Y_{MC})(cm)", 1000, -2, 2};
124 CbmQaHist<TH1D> fh2DresidualT{"h2DresidualT", "Trd2D: Residual T;(T_{reco} - T_{MC})(ns)", 100, -100, 100};
125
127 CbmQaHist<TH1D> fh1DpullU{"h1DpullU", "Trd1D: Pull U;(U_{reco} - U_{MC}) / #sigmaU_{reco}", 100, -5, 5};
128 CbmQaHist<TH1D> fh1DpullV{"h1DpullV", "Trd1D: Pull V;(V_{reco} - V_{MC}) / #sigmaV_{reco}", 100, -5, 5};
129 CbmQaHist<TH1D> fh1DpullT{"h1DpullT", "Trd1D: Pull T;(T_{reco} - T_{MC}) / #sigmaT_{reco}", 100, -5, 5};
130
131 CbmQaHist<TH1D> fh2DpullX{"h2DpullX", "Trd2D: Pull X;(X_{reco} - X_{MC}) / #sigmaX_{reco}", 100, -5, 5};
132 CbmQaHist<TH1D> fh2DpullY{"h2DpullY", "Trd2D: Pull Y;(Y_{reco} - Y_{MC}) / #sigmaY_{reco}", 100, -5, 5};
133 CbmQaHist<TH1D> fh2DpullT{"h2DpullT", "Trd2D: Pull T;(T_{reco} - T_{MC}) / #sigmaT_{reco}", 100, -5, 5};
134
136 std::vector<CbmQaHist<TH1D>*> fHistList;
137
139 std::vector<CbmQaHist<TH1I>> fhPointsPerHit;
140
142 std::vector<CbmQaHist<TH1I>> fhHitsPerPoint;
143
145 std::vector<CbmQaHist<TProfile2D>> fhEfficiencyXY;
146 std::vector<CbmQaHist<TProfile>> fhEfficiencyR;
147
149
150 CbmQaCanvas fCanvResidual{"cResidual", "Residual Distribution", 3 * 500, 2 * 500};
151 CbmQaCanvas fCanvPull{"cPull", "Pull Distribution", 3 * 500, 2 * 500};
152 CbmQaCanvas fCanvEfficiencyXY{"cEfficiencyXY", "Efficiency XY: % reconstructed McPoint", 2 * 500, 2 * 500};
153 CbmQaCanvas fCanvEfficiencyR{"cEfficiencyR", "Efficiency R: % reconstructed McPoint", 2 * 500, 2 * 500};
154 CbmQaCanvas fCanvHitsPerPoint{"cHitsPerMcPoint", "Efficiency: Hits Per McPoint", 2 * 500, 2 * 500};
155 CbmQaCanvas fCanvPointsPerHit{"cMcPointsPerHit", "Purity: McPoints per Hit", 2 * 500, 2 * 500};
156
157 private:
160
163
165};
166
167#endif
Definition of the CbmQaCanvas class.
Definition of the CbmQaHist class.
CbmDigiManager.
Access to a MC data branch for time-based analysis.
Task class creating and managing CbmMCDataArray objects.
Container class for MC events with number, file and start time.
Bookkeeping of time-slice content.
CbmTrdCalibTracker(const CbmTrdCalibTracker &)=delete
Suppressed copy constructor.
std::vector< CbmQaHist< TH1D > * > fHistList
List of the above histogramms.
CbmQaHist< TH1D > fh1DpullV
CbmQaHist< TH1D > fh2DresidualY
CbmTrdCalibTracker & operator=(const CbmTrdCalibTracker &)=delete
Suppressed assignment operator.
TClonesArray * fClusters
Data.
CbmQaHist< TH1D > fh2DresidualX
CbmMCDataArray * fMcTracks
std::vector< CbmQaHist< TH1I > > fhHitsPerPoint
hits efficiency
CbmQaHist< TH1D > fh1DpullU
Histogram for PULL Distribution.
CbmTimeSlice * fTimeSlice
CbmQaHist< TH1D > fh1DresidualV
void Finish()
FairTask: Action at end of run. For this task and all of the subtasks.
CbmQaHist< TH1D > fh1DresidualU
number of processed events
TParameter< int > fNevents
subfolder for histograms
std::vector< CbmQaHist< TProfile > > fhEfficiencyR
CbmTrdCalibTracker(const char *name="TrdQaTracker", Int_t verbose=1)
Constructor.
void DeInit()
Free the memory etc.
CbmQaHist< TH1D > fh2DpullY
CbmQaCanvas fCanvResidual
Canvaces: collection of histogramms.
CbmMCDataManager * fMcManager
CbmTrdParSetDigi * fTrdDigiPar
CbmQaHist< TH1D > fh2DresidualT
CbmMCDataArray * fMcPoints
CbmDigiManager * fDigiManager
CbmQaHist< TH1D > fh2DpullT
CbmTrdParSetGeo * fTrdGeoPar
InitStatus ReInit()
FairTask: Reinitialisation.
void ResolutionQa()
Analysis of hit uncertainty (pull) distributions.
void Clear(Option_t *="")
TTask: Clear all data structures created by a previous execution of a task.
InitStatus Init()
FairTask: Intialisation at begin of run.
std::vector< CbmQaHist< TProfile2D > > fhEfficiencyXY
hits efficiency
void SetParContainers()
FairTask: Intialise parameter containers.
ClassDef(CbmTrdCalibTracker, 0)
TClonesArray * fHitMatches
void Exec(Option_t *)
TTask: Process a timeslice.
InitStatus GeometryQa()
Check the geometry.
CbmQaHist< TH1D > fh2DpullX
std::vector< CbmQaHist< TH1I > > fhPointsPerHit
hits purity
TClonesArray * fHitsMc
Output.
CbmQaHist< TH1D > fh1DresidualT
TFolder * fHistFolder
output folder with histos and canvases
CbmQaHist< TH1D > fh1DpullT
~CbmTrdCalibTracker()
Destructor.
CbmMCEventList * fMcEventList
MC data.