CbmRoot
Loading...
Searching...
No Matches
CbmLitRadLengthQa.h
Go to the documentation of this file.
1/* Copyright (C) 2013-2014 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer] */
4
12#ifndef CBMLITRADLENGTHQA_H_
13#define CBMLITRADLENGTHQA_H_
14
15#include "FairTask.h"
17
18#include <map>
19#include <string>
20using std::map;
21using std::pair;
22using std::string;
23class CbmHistManager;
24class TClonesArray;
25
26class CbmLitRadLengthQa : public FairTask {
27 public:
32
36 virtual ~CbmLitRadLengthQa();
37
41 virtual InitStatus Init();
42
46 virtual void Exec(Option_t* opt);
47
51 virtual void Finish();
52
53 /* Setters */
54 void SetOutputDir(const string& outputDir) { fOutputDir = outputDir; }
55
56 private:
60 void ReadDataBranches();
61
65 void CreateHistograms();
66
72 void ExecDetector(const string& pathPattern, const string& detName);
73
79 void ExecDetector(const string& detName, Int_t (*getStationId)(const TString&));
80
81 void FillHistosDetector(const map<Int_t, map<Int_t, Double_t>>& parMap, const string& histName,
82 map<Int_t, map<Int_t, pair<Double_t, Double_t>>>& xyOnTrack);
83
89 static Int_t GetMvdStationId(const TString& nodePath);
90
96 static Int_t GetStsStationId(const TString& nodePath);
97
103 static Int_t GetTrdStationId(const TString& nodePath);
104
110 static Int_t GetMuchStationId(const TString& nodePath);
111
117 static Int_t GetMuchAbsorberId(const TString& nodePath);
118
123
124 void SaveDetectorMaterialBudgetToFile(const string& detName);
125
126 // Material properties of silicon
127 //static const Double_t SILICON_DENSITY = 2.33; // g*cm^-3
128 //static const Double_t SILICON_A = 28.08855; // silicon atomic weight
129 //static const Double_t SILICON_Z = 14.0; // silicon atomic number
130 static const Double_t SILICON_RAD_LENGTH; // cm
131
132 CbmHistManager* fHM; // Histogram manager
133 string fOutputDir; // Output directory for results
134
135 // Pointers to data arrays
136 TClonesArray* fRadLen; // RadLen array
137
138 CbmLitDetectorSetup fDet; // Detector setup
139
142
144};
145
146#endif /* CBMLITRADLENGTHQA_H_ */
Helper class to access detector presence.
Histogram manager.
Helper class to access detector presence.
virtual InitStatus Init()
Derived from FairTask.
void CreateHistograms()
Create histograms.
void SetOutputDir(const string &outputDir)
ClassDef(CbmLitRadLengthQa, 1)
static Int_t GetMuchAbsorberId(const TString &nodePath)
Return MUCH absorber ID by path to the node or -1 in case node does not exists.
virtual ~CbmLitRadLengthQa()
Destructor.
void ReadDataBranches()
Read data branches.
virtual void Finish()
Derived from FairTask.
static Int_t GetMvdStationId(const TString &nodePath)
Return MVD station ID by path to the node or -1 in case node does not exists.
TClonesArray * fRadLen
void SaveMaterialBudgetToFile()
Save silicon equivalent histograms to a separate files for each detector.
virtual void Exec(Option_t *opt)
Derived from FairTask.
CbmLitDetectorSetup fDet
static Int_t GetMuchStationId(const TString &nodePath)
Return MUCH station ID by path to the node or -1 in case node does not exists.
static const Double_t SILICON_RAD_LENGTH
CbmLitRadLengthQa()
Constructor.
CbmHistManager * fHM
CbmLitRadLengthQa(const CbmLitRadLengthQa &)
void ExecDetector(const string &pathPattern, const string &detName)
Execute total radiation length for a particular detector.
void SaveDetectorMaterialBudgetToFile(const string &detName)
static Int_t GetStsStationId(const TString &nodePath)
Return STS station ID by path to the node or -1 in case node does not exists.
void FillHistosDetector(const map< Int_t, map< Int_t, Double_t > > &parMap, const string &histName, map< Int_t, map< Int_t, pair< Double_t, Double_t > > > &xyOnTrack)
CbmLitRadLengthQa & operator=(const CbmLitRadLengthQa &)
static Int_t GetTrdStationId(const TString &nodePath)
Return TRD station ID by path to the node or -1 in case node does not exists.