Go to the documentation of this file. 1 #ifndef CBMTRDCHECKUTIL_H
2 #define CBMTRDCHECKUTIL_H
9 #include <FairRootManager.h>
15 #include <TProfile2D.h>
16 #include <TProfile3D.h>
48 std::map<TString, TH1D*>
f1D;
49 std::map<TString, TH2D*>
f2D;
50 std::map<TString, TH3D*>
f3D;
57 TDirectory* oldir = gDirectory;
58 TFile* outFile = FairRootManager::Instance()->GetOutFile();
59 if (outFile != NULL) {
62 for (
auto const&
x :
f1D)
63 if (
x.second)
x.second->Write(
x.first);
65 for (
auto const&
x :
f2D)
66 if (
x.second)
x.second->Write(
x.first);
68 for (
auto const&
x :
f3D)
69 if (
x.second)
x.second->Write(
x.first);
72 if (
x.second)
x.second->Write(
x.first);
75 if (
x.second)
x.second->Write(
x.first);
78 if (
x.second)
x.second->Write(
x.first);
80 gDirectory->cd(oldir->GetPath());
106 Double_t yhigh = 1.);
117 void Fill(std::string name, Double_t
x, Double_t
y = 9999.);
120 FillProfile(std::string name, Double_t
x, Double_t
y, Double_t z = 9999.);
126 void Fill(std::string name, Double_t
x, Double_t
y, Double_t z);
127 void Fill3D(std::string name, Double_t
x, Double_t
y, Double_t z);
128 void FillW(std::string name, Double_t
x, Double_t w);
130 if (!
f2D[name])
return 0.;
131 return f2D[name]->GetBinContent(
x,
y);
Double_t GetCont2D(std::string name, Double_t x, Double_t y)
void FillW(std::string name, Double_t x, Double_t w)
CbmTrdCheckUtil operator=(const CbmTrdCheckUtil &)
std::map< TString, TH2D * > f2D
void FillProfile3D(std::string name, Double_t x, Double_t y, Double_t z, Double_t w=1.)
void Fill3D(std::string name, Double_t x, Double_t y, Double_t z)
void CreateProfile3D(std::string name, Int_t xbins, Double_t xlow, Double_t xhigh, Int_t ybins, Double_t ylow, Double_t yhigh, Int_t zbins, Double_t zlow, Double_t zhigh)
std::map< TString, TProfile3D * > fProfile3D
CbmTrdCheckUtil()
default Constructor with messages
CbmTrdCheckUtil(Double_t cal, Double_t tau, Int_t mode)
Constructor with messages and preset reconstruction mode.
void CreateHist(std::string name, Int_t xbins, Double_t xlow, Double_t xhigh, Int_t ybins=0, Double_t ylow=1., Double_t yhigh=1.)
void Fill(std::string name, Double_t x, Double_t y=9999.)
std::map< TString, TH1D * > f1D
virtual ~CbmTrdCheckUtil()
Destructor.
std::map< TString, TProfile2D * > fProfile2D
std::map< TString, TProfile * > fProfile1D
void CreateProfile(std::string name, Int_t xbins, Double_t xlow, Double_t xhigh, Int_t ybins=0, Double_t ylow=1., Double_t yhigh=1.)
void CreateHist3D(std::string name, Int_t xbins, Double_t xlow, Double_t xhigh, Int_t ybins, Double_t ylow, Double_t yhigh, Int_t zbins, Double_t zlow, Double_t zhigh)
void SetSetter(Bool_t set)
CbmTrdCheckUtil(std::string readfile)
std::map< TString, TH3D * > f3D
CbmTrdCheckUtil(const CbmTrdCheckUtil &)
CbmTrdCheckUtil(Double_t cal, Double_t tau, std::vector< Int_t > mask)
Constructor with messages and selection mask.
ClassDef(CbmTrdCheckUtil, 1)
void FillProfile(std::string name, Double_t x, Double_t y, Double_t z=9999.)
CbmTrdDigi * MakeDigi(std::vector< Int_t > samples, Int_t channel, Int_t module, Int_t layer, ULong64_t time)