2 Int_t Hists3D::NtotHist = 2;
3 Hists3D::Hists3D(
const Char_t *Name,
const Char_t *Title,
4 const Char_t *TitleX,
const Char_t *TitleY,
6 Int_t nYBins, Double_t ymin, Double_t ymax,
7 Int_t nZBins, Double_t ZdEdxMin, Double_t ZdEdxMax,
8 Double_t xmin, Double_t xmax, Int_t nh) : fNHist(nh) {
9 const Char_t *Names[9] = {
"",
"C",
"N",
"Ne",
"Npi",
"NK",
"NP",
"Nd",
"dX"};
10 const Char_t *Titles[9] = {
"uncorrected",
"correctred",
"nP measured",
"nP for e",
"nP for pi",
"nP for K",
"nP for P",
"nP for d",
"dX"};
11 memset(hists, 0, 9*
sizeof(TH1*));
15 xmax = TMath::Abs(nXBins)+0.5;
19 nx = 2*TMath::Abs(nXBins) + 1;
25 for (Int_t j = 0; j < fNHist; j++) {
29 title +=
"("; title += Titles[j]; title +=
") versus "; title += TitleX; title +=
" and "; title += TitleY;
32 Double_t zmin = ZdEdxMin;
33 Double_t zmax = ZdEdxMax;
39 hists[j] = (TH1 *)
new TH3F(name,title,
40 nx,xmin, xmax, nYBins,ymin, ymax,nz, zmin, zmax);
42 hists[j] = (TH1 *)
new TProfile2D(name,title,
43 nx,xmin, xmax, nYBins,ymin, ymax,
"S");
45 hists[j]->SetXTitle(TitleX);
46 hists[j]->SetYTitle(TitleY);
50 void Hists3D::Fill(Double_t x, Double_t y, Double_t *z) {
51 for (Int_t i = 0; i < fNHist; i++) {
53 if (i < 8) ((TH3F *) hists[i])->Fill(x,y,z[i]);
54 else ((TProfile2D *) hists[i])->Fill(x,y,z[i]);
59 void Hists3D::FillY(Double_t x, Double_t *y, Double_t *z) {
60 for (Int_t i = 0; i < TMath::Min(2,fNHist); i++) {
62 if (i < 8) ((TH3F *) hists[i])->Fill(x,y[i],z[i]);
63 else ((TProfile2D *) hists[i])->Fill(x,y[i],z[i]);
68 Hists2D::Hists2D(
const Char_t *Name) {
69 memset(dev, 0, 3*KPidParticles*
sizeof(TH2F*));
72 const Char_t *
Charge[3] = {
"P",
"N",
"A"};
73 const Char_t *ChargeT[3] = {
"+",
"-",
"All"};
74 for (Int_t hyp=0; hyp<KPidParticles;hyp++) {
75 for (Int_t sCharge = 0; sCharge < 3; sCharge++) {
77 nameP += StProbPidTraits::mPidParticleDefinitions[hyp]->name().data();
78 nameP += Charge[sCharge];
79 nameP.ReplaceAll(
"-",
"");
80 title = Name; title +=
" Log(dE/dx_{Meas}/dE/dx_{Pred}) for ";
81 title += StProbPidTraits::mPidParticleDefinitions[hyp]->name().data();
82 title.ReplaceAll(
"-",
"");
83 title +=
" "; title += ChargeT[sCharge];
84 title +=
" versus log10(p/m)";
85 dev[hyp][sCharge] =
new TH2F(nameP.Data(),title.Data(),320,-2,6,2000,-5,5);
86 dev[hyp][sCharge]->SetMarkerColor(hyp+2);
87 dev[hyp][sCharge]->SetXTitle(
"log_{10}(p/m)");
90 devT[hyp][sCharge] =
new TH2F(nameP.Data(),title.Data(),320,-2,6,2000,-5,5);
91 devT[hyp][sCharge]->SetMarkerColor(hyp+2);
92 devT[hyp][sCharge]->SetXTitle(
"log_{10}(p/m)");