TH1D* cent = 0;
// We make summary histograms of accepted events.
for (Int_t i = 1; i < fSumList->GetEntries(); i++) {
- list = (TList*)fSumList->At(i);
- hist = (TH3D*)list->At(0);
+ list = dynamic_cast<TList*>(fSumList->At(i));
+ if (!list) continue;
+ hist = dynamic_cast<TH3D*>(list->At(0));
+ if (!hist) continue;
const char* histname = hist->GetName();
TString name = "";
for (Int_t j = 0; ; j++) {
for (Int_t cBin = 1; cBin <= hist2D->GetNbinsY(); cBin++) {
Int_t cRat = 100/hist2D->GetNbinsY();
Int_t cMin = cBin - 1;
- Int_t cMax = (cMin == 60/cRat ? cMin + 20/cRat : ((cMin < 20/cRat || cMin >= 90) ? cMin + 5/cRat : cMin + 10/cRat));
+ Int_t cMax = (cMin == 60/cRat ? cMin + 20/cRat : ((cMin < 20/cRat || cMin >= 90/cRat) ? cMin + 5/cRat : cMin + 10/cRat));
if (fgDispVtx) {
cRat = 1;
cMin = Int_t(hist2D->GetYaxis()->GetBinLowEdge(cBin));
Int_t nInBin = 0;
Int_t nCurBin = 0, nPrevBin = 0;
Int_t nCurRefBin = 0, nPrevRefBin = 0;
+ Int_t nBadBins = 0;
// Then we loop over the input and calculate sum cos(k*n*phi)
// and fill it in the reference and differential histograms
if (data) {
nInBin++;
}
- if (nInAvg > 1) {
+ if (nInAvg > 3) {
runAvg /= nInAvg;
avgSqr /= nInAvg;
Double_t stdev = TMath::Sqrt(nInAvg/(nInAvg-1))*TMath::Sqrt(avgSqr - runAvg*runAvg);
Double_t nSigma = (stdev == 0 ? 0 : (max-runAvg)/stdev);
- if (fSigmaCut > 0. && nSigma >= fSigmaCut && cent <= 60) return kFALSE;
+ if (fSigmaCut > 0. && nSigma >= fSigmaCut && cent <= 60) nBadBins++;
+// if (fSigmaCut > 0. && nSigma >= fSigmaCut) nBadBins++;
+ else nBadBins = 0;
fOutliers->Fill(cent, nSigma);
+ if (nBadBins > 3) return kFALSE;
}
runAvg = 0;
avgSqr = 0;
max = 0;
}
-
return kTRUE;
}
//_____________________________________________________________________
bin->AddOutput(fSumList);
}
- fWeights.Init(fSumList);
+ TList* wList = new TList();
+ wList->SetName("FlowWeights");
+ fWeights.Init(wList);
+ fSumList->Add(wList);
+
}
//_____________________________________________________________________
Bool_t AliForwardMCFlowTaskQC::Analyze()
o << " --run=" << fRunNumbers.At(i) << " \\\n";
TrainSetup::SaveOptions(o, "--", r);
if (fUseCent) o << " --cent \\\n"
- o << " --type=AOD \\\n"
+ << " --type=AOD \\\n"
<< " --trig=INEL \\\n"
<< " --vzMin=-10 \\\n"
<< " --vzMax=10 \\\n"
TList toAdd;
toAdd.SetOwner();
- Bool_t hasGAlice = (!fMC ? true : false);
- Bool_t hasKine = (!fMC ? true : false);
- Bool_t hasTrRef = (!fMC ? true : false);
+ Bool_t hasGAlice = (!(fMC || fExecType == kAOD) ? true : false);
+ Bool_t hasKine = (!(fMC || fExecType == kAOD) ? true : false);
+ Bool_t hasTrRef = (!(fMC || fExecType == kAOD) ? true : false);
// Sort list of files and check if we should add it
files->Sort();
if (!name.Contains(fnPattern)) {
// Info("ScanDirectory", "%s does not match pattern %s",
// name.Data(), fnPattern.Data());
- if (fMC) {
+ if (fMC && fExecType == kESD) {
if (name.CompareTo("galice.root") == 0) hasGAlice = true;
if (name.CompareTo("Kinematics.root") == 0) hasKine = true;
if (name.CompareTo("TrackRefs.root") == 0) hasTrRef = true;
toAdd.Add(new TObjString(full));
}
- if (fMC && toAdd.GetEntries() > 0 &&
+ if (fMC && fExecType == kESD && toAdd.GetEntries() > 0 &&
(!hasGAlice || !hasKine || !hasTrRef)) {
Warning("ScanDirectory",
"one or more of {galice,Kinematics,TrackRefs}.root missing from "