return list;
}
-void AliEMCALHistoUtilities::FillH1(TList *l, Int_t ind, Double_t x, Double_t w)
+void AliEMCALHistoUtilities::FillH1(TList *l, Int_t ind, Double_t x, Double_t w, Double_t error)
{
//fill 1d histogram
static TH1* hid=0;
+ static int bin=0;
if(l == 0) return;
+
if(ind>=0 && ind < l->GetSize()){
hid = (TH1*)l->At(ind);
- hid->Fill(x,w);
+ if(error <= 0.0) { // standard way
+ hid->Fill(x,w);
+ } else{
+ bin = hid->FindBin(x);
+ hid->SetBinContent(bin,w);
+ hid->SetBinError(bin,error);
+ }
}
}
TGraphErrors *AliEMCALHistoUtilities::DrawGraphErrors(const Int_t n,Double_t *x,Double_t *y,Double_t *ex,
Double_t *ey, Int_t markerColor, Int_t markerStyle, const char* opt, const char* tit,
-const char* xTit,char* yTit, Int_t ifun, const char *optFit, const char *fun)
+const char* xTit,const char* yTit, Int_t ifun, const char *optFit, const char *fun)
{
// Oct 15, 2007
printf("AliEMCALHistoUtilities::drawGraphErrors started \n");