AliPhysics  d565ceb (d565ceb)
AliAnalysisTaskEmcalClustersRef.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 ALIANALYSISTASKEMCALCLUSTERSREF_H
28 #define ALIANALYSISTASKEMCALCLUSTERSREF_H
29 
31 #include "AliCutValueRange.h"
32 #include <TCustomBinning.h>
33 #include <TString.h>
34 
35 class TClonesArray;
36 
37 namespace EMCalTriggerPtAnalysis {
38 
57 public:
58 
67  };
68 
73 
78  AliAnalysisTaskEmcalClustersRef(const char *name);
79 
84 
91  void EnableSumw2(Bool_t doEnable) { fEnableSumw2 = doEnable; }
92 
98 
104  void SetClusterTimeRange(double mintime, double maxtime) { fClusterTimeRange.SetLimits(mintime, maxtime); }
105 
111  void SetCentralityRange(double min, double max) { fCentralityRange.SetLimits(min, max); fRequestCentrality = true; }
112 
119 
124  void SetBunchCrossingIndex(Int_t bunchCrossingIndex) { fBunchCrossingIndex = bunchCrossingIndex; };
125 
131 
138  static AliAnalysisTaskEmcalClustersRef *AddTaskEmcalClustersRef(const TString &nClusters = "usedefault", const TString &suffix = "");
139 
145  static AliAnalysisTaskEmcalClustersRef *AddTaskEmcalClustersRefDefault(const TString &nClusters = "usedefault");
146 
147 protected:
148 
152  virtual void CreateUserObjects() {}
153 
157  virtual void CreateUserHistos();
158 
163  virtual bool IsUserEventSelected();
164 
171  virtual bool Run();
172 
181  virtual void UserFillHistosAfterEventSelection();
182 
188  void GetPatchBoundaries(TObject *o, Double_t *boundaries) const;
189 
190  void FillClusterHistograms(const TString &triggerclass, double energy, double transversenergy, double eta, double phi, double clustertime, int ncell, TList *triggerpatches);
191 
200  void FindPatchesForTrigger(TString triggerclass, const TClonesArray * triggerpatches, TList &foundpatches) const;
201 
209  Bool_t CorrelateToTrigger(Double_t etaclust, Double_t phiclust, TList *triggerpatches) const;
210 
211 
217 
222 
223 private:
224 
225  class EnergyBinning : public TCustomBinning {
226  public:
227  EnergyBinning();
228  virtual ~EnergyBinning() {}
229  };
230 
231  int CountTracklets(double etamin, double etamax, double phimin, double phimax);
232  int CountEmcalClusters(double ecut);
233  int GetEMCALCellOccupancy(double ecut);
234 
237 
239  ClassDef(AliAnalysisTaskEmcalClustersRef, 1);
241 };
242 
243 } /* namespace EMCalTriggerPtAnalysis */
244 
245 #endif /* ALIANALYSISTASKEMCALCLUSTERSREF_H */
AliCutValueRange< double > fClusterTimeRange
Selected range on cluster time.
void SetEnergyDefinition(EnergyDefinition_t edef)
Define type of energy used in the monitoring histograms.
void GetPatchBoundaries(TObject *o, Double_t *boundaries) const
Get the boundaries of the trigger patch.
double Double_t
Definition: External.C:58
Bool_t CorrelateToTrigger(Double_t etaclust, Double_t phiclust, TList *triggerpatches) const
Check whether cluster is inside a trigger patch which has fired the trigger.
AliAnalysisTaskEmcalClustersRef & operator=(const AliAnalysisTaskEmcalClustersRef &)
void SetFillMultiplicityHistograms(Bool_t doFill)
Switch for filling multiplicity correlation histograms.
energy
Definition: HFPtSpectrum.C:44
char Char_t
Definition: External.C:18
virtual bool IsUserEventSelected()
User event selection: Select event in maching centrality range (if requested)
Simple monitoring task for cluster-related quantities in EMCAL-triggered events.
Bool_t fRequestCentrality
Switch on request for centrality range.
virtual void CreateUserObjects()
Task has no user-defined objects.
void SetBunchCrossingIndex(Int_t bunchCrossingIndex)
Select events only from certain bunch crossings.
void SetClusterTimeRange(double mintime, double maxtime)
Define cut on the time of the leading cell in the cluster.
Bool_t fDoFillMultiplicityHistograms
Swich for multiplcity histograms.
const Double_t etamin
void SetCentralityRange(double min, double max)
Define centrality range used to select.
int Int_t
Definition: External.C:63
Helper class creating user defined custom binning.
static AliAnalysisTaskEmcalClustersRef * AddTaskEmcalClustersRef(const TString &nClusters="usedefault", const TString &suffix="")
Preconfigure task so that it can be used in subwagons.
EnergyDefinition_t
Type of the energy used in the monitoring histograms.
int CountTracklets(double etamin, double etamax, double phimin, double phimax)
TString fCentralityEstimator
Centrality estimator (default: V0M for PbPb)
static AliAnalysisTaskEmcalClustersRef * AddTaskEmcalClustersRefDefault(const TString &nClusters="usedefault")
Preconfigure task and add it to the analysis manager.
Analysis of high- tracks in triggered events.
AliCutValueRange< double > fCentralityRange
Selected centrality range.
const Double_t etamax
EnergyDefinition_t fEnergyDefinition
Energy definition used for a given cluster.
bool Bool_t
Definition: External.C:53
virtual void CreateUserHistos()
Creating histograms for the distributions monitored by the task.
void FillClusterHistograms(const TString &triggerclass, double energy, double transversenergy, double eta, double phi, double clustertime, int ncell, TList *triggerpatches)
const Double_t phimin
void FindPatchesForTrigger(TString triggerclass, const TClonesArray *triggerpatches, TList &foundpatches) const