fLastYbin = 0;
fEntries = 0;
fContent = 0;
+ fThreshold = 0;
}
-AliL3Histogram::AliL3Histogram(Char_t *name,Char_t *id,Int_t nxbin,Double_t xmin,Double_t xmax,Int_t nybin,Double_t ymin,Double_t ymax)
+AliL3Histogram::AliL3Histogram(Char_t *name,Char_t *id,
+ Int_t nxbin,Double_t xmin,Double_t xmax,
+ Int_t nybin,Double_t ymin,Double_t ymax)
{
strcpy(fName,name);
fLastXbin = nxbin;
fLastYbin = nybin;
fRootHisto = 0;
+ fThreshold = 0;
fContent = new Double_t[fNcells];
Reset();
return 0;
}
+ if(fContent[bin] < fThreshold)
+ return 0;
return fContent[bin];
}
fRootHisto = new TH2F(fName,"",fNxbins,fXmin,fXmax,fNybins,fYmin,fYmax);
for(Int_t bin=0; bin<fNcells; bin++)
{
- fRootHisto->AddBinContent(bin,fContent[bin]);
+ fRootHisto->AddBinContent(bin,GetBinContent(bin));
}
fRootHisto->Draw(option);
#include <TH2.h>
-class AliL3Histogram : public TObject {
+class AliL3Histogram {
private:
Int_t fFirstYbin;
Int_t fLastXbin;
Int_t fLastYbin;
+ Int_t fThreshold;
Double_t fXmin;
Double_t fYmin;
virtual ~AliL3Histogram();
void Reset();
- void Fill(Double_t x,Double_t y,Int_t weight);
+ void Fill(Double_t x,Double_t y,Int_t weight=1);
Int_t FindBin(Double_t x,Double_t y);
Int_t FindXbin(Double_t x);
Int_t FindYbin(Double_t y);
void AddBinContent(Int_t bin,Int_t weight);
void Add(AliL3Histogram *h1,Double_t weight=1);
void Draw(Char_t *option="hist");
-
+ void SetThreshold(Int_t i) {fThreshold = i;}
TH2F *GetRootHisto() {return fRootHisto;}
Double_t GetXmin() {return fXmin;}
Int_t GetNbinsX() {return fNxbins;}
Int_t GetNbinsY() {return fNybins;}
Int_t GetNEntries() {return fEntries;}
-
+
+
ClassDef(AliL3Histogram,1)
};