TIter next(&fRingHistos);
RingHistos* o = 0;
while ((o = static_cast<RingHistos*>(next()))) {
- o->Init(axis);
+ //o->Init(axis);
o->fMultCut = fCuts.GetFixedCut(o->fDet, o->fRing);
+ o->fPoisson.Init(o->fDet,o->fRing,fEtaLumping, fPhiLumping);
}
}
AliWarning(Form("No good fits for FMD%d%c at eta=%f", d, r, eta));
return 0;
}
+
UShort_t n = TMath::Min(fMaxParticles, UShort_t(m));
Double_t ret = fit->EvaluateWeighted(mult, n);
-
+
if (fDebug > 10) {
AliInfo(Form("FMD%d%c, eta=%7.4f, %8.5f -> %8.5f", d, r, eta, mult, ret));
}
- //HHD, CS test
- //if(mult < fit->GetDelta()) {std::cout<<ret<<" "<<1<<std::endl; ret = 1;}
-
- //if(mult > 8) {std::cout<<ret<<" "<<1<<std::endl; ret = 1;}
-
+
fWeightedSum->Fill(ret);
fSumOfWeights->Fill(ret);
while ((o = static_cast<RingHistos*>(next()))) {
// o->fPoisson.SetEtaLumping(fEtaLumping);
o->fPoisson.SetUseAverageOverEvents(fUseRunningAverage);
- o->fPoisson.Init(o->fDet,o->fRing,fEtaLumping, fPhiLumping);
- o->fPoisson.GetOccupancy()->SetFillColor(o->Color());
- o->fPoisson.GetMean()->SetFillColor(o->Color());
+ // o->fPoisson.Init(o->fDet,o->fRing,fEtaLumping, fPhiLumping);
+ // o->fPoisson.GetOccupancy()->SetFillColor(o->Color());
+ // o->fPoisson.GetMean()->SetFillColor(o->Color());
// o->fPoisson.GetOccupancy()->SetFillColor(o->Color());
o->Output(d);
}
#include "AliPoissonCalculator.h"
+#include "AliForwardCorrectionManager.h"
#include <TH2D.h>
#include <TBrowser.h>
#include <TROOT.h>
fBasic->SetYTitle("#varphi [radians]");
fBasic->Sumw2();
- for(Int_t v = 1 ; v < 11; v++) { //CHC bins
- for(Int_t centbin = 0 ; centbin < 13; centbin++) {
-
- TH2D* hTotal = new TH2D(Form("totalFMD%d%c_vertex%d_cent%d",d,r,v,centbin),"Total number of bins/region",
- nEta, etaMin, etaMax, nPhi, phiMin, phiMax);
- TH2D* hEmpty = new TH2D(Form("emptyFMD%d%c_vertex%d_cent%d",d,r,v,centbin), "Empty number of bins/region",
- nEta, etaMin, etaMax, nPhi, phiMin, phiMax);
- hEmpty->Sumw2();
- hTotal->Sumw2();
- fEmptyList.Add(hEmpty);
- fTotalList.Add(hTotal);
-
+ if(fRunningAverage) {
+ AliForwardCorrectionManager& fcm = AliForwardCorrectionManager::Instance();
+ const TAxis* pv = fcm.GetVertexAxis();
+ Int_t nVtxBins = pv->GetNbins();
+
+ for(Int_t v = 1 ; v < nVtxBins+1; v++) { //CHC bins
+ for(Int_t centbin = 0 ; centbin < 13; centbin++) {
+
+ TH2D* hTotal = new TH2D(Form("totalFMD%d%c_vertex%d_cent%d",d,r,v,centbin),"Total number of bins/region",
+ nEta, etaMin, etaMax, nPhi, phiMin, phiMax);
+ TH2D* hEmpty = new TH2D(Form("emptyFMD%d%c_vertex%d_cent%d",d,r,v,centbin), "Empty number of bins/region",
+ nEta, etaMin, etaMax, nPhi, phiMin, phiMax);
+ hEmpty->Sumw2();
+ hTotal->Sumw2();
+ fEmptyList.Add(hEmpty);
+ fTotalList.Add(hTotal);
+
+ }
}
}
+ else {
+ fTotal = new TH2D("total", "Total number of hits",
+ nEta, etaMin, etaMax, nPhi, phiMin, phiMax);
+ fTotal->SetXTitle("#eta");
+ fTotal->SetYTitle("#varphi [radians]");
+ fTotal->Sumw2();
+ fEmpty = new TH2D("empty", "Number of empties",
+ nEta, etaMin, etaMax, nPhi, phiMin, phiMax);
+ fEmpty->SetXTitle("#eta");
+ fEmpty->SetYTitle("#varphi [radians]");
+ fEmpty->Sumw2();
+
+
+ }
}
//Create diagnostics if void
if (fEmptyVsTotal) return;
+ MakeOutput();
+
+
+}
+ //____________________________________________________________________
+void AliPoissonCalculator::MakeOutput() {
+
Int_t n = fEtaLumping * fPhiLumping + 1;
fEmptyVsTotal = new TH2D("emptyVsTotal",
"# of empty # bins vs total # bins",
fCorr->SetOption("colz");
fCorr->SetDirectory(0);
-
+
}
//____________________________________________________________________
void AliPoissonCalculator::SetObject(UShort_t d, Char_t r, UShort_t v, Double_t cent) {
+ if(!fRunningAverage) return;
+
Int_t centbin = 0;
if(cent > 0) {
if(cent > 0 && cent <5) centbin = 1;
AliPoissonCalculator::Output(TList* d)
{
if (!d) return;
- if (!fEmptyVsTotal) Init();
+ if (!fEmptyVsTotal) MakeOutput();
d->Add(fEmptyVsTotal);
d->Add(fMean);
d->Add(fOcc);
//
// Reset histogram
//
+
if (!base) return;
if (fBasic /* && fTotal && fEmpty*/) {
fBasic->Reset();