AliPhysics  1976924 (1976924)
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 #include <vector>
35 
36 class TClonesArray;
37 
38 namespace EMCalTriggerPtAnalysis {
39 
58 public:
59 
68  };
69 
74 
79  AliAnalysisTaskEmcalClustersRef(const char *name);
80 
85 
92  void EnableSumw2(Bool_t doEnable) { fEnableSumw2 = doEnable; }
93 
99 
105  void SetClusterTimeRange(double mintime, double maxtime) { fClusterTimeRange.SetLimits(mintime, maxtime); }
106 
112  void SetCentralityRange(double min, double max) { fCentralityRange.SetLimits(min, max); fRequestCentrality = true; }
113 
120 
125  void SetBunchCrossingIndex(Int_t bunchCrossingIndex) { fBunchCrossingIndex = bunchCrossingIndex; };
126 
132 
142 
149  static AliAnalysisTaskEmcalClustersRef *AddTaskEmcalClustersRef(const TString &nClusters = "usedefault", const TString &suffix = "");
150 
156  static AliAnalysisTaskEmcalClustersRef *AddTaskEmcalClustersRefDefault(const TString &nClusters = "usedefault");
157 
158 protected:
159 
163  virtual void CreateUserObjects() {}
164 
168  virtual void CreateUserHistos();
169 
174  virtual bool IsUserEventSelected();
175 
182  virtual bool Run();
183 
192  virtual void UserFillHistosAfterEventSelection();
193 
199  void GetPatchBoundaries(AliEMCALTriggerPatchInfo &o, Double_t *boundaries) const;
200 
201  void FillClusterHistograms(const TString &triggerclass, double energy, double transversenergy, double eta, double phi, double clustertime, int ncell, const TList *triggerpatches, int energycomp);
202 
210  std::vector<AliEMCALTriggerPatchInfo *> CorrelateToTrigger(Double_t etaclust, Double_t phiclust, const TList &triggerpatches) const;
211 
212 
218 
224 
225 private:
226 
227  class EnergyBinning : public TCustomBinning {
228  public:
229  EnergyBinning();
230  virtual ~EnergyBinning() {}
231  };
232 
233  int CountTracklets(double etamin, double etamax, double phimin, double phimax);
234  int CountEmcalClusters(double ecut);
235  int GetEMCALCellOccupancy(double ecut);
236 
239 
241  ClassDef(AliAnalysisTaskEmcalClustersRef, 1);
243 };
244 
245 } /* namespace EMCalTriggerPtAnalysis */
246 
247 #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.
double Double_t
Definition: External.C:58
void SetUseExclusiveTriggers(Bool_t doUse)
Switch on/off exclusive triggers.
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.
std::vector< AliEMCALTriggerPatchInfo * > CorrelateToTrigger(Double_t etaclust, Double_t phiclust, const TList &triggerpatches) const
Check whether cluster is inside a trigger patch which has fired the trigger.
const Double_t etamin
void SetCentralityRange(double min, double max)
Define centrality range used to select.
int Int_t
Definition: External.C:63
void FillClusterHistograms(const TString &triggerclass, double energy, double transversenergy, double eta, double phi, double clustertime, int ncell, const TList *triggerpatches, int energycomp)
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)
Bool_t fUseExclusiveTriggers
Include exclusive triggers (without lower threshold triggers)
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 GetPatchBoundaries(AliEMCALTriggerPatchInfo &o, Double_t *boundaries) const
Get the boundaries of the trigger patch.
const Double_t phimin