Changes by Salvatore
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / AliAnalysisTaskRhoBase.h
1 #ifndef ALIANALYSISTASKRHOBASE_H
2 #define ALIANALYSISTASKRHOBASE_H
3
4 // $Id$
5
6 class TString;
7 class TF1;
8 class TH1F;
9 class TH2F;
10 class AliRhoParameter;
11
12 #include "AliAnalysisTaskEmcalJet.h"
13
14 class AliAnalysisTaskRhoBase : public AliAnalysisTaskEmcalJet {
15  public:
16   AliAnalysisTaskRhoBase();
17   AliAnalysisTaskRhoBase(const char *name, Bool_t histo=kFALSE);
18   virtual ~AliAnalysisTaskRhoBase() {}
19
20   void                   UserCreateOutputObjects();
21
22   void                   SetRhoName(const char *name)                          { fRhoName              = name ; 
23                                                                                  fRhoScaledName        = Form("%s_Scaled",name) ; }
24   void                   SetCompareRhoName(const char *name)                   { fCompareRhoName       = name ;                   }
25   void                   SetCompareRhoScaledName(const char *name)             { fCompareRhoScaledName = name ;                   }
26   void                   SetScaleFunction(TF1* sf)                             { fScaleFunction        = sf   ;                   }
27   void                   SetRhoFunction(TF1* rf)                               { fRhoFunction          = rf   ;                   }
28   void                   SetInEventSigmaRho(Double_t s)                        { fInEventSigmaRho      = s    ;                   }
29   void                   SetAttachToEvent(Bool_t a)                            { fAttachToEvent        = a    ;                   }
30
31  protected:
32   void                   ExecOnce();
33   Bool_t                 Run();
34   Bool_t                 FillHistograms();
35
36   virtual Double_t       GetRhoFactor(Double_t cent);
37   virtual Double_t       GetScaleFactor(Double_t cent);
38
39   TString                fRhoScaledName;                 // name of scaled rho object
40   TString                fCompareRhoName;                // name of rho object to compare
41   TString                fCompareRhoScaledName;          // name of scaled rho object to compare
42   TF1                   *fRhoFunction;                   // pre-computed rho as a function of centrality
43   TF1                   *fScaleFunction;                 // pre-computed scale factor as a function of centrality
44   Double_t               fInEventSigmaRho;               // in-event sigma rho
45   Bool_t                 fAttachToEvent;                 // whether or not attach rho to the event objects list
46
47   AliRhoParameter       *fRhoScaled;                     //!scaled rho object
48   AliRhoParameter       *fCompareRho;                    //!rho object to compare
49   AliRhoParameter       *fCompareRhoScaled;              //!scaled rho object to compare
50
51   TH2F                  *fHistJetPtvsCent;               //!jet pt vs. centrality
52   TH2F                  *fHistJetAreavsCent;             //!jet area vs. centrality
53   TH2F                  *fHistJetRhovsCent;              //!jet pt/area vs. centrality
54   TH2F                  *fHistNjetvsCent;                //!no. of jets vs. centrality
55   TH2F                  *fHistJetPtvsNtrack;             //!jet pt vs. no. of tracks
56   TH2F                  *fHistJetAreavsNtrack;           //!jet area vs. no. of tracks
57   TH2F                  *fHistNjetvsNtrack;              //!no. of jets vs. no. of tracks
58   TH2F                  *fHistNjUEoverNjVsNj[12];        //!ratio no. of jets below rho*A+sigma_rho over. no. of jets vs. no. of jets
59   TH2F                  *fHistJetNconstVsPt[4];          //!jet no. of constituents vs. pt
60
61   TH2F                  *fHistRhovsCent;                 //!rho vs. centrality
62   TH2F                  *fHistRhoScaledvsCent;           //!rhoscaled vs. centrality
63   TH2F                  *fHistDeltaRhovsCent;            //!delta rho vs. centrality
64   TH2F                  *fHistDeltaRhoScalevsCent;       //!delta rhoscaled vs. centrality
65
66   TH2F                  *fHistRhovsNtrack;               //!rho vs. no. of tracks
67   TH2F                  *fHistRhoScaledvsNtrack;         //!rhoscaled vs. no. of tracks
68   TH2F                  *fHistDeltaRhovsNtrack;          //!delta rho vs. no. of tracks
69   TH2F                  *fHistDeltaRhoScalevsNtrack;     //!delta rho scaled vs. no. of tracks
70  
71   TH2F                  *fHistRhovsNcluster;             //!rho vs. no. of clusters
72   TH2F                  *fHistRhoScaledvsNcluster;       //!rhoscaled vs. no. of clusters
73
74   AliAnalysisTaskRhoBase(const AliAnalysisTaskRhoBase&);             // not implemented
75   AliAnalysisTaskRhoBase& operator=(const AliAnalysisTaskRhoBase&);  // not implemented
76   
77   ClassDef(AliAnalysisTaskRhoBase, 8); // Rho base task
78 };
79 #endif