1 #ifndef ALIANALYSISTASKEMCAL_H
2 #define ALIANALYSISTASKEMCAL_H
4 // $Id: AliAnalysisTaskEmcal.h 56756 2012-05-30 05:03:02Z loizides $
9 class AliEmcalParticle;
14 class AliEMCALGeometry;
16 #include "AliAnalysisTaskSE.h"
18 class AliAnalysisTaskEmcal : public AliAnalysisTaskSE {
22 kTPC = 0, // TPC acceptance
23 kEMCAL = 1, // EMCal acceptance
24 kUser = 2, // User defined acceptance
34 AliAnalysisTaskEmcal();
35 AliAnalysisTaskEmcal(const char *name, Bool_t histo=kFALSE);
36 virtual ~AliAnalysisTaskEmcal();
38 void UserExec(Option_t *option);
39 void UserCreateOutputObjects();
41 void SetAnaType(EmcalAnaType type) { fAnaType = type ; ; }
42 void SetCentRange(Double_t min, Double_t max) { fMinCent = min ; fMaxCent = max ; }
43 void SetClusName(const char *n) { fCaloName = n ; }
44 void SetClusPtCut(Double_t cut) { fClusPtCut = cut ; }
45 void SetClusTimeCut(Double_t min, Double_t max) { fClusTimeCutLow = min ; fClusTimeCutUp = max ; }
46 void SetHistoBins(Int_t nbins, Double_t min, Double_t max) { fNbins = nbins; fMinBinPt = min; fMaxBinPt = max ; }
47 void SetOffTrigger(UInt_t t) { fOffTrigger = t ; }
48 void SetPtCut(Double_t cut) { SetClusPtCut(cut) ; SetTrackPtCut(cut) ; }
49 void SetTrackPtCut(Double_t cut) { fTrackPtCut = cut ; }
50 void SetTrackEtaLimits(Double_t min, Double_t max) { fTrackMaxEta = max ; fTrackMinEta = min ; }
51 void SetTrackPhiLimits(Double_t min, Double_t max) { fTrackMaxPhi = max ; fTrackMinPhi = min ; }
52 void SetTracksName(const char *n) { fTracksName = n ; }
53 void SetTrigClass(const char *n) { fTrigClass = n ; }
54 void SetVzRange(Double_t min, Double_t max) { fMinVz = min ; fMaxVz = max ; }
55 void SetForceBeamType(BeamType f) { fForceBeamType = f ; }
56 void SetMakeGeneralHistograms(Bool_t g) { fGeneralHistograms = g ; }
57 void SetMinPtTrackInEmcal(Double_t min) { fMinPtTrackInEmcal = min ; }
60 Bool_t AcceptCluster(AliVCluster *clus, Bool_t acceptMC = kFALSE) const;
61 Bool_t AcceptEmcalPart(AliEmcalParticle *part, Bool_t acceptMC = kFALSE) const;
62 Bool_t AcceptTrack(AliVTrack *track, Bool_t acceptMC = kFALSE) const;
63 virtual void ExecOnce();
64 virtual Bool_t FillGeneralHistograms();
65 virtual Bool_t FillHistograms() { return kTRUE ; }
66 BeamType GetBeamType();
67 TClonesArray *GetArrayFromEvent(const char *name, const char *clname=0);
68 virtual Bool_t IsEventSelected();
69 virtual Bool_t RetrieveEventObjects();
70 virtual Bool_t Run() { return kTRUE ; }
72 EmcalAnaType fAnaType; // analysis type
73 BeamType fForceBeamType; // forced beam type
74 Bool_t fGeneralHistograms; // whether or not it should fill some general histograms
75 Bool_t fInitialized; // whether or not the task has been already initialized
76 Bool_t fCreateHisto; // whether or not create histograms
77 TString fTracksName; // name of track collection
78 TString fCaloName; // name of calo cluster collection
79 Double_t fMinCent; // min centrality for event selection
80 Double_t fMaxCent; // max centrality for event selection
81 Double_t fMinVz; // min vertex for event selection
82 Double_t fMaxVz; // max vertex for event selection
83 UInt_t fOffTrigger; // offline trigger for event selection
84 TString fTrigClass; // trigger class name for event selection
85 Int_t fNbins; // no. of pt bins
86 Double_t fMinBinPt; // min pt in histograms
87 Double_t fMaxBinPt; // max pt in histograms
88 Double_t fClusPtCut; // cut on cluster pt
89 Double_t fTrackPtCut; // cut on track pt
90 Double_t fTrackMinEta; // cut on track eta
91 Double_t fTrackMaxEta; // cut on track eta
92 Double_t fTrackMinPhi; // cut on track phi
93 Double_t fTrackMaxPhi; // cut on track phi
94 Double_t fClusTimeCutLow; // low time cut for clusters
95 Double_t fClusTimeCutUp; // up time cut for clusters
96 Double_t fMinPtTrackInEmcal; // min pt track in emcal
97 AliEMCALGeometry *fGeom; //!emcal geometry
98 TClonesArray *fTracks; //!tracks
99 TClonesArray *fCaloClusters; //!clusters
100 Double_t fCent; //!event centrality
101 Int_t fCentBin; //!event centrality bin
102 Double_t fEPV0; //!event plane V0
103 Double_t fEPV0A; //!event plane V0A
104 Double_t fEPV0C; //!event plane V0C
105 Double_t fVertex[3]; //!event vertex
106 Int_t fNVertCont; //!event vertex number of contributors
107 BeamType fBeamType; //!event beam type
108 TList *fOutput; //!output list
110 TH1F *fHistCentrality; //!Event centrality distribution
111 TH1F *fHistZVertex; //!Z vertex position
114 AliAnalysisTaskEmcal(const AliAnalysisTaskEmcal&); // not implemented
115 AliAnalysisTaskEmcal &operator=(const AliAnalysisTaskEmcal&); // not implemented
117 ClassDef(AliAnalysisTaskEmcal, 8) // EMCAL base analysis task