#ifndef ALIHADCORRTASK_H
#define ALIHADCORRTASK_H
class TClonesArray;
class TList;
class TH1;
class TH2;
class AliEmcalParticle;
class TString;
#include "AliAnalysisTaskEmcal.h"
class AliHadCorrTask : public AliAnalysisTaskEmcal {
public:
AliHadCorrTask();
AliHadCorrTask(const char *name, Bool_t histo=kFALSE);
virtual ~AliHadCorrTask();
void UserCreateOutputObjects();
void SetEexcl(Double_t Emin) { fEexclCell = Emin ; }
void SetEtaMatch(Double_t eta) { fEtaMatch = eta ; }
void SetHadCorr(Double_t c) { fHadCorr = c ; }
void SetOutClusName(const char *n) { fOutCaloName = n ; }
void SetPhiMatch(Double_t phi) { fPhiMatch = phi ; }
void SetTrackClus(Int_t c) { fDoTrackClus = c ; }
void SetDoExact(Bool_t d) { fDoExact = d ; }
protected:
Double_t ApplyHadCorrOneTrack(AliEmcalParticle *emccluster, Double_t hadCorr);
Double_t ApplyHadCorrAllTracks(AliEmcalParticle *emccluster, Double_t hadCorr);
void DoMatchedTracksLoop(AliEmcalParticle *emccluster, Double_t &totalTrkP, Int_t &Nmatches, Double_t &trkPMCfrac, Int_t &NMCmatches);
void DoTrackLoop();
Double_t GetEtaSigma(Int_t pbin) const;
UInt_t GetMomBin(Double_t pt) const;
Double_t GetPhiMean(Int_t pbin, Int_t centbin) const;
Double_t GetPhiSigma(Int_t pbin, Int_t centbin) const;
Bool_t Run() ;
void ExecOnce() ;
TString fOutCaloName;
Double_t fPhiMatch;
Double_t fEtaMatch;
Int_t fDoTrackClus;
Double_t fHadCorr;
Double_t fEexclCell;
Bool_t fDoExact;
Bool_t fEsdMode;
TClonesArray *fOutClusters;
TH2 *fHistMatchEtaPhi[8][9][2];
TH2 *fHistMatchEtaPhiAll;
TH2 *fHistMatchEtaPhiAllTr;
TH2 *fHistMatchEtaPhiAllCl;
TH2 *fHistMatchEvsP[4];
TH2 *fHistNMatchEnergy[4];
TH2 *fHistNCellsEnergy[4][4];
TH2 *fHistMatchdRvsEP[4];
TH1 *fHistNclusvsCent;
TH1 *fHistNclusMatchvsCent;
TH1 *fHistEbefore;
TH1 *fHistEafter;
TH2 *fHistEoPCent;
TH2 *fHistNMatchCent;
TH2 *fHistNClusMatchCent;
TH1 *fHistEsubPch[8];
TH2 *fHistEsubPchRat[8];
TH2 *fHistEsubPchRatAll[8];
TH2 *fHistEmbTrackMatchesOversub[4];
TH2 *fHistNonEmbTrackMatchesOversub[4];
TH2 *fHistOversubMCClusters[4];
TH2 *fHistOversubNonMCClusters[4];
TH2 *fHistOversub[4];
private:
AliHadCorrTask(const AliHadCorrTask&);
AliHadCorrTask &operator=(const AliHadCorrTask&);
ClassDef(AliHadCorrTask, 14)
};
#endif