CbmRoot
CbmLitRadLengthQa.h
Go to the documentation of this file.
1 
8 #ifndef CBMLITRADLENGTHQA_H_
9 #define CBMLITRADLENGTHQA_H_
10 
11 #include "FairTask.h"
13 #include <map>
14 #include <string>
15 using std::map;
16 using std::pair;
17 using std::string;
18 class CbmHistManager;
19 class TClonesArray;
20 
21 class CbmLitRadLengthQa : public FairTask {
22 public:
27 
31  virtual ~CbmLitRadLengthQa();
32 
36  virtual InitStatus Init();
37 
41  virtual void Exec(Option_t* opt);
42 
46  virtual void Finish();
47 
48  /* Setters */
49  void SetOutputDir(const string& outputDir) { fOutputDir = outputDir; }
50 
51 private:
55  void ReadDataBranches();
56 
60  void CreateHistograms();
61 
67  void ExecDetector(const string& pathPattern, const string& detName);
68 
74  void ExecDetector(const string& detName,
75  Int_t (*getStationId)(const TString&));
76 
77  void FillHistosDetector(
78  const map<Int_t, map<Int_t, Double_t>>& parMap,
79  const string& histName,
80  map<Int_t, map<Int_t, pair<Double_t, Double_t>>>& xyOnTrack);
81 
87  static Int_t GetMvdStationId(const TString& nodePath);
88 
94  static Int_t GetStsStationId(const TString& nodePath);
95 
101  static Int_t GetTrdStationId(const TString& nodePath);
102 
108  static Int_t GetMuchStationId(const TString& nodePath);
109 
115  static Int_t GetMuchAbsorberId(const TString& nodePath);
116 
121 
122  void SaveDetectorMaterialBudgetToFile(const string& detName);
123 
124  // Material properties of silicon
125  //static const Double_t SILICON_DENSITY = 2.33; // g*cm^-3
126  //static const Double_t SILICON_A = 28.08855; // silicon atomic weight
127  //static const Double_t SILICON_Z = 14.0; // silicon atomic number
128  static const Double_t SILICON_RAD_LENGTH; // cm
129 
130  CbmHistManager* fHM; // Histogram manager
131  string fOutputDir; // Output directory for results
132 
133  // Pointers to data arrays
134  TClonesArray* fRadLen; // RadLen array
135 
136  CbmLitDetectorSetup fDet; // Detector setup
137 
140 
142 };
143 
144 #endif /* CBMLITRADLENGTHQA_H_ */
CbmLitRadLengthQa::GetMuchAbsorberId
static Int_t GetMuchAbsorberId(const TString &nodePath)
Return MUCH absorber ID by path to the node or -1 in case node does not exists.
Definition: CbmLitRadLengthQa.cxx:486
CbmLitRadLengthQa::Exec
virtual void Exec(Option_t *opt)
Derived from FairTask.
Definition: CbmLitRadLengthQa.cxx:57
CbmLitRadLengthQa::ExecDetector
void ExecDetector(const string &pathPattern, const string &detName)
Execute total radiation length for a particular detector.
Definition: CbmLitRadLengthQa.cxx:273
CbmLitRadLengthQa::Init
virtual InitStatus Init()
Derived from FairTask.
Definition: CbmLitRadLengthQa.cxx:49
CbmLitRadLengthQa::FillHistosDetector
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)
Definition: CbmLitRadLengthQa.cxx:415
CbmLitRadLengthQa::operator=
CbmLitRadLengthQa & operator=(const CbmLitRadLengthQa &)
CbmLitRadLengthQa::CbmLitRadLengthQa
CbmLitRadLengthQa()
Constructor.
Definition: CbmLitRadLengthQa.cxx:42
CbmLitDetectorSetup
Helper class to access detector presence.
Definition: CbmLitDetectorSetup.h:22
CbmLitRadLengthQa::ClassDef
ClassDef(CbmLitRadLengthQa, 1)
CbmLitRadLengthQa::GetMvdStationId
static Int_t GetMvdStationId(const TString &nodePath)
Return MVD station ID by path to the node or -1 in case node does not exists.
Definition: CbmLitRadLengthQa.cxx:435
CbmLitRadLengthQa::fDet
CbmLitDetectorSetup fDet
Definition: CbmLitRadLengthQa.h:136
CbmHistManager
Histogram manager.
Definition: CbmHistManager.h:41
CbmLitRadLengthQa::GetStsStationId
static Int_t GetStsStationId(const TString &nodePath)
Return STS station ID by path to the node or -1 in case node does not exists.
Definition: CbmLitRadLengthQa.cxx:441
CbmLitRadLengthQa
Definition: CbmLitRadLengthQa.h:21
CbmLitRadLengthQa::fHM
CbmHistManager * fHM
Definition: CbmLitRadLengthQa.h:130
CbmLitRadLengthQa::CreateHistograms
void CreateHistograms()
Create histograms.
Definition: CbmLitRadLengthQa.cxx:102
CbmLitRadLengthQa::~CbmLitRadLengthQa
virtual ~CbmLitRadLengthQa()
Destructor.
Definition: CbmLitRadLengthQa.cxx:45
CbmLitRadLengthQa::fOutputDir
string fOutputDir
Definition: CbmLitRadLengthQa.h:131
CbmLitRadLengthQa::CbmLitRadLengthQa
CbmLitRadLengthQa(const CbmLitRadLengthQa &)
CbmLitRadLengthQa::ReadDataBranches
void ReadDataBranches()
Read data branches.
Definition: CbmLitRadLengthQa.cxx:96
CbmLitRadLengthQa::SaveMaterialBudgetToFile
void SaveMaterialBudgetToFile()
Save silicon equivalent histograms to a separate files for each detector.
Definition: CbmLitRadLengthQa.cxx:496
CbmLitRadLengthQa::GetMuchStationId
static Int_t GetMuchStationId(const TString &nodePath)
Return MUCH station ID by path to the node or -1 in case node does not exists.
Definition: CbmLitRadLengthQa.cxx:467
CbmLitRadLengthQa::SaveDetectorMaterialBudgetToFile
void SaveDetectorMaterialBudgetToFile(const string &detName)
Definition: CbmLitRadLengthQa.cxx:506
CbmLitRadLengthQa::Finish
virtual void Finish()
Derived from FairTask.
Definition: CbmLitRadLengthQa.cxx:79
CbmLitRadLengthQa::SILICON_RAD_LENGTH
static const Double_t SILICON_RAD_LENGTH
Definition: CbmLitRadLengthQa.h:128
CbmLitRadLengthQa::SetOutputDir
void SetOutputDir(const string &outputDir)
Definition: CbmLitRadLengthQa.h:49
CbmLitRadLengthQa::fRadLen
TClonesArray * fRadLen
Definition: CbmLitRadLengthQa.h:134
CbmLitRadLengthQa::GetTrdStationId
static Int_t GetTrdStationId(const TString &nodePath)
Return TRD station ID by path to the node or -1 in case node does not exists.
Definition: CbmLitRadLengthQa.cxx:453
CbmLitDetectorSetup.h
Helper class to access detector presence.