AliPhysics  9b6b435 (9b6b435)
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 
159 
169 
177  void AddRequiredTriggerOverlap(const char *trigger);
178 
187  void AddExcludedTriggerOverlap(const char *trigger);
188 
195  static AliAnalysisTaskEmcalClustersRef *AddTaskEmcalClustersRef(const TString &nClusters = "usedefault", const TString &suffix = "");
196 
202  static AliAnalysisTaskEmcalClustersRef *AddTaskEmcalClustersRefDefault(const TString &nClusters = "usedefault");
203 
204 protected:
205 
209  virtual void CreateUserObjects() {}
210 
214  virtual void CreateUserHistos();
215 
220  virtual bool IsUserEventSelected();
221 
228  virtual bool Run();
229 
238  virtual void UserFillHistosAfterEventSelection();
239 
245  void GetPatchBoundaries(AliEMCALTriggerPatchInfo &o, Double_t *boundaries) const;
246 
247  void FillClusterHistograms(const TString &triggerclass, double energy, double eta, double phi, double clustertime, int ncell, int trgcluster, const TList *triggerpatches, int energycomp);
248 
256  std::vector<AliEMCALTriggerPatchInfo *> CorrelateToTrigger(Double_t etaclust, Double_t phiclust, const TList &triggerpatches) const;
257 
258 
264 
272  std::vector<TriggerCluster_t> fTriggerClusters;
275 
276 private:
277 
278  class EnergyBinning : public TCustomBinning {
279  public:
280  EnergyBinning();
281  virtual ~EnergyBinning() {}
282  };
283 
284  int CountTracklets(double etamin, double etamax, double phimin, double phimax);
285  int CountEmcalClusters(double ecut);
286  int GetEMCALCellOccupancy(double ecut);
287 
290 
292  ClassDef(AliAnalysisTaskEmcalClustersRef, 1);
294 };
295 
296 } /* namespace EMCalTriggerPtAnalysis */
297 
298 #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
void FillClusterHistograms(const TString &triggerclass, double energy, double eta, double phi, double clustertime, int ncell, int trgcluster, const TList *triggerpatches, int energycomp)
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 SetFillTriggerClusters(Bool_t doFill)
Set filling trigger cluster dimension.
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