]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetTagger.h
Merge branch 'master' of http://git.cern.ch/pub/AliRoot
[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   //Getters
45   Double_t GetFractionSharedPt(const AliEmcalJet *jet1, const AliEmcalJet *jet2) const;
46
47  protected:
48   Bool_t                              RetrieveEventObjects();
49   Bool_t                              Run();
50   Bool_t                              FillHistograms();
51
52
53   Double_t GetDeltaPhi(const AliEmcalJet* jet1, const AliEmcalJet* jet2);
54   Double_t GetDeltaPhi(Double_t phi1,Double_t phi2);
55   Double_t GetDeltaR(const AliEmcalJet* jet1, const AliEmcalJet* jet2) const;
56
57   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);
58   void     ResetTagging(const Int_t c);
59   
60   JetTaggingType                      fJetTaggingType;             // jet matching type
61   JetTaggingMethod                    fJetTaggingMethod;           // jet matching method
62
63   Int_t                               fContainerBase;              // jets to be tagged
64   Int_t                               fContainerTag;               // jets used for tagging
65
66   Double_t                            fMinFractionShared;          // only fill histos for jets if shared fraction larger than X
67   
68  private:
69   Bool_t            fMatchingDone;                // flag to indicate if matching is done or not
70   TH3F            **fh3PtJet1VsDeltaEtaDeltaPhi;  //!pt jet 1 vs deta vs dphi
71   TH2F            **fh2PtJet1VsDeltaR;            //!pt jet 1 vs dR
72   TH2F            **fh2PtJet2VsFraction;          //!pt jet 1 vs shared fraction
73   
74   TH2F            **fh2PtJet1VsLeadPtAllSel;      //!all jets after std selection
75   TH2F            **fh2PtJet1VsLeadPtTagged;      //!tagged jets
76   TH2F            **fh2PtJet1VsPtJet2;            //!pT of base jet vs tagged jet
77
78   TH3F             *fh3PtJetDEtaDPhiConst;        //!pt jet vs delta eta vs delta phi of constituents
79   TH2F             *fh2PtJetDRConst;              //!pt jet vs delta R of constituents
80   TH3F             *fh3PtJetAreaDRConst;          //!pt jet vs Area vs delta R of constituents
81
82   AliAnalysisTaskEmcalJetTagger(const AliAnalysisTaskEmcalJetTagger&);            // not implemented
83   AliAnalysisTaskEmcalJetTagger &operator=(const AliAnalysisTaskEmcalJetTagger&); // not implemented
84
85   ClassDef(AliAnalysisTaskEmcalJetTagger, 3)
86 };
87 #endif
88