#ifndef ALIJXTHISTOS_H
#define ALIJXTHISTOS_H
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <stdio.h>
#include <TH1.h>
#include <TH2.h>
#include <TProfile.h>
#include <TFile.h>
#include <TList.h>
#define kMaxNoCentrBin 10 // Maximum no of centrality bins defined in JCard.h
class AliJCard;
using namespace std;
class AliJXtHistos {
public:
AliJXtHistos(AliJCard* cardP);
virtual ~AliJXtHistos(){delete fhistoList;}
AliJXtHistos(const AliJXtHistos& obj);
AliJXtHistos& operator=(const AliJXtHistos& obj);
void CreateXtHistos();
TList *GetHistoList() { return fhistoList; }
bool UseDirectory() const { return fUseDirectory; }
void UseDirectory(bool b) { fUseDirectory=b; }
TDirectory * MakeDirectory(TString name);
TDirectory * JumpToDefaultDirectory();
void FillCentralityHistos(double fcent, int fCentBin){
fhCentr->Fill(fcent);
fhiCentr->Fill(1.0*fCentBin);
}
void FillRawVertexHisto(double zVert){fhZVertRaw->Fill(zVert);}
void FillAcceptedVertexHisto(double zVert, int centBin){fhZVert[centBin]->Fill(zVert);}
void FillInclusiveHistograms(double pT, double xT, double eta, double phi, double effCorr, int centBin);
void FillIsolatedHistograms(double pT, double xT, double eta, double phi, double effCorr, int centBin);
void FillInclusiveConeActivities(double pT, double sumPt){fhConeActivity->Fill(pT,sumPt);}
void FillIsolatedConeActivities(double pT, double sumPt){fhConeActivityIsolated->Fill(pT,sumPt);}
protected:
bool fUseDirectory;
TDirectory * fTopDirectory;
AliJCard *fCard;
double fmaxEtaRange;
TList *fhistoList;
private:
char fhname[40], fhtit[40];
TH1D *fhChargedPt[kMaxNoCentrBin], *fhInvariantChargedPt[kMaxNoCentrBin], *fhChargedPtNoCorr[kMaxNoCentrBin];
TH1D *fhIsolatedChargedPt[kMaxNoCentrBin], *fhInvariantIsolatedChargedPt[kMaxNoCentrBin];
TH1D *fhChargedXt[kMaxNoCentrBin], *fhInvariantChargedXt[kMaxNoCentrBin], *fhChargedXtNoCorr[kMaxNoCentrBin];
TH1D *fhIsolatedChargedXt[kMaxNoCentrBin], *fhInvariantIsolatedChargedXt[kMaxNoCentrBin];
TH1D *fhChargedPhi[kMaxNoCentrBin], *fhChargedPhiNoCorr[kMaxNoCentrBin], *fhIsolatedChargedPhi[kMaxNoCentrBin];
TH1D *fhChargedEta[kMaxNoCentrBin], *fhChargedEtaNoCorr[kMaxNoCentrBin], *fhIsolatedChargedEta[kMaxNoCentrBin];
TProfile *fhConeActivity;
TProfile *fhConeActivityIsolated;
TH1D *fhZVertRaw;
TH1D *fhZVert[kMaxNoCentrBin];
TH1D *fhCentr;
TH1D *fhiCentr;
TH1D *fhEventPerRun;
TH2D* fhVertexZTriggVtx;
};
#endif