fMinNoRPs(-44),
fMaxNoRPs(-44),
fExactNoRPs(-44),
+ fPropagateError(kTRUE),
// 1.) Control histograms:
fControlHistogramsList(NULL),
fControlHistogramsFlagsPro(NULL),
this->BookEverythingForNestedLoops();
this->BookEverythingForStandardCandles();
this->BookEverythingForQcumulants();
- this->BookEverythingForDiffCorrelations(); return; // _11
+ this->BookEverythingForDiffCorrelations();
// d) Set all flags:
// ...
// Standard candle:
Double_t dSCn1n2n2n1 = 0.; // SC(-n1,-n2,n2,n1)
Double_t dSCn1n2n2n1Err = 0.; // SC(-n1,-n2,n2,n1) stat. error
-
+ fPropagateError = kTRUE;
+
// Correlations:
Double_t dCosn1n2n2n1 = 0.; // <<Cos(-n1,-n2,n2,n1)>>
Double_t dCosn1n2n2n1Err = 0.; // <<Cos(-n1,-n2,n2,n1)>> stat. error
if(dSCn1n2n2n1ErrSquared > 0.)
{
dSCn1n2n2n1Err = pow(dSCn1n2n2n1ErrSquared,0.5);
- } else{Warning(sMethodName.Data(),"dSCn1n2n2n1ErrSquared > 0. is not satisfied for %s !!!!",labeln1n2n2n1.ReplaceAll("Cos","SC").Data());}
+ } else
+ {
+ Warning(sMethodName.Data(),"dSCn1n2n2n1ErrSquared > 0. is not satisfied for %s !!!!",labeln1n2n2n1.ReplaceAll("Cos","SC").Data());
+ fPropagateError = kFALSE;
+ }
// Store the final stat. error:
- fStandardCandlesHist->SetBinError(b,dSCn1n2n2n1Err);
+ if(fPropagateError)
+ {
+ fStandardCandlesHist->SetBinError(b,dSCn1n2n2n1Err);
+ }
} // for(Int_t b=1;b<=nBins;b++)
+ fPropagateError = kTRUE;
+
return;
} // void AliFlowAnalysisWithMultiparticleCorrelations::CalculateStandardCandles()
fMinNoRPs = (Int_t)fInternalFlagsPro->GetBinContent(2);
fMaxNoRPs = (Int_t)fInternalFlagsPro->GetBinContent(3);
fExactNoRPs = (Int_t)fInternalFlagsPro->GetBinContent(4);
+ fPropagateError = (Bool_t)fInternalFlagsPro->GetBinContent(5);
// c) Get pointers for control histograms:
this->GetPointersForControlHistograms();
TComplex AliFlowAnalysisWithMultiparticleCorrelations::q(Int_t n, Int_t wp)
{
// Using the fact that q{-n,p} = q{n,p}^*.
-
+
+ // When weights are used for RPs and not for POIs, and vice versa, some gymnastics is required here:
+ // TBI rethink and reimplement the lines below:
+ Int_t nUseWeightsForRP = (Int_t)(fUseWeights[0][0] || fUseWeights[0][1] || fUseWeights[0][2]);
+ Int_t nUseWeightsForPOI = (Int_t)(fUseWeights[1][0] || fUseWeights[1][1] || fUseWeights[1][2]);
+ if(nUseWeightsForPOI == 1 && nUseWeightsForRP == 0){wp=1;}
+ else if(nUseWeightsForPOI == 0 && nUseWeightsForRP == 1){wp-=1;}
+
if(n>=0){return fqvector[fDiffBinNo][n][wp];}
return TComplex::Conjugate(fqvector[fDiffBinNo][-n][wp]);
// Book all objects for calculations with weights.
// a) Book profile to hold all flags for weights;
- // b) Store histograms holding phi, pt and eta weights.
+ // b) Store histograms holding phi, pt and eta weights.
// a) Book profile to hold all flags for weights:
fWeightsFlagsPro = new TProfile("fWeightsFlagsPro","0 = weight not used, 1 = weight used ",6,0,6);
{
// Book all base objects.
- fInternalFlagsPro = new TProfile("fInternalFlagsPro","Internal flags and settings",4,0,4);
+ fInternalFlagsPro = new TProfile("fInternalFlagsPro","Internal flags and settings",5,0,5);
fInternalFlagsPro->SetLabelSize(0.05);
fInternalFlagsPro->SetStats(kFALSE);
fInternalFlagsPro->SetFillColor(kGray);
fInternalFlagsPro->GetXaxis()->SetBinLabel(2,"fMinNoRPs"); fInternalFlagsPro->Fill(1.5,fMinNoRPs);
fInternalFlagsPro->GetXaxis()->SetBinLabel(3,"fMaxNoRPs"); fInternalFlagsPro->Fill(2.5,fMaxNoRPs);
fInternalFlagsPro->GetXaxis()->SetBinLabel(4,"fExactNoRPs"); fInternalFlagsPro->Fill(3.5,fExactNoRPs);
+ fInternalFlagsPro->GetXaxis()->SetBinLabel(5,"fPropagateError"); fInternalFlagsPro->Fill(4.5,fPropagateError);
+
fHistList->Add(fInternalFlagsPro);
} // void AliFlowAnalysisWithMultiparticleCorrelations::BookEverythingForBase()
TString sMethodName = "void AliFlowAnalysisWithMultiparticleCorrelations::CalculateQcumulants()";
+ fPropagateError = kTRUE;
Int_t n = fHarmonicQC;
fQcumulantsHist->SetTitle(Form("Q-cumulants (n = %d)",n));
if(qc4ErrorSquared > 0. && !(fDontGoBeyond < 4))
{
qc4Error = pow(qc4ErrorSquared,0.5);
- } else{Warning(sMethodName.Data(),"Statistical error of QC{4} is imaginary !!!!");}
+ } else{Warning(sMethodName.Data(),"Statistical error of QC{4} is imaginary !!!!"); fPropagateError = kFALSE;}
// Statistical error of QC{6}:
qc6ErrorSquared = 81.*pow(4.*pow(two,2.)-four,2.)*pow(twoError,2.)
if(qc6ErrorSquared > 0. && !(fDontGoBeyond < 6))
{
qc6Error = pow(qc6ErrorSquared,0.5);
- } else{Warning(sMethodName.Data(),"Statistical error of QC{6} is imaginary !!!!");}
+ } else{Warning(sMethodName.Data(),"Statistical error of QC{6} is imaginary !!!!"); fPropagateError = kFALSE;}
// Statistical error of QC{8}:
qc8ErrorSquared = 256.*pow(36.*pow(two,3.)-18.*four*two+six,2.)*pow(twoError,2.)
if(qc8ErrorSquared > 0. && !(fDontGoBeyond < 8))
{
qc8Error = pow(qc8ErrorSquared,0.5);
- } else{Warning(sMethodName.Data(),"Statistical error of QC{8} is imaginary !!!!");}
+ } else{Warning(sMethodName.Data(),"Statistical error of QC{8} is imaginary !!!!"); fPropagateError = kFALSE;}
+
+ if(!fPropagateError){fPropagateError = kTRUE; return;}
// Store the statistical errors for Q-cumulants:
if(TMath::Abs(qc2)>0.)
} // if(sBinLabel.EqualTo(x))
if(sBinLabel.EqualTo("")){break;}
} // for(Int_t b=1;b<=nbx;b++)
- if(TMath::Abs(dx)<1.e-44){Fatal(sMethodName.Data(),"TMath::Abs(dx)<1.e-44, %s",x);}
- if(TMath::Abs(wx)<1.e-44){Fatal(sMethodName.Data(),"TMath::Abs(wx)<1.e-44, %s",x);}
+ if(TMath::Abs(dx)<1.e-44)
+ {
+ Warning(sMethodName.Data(),"TMath::Abs(dx)<1.e-44, %s",x);
+ fPropagateError = kFALSE;
+ return wCov;
+ }
+ if(TMath::Abs(wx)<1.e-44)
+ {
+ Warning(sMethodName.Data(),"TMath::Abs(wx)<1.e-44, %s",x);
+ fPropagateError = kFALSE;
+ return wCov;
+ }
// y:
- Double_t dy = 0.; // <<y>>
+ Double_t dy = 0.; // <<y>>
Double_t wy = 0.; // \sum w_y
Int_t nby = fCorrelationsPro[csy][cy]->GetNbinsX();
for(Int_t b=1;b<=nby;b++)
} // if(sBinLabel.EqualTo(y))
if(sBinLabel.EqualTo("")){break;}
} // for(Int_t b=1;b<=nby;b++)
- if(TMath::Abs(dy)<1.e-44){Fatal(sMethodName.Data(),"TMath::Abs(dy)<1.e-44, %s",y);}
- if(TMath::Abs(wy)<1.e-44){Fatal(sMethodName.Data(),"TMath::Abs(wy)<1.e-44, %s",y);}
+ if(TMath::Abs(dy)<1.e-44)
+ {
+ Warning(sMethodName.Data(),"TMath::Abs(dy)<1.e-44, %s",y);
+ fPropagateError = kFALSE;
+ return wCov;
+ }
+ if(TMath::Abs(wy)<1.e-44)
+ {
+ Warning(sMethodName.Data(),"TMath::Abs(wy)<1.e-44, %s",y);
+ fPropagateError = kFALSE;
+ return wCov;
+ }
// Product:
Double_t dxy = 0.; // <<xy>>
dxy = profile2D->GetBinContent(profile2D->GetBin(gby,gbx));
wxy = profile2D->GetBinEntries(profile2D->GetBin(gby,gbx));
} else{Fatal(sMethodName.Data(),"gbx==gby, %s, %s",x,y);}
- if(TMath::Abs(dxy)<1.e-44){Fatal(sMethodName.Data(),"TMath::Abs(dxy)<1.e-44, %s, %s",x,y);}
- if(TMath::Abs(wxy)<1.e-44){Fatal(sMethodName.Data(),"TMath::Abs(wxy)<1.e-44, %s, %s",x,y);}
+ if(TMath::Abs(dxy)<1.e-44)
+ {
+ Warning(sMethodName.Data(),"TMath::Abs(dxy)<1.e-44, %s, %s",x,y);
+ fPropagateError = kFALSE;
+ return wCov;
+ }
+ if(TMath::Abs(wxy)<1.e-44)
+ {
+ Warning(sMethodName.Data(),"TMath::Abs(wxy)<1.e-44, %s, %s",x,y);
+ fPropagateError = kFALSE;
+ return wCov;
+ }
// Finally:
if(bUnbiasedEstimator)
Double_t num = dxy-dx*dy; // numerator of Eq. (C.12) on page 131 of my thesis
Double_t den = 1.-wxy/(wx*wy); // denominator of Eq. (C.12) on page 131 of my thesis
Double_t pre = wxy/(wx*wy); // prefactor
- if(TMath::Abs(den)<1.e-44){Fatal(sMethodName.Data(),"TMath::Abs(den)<1.e-44, %s, %s",x,y);}
+ if(TMath::Abs(den)<1.e-44)
+ {
+ Warning(sMethodName.Data(),"TMath::Abs(den)<1.e-44, %s, %s",x,y);
+ fPropagateError = kFALSE;
+ return wCov;
+ }
wCov = pre*num/den;
- if(TMath::Abs(wCov)<1.e-44){Fatal(sMethodName.Data(),"TMath::Abs(wCov)<1.e-44, %s, %s",x,y);}
+ if(TMath::Abs(wCov)<1.e-44)
+ {
+ Warning(sMethodName.Data(),"TMath::Abs(wCov)<1.e-44, %s, %s",x,y);
+ fPropagateError = kFALSE;
+ return wCov;
+ }
} else
{
// TBI check if this is a correct formula for the biased estimator
Double_t num = dxy-dx*dy; // numerator of Eq. (C.12) on page 131 of my thesis
Double_t den = 1.;
Double_t pre = wxy/(wx*wy); // prefactor
- if(TMath::Abs(den)<1.e-44){Fatal(sMethodName.Data(),"TMath::Abs(den)<1.e-44, %s, %s",x,y);}
+ if(TMath::Abs(den)<1.e-44)
+ {
+ Warning(sMethodName.Data(),"TMath::Abs(den)<1.e-44, %s, %s",x,y);
+ fPropagateError = kFALSE;
+ return wCov;
+ }
wCov = pre*num/den;
- if(TMath::Abs(wCov)<1.e-44){Fatal(sMethodName.Data(),"TMath::Abs(wCov)<1.e-44, %s, %s",x,y);}
+ if(TMath::Abs(wCov)<1.e-44)
+ {
+ Warning(sMethodName.Data(),"TMath::Abs(wCov)<1.e-44, %s, %s",x,y);
+ fPropagateError = kFALSE;
+ return wCov;
+ }
}
return wCov;