Skip to content

Commit

Permalink
Merge pull request #16668 from fcatalan92/master
Browse files Browse the repository at this point in the history
Add option to use or not the Dplus peak in Ds v2 fit
  • Loading branch information
alibuild authored Jan 18, 2021
2 parents 5e4d1ca + 2b9260b commit cb06c16
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions PWGHF/vertexingHF/charmFlow/CharmHadronVnAnalysis.C
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ void CharmHadronVnAnalysis(string cfgFileName) {
bool fixMeanSecP = static_cast<bool>(config["AnalysisOptions"]["FixMeanSecondPeak"].as<int>());
bool fixSigmaSecP = static_cast<bool>(config["AnalysisOptions"]["FixSigmaSecondPeak"].as<int>());
string sigmaFileName = config["AnalysisOptions"]["SigmaFileName"].as<string>();
vector<int> inclSecPeakV2 = config["AnalysisOptions"]["IncludeSecondPeakV2"].as<vector<int> >();

int flowmethod = -1.;
if(flowmethodname=="EP")
Expand Down Expand Up @@ -535,7 +536,7 @@ void CharmHadronVnAnalysis(string cfgFileName) {
vnvsmassfitter[iPt]->SetInitialGaussianMean(massD,fixMeanVnVsMassFit);
vnvsmassfitter[iPt]->SetInitialGaussianSigma(hSigmaInt->GetBinContent(iPt+1)/1000,fixSigmaVnVsMassFit);
if(meson==AliAnalysisTaskSECharmHadronvn::kDstoKKpi)
vnvsmassfitter[iPt]->IncludeSecondGausPeak(massDplus,fixMeanSecP,DplusSigma[iPt],fixSigmaSecP,true);
vnvsmassfitter[iPt]->IncludeSecondGausPeak(massDplus,fixMeanSecP,DplusSigma[iPt],fixSigmaSecP,static_cast<bool>(inclSecPeakV2[iPt]));
if(useRefl) {
vnvsmassfitter[iPt]->SetTemplateReflections(hMCRefl[iPt],reflopt,MassMin[iPt],MassMax[iPt]);
vnvsmassfitter[iPt]->SetFixReflOverS(SoverR);
Expand Down Expand Up @@ -593,7 +594,7 @@ void CharmHadronVnAnalysis(string cfgFileName) {
cosnphiDvsmassfitter[iPt]->SetReflVnOption(AliHFVnVsMassFitter::kSameVnSignal);
}
if(meson==AliAnalysisTaskSECharmHadronvn::kDstoKKpi)
cosnphiDvsmassfitter[iPt]->IncludeSecondGausPeak(massDplus,fixMeanSecP,DplusSigma[iPt],fixSigmaSecP,true);
cosnphiDvsmassfitter[iPt]->IncludeSecondGausPeak(massDplus,fixMeanSecP,DplusSigma[iPt],fixSigmaSecP,static_cast<bool>(inclSecPeakV2[iPt]));
cosnphiDvsmassfitter[iPt]->SimultaneusFit(false);

sinnphiDvsmassfitter[iPt] = new AliHFVnVsMassFitter(hInvMassPhiInt[iPt],hSinnPhiDVsMass[iPt],MassMin[iPt],MassMax[iPt],BkgFunc,SgnFunc,VnBkgFunc);
Expand All @@ -606,7 +607,7 @@ void CharmHadronVnAnalysis(string cfgFileName) {
sinnphiDvsmassfitter[iPt]->SetReflVnOption(AliHFVnVsMassFitter::kSameVnSignal);
}
if(meson==AliAnalysisTaskSECharmHadronvn::kDstoKKpi)
sinnphiDvsmassfitter[iPt]->IncludeSecondGausPeak(massDplus,fixMeanSecP,DplusSigma[iPt],fixSigmaSecP,true);
sinnphiDvsmassfitter[iPt]->IncludeSecondGausPeak(massDplus,fixMeanSecP,DplusSigma[iPt],fixSigmaSecP,static_cast<bool>(inclSecPeakV2[iPt]));
sinnphiDvsmassfitter[iPt]->SimultaneusFit(false);

hMeanCosnPhiDVsPt->SetBinContent(iPt+1,cosnphiDvsmassfitter[iPt]->GetVn());
Expand Down
3 changes: 2 additions & 1 deletion PWGHF/vertexingHF/charmFlow/CharmHadronVnFitSystematics.C
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ void CharmHadronVnFitSystematics(string cfgFileName, string refFileName, int ref
bool fixMeanSecP = static_cast<bool>(config["AnalysisOptions"]["FixMeanSecondPeak"].as<int>());
bool fixSigmaSecP = static_cast<bool>(config["AnalysisOptions"]["FixSigmaSecondPeak"].as<int>());
string sigmaFileName = config["AnalysisOptions"]["SigmaFileName"].as<string>();
vector<int> inclSecPeakV2 = config["AnalysisOptions"]["IncludeSecondPeakV2"].as<vector<int> >();

vector<double> MassMin = config["FitSystematicsOptions"]["MassMin"].as<vector<double> >();
vector<double> MassMax = config["FitSystematicsOptions"]["MassMax"].as<vector<double> >();
Expand Down Expand Up @@ -567,7 +568,7 @@ void CharmHadronVnFitSystematics(string cfgFileName, string refFileName, int ref
vnvsmassfitter->SetInitialGaussianMean(massD,1);
vnvsmassfitter->SetInitialGaussianSigma(massfitterInt.GetSigma(),1);
if(meson==AliAnalysisTaskSECharmHadronvn::kDstoKKpi)
vnvsmassfitter->IncludeSecondGausPeak(massDplus,fixMeanSecP,DplusSigma[iPt],fixSigmaSecP,true);
vnvsmassfitter->IncludeSecondGausPeak(massDplus,fixMeanSecP,DplusSigma[iPt],fixSigmaSecP,static_cast<bool>(inclSecPeakV2[iPt]));
if(useRefl) {
vnvsmassfitter->SetTemplateReflections(hMCRefl[iPt],reflopt,MassMin[iMassMin],MassMax[iMassMax]);
vnvsmassfitter->SetFixReflOverS(SoverR);
Expand Down
1 change: 1 addition & 0 deletions PWGHF/vertexingHF/charmFlow/config_Dplus_v2_unbiased.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ AnalysisOptions:
FixMeanSecondPeak: 0 # 0->false, 1->true, used for Ds
FixSigmaSecondPeak: 0 # 0->false, 1->true, used for Ds
SigmaFileName: "" # file with MC D+ peak width
IncludeSecondPeakV2: [] # list [0, 1, 1, 0, ...] include D+ peak in Ds v2 fit, 0->false, 1->true
#application of ML selection
MLSelection:
ApplyML: 0 # 0->false, 1->true, enable only if you applied your ML model in the vn task
Expand Down

0 comments on commit cb06c16

Please sign in to comment.