AliPhysics  7f1bdba (7f1bdba)
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 
83  };
84 
89 
94  AliAnalysisTaskEmcalClustersRef(const char *name);
95 
100 
107  void EnableSumw2(Bool_t doEnable) { fEnableSumw2 = doEnable; }
108 
114 
120  void SetClusterTimeRange(double mintime, double maxtime) { fClusterTimeRange.SetLimits(mintime, maxtime); }
121 
127  void SetCentralityRange(double min, double max) { fCentralityRange.SetLimits(min, max); fRequestCentrality = true; }
128 
135 
140  void SetBunchCrossingIndex(Int_t bunchCrossingIndex) { fBunchCrossingIndex = bunchCrossingIndex; };
141 
147 
153 
163 
171  void AddRequiredTriggerOverlap(const char *trigger);
172 
181  void AddExcludedTriggerOverlap(const char *trigger);
182 
189  static AliAnalysisTaskEmcalClustersRef *AddTaskEmcalClustersRef(const TString &nClusters = "usedefault", const TString &suffix = "");
190 
196  static AliAnalysisTaskEmcalClustersRef *AddTaskEmcalClustersRefDefault(const TString &nClusters = "usedefault");
197 
198 protected:
199 
203  virtual void CreateUserObjects() {}
204 
208  virtual void CreateUserHistos();
209 
214  virtual bool IsUserEventSelected();
215 
222  virtual bool Run();
223 
232  virtual void UserFillHistosAfterEventSelection();
233 
239  void GetPatchBoundaries(AliEMCALTriggerPatchInfo &o, Double_t *boundaries) const;
240 
241  void FillClusterHistograms(const TString &triggerclass, double energy, double transversenergy, double eta, double phi, double clustertime, int ncell, int trgcluster, const TList *triggerpatches, int energycomp);
242 
250  std::vector<AliEMCALTriggerPatchInfo *> CorrelateToTrigger(Double_t etaclust, Double_t phiclust, const TList &triggerpatches) const;
251 
252 
258 
265  std::vector<TriggerCluster_t> fTriggerClusters;
268 
269 private:
270 
271  class EnergyBinning : public TCustomBinning {
272  public:
273  EnergyBinning();
274  virtual ~EnergyBinning() {}
275  };
276 
277  int CountTracklets(double etamin, double etamax, double phimin, double phimax);
278  int CountEmcalClusters(double ecut);
279  int GetEMCALCellOccupancy(double ecut);
280 
283 
285  ClassDef(AliAnalysisTaskEmcalClustersRef, 1);
287 };
288 
289 } /* namespace EMCalTriggerPtAnalysis */
290 
291 #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 SetUsedFiredClusters(Bool_t doUse)
Switch on histograms for fired clusters.
double Double_t
Definition: External.C:58
void SetUseExclusiveTriggers(Bool_t doUse)
Switch on/off exclusive triggers.
TObjArray fRequiredOverlaps
Add option to require overlap with certain triggers.
void AddExcludedTriggerOverlap(const char *trigger)
Add trigger for which overlap is excluded.
AliAnalysisTaskEmcalClustersRef & operator=(const AliAnalysisTaskEmcalClustersRef &)
void SetFillMultiplicityHistograms(Bool_t doFill)
Switch for filling multiplicity correlation histograms.
energy
Definition: HFPtSpectrum.C:44
TObjArray fExcludedOverlaps
Add option to exclude overlap with certain triggers.
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.
void AddRequiredTriggerOverlap(const char *trigger)
Add trigger for which overlap is required.
Bool_t fDoFillMultiplicityHistograms
Swich for multiplcity histograms.
std::vector< TriggerCluster_t > fTriggerClusters
! Detected trigger clusters for event
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.
void FillClusterHistograms(const TString &triggerclass, double energy, double transversenergy, double eta, double phi, double clustertime, int ncell, int trgcluster, const TList *triggerpatches, int energycomp)
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)
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.
Bool_t fUseFiredTriggers
Study clusters connected with patches.
const Double_t phimin