auto ret = dataFrame.Filter("TMath::Abs(md0_d - 1.8646) < 0.04")
.Filter("ptds_d > 2.5")
.Filter("TMath::Abs(etads_d) < 1.5")
.Filter([](
int ik,
int ipi,
RVecI& nhitrp) {
return nhitrp[ik - 1] * nhitrp[ipi - 1] > 1; },
{"ik", "ipi", "nhitrp"})
.
Filter([](
int ik,
RVecF& rstart,
RVecF& rend) {
return rend[ik - 1] - rstart[ik - 1] > 22; },
{"ik", "rstart", "rend"})
.
Filter([](
int ipi,
RVecF& rstart,
RVecF& rend) {
return rend[ipi - 1] - rstart[ipi - 1] > 22; },
{"ipi", "rstart", "rend"})
.
Filter([](
int ik,
RVecF& nlhk) {
return nlhk[ik - 1] > 0.1; }, {
"ik",
"nlhk"})
.
Filter([](
int ipi,
RVecF& nlhpi) {
return nlhpi[ipi - 1] > 0.1; }, {
"ipi",
"nlhpi"})
.
Filter([](
int ipis,
RVecF& nlhpi) {
return nlhpi[ipis - 1] > 0.1; }, {
"ipis",
"nlhpi"})
return ret;
};
{
return 0;
dxbin * (par[0] *
pow(
x - 0.13957, par[1]) + par[2] / 2.5066 / par[4] *
exp(-xp3 / 2 / par[4] / par[4]));
return res;
}
{
return 0;
return res;
}
void FitAndPlotHdmd(
TH1 &hdmd)
{
auto c1 =
new TCanvas(
"c1",
"h1analysis analysis", 10, 10, 800, 600);
auto f5 =
new TF1(
"f5",
fdm5, 0.139, 0.17, 5);
f5->SetParameters(1000000, .25, 2000, .1454, .001);
hdraw->Fit("f5", "lr");
}
void FitAndPlotH2(
TH2 &h2)
{
auto c2 =
new TCanvas(
"c2",
"tauD0", 100, 100, 800, 600);
c2->SetBottomMargin(0.15);
auto f2 =
new TF1(
"f2",
fdm2, 0.139, 0.17, 2);
f2->SetParameters(10000, 10);
h2.FitSlicesX(f2, 0, -1, 1,
"qln");
h2_1->SetDirectory(nullptr);
h2_1->GetXaxis()->SetTitle("#tau [ps]");
h2_1->SetMarkerStyle(21);
h2_1->Draw();
}
void df101_h1Analysis()
{
chain.Add("root://eospublic.cern.ch//eos/root-eos/h1/dstarmb.root");
chain.Add("root://eospublic.cern.ch//eos/root-eos/h1/dstarp1a.root");
chain.Add("root://eospublic.cern.ch//eos/root-eos/h1/dstarp1b.root");
chain.Add("root://eospublic.cern.ch//eos/root-eos/h1/dstarp2.root");
auto selected = Select(dataFrame);
auto hdmdARP = selected.Histo1D({"hdmd", "Dm_d;m_{K#pi#pi} - m_{K#pi}[GeV/c^{2}]", 40, 0.13, 0.17}, "dm_d");
auto selectedAddedBranch = selected.Define("h2_y", "rpd0_t / 0.029979f * 1.8646f / ptd0_d");
auto h2ARP = selectedAddedBranch.Histo2D({"h2", "ptD0 vs Dm_d", 30, 0.135, 0.165, 30, -3, 6}, "dm_d", "h2_y");
FitAndPlotHdmd(*hdmdARP);
FitAndPlotH2(*h2ARP);
}
R__EXTERN TStyle * gStyle
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
A chain is a collection of files containing TTree objects.
1-D histogram with a double per channel (see TH1 documentation)
TH1 is the base class of all histogram classes in ROOT.
Service class for 2-D histogram classes.
Use the TLine constructor to create a simple line.
virtual TObject * DrawClone(Option_t *option="") const
Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
void SetOptFit(Int_t fit=1)
The type of information about fit parameters printed in the histogram statistics box can be selected ...
RVec< PromoteTypes< T0, T1 > > pow(const T0 &x, const RVec< T1 > &v)
RVec< PromoteType< T > > exp(const RVec< T > &v)
RVec< T > Filter(const RVec< T > &v, F &&f)
Create a new collection with the elements passing the filter expressed by the predicate.
Double_t fdm5(Double_t *xx, Double_t *par)
Double_t fdm2(Double_t *xx, Double_t *par)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
void EnableImplicitMT(UInt_t numthreads=0)
Enable ROOT's implicit multi-threading for all objects and methods that provide an internal paralleli...