CbmRoot
Loading...
Searching...
No Matches
CbmLitClusteringQa.h
Go to the documentation of this file.
1/* Copyright (C) 2011-2020 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer], Volker Friese */
4
5#
12#ifndef CBMLITCLUSTERINGQA_H
13#define CBMLITCLUSTERINGQA_H
14
15#include "CbmMCEventList.h"
16#include "CbmModuleList.h"
17#include "CbmMuchGeoScheme.h"
18#include "CbmTimeSlice.h"
20
21#include <FairTask.h>
22
23#include <string>
24#include <vector>
25
26class CbmHistManager;
27class CbmMCDataArray;
28class CbmDigiManager;
29class TClonesArray;
30
31class CbmLitClusteringQa : public FairTask {
32 public:
37
41 virtual ~CbmLitClusteringQa();
42
46 virtual InitStatus Init();
47
51 virtual void Exec(Option_t* opt);
52
56 virtual void Finish();
57
59 void SetOutputDir(const string& outputDir) { fOutputDir = outputDir; }
60 void SetMuchDigiFileName(const string& digiFileName) { fMuchDigiFileName = digiFileName; }
61
62 private:
63 Int_t GetStationId(Int_t address, ECbmModuleId detId);
64
68 void ReadDataBranches();
69
70 void InitMuchGeoScheme(const string& digiFileName);
71
72 void ProcessPoints(Int_t iEvent, CbmMCDataArray* points, const string& detName, ECbmModuleId detId);
73
74 template<class Digi>
75 void ProcessDigis(const string& detName);
76
77 void ProcessClusters(const TClonesArray* clusters, const TClonesArray* clusterMatches, const string& detName,
78 ECbmModuleId detId);
79
80 void ProcessHits(const TClonesArray* hits, const TClonesArray* hitMatches, const string& detName, ECbmModuleId detId);
81
85 void FillEventCounterHistograms(Int_t iEvent);
86
90 void CreateHistograms();
91
95 void CreateNofObjectsHistograms(ECbmModuleId detId, const string& detName);
96
100 void CreateNofObjectsHistograms(ECbmModuleId detId, const string& detName, const string& parameter,
101 const string& xTitle);
102
103 void CreateClusterParametersHistograms(ECbmModuleId detId, const string& detName);
104
105 void FillResidualAndPullHistograms(CbmMCDataArray* points, const TClonesArray* hits, const TClonesArray* hitMatches,
106 const string& detName, ECbmModuleId detId);
107
108 void FillHitEfficiencyHistograms(Int_t iEvent, CbmMCDataArray* points, const TClonesArray* hits,
109 const TClonesArray* hitMatches, const string& detName, ECbmModuleId detId);
110
111 void CreateHitEfficiencyHistograms(ECbmModuleId detId, const string& detName, const string& parameter,
112 const string& xTitle, Int_t nofBins, Double_t minBin, Double_t maxBin);
113
114 CbmHistManager* fHM = nullptr; // Histogram manager
115 std::string fOutputDir = ""; // Output directory for results
116 CbmLitDetectorSetup fDet{}; // For detector setup determination
118
119 // Pointers to data arrays
121
123 TClonesArray* fMvdClusters = nullptr;
124 TClonesArray* fMvdHits = nullptr;
125
127 ;
128 TClonesArray* fStsClusters = nullptr;
129 ;
130 TClonesArray* fStsHits = nullptr;
131 TClonesArray* fStsClusterMatches = nullptr;
132 TClonesArray* fStsHitMatches = nullptr;
133
135 TClonesArray* fRichHits = nullptr;
136
138 TClonesArray* fMuchClusters = nullptr;
139 TClonesArray* fMuchPixelHits = nullptr;
140 TClonesArray* fMuchClusterMatches = nullptr;
141 TClonesArray* fMuchPixelHitMatches = nullptr;
142
144 TClonesArray* fTrdClusters = nullptr;
145 TClonesArray* fTrdHits = nullptr;
146 TClonesArray* fTrdClusterMatches = nullptr;
147 TClonesArray* fTrdHitMatches = nullptr;
148
150 TClonesArray* fTofHits = nullptr;
151
152 string fMuchDigiFileName = "";
153
156
159
161};
162
163#endif /* CBMLITCLUSTERINGQA_H */
TClonesArray * points
ECbmModuleId
Definition CbmDefs.h:39
Helper class to access detector presence.
static vector< vector< QAHit > > hits
CbmDigiManager.
Histogram manager.
void ProcessClusters(const TClonesArray *clusters, const TClonesArray *clusterMatches, const string &detName, ECbmModuleId detId)
virtual void Exec(Option_t *opt)
Derived from FairTask.
TClonesArray * fTrdClusters
CbmTrdPoint.
TClonesArray * fStsHits
CbmStsCluster.
CbmMCDataArray * fTrdPoints
CbmMatch (hit)
virtual ~CbmLitClusteringQa()
Destructor.
TClonesArray * fStsClusterMatches
CbmStsHit array.
TClonesArray * fRichHits
CbmRichPoint.
CbmLitClusteringQa(const CbmLitClusteringQa &)=delete
CbmMCDataArray * fStsPoints
CbmMvdHit.
CbmTimeSlice * fTimeSlice
void FillEventCounterHistograms(Int_t iEvent)
ClassDef(CbmLitClusteringQa, 2)
CbmMCDataArray * fMvdPoints
CbmMCTrack.
Int_t GetStationId(Int_t address, ECbmModuleId detId)
void ReadDataBranches()
Read data branches.
CbmMCDataArray * fMCTracks
Interface to digi data.
void FillHitEfficiencyHistograms(Int_t iEvent, CbmMCDataArray *points, const TClonesArray *hits, const TClonesArray *hitMatches, const string &detName, ECbmModuleId detId)
void ProcessDigis(const string &detName)
void InitMuchGeoScheme(const string &digiFileName)
CbmLitClusteringQa()
Constructor.
TClonesArray * fMvdClusters
CbmMvdPoint.
CbmMCDataArray * fRichPoints
CbmMatch (hit)
CbmMCDataArray * fTofPoints
CbmMatch (hit)
virtual void Finish()
Derived from FairTask.
void SetOutputDir(const string &outputDir)
TClonesArray * fStsHitMatches
CbmMatch (cluster)
TClonesArray * fMuchClusters
CbmMuchPoint.
CbmDigiManager * fDigiMan
void CreateNofObjectsHistograms(ECbmModuleId detId, const string &detName)
virtual InitStatus Init()
Derived from FairTask.
CbmMCEventList * fEventList
void CreateClusterParametersHistograms(ECbmModuleId detId, const string &detName)
void FillResidualAndPullHistograms(CbmMCDataArray *points, const TClonesArray *hits, const TClonesArray *hitMatches, const string &detName, ECbmModuleId detId)
void ProcessPoints(Int_t iEvent, CbmMCDataArray *points, const string &detName, ECbmModuleId detId)
TClonesArray * fMuchPixelHitMatches
CbmMatch array.
TClonesArray * fTrdHits
CbmTrdCluster.
TClonesArray * fMvdHits
CbmMvdCluster.
TClonesArray * fMuchClusterMatches
CbmMuchPixelHit.
string fMuchDigiFileName
CbmTofHit.
CbmLitClusteringQa & operator=(const CbmLitClusteringQa &)=delete
CbmLitDetectorSetup fDet
CbmMCDataArray * fMuchPoints
CbmRichHit.
void ProcessHits(const TClonesArray *hits, const TClonesArray *hitMatches, const string &detName, ECbmModuleId detId)
TClonesArray * fTrdClusterMatches
CbmTrdHit.
TClonesArray * fTofHits
CbmTofPoint.
TClonesArray * fStsClusters
CbmStsPoint.
TClonesArray * fTrdHitMatches
CbmMatch (cluster)
void SetMuchDigiFileName(const string &digiFileName)
TClonesArray * fMuchPixelHits
CbmMuchCluster.
void CreateHitEfficiencyHistograms(ECbmModuleId detId, const string &detName, const string &parameter, const string &xTitle, Int_t nofBins, Double_t minBin, Double_t maxBin)
Helper class to access detector presence.
Access to a MC data branch for time-based analysis.
Container class for MC events with number, file and start time.
Bookkeeping of time-slice content.