AliPhysics  master (3d17d9d)
AliAnalysisTaskRhoBase.h
Go to the documentation of this file.
1 /************************************************************************************
2  * Copyright (C) 2012, Copyright Holders of the ALICE Collaboration *
3  * All rights reserved. *
4  * *
5  * Redistribution and use in source and binary forms, with or without *
6  * modification, are permitted provided that the following conditions are met: *
7  * * Redistributions of source code must retain the above copyright *
8  * notice, this list of conditions and the following disclaimer. *
9  * * Redistributions in binary form must reproduce the above copyright *
10  * notice, this list of conditions and the following disclaimer in the *
11  * documentation and/or other materials provided with the distribution. *
12  * * Neither the name of the <organization> nor the *
13  * names of its contributors may be used to endorse or promote products *
14  * derived from this software without specific prior written permission. *
15  * *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND *
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
19  * DISCLAIMED. IN NO EVENT SHALL ALICE COLLABORATION BE LIABLE FOR ANY *
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND *
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
26  ************************************************************************************/
27 #ifndef ALIANALYSISTASKRHOBASE_H
28 #define ALIANALYSISTASKRHOBASE_H
29 
30 class TString;
31 class TF1;
32 class TH1F;
33 class TH2F;
34 class TH3F;
35 class AliRhoParameter;
36 
38 
49  public:
60  AliAnalysisTaskRhoBase(const char *name, Bool_t histo=kFALSE);
61 
66 
71 
72  void SetOutRhoName(const char *name) { fOutRhoName = name ;
73  fOutRhoScaledName = Form("%s_Scaled",name); }
74  void SetCompareRhoName(const char *name) { fCompareRhoName = name ; }
75  void SetCompareRhoScaledName(const char *name) { fCompareRhoScaledName = name ; }
76  void SetScaleFunction(TF1* sf) { fScaleFunction = sf ; }
77  void SetRhoFunction(TF1* rf) { fRhoFunction = rf ; }
84  TF1* LoadRhoFunction(const char* path, const char* name);
87  void SetSmallSystem(Bool_t setter = kTRUE) { fIsPbPb = !setter ; }
88 
89  const char* GetOutRhoName() const { return fOutRhoName.Data() ; }
90  const char* GetOutRhoScaledName() const { return fOutRhoScaledName.Data() ; }
91 
92  protected:
96  void ExecOnce();
97 
102  Bool_t Run();
108 
114  virtual Double_t GetRhoFactor(Double_t cent);
115 
121  virtual Double_t GetScaleFactor(Double_t cent);
122 
132 
137 
152 
157 
160 
161  AliAnalysisTaskRhoBase(const AliAnalysisTaskRhoBase&); // not implemented
162  AliAnalysisTaskRhoBase& operator=(const AliAnalysisTaskRhoBase&); // not implemented
163 
164  ClassDef(AliAnalysisTaskRhoBase, 11); // Rho base task
165 };
166 #endif
AliRhoParameter * fCompareRho
! rho object to compare
TH2F * fHistDeltaRhovsNtrack
rhoscaled vs. no. of tracks vs V0mult
double Double_t
Definition: External.C:58
Definition: External.C:260
TH2F * fHistDeltaRhoScalevsNtrack
delta rho vs. no. of tracks
TH2F * fHistNjetvsNtrack
! no. of jets vs. no. of tracks
Double_t fInEventSigmaRho
in-event sigma rho
Definition: External.C:236
AliAnalysisTaskRhoBase & operator=(const AliAnalysisTaskRhoBase &)
TString fCompareRhoScaledName
name of scaled rho object to compare
TString fOutRhoName
name of output rho object
const char * GetOutRhoScaledName() const
void SetOutRhoName(const char *name)
TH2F * fHistNjetvsCent
! no. of jets vs. centrality
TF1 * LoadRhoFunction(const char *path, const char *name)
Load the scale function from a file.
void UserCreateOutputObjects()
User create output objects, called at the beginning of the analysis.
TH2F * fHistJetRhovsCent
! jet pt/area vs. centrality
Bool_t fAttachToEvent
whether or not attach rho to the event objects list
TH2F * fHistJetPtvsNtrack
! jet pt vs. no. of tracks
virtual Double_t GetRhoFactor(Double_t cent)
Access rho valie per centrality.
AliRhoParameter * fOutRhoScaled
! output scaled rho object
AliRhoParameter * fCompareRhoScaled
! scaled rho object to compare
const char * GetOutRhoName() const
void SetSmallSystem(Bool_t setter=kTRUE)
TString fOutRhoScaledName
name of output scaled rho object
TString fCompareRhoName
name of rho object to compare
TH2F * fHistJetRhovsEta[4]
! rho vs. eta
Bool_t fIsPbPb
different histogram ranges for pp/pPb and PbPb
TH2F * fHistJetAreavsNtrack
! jet area vs. no. of tracks
TH3F * fHistRhovsNtrackvsV0Mult
! rho vs. no. of tracks vs V0mult
TH2F * fHistRhoScaledvsCent
! rhoscaled vs. centrality
TH2F * fHistRhovsNcluster
delta rho scaled vs. no. of tracks
virtual Double_t GetScaleFactor(Double_t cent)
Get scale factor per centrality.
void SetCompareRhoName(const char *name)
TF1 * fRhoFunction
pre-computed rho as a function of centrality
TH2F * fHistNjUEoverNjVsNj[12]
! ratio no. of jets below rho*A+sigma_rho over. no. of jets vs. no. of jets
TH2F * fHistJetAreavsCent
! jet area vs. centrality
TH2F * fHistJetNconstVsPt[4]
! jet no. of constituents vs. pt
TF1 * fScaleFunction
pre-computed scale factor as a function of centrality
Bool_t Run()
Run the analysis.
TH2F * fHistRhoScaledvsNcluster
rho vs. no. of clusters
TH2F * fHistRhovsCent
! rho vs. centrality
TH2F * fHistJetPtvsCent
! jet pt vs. centrality
Base task in the EMCAL jet framework.
Bool_t FillHistograms()
Fill histograms.
bool Bool_t
Definition: External.C:53
Base class for rho calculation.
void ExecOnce()
Init the analysis.
AliRhoParameter * fOutRho
! output rho object
TH2F * fHistDeltaRhoScalevsCent
! delta rhoscaled vs. centrality
void SetInEventSigmaRho(Double_t s)
virtual ~AliAnalysisTaskRhoBase()
Destructor.
void SetCompareRhoScaledName(const char *name)
TH2F * fHistDeltaRhovsCent
! delta rho vs. centrality
AliAnalysisTaskRhoBase()
Dummy constructor, for ROOT I/O.