AliPhysics  master (3d17d9d)
AliAnalysisTaskRhoBaseDev.h
Go to the documentation of this file.
1 /************************************************************************************
2  * Copyright (C) 2017, 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 ALIANALYSISTASKRHOBASEDEV_H
28 #define ALIANALYSISTASKRHOBASEDEV_H
29 
30 class TString;
31 class TF1;
32 class TH1F;
33 class TH2F;
34 class TH3F;
35 class AliRhoParameter;
36 
37 #include <map>
38 #include <string>
39 
40 #include "AliAnalysisTaskJetUE.h"
41 
42 
55  public:
60 
67  AliAnalysisTaskRhoBaseDev(const char *name, Bool_t histo=kFALSE);
69 
77 
78  void SetOutRhoName(const char *name) { fOutRhoName = name ;
79  fOutRhoScaledName = Form("%s_Scaled",name); }
80  void SetScaleFunction(TF1* sf) { fScaleFunction = sf ; }
81  void SetRhoFunction(TF1* rf) { fRhoFunction = rf ; }
82 
89  TF1* LoadRhoFunction(const char* path, const char* name);
91 
92  const char* GetOutRhoName() const { return fOutRhoName.Data() ; }
93  const char* GetOutRhoScaledName() const { return fOutRhoScaledName.Data() ; }
94 
109  TString nTracks = "usedefault",
110  TString nClusters = "usedefault",
111  TString nRho = "Rho",
112  Double_t jetradius = 0.2,
113  UInt_t acceptance = AliEmcalJet::kTPCfid,
116  Bool_t histo = kTRUE,
117  TString suffix = ""
118  );
119 
120  protected:
124  void ExecOnce();
125 
129  Bool_t Run();
130 
135 
136  virtual Bool_t VerifyContainers() { return kTRUE; }
137 
142  virtual void CalculateRho();
143 
149  virtual Double_t GetRhoFactor(Double_t cent);
150 
156  virtual Double_t GetScaleFactor(Double_t cent);
157 
163 
165 
166  // Exported background density
169 
170  // Histograms
172 
173  std::map<std::string, TH2*> fHistRhoVsLeadJetPt;
174  std::map<std::string, TH2*> fHistLeadJetPtVsCent;
175  std::map<std::string, TH2*> fHistLeadJetPtDensityVsCent;
176  std::map<std::string, TH2*> fHistTotJetAreaVsCent;
177  std::map<std::string, TH2*> fHistLeadJetNconstVsCent;
178  std::map<std::string, TH2**> fHistLeadJetNconstVsPt;
179  std::map<std::string, TH2*> fHistNjetVsCent;
180  std::map<std::string, TH2*> fHistNjetVsNtrack;
181 
186 
191 
195 
196  AliAnalysisTaskRhoBaseDev(const AliAnalysisTaskRhoBaseDev&); // not implemented
198 
199  ClassDef(AliAnalysisTaskRhoBaseDev, 2);
200 };
201 #endif
TString fOutRhoName
name of output rho object
double Double_t
Definition: External.C:58
Definition: External.C:260
Definition: External.C:236
TF1 * fScaleFunction
pre-computed scale factor as a function of centrality
TString fOutRhoScaledName
name of output scaled rho object
virtual Double_t GetRhoFactor(Double_t cent)
Access rho per centrality.
TH2 * fHistRhoVsCent
!rho vs. centrality
Base class for a task that calculates the UE.
Bool_t fAttachToEvent
whether or not attach rho to the event objects list
AliAnalysisTaskRhoBaseDev & operator=(const AliAnalysisTaskRhoBaseDev &)
std::map< std::string, TH2 * > fHistRhoVsLeadJetPt
!rho vs. leading jet pt
Bool_t fTaskConfigured
!kTRUE if the task is properly configured
Bool_t Run()
Run the analysis.
std::map< std::string, TH2 * > fHistLeadJetPtVsCent
!leading jet pt vs. centrality
std::map< std::string, TH2 * > fHistTotJetAreaVsCent
!total area covered by jets vs. centrality
TH2 * fHistNtrackVsCent
!no. of tracks vs. centrality
TH2 * fHistRhoVsLeadClusterE
!rho vs. leading cluster energy
TPC fiducial acceptance (each eta edge narrowed by jet R)
Definition: AliEmcalJet.h:68
std::map< std::string, TH2 * > fHistLeadJetPtDensityVsCent
!leading jet area vs. centrality
std::map< std::string, TH2 ** > fHistLeadJetNconstVsPt
!leading jet constituents vs. pt
AliAnalysisTaskRhoBaseDev()
Default constructor. Needed by ROOT I/O.
void SetOutRhoName(const char *name)
unsigned int UInt_t
Definition: External.C:33
TF1 * LoadRhoFunction(const char *path, const char *name)
Load the scale function from a file.
TH2 * fHistRhoScaledVsCent
!rhoscaled vs. centrality
const char * GetOutRhoName() const
TH2 * fHistLeadClusterEVsCent
!leading cluster energy vs. centrality
const char * GetOutRhoScaledName() const
TH2 * fHistRhoScaledVsNcluster
!rhoscaled vs. no. of clusters
std::map< std::string, TH2 * > fHistLeadJetNconstVsCent
!leading jet constituents vs. cent
virtual Double_t GetScaleFactor(Double_t cent)
Get scale factor.
static AliAnalysisTaskRhoBaseDev * AddTaskRhoBaseDev(TString nTracks="usedefault", TString nClusters="usedefault", TString nRho="Rho", Double_t jetradius=0.2, UInt_t acceptance=AliEmcalJet::kTPCfid, AliJetContainer::EJetType_t jetType=AliJetContainer::kChargedJet, AliJetContainer::ERecoScheme_t rscheme=AliJetContainer::pt_scheme, Bool_t histo=kTRUE, TString suffix="")
Create an instance of this class and add it to the analysis manager.
TH2 * fHistRhoVsNcluster
!rho vs. no. of clusters
std::map< std::string, TH2 * > fHistNjetVsNtrack
!no. of jets vs. no. of tracks
TH2 * fHistRhoVsLeadTrackPt
!rho vs. leading track pt
Base class for a task that studies the UE.
Definition: External.C:220
TH2 * fHistNclusterVsCent
!no. of cluster vs. centrality
TH2 * fHistRhoVsNtrack
!rho vs. no. of tracks
TF1 * fRhoFunction
pre-computed rho as a function of centrality
Declaration of class AliAnalysisTaskJetUE.
TH2 * fHistRhoScaledVsNtrack
!rhoscaled vs. no. of tracks
virtual void CalculateRho()
Calculates the average background using a given parametrization as a function of centrality.
bool Bool_t
Definition: External.C:53
AliRhoParameter * fOutRhoScaled
!output scaled rho object
Bool_t FillHistograms()
Fill histograms.
AliRhoParameter * fOutRho
!output rho object
std::map< std::string, TH2 * > fHistNjetVsCent
!no. of jets vs. centrality
TH2 * fHistLeadTrackPtVsCent
!leading track pt vs. centrality
void UserCreateOutputObjects()
Creating user output.