Commit 05001871 authored by Martin Vala's avatar Martin Vala

Merge branch '15-rsn-mutli-dim-histogram' into 'master'

Resolve "Rsn mutli dim histogram"

Closes #15

See merge request !17
parents e139947e c3423e4b
Pipeline #1042 passed with stages
in 58 seconds
R__LOAD_LIBRARY(libSalsaRootCore)
#include "RsnDraw.c"
void RsnAnalysis(const char *filename = "filelist", Bool_t primaryOnly = kTRUE,
Int_t particle1 = 3, Double_t nsigma1 = 3, Short_t charge1 = 1,
......@@ -30,13 +29,17 @@ void RsnAnalysis(const char *filename = "filelist", Bool_t primaryOnly = kTRUE,
TLorentzVector v2; // initialized by (0., 0., 0., 0.)
TLorentzVector v; // initialized by (0., 0., 0., 0.)
Int_t nbins = 215;
Double_t min = 0.985;
Double_t max = 1.2;
TH1 *unlike = new TH1D("Unlike", "Invariant Mass Unlike(Blue) vs Like(Red)",
nbins, min, max);
TH1 *likepp = new TH1D("LikePP", "Invariant Mass LikePP", nbins, min, max);
TH1 *likemm = new TH1D("LikeMM", "Invariant Mass LikeMM", nbins, min, max);
Int_t nbins[3] = {215, 120, 150};
Double_t min[3] = {0.985, 0.0, 0.0};
Double_t max[3] = {1.2, 12.00, 150};
Double_t histFill[3];
THnSparse *unlike =
new THnSparseD("Unlike", "Invariant Mass Unlike", 3, nbins, min, max);
THnSparse *likepp =
new THnSparseD("LikePP", "Invariant Mass LikePP", 3, nbins, min, max);
THnSparse *likemm =
new THnSparseD("LikeMM", "Invariant Mass LikeMM", 3, nbins, min, max);
unlike->Sumw2();
likepp->Sumw2();
......@@ -74,7 +77,10 @@ void RsnAnalysis(const char *filename = "filelist", Bool_t primaryOnly = kTRUE,
daughters2[j]->GetPz(), mass2);
v = v1 + v2;
// Printf("mass = %f", v.M());
unlike->Fill(v.M());
histFill[0] = v.M();
histFill[1] = v.Pt();
histFill[2] = event->GetNTrack();
unlike->Fill(histFill);
}
}
......@@ -86,7 +92,10 @@ void RsnAnalysis(const char *filename = "filelist", Bool_t primaryOnly = kTRUE,
v2.SetXYZM(daughters1[j]->GetPx(), daughters1[j]->GetPy(),
daughters1[j]->GetPz(), mass2);
v = v1 + v2;
likepp->Fill(v.M());
histFill[0] = v.M();
histFill[1] = v.Pt();
histFill[2] = event->GetNTrack();
likepp->Fill(histFill);
}
}
// K-K- combinations
......@@ -97,7 +106,10 @@ void RsnAnalysis(const char *filename = "filelist", Bool_t primaryOnly = kTRUE,
v2.SetXYZM(daughters2[j]->GetPx(), daughters2[j]->GetPy(),
daughters2[j]->GetPz(), mass2);
v = v1 + v2;
likemm->Fill(v.M());
histFill[0] = v.M();
histFill[1] = v.Pt();
histFill[2] = event->GetNTrack();
likemm->Fill(histFill);
}
}
......@@ -112,5 +124,4 @@ void RsnAnalysis(const char *filename = "filelist", Bool_t primaryOnly = kTRUE,
likemm->Write();
out->Close();
delete out;
RsnDraw("file://rsn.root");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment