Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Tutorials/PWGEM/Cocktail/configs/ana_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"em-lmee-lf-cocktail": {
"cfgResFileName": "PATH/Cocktail/files/resolution/Resolution_PbPb5TeV.root",
"cfgEffFileName": "PATH/Cocktail/files/resolution/EffMult.root",
"cfgMultFileName": "PATH/Cocktail/files/resolution/EffMult.root",
"cfgDCAFileName": "PATH/Cocktail/files/resolution/DCA.root",
"cfgWriteTTree": "false",
"cfgDoPairing": "false",
"cfgMaxEta": "0.8",
"cfgMinPt": "0.2",
"cfgMaxPt": "10.0",
"cfgMinOpAng": "0",
"cfgALTweight": "1",
"cfgDoVirtPh": "false",
"cfgPhotonPtFileName": "",
"cfgPhotonPtDirName": ""
}
}
3 changes: 3 additions & 0 deletions Tutorials/PWGEM/Cocktail/configs/ini_example.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[GeneratorExternal]
fileName = ${O2DPG_ROOT}/MC/config/PWGEM/external/generator/GeneratorEMCocktailV2.C
funcName=GenerateEMCocktail(400,0,3,63,"${O2DPG_ROOT}/MC/config/PWGEM/parametrizations/PbPb5TeV_central.json","5TeV_0005_wRatio_etatest",350,0.0,30.0,10000,1,1,0,0,"",0,1.1,"${O2DPG_ROOT}/MC/config/PWGEM/decaytables/decaytable_LMee.dat",0)
21 changes: 21 additions & 0 deletions Tutorials/PWGEM/Cocktail/configs/sim_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"collisionSystem": "kPbPb",
"centrality": "k0005",
"selectedMothers": 63,
"paramFile": "PATH/Cocktail/files/parametrizations/PbPb_5TeV.json",
"paramFileDir": "5TeV_0005_wRatio",
"numberOfParticles": 350,
"minPt": 0.0,
"maxPt": 30.0,
"yGenRange": 1.1,
"externalDecayer": 1,
"decayMode": 3,
"dynamicalPtRange": 0,
"useLMeeDecaytable": "PATH/Cocktail/files/decaytables/decaytable_LMee.dat",
"weightingMode": 0,
"pythiaErrorTolerance": 10000,
"paramV2FileDir": "",
"useYWeights": 0,
"decayLongLived": 1,
"toFixEP": 0
}
399 changes: 399 additions & 0 deletions Tutorials/PWGEM/Cocktail/files/decaytables/decaytable_LMee.dat

Large diffs are not rendered by default.

402 changes: 402 additions & 0 deletions Tutorials/PWGEM/Cocktail/files/parametrizations/PbPb_5TeV.json

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions Tutorials/PWGEM/Cocktail/files/parametrizations/pp_13TeV.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"13TeV_default": {
"histoMtScaleFactor": {
"331": 0.4,
"333": 0.13,
"443": 0.054,
"3212": 0.49,
"310": 1.0,
"2224": 1.0,
"2214": 1.0,
"1114": 1.0,
"2114": 1.0,
"213": 1.0,
"-213": 1.0,
"313": 1.0,
"130": 1.0,
"3122": 1.0
},
"111_pt": "((x*(66.3458/TMath::Power(TMath::Exp((-(0.218056*x))-(0.0842573*(x*x)))+(x/0.741916),6.22709)))/(1634.39/TMath::Power(TMath::Exp((-(0.346984*x))-(0.0798057*(x*x)))+(x/0.648328),6.04003)))*(2098.79/TMath::Power(TMath::Exp((-(0.391494*x))-(0.0443212*(x*x)))+(x/0.575932),6.08223))",
"221_pt": "(((x*(66.3458/TMath::Power(TMath::Exp((-(0.218056*x))-(0.0842573*(x*x)))+(x/0.741916),6.22709)))/(1634.39/TMath::Power(TMath::Exp((-(0.346984*x))-(0.0798057*(x*x)))+(x/0.648328),6.04003)))*(2098.79/TMath::Power(TMath::Exp((-(0.391494*x))-(0.0443212*(x*x)))+(x/0.575932),6.08223)))*(((0.504625*exp((((-(157384*x))-sqrt((x*x)+(0.5478530000*0.5478530000)))/sqrt(1-(-(157384*-(157384)))))/0.1))+(42.0992*(-(0.0112628*TMath::Power(1+((x/1.39355)*(x/1.39355)),-(0.919045))))))/(exp((((-(157384*x))-sqrt((x*x)+(0.1349770000*0.1349770000)))/sqrt(1-(-(157384*-(157384)))))/0.1)+(-(0.0112628*TMath::Power(1+((x/1.39355)*(x/1.39355)),-(0.919045))))))",
"113_pt": "(((x*(66.3458/TMath::Power(TMath::Exp((-(0.218056*x))-(0.0842573*(x*x)))+(x/0.741916),6.22709)))/(1634.39/TMath::Power(TMath::Exp((-(0.346984*x))-(0.0798057*(x*x)))+(x/0.648328),6.04003)))*(2098.79/TMath::Power(TMath::Exp((-(0.391494*x))-(0.0443212*(x*x)))+(x/0.575932),6.08223)))*((((0.37788/(1+exp(-((x-0.265203)/0.274547))))+(-(0.393597*TMath::Gaus(x,0.324349,0.819888))))+(-(0.230459*TMath::Gaus(x,1.23251,1.24114))))+0.412584)",
"223_pt": "(((x*(66.3458/TMath::Power(TMath::Exp((-(0.218056*x))-(0.0842573*(x*x)))+(x/0.741916),6.22709)))/(1634.39/TMath::Power(TMath::Exp((-(0.346984*x))-(0.0798057*(x*x)))+(x/0.648328),6.04003)))*(2098.79/TMath::Power(TMath::Exp((-(0.391494*x))-(0.0443212*(x*x)))+(x/0.575932),6.08223)))*((((0.435069/(1+exp(-((x-0.302485)/0.27614))))+(-(0.258853*TMath::Gaus(x,0.42493,0.693856))))+(-(0.202117*TMath::Gaus(x,1.07795,1.09857))))+0.242026)"
},
"13TeV_PreliminaryChargedPions": {
"histoMtScaleFactor": {
"331": 0.4,
"333": 0.13,
"443": 0.054,
"3212": 0.49,
"310": 1.0,
"2224": 1.0,
"2214": 1.0,
"1114": 1.0,
"2114": 1.0,
"213": 1.0,
"-213": 1.0,
"313": 1.0,
"130": 1.0,
"3122": 1.0
},
"111_pt": "x*(123.313*(pow((exp((0.171351*x)-(abs(0.00418378)*(x*x)))+(x/0.919801)),-6.29677)))",
"221_pt": "(x*(123.313*(pow((exp((0.171351*x)-(abs(0.00418378)*(x*x)))+(x/0.919801)),-(6.29677)))))*(((0.539894*exp((((0.994515*x)-sqrt((x*x)+(0.5478530000*0.5478530000)))/sqrt(1-(0.994515*0.994515)))/1.69543))+(-(0.0125445*(0.608582*TMath::Power(1+((x/22.1715)*(x/22.1715)),-(229.876))))))/(exp((((0.994515*x)-sqrt((x*x)+(0.1349770000*0.1349770000)))/sqrt(1-(0.994515*0.994515)))/1.69543)+(0.608582*TMath::Power(1+((x/22.1715)*(x/22.1715)),-(229.876)))))",
"113_pt": "(x*(123.313*(pow((exp((0.171351*x)-(abs(0.00418378)*(x*x)))+(x/0.919801)),-(6.29677)))))*((((0.37788/(1+exp(-((x-0.265203)/0.274547))))+(-(0.393597*TMath::Gaus(x,0.324349,0.819888))))+(-(0.230459*TMath::Gaus(x,1.23251,1.24114))))+0.412584)",
"223_pt": "(x*(123.313*(pow((exp((0.171351*x)-(abs(0.00418378)*(x*x)))+(x/0.919801)),-(6.29677)))))*((((0.435069/(1+exp(-((x-0.302485)/0.27614))))+(-(0.258853*TMath::Gaus(x,0.42493,0.693856))))+(-(0.202117*TMath::Gaus(x,1.07795,1.09857))))+0.242026)"
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
75 changes: 75 additions & 0 deletions Tutorials/PWGEM/Cocktail/plotLFCocktail.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

const int nHists = 7;
TH1F* mee[nHists];
TH1F* mee_orig[nHists];
TString histNames[nHists] = {"", "_Pi0", "_Eta", "_EtaP",
"_Rho", "_Omega", "_Phi"};
TString histLegends[nHists] = {
"Cocktail sum",
"#pi^{0}#rightarrow#gammae^{+}e^{-}",
"#eta#rightarrow#gammae^{+}e^{-}",
"#eta'#rightarrow#gammae^{+}e^{-}, #eta'#rightarrow#omegae^{+}e^{-}",
"#rho#rightarrowe^{+}e^{-}",
"#omega#rightarrow#pi^{0}e^{+}e^{-}, #omega#rightarrowe^{+}e^{-}",
"#phi#rightarrow#etae^{+}e^{-}, #phi#rightarrow#pi^{0}e^{+}e^{-}, "
"#phi#rightarrowe^{+}e^{-}"};

void loadHistos(TFile* file, TH1F* hists[], TString name_extra, int rebin,
int nEvents)
{
for (int i = 0; i < nHists; i++) {
hists[i] = (TH1F*)file->GetDirectory("em-lmee-lf-cocktail")
->Get(TString("mee") + name_extra + histNames[i]);
hists[i]->Rebin(rebin);
hists[i]->Scale(1. / nEvents);
hists[i]->SetTitle(histLegends[i]);
}
}

void plotLFCocktail(TString filename = "AnalysisResults.root", int rebin = 1)
{

TFile* file = TFile::Open(filename.Data());

TH1I* hNEvents =
(TH1I*)file->GetDirectory("em-lmee-lf-cocktail")->Get("NEvents");
int nEvents = hNEvents->GetBinContent(1);

loadHistos(file, mee, "", rebin, nEvents);
loadHistos(file, mee_orig, "_orig", rebin, nEvents);

auto canvas = new TCanvas("LF Cocktail", "LF Cocktail", 1500, 500);
canvas->Divide(2, 1);

mee[0]->SetStats(0);
mee[0]->GetXaxis()->SetRangeUser(0.0, 1.1);
mee_orig[0]->SetStats(0);
mee_orig[0]->GetXaxis()->SetRangeUser(0.0, 1.1);

canvas->cd(1);
gPad->SetLogy();
for (int i = 0; i < nHists; i++) {
mee_orig[i]->SetLineColor(i + 1);
mee_orig[i]->Draw("hist same");
}
gPad->BuildLegend(0.62, 0.9, 0.9, 0.6);
mee_orig[0]->SetTitle("before resolution and acceptance");
canvas->cd(2);
gPad->SetLogy();
for (int i = 0; i < nHists; i++) {
mee[i]->SetLineColor(i + 1);
mee[i]->Draw("hist same");
}
gPad->BuildLegend(0.62, 0.9, 0.9, 0.6);
mee[0]->SetTitle("after resolution and acceptance");
}
Loading