0821e689a4cfba102a797e53c16f21f8bba684cf
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / UserTasks / AliAnalysisTaskEmcalHJetMass.h
1 #ifndef ALIANALYSISTASKEMCALHJETMASS_H
2 #define ALIANALYSISTASKEMCALHJETMASS_H
3
4 class TH1;
5 class TH2;
6 class TH3;
7 class TH3F;
8 class THnSparse;
9 class TClonesArray;
10 class TArrayI;
11 class AliAnalysisManager;
12 class AliJetContainer;
13 class AliEmcalJet;
14
15 #include "AliAnalysisTaskEmcalJet.h"
16
17 class AliAnalysisTaskEmcalHJetMass : public AliAnalysisTaskEmcalJet {
18  public:
19   enum JetMassType {
20     kRaw   = 0,  //mass form anti-kt 4-vector
21     kDeriv = 1   //area based subtracted jet mass
22   };
23
24   AliAnalysisTaskEmcalHJetMass();
25   AliAnalysisTaskEmcalHJetMass(const char *name);
26   virtual ~AliAnalysisTaskEmcalHJetMass();
27
28   void                                UserCreateOutputObjects();
29   void                                Terminate(Option_t *option);
30
31   //Setters
32   void SetJetContainerBase(Int_t c)                             { fContainerBase     = c   ; }
33  void SetJetContainerUnsub(Int_t c)                                 { fContainerUnsub    = c   ; }
34   void SetMinFractionShared(Double_t f, Bool_t useUnsubJet = kFALSE) { fMinFractionShared = f   ; fUseUnsubJet = useUnsubJet; }
35   void SetJetMassType(JetMassType t)                            { fJetMassType       = t   ; }
36   void SetMaxDeltaPhi(Double_t dphi)                            { fDPhiHJetMax       = dphi; }
37
38  protected:
39   Bool_t                              RetrieveEventObjects();
40   Bool_t                              Run();
41   Bool_t                              FillHJetHistograms(Double_t pt, const AliEmcalJet *jet);
42
43   Double_t                            GetJetMass(const AliEmcalJet *jet) const;
44   Double_t                            GetDeltaPhi(const AliVParticle *vp, const AliEmcalJet* jet) const;
45   Double_t                            GetDeltaPhi(Double_t phi1,Double_t phi2) const; 
46
47   Int_t                               fContainerBase;              // jets to be analyzed
48   Int_t                               fContainerUnsub;             // unsubtracted jets
49   Double_t                            fMinFractionShared;          // only fill histos for jets if shared fraction larger than X
50   Bool_t                              fUseUnsubJet;                // calc fraction of unsubtracted jet (relevant for constituent subtraction
51   JetMassType                         fJetMassType;                // jet mass type to be used
52   Double_t                            fDPhiHJetMax;                // maximum delta phi between hadron and jet
53
54   TH1F            **fh1PtHadron;                        //!pt of hadrons
55   TH3F            **fh3PtJet1VsMassVsHPtAllSel;         //!all jets after std selection pt vs mass vs track pt
56   TH3F            **fh3PtJet1VsMassVsHPtTagged;         //!tagged jets pt vs mass vs track pt
57   TH3F            **fh3PtJet1VsMassVsHPtTaggedMatch;    //!tagged jets pt vs mass vs track pt matched to MC
58
59   TH3F            **fh3PtJet1VsRatVsHPtAllSel;          //!all jets after std selection pt vs mass/pt vs track pt
60   TH3F            **fh3PtJet1VsRatVsHPtTagged;          //!tagged jets pt vs mass/pt vs track pt
61   TH3F            **fh3PtJet1VsRatVsHPtTaggedMatch;     //!tagged jets pt vs mas/pts vs track pt matched to MC
62
63  private:
64   AliAnalysisTaskEmcalHJetMass(const AliAnalysisTaskEmcalHJetMass&);            // not implemented
65   AliAnalysisTaskEmcalHJetMass &operator=(const AliAnalysisTaskEmcalHJetMass&); // not implemented
66
67   ClassDef(AliAnalysisTaskEmcalHJetMass, 1)
68 };
69 #endif
70