AliPhysics  4a7363b (4a7363b)
AliAnalysisTaskEmcalVsPhos.h
Go to the documentation of this file.
1 #ifndef AliAnalysisTaskEmcalVsPhos_H
2 #define AliAnalysisTaskEmcalVsPhos_H
3 
4 /**********************************************************************************
5  * Copyright (C) 2016, Copyright Holders of the ALICE Collaboration *
6  * All rights reserved. *
7  * *
8  * Redistribution and use in source and binary forms, with or without *
9  * modification, are permitted provided that the following conditions are met: *
10  * * Redistributions of source code must retain the above copyright *
11  * notice, this list of conditions and the following disclaimer. *
12  * * Redistributions in binary form must reproduce the above copyright *
13  * notice, this list of conditions and the following disclaimer in the *
14  * documentation and/or other materials provided with the distribution. *
15  * * Neither the name of the <organization> nor the *
16  * names of its contributors may be used to endorse or promote products *
17  * derived from this software without specific prior written permission. *
18  * *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND *
20  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *
21  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
22  * DISCLAIMED. IN NO EVENT SHALL ALICE COLLABORATION BE LIABLE FOR ANY *
23  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
24  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
25  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND *
26  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
28  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
29  * *********************************************************************************/
30 
41 class AliPHOSGeometry;
42 
43 #include "THistManager.h"
44 
45 #include "AliEventCuts.h"
47 
49  public:
50 
51  enum ClusterType {
52  kNA = -1,
53  kEMCal = 0,
54  kDCal = 1,
55  kPHOS = 2
56  };
57 
59  AliAnalysisTaskEmcalVsPhos(const char *name) ;
60  virtual ~AliAnalysisTaskEmcalVsPhos() ;
61 
63 
64  // Setters
65  void SetMaxPt(Double_t d) { fMaxPt = d; }
84 
85  protected:
86  void ExecOnce() ;
88  Bool_t Run() ;
90 
91  // Analysis and plotting functions
92  void GenerateHistoBins() ;
93  void AllocateCaloHistograms() ;
95  void AllocateCellHistograms() ;
99  void FillCaloHistograms() ;
100  void FillClusterHistograms() ;
101  void FillCellHistograms() ;
102  void FillNeutralJetHistograms() ;
104  void FillEventHistograms() ;
105  void FillClusterTHnSparse(TString clustersName, Double_t eta, Double_t phi, Double_t Enonlin, Double_t Ehadcorr, Int_t hasMatchedTrack, Double_t M02, Int_t nCells, Int_t passDispersionCut, Double_t distNN, Int_t isOddEta, Int_t coneType = 0, Double_t R = 0., Double_t Econe = 0.);
106  void FillClusterTHnSparse(TString clustersName, Double_t eta, Double_t phi, Double_t Enonlin, Double_t eCellCone, Double_t eCellSM, Int_t nCellsCone, Int_t nCellsSM);
107 
108  // Utility functions
109  Double_t GetJetPt(const AliEmcalJet* jet, Double_t rho);
110  Double_t GetDeltaR(AliTLorentzVector part, Double_t etaRef, Double_t phiRef);
111  Double_t GetDeltaR(Double_t eta1, Double_t phi1, Double_t eta2, Double_t phi2);
112  Double_t GetJetType(const AliEmcalJet* jet);
113  Double_t GetFcross(const AliVCluster *cluster, AliVCaloCells *cells);
116  Double_t GetConeCellEnergy(Double_t etaRef, Double_t phiRef, Double_t R, Bool_t returnNcells = kFALSE);
117  Double_t GetSMCellEnergy(Int_t sm, Int_t clusType, Bool_t returnNcells = kFALSE);
118  Bool_t IsCellRejected(Int_t absId, Int_t cellType);
119 
120  // Analysis configuration and plotting options
137 
138  // Plotting parameters
146 
147  // Event selection
149  AliEventCuts fEventCuts;
152 
153  // Phos geometry (only needed for cluster studies)
154  AliPHOSGeometry* fPHOSGeo;
155 
156  // Hist manager
158 
159  private:
160  AliAnalysisTaskEmcalVsPhos(const AliAnalysisTaskEmcalVsPhos&) ; // not implemented
162 
164  ClassDef(AliAnalysisTaskEmcalVsPhos, 13);
166 };
167 #endif
double Double_t
Definition: External.C:58
Bool_t fPlotEvenOddEta
Set whether to add axis to THnSparse separating even/odd eta columns.
Bool_t fPlotClustersInJets
Set whether to plot histogram of clusters within jets.
Double_t GetSMCellEnergy(Int_t sm, Int_t clusType, Bool_t returnNcells=kFALSE)
Double_t GetFcross(const AliVCluster *cluster, AliVCaloCells *cells)
Int_t fNCentHistBins
! number of cent bins
Double_t * fPtHistBins
! variable pt bins
Bool_t fPlotCellHistograms
Set whether to plot cell histograms.
Bool_t fUseAliEventCuts
Flag to use AliEventCuts (otherwise AliAnalysisTaskEmcal will be used)
AliAnalysisTaskEmcalVsPhos & operator=(const AliAnalysisTaskEmcalVsPhos &)
Int_t fNM02HistBins
! number of variable M02 bins
Double_t FindNearestNeighborDistance(AliTLorentzVector cluster)
THistManager fHistManager
Histogram manager.
AliPHOSGeometry * fPHOSGeo
! phos geometry
Double_t GetConeCellEnergy(Double_t etaRef, Double_t phiRef, Double_t R, Bool_t returnNcells=kFALSE)
int Int_t
Definition: External.C:63
Bool_t fPlotStandardClusterTHnSparse
Set whether to plot "standard" axes in cluster THnSparse.
Int_t fNPtHistBins
! number of variable pt bins
float Float_t
Definition: External.C:68
Bool_t fPlotNeutralJets
Set whether to plot neutral jet histo.
Bool_t IsCellRejected(Int_t absId, Int_t cellType)
Bool_t fPlotClusterCone
Set whether to plot sum of energy surrounding cluster in THnSparse.
Bool_t fPlotFineGrainedEtaPhi
Set whether to plot fine-grained eta-phi bins in cluster THnSparse.
Bool_t fExcludeRejectedCells
Set whether to exclude cells from rejected clusters in cone/SM studies.
Double_t GetJetType(const AliEmcalJet *jet)
Bool_t fPlotCellSMDensity
Set whether to plot SM cell density when computing local density.
Bool_t fPlotClusterHistograms
Set whether to plot cluster histograms.
Bool_t fPlotEventHistograms
Set whether to plot some calo event histograms.
Bool_t fUseManualEventCuts
Flag to use manual event cuts.
TList * fEventCutList
! Output list for event cut histograms
Bool_t fPlotNearestNeighborDistribution
Set whether to plot nearest neighbor axis in cluster THnSparse.
Double_t * fM02HistBins
! variable M02 bins
Bool_t fPlotFineGrainedCentrality
Set whether to plot a more fine grained centrality binning.
Double_t GetDeltaR(AliTLorentzVector part, Double_t etaRef, Double_t phiRef)
Double_t GetConeClusterEnergy(Double_t etaRef, Double_t phiRef, Double_t R)
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
Container class for histograms.
Definition: THistManager.h:99
bool Bool_t
Definition: External.C:53
Double_t GetJetPt(const AliEmcalJet *jet, Double_t rho)
Bool_t fPlotCaloCentrality
Set whether to bin cluster THnSparse in calorimeter local density.
Bool_t fPlotClusWithoutNonLinCorr
If true, use pre-nonlincorr energy in cluster thnsparse.
Bool_t fPlotExotics
Set whether to plot exotic cluster study.
Float_t fMaxPt
Histogram pt limit.
AliEventCuts fEventCuts
event selection utility
void FillClusterTHnSparse(TString clustersName, Double_t eta, Double_t phi, Double_t Enonlin, Double_t Ehadcorr, Int_t hasMatchedTrack, Double_t M02, Int_t nCells, Int_t passDispersionCut, Double_t distNN, Int_t isOddEta, Int_t coneType=0, Double_t R=0., Double_t Econe=0.)