]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
AliParticleYield Metadata fixes
authormfloris <michele.floris@cern.ch>
Mon, 14 Apr 2014 07:22:08 +0000 (09:22 +0200)
committermfloris <michele.floris@cern.ch>
Mon, 14 Apr 2014 07:24:45 +0000 (09:24 +0200)
Improved combination of metadata when adding/dividing particles
New type bit for values extrapolated via fit

PWGLF/ThermalFits/AliParticleYield.cxx
PWGLF/ThermalFits/AliParticleYield.h

index 093541ba64bc6cbbfb0c34e21f117a0a562a7835..5667e9deaaffdfe3ce5114d3873fdb02c7a65c19 100644 (file)
@@ -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;
 
 
index 9207c57382362a0c29bfa3333a48fb50db9f2ee3..bf74a70033bf4a6c4f9a90e0f57d655f6fb341dd 100644 (file)
@@ -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;