]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetTagger.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / UserTasks / AliAnalysisTaskEmcalJetTagger.h
1 #ifndef ALIANALYSISTASKEMCALJETTAGGER_H
2 #define ALIANALYSISTASKEMCALJETTAGGER_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
14 #include "AliAnalysisTaskEmcalJet.h"
15
16 class AliAnalysisTaskEmcalJetTagger : public AliAnalysisTaskEmcalJet {
17  public:
18   enum JetTaggingMethod {
19     kGeo      = 0,
20     kFraction = 1
21   };
22
23   enum JetTaggingType {
24     kTag      = 0,
25     kClosest  = 1
26   };
27
28   AliAnalysisTaskEmcalJetTagger();
29   AliAnalysisTaskEmcalJetTagger(const char *name);
30   virtual ~AliAnalysisTaskEmcalJetTagger();
31
32   void                                UserCreateOutputObjects();
33   void                                Terminate(Option_t *option);
34
35   //Setters
36   void SetJetContainerBase(Int_t c)                             { fContainerBase = c;}
37   void SetJetContainerTag(Int_t c)                              { fContainerTag  = c;}
38
39   void SetJetTaggingType(JetTaggingType t)                      { fJetTaggingType = t;}
40   void SetJetTaggingMethod(JetTaggingMethod m)                  { fJetTaggingMethod = m;}
41
42   void SetMinFractionShared(Double_t f)                         { fMinFractionShared = f; }
43
44   void SetUseSumw2(Bool_t b)                                    { fUseSumw2 = b;}
45
46   //Getters
47   Double_t GetFractionSharedPt(const AliEmcalJet *jet1, const AliEmcalJet *jet2) const;
48
49  protected:
50   Bool_t                              RetrieveEventObjects();
51   Bool_t                              Run();
52   Bool_t                              FillHistograms();
53
54
55   Double_t GetDeltaPhi(const AliEmcalJet* jet1, const AliEmcalJet* jet2);
56   Double_t GetDeltaPhi(Double_t phi1,Double_t phi2);
57   Double_t GetDeltaR(const AliEmcalJet* jet1, const AliEmcalJet* jet2) const;
58
59   void     MatchJetsGeo(Int_t c1 = -1, Int_t c2 = -1, Int_t iDebug = 0, Float_t maxDist = 0.3, Int_t type = 2, Bool_t bReset = kTRUE);
60   void     ResetTagging(const Int_t c);
61   
62  private:
63   JetTaggingType                      fJetTaggingType;             // jet matching type
64   JetTaggingMethod                    fJetTaggingMethod;           // jet matching method
65   Int_t                               fContainerBase;              // jets to be tagged
66   Int_t                               fContainerTag;               // jets used for tagging
67   Double_t                            fMinFractionShared;          // only fill histos for jets if shared fraction larger than X
68   Bool_t                              fUseSumw2;                   // activate sumw2 for output histograms
69   Bool_t                              fMatchingDone;               // flag to indicate if matching is done or not
70
71   TH3F            **fh3PtJet1VsDeltaEtaDeltaPhi;  //!pt jet 1 vs deta vs dphi
72   TH2F            **fh2PtJet1VsDeltaR;            //!pt jet 1 vs dR
73   TH2F            **fh2PtJet2VsFraction;          //!pt jet 1 vs shared fraction
74   
75   TH2F            **fh2PtJet1VsLeadPtAllSel;      //!all jets after std selection
76   TH2F            **fh2PtJet1VsLeadPtTagged;      //!tagged jets
77   TH2F            **fh2PtJet1VsPtJet2;            //!pT of base jet vs tagged jet
78   TH2F            **fh2PtJet2VsRelPt;             //!pT of tagged jet vs pt base jet / pt tagged jet
79   
80   TH3F             *fh3PtJetDEtaDPhiConst;        //!pt jet vs delta eta vs delta phi of constituents
81   TH2F             *fh2PtJetDRConst;              //!pt jet vs delta R of constituents
82   TH3F             *fh3PtJetAreaDRConst;          //!pt jet vs Area vs delta R of constituents
83
84   AliAnalysisTaskEmcalJetTagger(const AliAnalysisTaskEmcalJetTagger&);            // not implemented
85   AliAnalysisTaskEmcalJetTagger &operator=(const AliAnalysisTaskEmcalJetTagger&); // not implemented
86
87   ClassDef(AliAnalysisTaskEmcalJetTagger, 6)
88 };
89 #endif
90