AliPhysics  608b256 (608b256)
AliAnalysisTaskEmcalTriggerBase.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKEMCALTRIGGERBASE_H
2 #define ALIANALYSISTASKEMCALTRIGGERBASE_H
3 /* Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 #include <TString.h>
7 #include <string>
8 #include <vector>
9 
10 #include "AliAnalysisTaskEmcal.h"
11 #include "AliCutValueRange.h"
13 
14 class TClonesArray;
15 class THistManager;
16 class AliOADBContainer;
17 
18 namespace PWG { namespace EMCAL { class AliEmcalTriggerDecisionContainer; } }
19 
20 namespace EMCalTriggerPtAnalysis {
21 
62 public:
63 
68 
76  AliAnalysisTaskEmcalTriggerBase(const char *name);
77 
82 
92  void EnableDCALTriggers(Bool_t doEnable) { fEnableDCALTriggers = doEnable; }
93 
98  void EnableT0Triggers(Bool_t doEnable) { fEnableT0Triggers = doEnable; }
99 
104  void EnableVZEROTriggers(Bool_t doEnable) { fEnableV0Triggers = doEnable; }
105 
114  void EnableNoINTTriggers(Bool_t doEnable) { fEnableNoINTTriggers = doEnable; }
115 
120  void EnableCentralityTriggers(Bool_t doEnable) { fEnableCentralityTriggers = doEnable; }
121 
130  void SetSelectCentralityTriggers2018(Bool_t doSelect) { fSelectCentralityTriggers2018 = doSelect; }
131 
143  void SetDownscaleOADB(TString oadbname) { fNameDownscaleOADB = oadbname; }
144 
149  void SetApplyDownscaleCorrectionFromOCDB(Bool_t doApply) { fUseDownscaleCorrectionFormOCDB = doApply; }
150 
160  void SetOfflineTriggerSelection(AliEmcalTriggerOfflineSelection *sel) { fTriggerSelection = sel; }
161 
170  AliEmcalTriggerOfflineSelection *GetOfflineTriggerSelection() const { return fTriggerSelection; }
171 
176  void SetApplyVertexCuts(bool doUse) { fApplyVertexCuts = doUse; }
177 
183  void SetVertexCut(double zmin, double zmax) { fVertexCut.SetLimits(zmin, zmax); }
184 
191  void SetUseSPDVertex(bool doUse) { fUseSPDVertex = doUse; }
192 
201  void SetUseTriggerBits(Bool_t doUse) { fUseTriggerBits = doUse; }
202 
211  void SetRequireBunchCrossing(Bool_t doRequire) { fRequireBunchCrossing = doRequire; }
212 
219  void SetRequireAnalysisUtils(Bool_t doRequire) { fRequireAnalysisUtils = doRequire; }
220 
228  void SetExclusiveMinBias(Bool_t exclusivemb) { fExclusiveMinBias = exclusivemb; SetCaloTriggerPatchInfoName(""); }
229 
235  void SetUseTriggerSelectionContainer(Bool_t doUse) { fUseTriggerSelectionContainer = doUse; }
236 
242  void SetNameTriggerSelectionContainer(TString &nameCont) { fNameTriggerSelectionContainer = nameCont;}
243 
244 protected:
245 
254  virtual void UserCreateOutputObjects();
255 
265  virtual bool IsEventSelected();
266 
272  virtual bool IsUserEventSelected() { return true; }
273 
279  virtual void CreateUserHistos() = 0;
280 
285  virtual void CreateUserObjects() = 0;
286 
293  virtual void ExecOnce();
294 
302  virtual void RunChanged(Int_t runnuber);
303 
309 
315 
323  std::vector<TString> GetSupportedTriggers(Bool_t useExclusiveTriggers = true) const;
324 
333  Double_t GetTriggerWeight(const TString &triggerclass) const;
334 
342  void TriggerSelection();
343 
356  bool MatchTriggerFromPattern(const std::string &pattern, const std::string &triggerclass) const;
357 
368  bool MatchTriggerFromContainer(const std::string &pattern, const PWG::EMCAL::AliEmcalTriggerDecisionContainer *trgcont) const;
369 
375  void SetClusterContainer(TString clustercontname) { fNameClusterContainer = clustercontname; }
376 
380  void PrepareDownscaleFactorsFormOCDB();
381 
382 
384 
389  std::vector<TString> fSelectedTriggers;
391 
396 
398  AliOADBContainer *fDownscaleOADB;
401 
410 
411 private:
414 };
415 
416 } /* namespace EMCalTriggerPtAnalysis */
417 
418 #endif /* ALIANALYSISTASKEMCALTRIGGERBASE_H */
std::vector< TString > fSelectedTriggers
! Triggers selected for given event
void EnableNoINTTriggers(Bool_t doEnable)
Enable EMCAL triggers without coincidence with INT triggers.
double Double_t
Definition: External.C:58
void EnableT0Triggers(Bool_t doEnable)
Enable T0-based (INT8, EMC8, DMC8) trigger suite (Default: Off)
Base task in the EMCAL framework.
void EnableDCALTriggers(Bool_t doEnable)
Enable / Disable histograms for the DCAL triggers.
void EnableCentralityTriggers(Bool_t doEnable)
Enable centrality (CENT/SEMICENT) triggers (only relevant for Pb-Pb)
Bool_t fEnableV0Triggers
Enable VZERO-based triggers (default)
Bool_t fSelectCentralityTriggers2018
Select centrality triggers 2018 based on trigger string (missing support by physics selection yet) ...
Bool_t fEnableNoINTTriggers
Process EMCAL triggers without coincidence with INT triggers - exotic case - default off...
AliEmcalTriggerOfflineSelection * fTriggerSelection
Offline trigger selection.
void SetDownscaleOADB(TString oadbname)
Set the name of the OADB container with the downscale factors.
Helper class selecting events on the presence of a trigger patch for the given type above threshold...
void SetRequireBunchCrossing(Bool_t doRequire)
Defining whether to require bunch crossing events.
void SetUseTriggerSelectionContainer(Bool_t doUse)
Use trigger selection container in addition to trigger string.
Bool_t fEnableDCALTriggers
Enable / Disable event selection for DCAL trigger classes.
void SetOfflineTriggerSelection(AliEmcalTriggerOfflineSelection *sel)
Set an offline trigger selection.
Namespace for EMCAL framework classes and task.
Bool_t fRequireAnalysisUtils
Switch whether to require event selection in AliAnalysisUtils.
void SetSelectCentralityTriggers2018(Bool_t doSelect)
Switch on selection of centrality triggers for PbPb 2018.
Bool_t fRequireBunchCrossing
Require bunch-bunch events (tag -B- in trigger string)
AliEmcalTriggerOfflineSelection * GetOfflineTriggerSelection() const
Providing access to the offline trigger selection.
TString fNameClusterContainer
Name of the cluster container in the event.
int Int_t
Definition: External.C:63
TString fNameTriggerSelectionContainer
Name of the trigger selection container.
const Double_t zmin
TString fNameDownscaleOADB
Name of the downscale OADB container.
Bool_t fEnableT0Triggers
Enable triggers depending on T0 (INT8, EMC8, EMC8EGA, EMC8EJE) - default off.
Namespace for PWG framework classes.
void SetUseTriggerBits(Bool_t doUse)
Defining whether to require trigger bits.
Bool_t fEnableCentralityTriggers
Enable central / semi-central trigger.
Bool_t fUseTriggerBits
Switch whether using trigger bits (relies on physics selection)
void SetExclusiveMinBias(Bool_t exclusivemb)
Run event loop only on min. bias events.
void SetApplyDownscaleCorrectionFromOCDB(Bool_t doApply)
Load the downscale factors run-by-run from the OCDB.
AliOADBContainer * fDownscaleOADB
! Container with downscale factors for different triggers
Analysis of high- tracks in triggered events.
Bool_t fUseSPDVertex
Use SPD vertex (for productions without TPC)
Container class for histograms.
Definition: THistManager.h:99
const Double_t zmax
AliCutValueRange< double > fVertexCut
Cut on the z-position of the primary vertex.
bool Bool_t
Definition: External.C:53
void EnableVZEROTriggers(Bool_t doEnable)
Enable VZERO-based (INT7, EMC7, DMC7) trigger suite (Default: On)
void SetNameTriggerSelectionContainer(TString &nameCont)
Set the name of the trigger decision container.
Bool_t fUseTriggerSelectionContainer
Use trigger decision in trigger selection container.
void SetRequireAnalysisUtils(Bool_t doRequire)
Define whether cuts in AliAnalysisUtils are used in the event selection.
void SetVertexCut(double zmin, double zmax)
Set z-range of the primary vertex which is selected.