updates from salvatore
[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
24   void                        SetJetMinRC2LJ(Float_t d)                            { fMinRC2LJ                = d          ; } 
25   void                        SetEmbJetsName(const char *n)                        { fEmbJetsName             = n          ; }
26   void                        SetRandTracksName(const char *n)                     { fRandTracksName          = n          ; }
27   void                        SetRandClusName(const char *n)                       { fRandCaloName            = n          ; }
28   void                        SetEmbTracksName(const char *n)                      { fEmbTracksName          = n          ; }
29   void                        SetEmbClusName(const char *n)                        { fEmbCaloName            = n          ; }
30   void                        SetRhoName(const char *n)                            { fRhoName                 = n          ; } 
31
32  protected:
33   void                        ExecOnce()                                                                                    ;
34   Bool_t                      RetrieveEventObjects()                                                                        ;
35   Bool_t                      FillHistograms()                                                                              ;
36   void                        GetLeadingJets(Int_t &maxJetIndex, Int_t &max2JetIndex)                                       ;
37   void                        DoJetLoop()                                                                                   ;
38   void                        DoEmbJetLoop(AliEmcalJet* &embJet, TObject* &embPart)                                         ;
39   void                        DoTrackLoop()                                                                                 ;
40   void                        DoClusterLoop()                                                                               ;
41   void                        GetRigidCone(Float_t &pt, Float_t &ptrigid, Float_t &eta, Float_t &phi, Bool_t acceptMC = kFALSE, 
42                                            AliEmcalJet *jet = 0, TClonesArray* tracks = 0, TClonesArray* clusters = 0) const;
43
44   Float_t                     fMinRC2LJ;                   // Minimum distance random cone to leading jet
45   TString                     fEmbJetsName;                // Name of embedded jet collection
46   TString                     fEmbTracksName;              // Name of embedded track collection
47   TString                     fEmbCaloName;                // Name of embedded calo cluster collection
48   TString                     fRandTracksName;             // Name of randomized track collection
49   TString                     fRandCaloName;               // Name of randomized calo cluster collection
50   TString                     fRhoName;                    // Name of rho object
51
52   TClonesArray               *fEmbJets;                    //!Embedded Jets
53   TClonesArray               *fEmbTracks;                  //!Embedded tracks
54   TClonesArray               *fEmbCaloClusters;            //!Embedded clusters  
55   TClonesArray               *fRandTracks;                 //!Randomized tracks
56   TClonesArray               *fRandCaloClusters;           //!Randomized clusters
57   AliRhoParameter            *fRho;                        //!Event rho
58
59   // General histograms
60   TH1F                       *fHistCentrality;             //!Event centrality distribution
61   TH1F                       *fHistEvents[4];              //!Events accepted/rejected
62   TH1F                       *fHistTracksPt[4];            //!Inclusive track pt spectrum
63   TH1F                       *fHistClustersPt[4];          //!Inclusive clusters pt spectrum
64   TH2F                       *fHistJetPhiEta[4];           //!Phi-Eta distribution of jets
65   TH1F                       *fHistJetsPt[4];              //!Inclusive jet pt spectrum
66   TH2F                       *fHistJetsPtArea[4];          //!Jet pt vs. area
67   TH1F                       *fHistLeadingJetPt[4];        //!Leading jet pt spectrum
68   TH1F                       *fHist2LeadingJetPt[4];       //!Second leading jet pt spectrum
69   TH2F                       *fHistJetsNEFvsPt[4];         //!Jet neutral energy fraction vs. jet pt
70   TH2F                       *fHistJetsZvsPt[4];           //!Constituent Pt over Jet Pt ratio vs. jet pt
71   TH2F                       *fHistMaxTrackPtvsJetPt[4];   //!Max constituent track pt vs. jet pt
72   TH2F                       *fHistMaxClusPtvsJetPt[4];    //!Max constituent cluster pt vs. jet pt
73   TH2F                       *fHistMaxPartPtvsJetPt[4];    //!Max constituent particle (track or cluster) pt vs. jet pt
74   TH2F                       *fHistMaxTrackPtvsJetCorrPt[4];   //!Max constituent track pt vs. jet pt
75   TH2F                       *fHistMaxClusPtvsJetCorrPt[4];    //!Max constituent cluster pt vs. jet pt
76   TH2F                       *fHistMaxPartPtvsJetCorrPt[4];    //!Max constituent particle (track or cluster) pt vs. jet pt
77
78   // Rho
79   TH1F                       *fHistRho[4];                    //!Rho distribution
80   TH2F                       *fHistRhoVSleadJetPt;            //!Area(leadjetarea) * rho vs. leading jet pt
81   TH1F                       *fHistCorrJetsPt[4];             //!Corrected inclusive jet pt spectrum
82   TH2F                       *fHistCorrJetsPtArea[4];         //!Jet pt vs. area
83   TH1F                       *fHistCorrLeadingJetPt[4];       //!Corrected leading jet pt spectrum
84
85   // Random cones
86   TH2F                       *fHistRCPhiEta;               //!Phi-Eta distribution of random cones
87   TH1F                       *fHistRCPtRigid[4];           //!Random cone pt, rigid
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                       *fHistDeltaPtRCRigid[4];      //!deltaPt = Pt(RC) - A * rho, rigid
94   TH1F                       *fHistDeltaPtRC[4];           //!deltaPt = Pt(RC) - A * rho
95   TH1F                       *fHistDeltaPtRCExLJ[4];       //!deltaPt = Pt(RC) - A * rho, imposing min distance from leading jet
96   TH1F                       *fHistDeltaPtRCRand[4];       //!deltaPt = Pt(RC) - A * rho, randomzied particles
97
98   // Jet embedding
99   TH1F                       *fHistEmbJetsPt[4];           //!Pt distribution of embedded jets
100   TH1F                       *fHistEmbJetsCorrPt[4];       //!Pt distribution of embedded jets
101   TH1F                       *fHistEmbPart[4];             //!Pt distribution of embedded particle
102   TH2F                       *fHistEmbJetPhiEta;           //!Phi-Eta distribution of embedded jets
103   TH2F                       *fHistEmbPartPhiEta;          //!Phi-Eta distribution of embedded particles
104   TH2F                       *fHistRhoVSEmbBkg;            //!Area(embjet) * rho vs. Pt(embjet) - Pt(embtrack)
105   TH1F                       *fHistDeltaPtEmb[4];          //!deltaPt = Pt(embjet) - Area(embjet) * rho - Pt(embtrack)
106
107  private:
108   AliAnalysisTaskSAJF(const AliAnalysisTaskSAJF&);            // not implemented
109   AliAnalysisTaskSAJF &operator=(const AliAnalysisTaskSAJF&); // not implemented
110
111   ClassDef(AliAnalysisTaskSAJF, 7) // jet analysis task
112 };
113 #endif