AliPhysics  2aaea23 (2aaea23)
AliAnalysisTaskEmcalPatchesRef.h
Go to the documentation of this file.
1 /************************************************************************************
2  * Copyright (C) 2015, 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 ALIANALYSISTASKEMCALPATCHESREF_H
28 #define ALIANALYSISTASKEMCALPATCHESREF_H
29 
30 #include <string>
31 #include <vector>
33 #include "AliCutValueRange.h"
34 #include <TCustomBinning.h>
35 #include <TString.h>
36 
37 class AliOADBContainer;
38 class AliEMCALTriggerPatchInfo;
39 class THistManager;
40 class TObjArray;
41 
42 namespace EMCalTriggerPtAnalysis {
43 
44 class AliEmcalTriggerOfflineSelection;
45 
54 public:
59 
64  AliAnalysisTaskEmcalPatchesRef(const char *name);
65 
70 
80  void EnableSumw2(Bool_t doEnable) { fEnableSumw2 = doEnable; }
81 
90  void SetCentralityRange(double min, double max) { fCentralityRange.SetLimits(min,max); fRequestCentrality = true; }
91 
102  void SetUseRecalcPatches(Bool_t doUse = kTRUE) { fUseRecalcPatches = doUse; }
103 
104 protected:
105 
109  virtual void CreateUserObjects() {}
110 
118  virtual void CreateUserHistos();
119 
128  virtual bool IsUserEventSelected();
129 
139  virtual bool Run();
140 
151  virtual void UserFillHistosAfterEventSelection();
152 
159  void GetPatchBoundaries(const AliEMCALTriggerPatchInfo *patch, Double_t *boundaries) const;
160 
166  bool SelectSingleShowerPatch(const AliEMCALTriggerPatchInfo *patch) const;
167 
173  bool SelectJetPatch(const AliEMCALTriggerPatchInfo *patch) const;
174 
191  void FillPatchHistograms(TString triggerclass, TString patchname, double energy, double transverseenergy, double smearedenergy, double eta, double phi, int col, int row);
192 
198 
199 private:
200 
205  class EnergyBinning : public TCustomBinning {
206  public:
210  EnergyBinning();
211 
215  virtual ~EnergyBinning() {}
216  };
217 
220 
222  ClassDef(AliAnalysisTaskEmcalPatchesRef, 1);
224 };
225 
226 } /* namespace EMCalTriggerPtAnalysis */
227 
228 #endif /* ALIANALYSISTASKEMCALPATCHESREF_H */
virtual bool IsUserEventSelected()
Apply additional event selection requested by the user.
double Double_t
Definition: External.C:58
void FillPatchHistograms(TString triggerclass, TString patchname, double energy, double transverseenergy, double smearedenergy, double eta, double phi, int col, int row)
Filling patch related histogram.
Bool_t fEnableSumw2
Enable sumw2 during histogram creation.
energy
Definition: HFPtSpectrum.C:44
void SetUseRecalcPatches(Bool_t doUse=kTRUE)
Switch for recalc patches.
virtual void UserFillHistosAfterEventSelection()
Fill event-based histograms.
Bool_t fRequestCentrality
Switch for request of centrality selection.
AliAnalysisTaskEmcalPatchesRef & operator=(const AliAnalysisTaskEmcalPatchesRef &)
bool SelectSingleShowerPatch(const AliEMCALTriggerPatchInfo *patch) const
Selecting offline/recalc simple single shower (gamma or L0) patches.
Helper class creating user defined custom binning.
void EnableSumw2(Bool_t doEnable)
Enable Sumw2 when creating the histograms.
bool SelectJetPatch(const AliEMCALTriggerPatchInfo *patch) const
Selecting offline/recalc simple jet patches.
Analysis of trigger patches in min. bias and triggered events.
Analysis of high- tracks in triggered events.
AliCutValueRange< double > fCentralityRange
Range of accepted event centralities.
Container class for histograms.
Definition: THistManager.h:99
bool Bool_t
Definition: External.C:53
void SetCentralityRange(double min, double max)
Set centrality selection.
Bool_t fUseRecalcPatches
Switch between offline (FEE) and recalc (L1) patches.
void GetPatchBoundaries(const AliEMCALTriggerPatchInfo *patch, Double_t *boundaries) const