From f10825a3da0c4e36dbd3f310eafa25affee0d9cd Mon Sep 17 00:00:00 2001 From: mfloris Date: Mon, 14 Apr 2014 09:22:08 +0200 Subject: [PATCH] AliParticleYield Metadata fixes Improved combination of metadata when adding/dividing particles New type bit for values extrapolated via fit --- PWGLF/ThermalFits/AliParticleYield.cxx | 19 ++++++++++--------- PWGLF/ThermalFits/AliParticleYield.h | 9 +++++---- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/PWGLF/ThermalFits/AliParticleYield.cxx b/PWGLF/ThermalFits/AliParticleYield.cxx index 093541ba64b..5667e9deaaf 100644 --- a/PWGLF/ThermalFits/AliParticleYield.cxx +++ b/PWGLF/ThermalFits/AliParticleYield.cxx @@ -402,11 +402,11 @@ const char * AliParticleYield::GetLatexName(Int_t pdg) const { return "#bar{^{3}He}"; break; case 1010010030: - if(fIsSum) return "^{3}_{#Lambda}H + #bar{^{3}_{#Lambda}H}"; - return "^{3}_{#Lambda}H"; + if(fIsSum) return "{}^{3}_{#Lambda}H + {}^{3}_{#Lambda}#bar{H}"; + return "{}^{3}_{#Lambda}H"; break; case -1010010030: - return "#bar{^{3}_{#Lambda}H}"; + return "{}^{3}_{#Lambda}#bar{H}"; break; default: AliWarning("Latex Name not know for this particle"); @@ -819,9 +819,11 @@ void AliParticleYield::CombineMetadata(AliParticleYield *part1, AliParticleYield Int_t status = part1->GetStatus() == part2->GetStatus() ? part2->GetStatus() : -1; Int_t type = part1->GetMeasurementType() == part2->GetMeasurementType() ? part2->GetMeasurementType() : -1; - TString centr = part1->GetCentr() == part2->GetCentr() ? part2->GetCentr() : part1->GetCentr()+"/"+part2->GetCentr(); - TString tag = part1->GetTag() == part2->GetTag() ? part2->GetTag() : part1->GetTag()+"/"+part2->GetTag(); - Int_t issum = part1->GetIsSum() == part2->GetIsSum() ? part2->GetIsSum() : -1000; + TString centr = part1->GetCentr() == part2->GetCentr() ? part2->GetCentr() : part1->GetCentr()+pdgSep+part2->GetCentr(); + TString tag = part1->GetTag() == part2->GetTag() ? part2->GetTag() : part1->GetTag()+pdgSep+part2->GetTag(); + TString name = part1->GetPartName()+pdgSep+part2->GetPartName(); + + Int_t issum = part1->GetIsSum() || part2->GetIsSum() ? 1 : 0; SetPdgCode(pdg1); SetPdgCode2(pdg2); @@ -834,9 +836,8 @@ void AliParticleYield::CombineMetadata(AliParticleYield *part1, AliParticleYield SetCentr(centr); SetTag(tag); SetIsSum(issum); + SetPartName(name); - fPartName = TDatabasePDG::Instance()->GetParticle(fPdgCode)->GetName(); - if(pdg2) fPartName = fPartName + pdgSep + TDatabasePDG::Instance()->GetParticle(fPdgCode2)->GetName(); } AliParticleYield * AliParticleYield::Add (AliParticleYield * part1, AliParticleYield * part2, Double_t correlatedError , Option_t * opt){ @@ -873,7 +874,7 @@ AliParticleYield * AliParticleYield::Add (AliParticleYield * part1, AliParticl part->SetSystError(syst); part->SetNormError(norm); part->CombineMetadata(part1, part2, "+"); - + part->SetIsSum(1); // CombineMetadata inherits this form part1 and part2 return part; diff --git a/PWGLF/ThermalFits/AliParticleYield.h b/PWGLF/ThermalFits/AliParticleYield.h index 9207c573823..bf74a70033b 100644 --- a/PWGLF/ThermalFits/AliParticleYield.h +++ b/PWGLF/ThermalFits/AliParticleYield.h @@ -33,11 +33,12 @@ public: static const char * kStatusString[]; enum AliPYMeasurementType_t { // this is a bit mask: more than one bit can be one (be careful not to set mutually exclusive ones). - // Type of measurements (lowest nibble reserved for this) + // Type of measurements kTypeLinearInterpolation = 0x1, - kTypeParticleRatio = 0x2, // If true, this is a ratio of 2 particles where the propagation of uncertainty was properly taken into account. - kTypeAverageAndRefit = 0x4, // this means that the measurement has been obtained summing several spectra in smaller centality bins (weihgted by the width of the centrality bin) and refitting them - kTypeExtrPionRatio = 0x8, // Extrapolated from a different centrality bin, assumin the ratio to pions is constant + kTypeParticleRatio = 0x2, // If true, this is a ratio of 2 particles where the propagation of uncertainty was properly taken into account. + kTypeAverageAndRefit = 0x4, // this means that the measurement has been obtained summing several spectra in smaller centality bins (weihgted by the width of the centrality bin) and refitting them + kTypeExtrPionRatio = 0x8, // Extrapolated from a different centrality bin, assumin the ratio to pions is constant + kTypeExtrFit = 0x20, // Extrapolated fitting the centrality dependence vs npart // Type of errors kTypeOnlyTotError = 0x10, // If on, only the total error is returned as "GetSystError". GetStatError should be set to 0; -- 2.43.0