5722322824ee864869fa2b057f52191bfd836192
[u/mrichter/AliRoot.git] / PWGGA / EMCALJetTasks / AliAnalysisTaskSAJF.h
1 #ifndef ALIANALYSISTASKSAJF_H
2 #define ALIANALYSISTASKSAJF_H
3
4 // $Id$
5
6 class TClonesArray;
7 class TString;
8 class TH1F;
9 class TH2F;
10 class AliRhoParameter;
11
12 #include "AliAnalysisTaskEmcalJet.h"
13
14 class AliAnalysisTaskSAJF : public AliAnalysisTaskEmcalJet {
15  public:
16
17   AliAnalysisTaskSAJF();
18   AliAnalysisTaskSAJF(const char *name);
19   virtual ~AliAnalysisTaskSAJF();
20
21   void                        UserCreateOutputObjects();
22   void                        Terminate(Option_t *option);
23   void                        Init();
24
25   void                        SetJetMinRC2LJ(Float_t d)                            { fMinRC2LJ                = d          ; } 
26   void                        SetEmbJetsName(const char *n)                        { fEmbJetsName             = n          ; }
27   void                        SetRandTracksName(const char *n)                     { fRandTracksName          = n          ; }
28   void                        SetRandClusName(const char *n)                       { fRandCaloName            = n          ; }
29   void                        SetEmbTracksName(const char *n)                      { fEmbTracksName          = n          ; }
30   void                        SetEmbClusName(const char *n)                        { fEmbCaloName            = n          ; }
31   void                        SetRhoName(const char *n)                            { fRhoName                 = n          ; } 
32
33  protected:
34
35   Bool_t                      RetrieveEventObjects()                                                                        ;
36   Bool_t                      FillHistograms()                                                                              ;
37   void                        GetLeadingJets(Int_t &maxJetIndex, Int_t &max2JetIndex)                                       ;
38   void                        DoJetLoop()                                                                                   ;
39   void                        DoEmbJetLoop(AliEmcalJet* &embJet, TObject* &embPart)                                         ;
40   void                        DoTrackLoop()                                                                                 ;
41   void                        DoClusterLoop()                                                                               ;
42   void                        GetRigidCone(Float_t &pt, Float_t &eta, Float_t &phi, Bool_t acceptMC = kFALSE, 
43                                            AliEmcalJet *jet = 0, TClonesArray* tracks = 0, TClonesArray* clusters = 0) const;
44
45   Float_t                     fMinRC2LJ;                   // Minimum distance random cone to leading jet
46   TString                     fEmbJetsName;                // Name of embedded jet collection
47   TString                     fEmbTracksName;              // Name of embedded track collection
48   TString                     fEmbCaloName;                // Name of embedded calo cluster collection
49   TString                     fRandTracksName;             // Name of randomized track collection
50   TString                     fRandCaloName;               // Name of randomized calo cluster collection
51   TString                     fRhoName;                    // Name of rho object
52
53   TClonesArray               *fEmbJets;                    //!Embedded Jets
54   TClonesArray               *fEmbTracks;                  //!Embedded tracks
55   TClonesArray               *fEmbCaloClusters;            //!Embedded clusters  
56   TClonesArray               *fRandTracks;                 //!Randomized tracks
57   TClonesArray               *fRandCaloClusters;           //!Randomized clusters
58   AliRhoParameter            *fRho;                        //!Event rho
59
60   // General histograms
61   TH1F                       *fHistCentrality;             //!Event centrality distribution
62   TH1F                       *fHistEvents[4];              //!Events accepted/rejected
63   TH1F                       *fHistTracksPt[4];            //!Inclusive track pt spectrum
64   TH1F                       *fHistClustersPt[4];          //!Inclusive clusters pt spectrum
65   TH2F                       *fHistJetPhiEta[4];           //!Phi-Eta distribution of jets
66   TH1F                       *fHistJetsPt[4];              //!Inclusive jet pt spectrum
67   TH2F                       *fHistJetsPtArea[4];          //!Jet pt vs. area
68   TH1F                       *fHistLeadingJetPt[4];        //!Leading jet pt spectrum
69   TH1F                       *fHist2LeadingJetPt[4];       //!Second leading jet pt spectrum
70   TH2F                       *fHistJetsNEFvsPt[4];         //!Jet neutral energy fraction vs. jet pt
71   TH2F                       *fHistJetsZvsPt[4];           //!Constituent Pt over Jet Pt ratio vs. jet pt
72   TH2F                       *fHistMaxTrackPtvsJetPt[4];   //!Max constituent track pt vs. jet pt
73   TH2F                       *fHistMaxClusPtvsJetPt[4];    //!Max constituent cluster pt vs. jet pt
74   TH2F                       *fHistMaxPartPtvsJetPt[4];    //!Max constituent particle (track or cluster) pt vs. jet pt
75   TH2F                       *fHistMaxTrackPtvsJetCorrPt[4];   //!Max constituent track pt vs. jet pt
76   TH2F                       *fHistMaxClusPtvsJetCorrPt[4];    //!Max constituent cluster pt vs. jet pt
77   TH2F                       *fHistMaxPartPtvsJetCorrPt[4];    //!Max constituent particle (track or cluster) pt vs. jet pt
78
79   // Rho
80   TH1F                       *fHistRho[4];                    //!Rho distribution
81   TH2F                       *fHistRhoVSleadJetPt;            //!Area(leadjetarea) * rho vs. leading jet pt
82   TH1F                       *fHistCorrJetsPt[4];             //!Corrected inclusive jet pt spectrum
83   TH2F                       *fHistCorrJetsPtArea[4];         //!Jet pt vs. area
84   TH1F                       *fHistCorrLeadingJetPt[4];       //!Corrected leading jet pt spectrum
85
86   // Random cones
87   TH2F                       *fHistRCPhiEta;               //!Phi-Eta distribution of random cones
88   TH1F                       *fHistRCPt[4];                //!Random cone pt
89   TH1F                       *fHistRCPtExLJ[4];            //!Random cone pt, imposing min distance from leading jet
90   TH1F                       *fHistRCPtRand[4];            //!Random cone pt, randomized particles
91   TH2F                       *fHistRCPtExLJVSDPhiLJ;       //!Random cone pt, imposing min distance from leading jet, vs. deltaPhi leading jet
92   TH2F                       *fHistRhoVSRCPt;              //!Rho vs. Pt(RCExLJ) / Area(RCExLJ)
93   TH1F                       *fHistDeltaPtRC[4];           //!deltaPt = Pt(RC) - A * rho
94   TH1F                       *fHistDeltaPtRCExLJ[4];       //!deltaPt = Pt(RC) - A * rho, imposing min distance from leading jet
95   TH1F                       *fHistDeltaPtRCRand[4];       //!deltaPt = Pt(RC) - A * rho, randomzied particles
96
97   // Jet embedding
98   TH1F                       *fHistEmbJetsPt[4];           //!Pt distribution of embedded jets
99   TH1F                       *fHistEmbJetsCorrPt[4];       //!Pt distribution of embedded jets
100   TH1F                       *fHistEmbPart[4];             //!Pt distribution of embedded particle
101   TH2F                       *fHistEmbJetPhiEta;           //!Phi-Eta distribution of embedded jets
102   TH2F                       *fHistEmbPartPhiEta;          //!Phi-Eta distribution of embedded particles
103   TH2F                       *fHistRhoVSEmbBkg;            //!Area(embjet) * rho vs. Pt(embjet) - Pt(embtrack)
104   TH1F                       *fHistDeltaPtEmb[4];          //!deltaPt = Pt(embjet) - Area(embjet) * rho - Pt(embtrack)
105
106  private:
107   AliAnalysisTaskSAJF(const AliAnalysisTaskSAJF&);            // not implemented
108   AliAnalysisTaskSAJF &operator=(const AliAnalysisTaskSAJF&); // not implemented
109
110   ClassDef(AliAnalysisTaskSAJF, 7) // jet analysis task
111 };
112 #endif