AliPhysics  d20dab4 (d20dab4)
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 <vector>
8 
9 #include "AliAnalysisTaskEmcal.h"
10 #include "AliCutValueRange.h"
12 
13 class TClonesArray;
14 class THistManager;
15 class AliOADBContainer;
16 
17 namespace EMCalTriggerPtAnalysis {
18 
59 public:
60 
65 
73  AliAnalysisTaskEmcalTriggerBase(const char *name);
74 
79 
89  void EnableDCALTriggers(Bool_t doEnable) { fEnableDCALTriggers = doEnable; }
90 
91  void EnableT0Triggers(Bool_t doEnable) { fEnableT0Triggers = doEnable; }
92 
94 
106  void SetDownscaleOADB(TString oadbname) { fNameDownscaleOADB = oadbname; }
107 
113 
119  void SetExcludeNoiseEvents(Bool_t doExclude = true) { fRejectNoiseEvents = doExclude; }
120 
126  void SetSelectNoiseEvents(Bool_t doSelect = true) { fSelectNoiseEvents = doSelect; }
127 
132  void SetRequireL0ForL1(Bool_t doRequire = true) { fRequireL0forL1 = doRequire; }
133 
138  void AddMaskedFastor(int fastorID) { fMaskedFastors.push_back(fastorID); }
139 
144  void SetMaskedFastorOADB(TString oadbname) { fNameMaskedFastorOADB = oadbname; }
145 
156 
166 
172  void SetVertexCut(double zmin, double zmax) { fVertexCut.SetLimits(zmin, zmax); }
173 
179 
185  void SetOnlineTriggerThreshold(const TString &triggerclass, Int_t threshold);
186 
195  void SetUseTriggerBits(Bool_t doUse) { fUseTriggerBits = doUse; }
196 
205  void SetRequireBunchCrossing(Bool_t doRequire) { fRequireBunchCrossing = doRequire; }
206 
213  void SetRequireAnalysisUtils(Bool_t doRequire) { fRequireAnalysisUtils = doRequire; }
214 
222  void SetTriggerAcceptanceOADB(const TString &nameAcceptanceOADB) { fNameAcceptanceOADB = nameAcceptanceOADB; }
223 
232 
239 
246 
247 protected:
248 
257  virtual void UserCreateOutputObjects();
258 
268  virtual bool IsEventSelected();
269 
275  virtual bool IsUserEventSelected() { return true; }
276 
282  virtual void CreateUserHistos() = 0;
283 
288  virtual void CreateUserObjects() = 0;
289 
296  virtual void ExecOnce();
297 
305  virtual void RunChanged(Int_t runnuber);
306 
312 
318 
326  std::vector<TString> GetSupportedTriggers(Bool_t useExclusiveTriggers = true) const;
327 
336  Double_t GetTriggerWeight(const TString &triggerclass) const;
337 
343  TString GetFiredTriggerClassesFromPatches(const TClonesArray* triggerpatches) const;
344 
352  void TriggerSelection();
353 
362 
368  void SetClusterContainer(TString clustercontname) { fNameClusterContainer = clustercontname; }
369 
375  bool OnlineThresholdsInitialized() const;
376 
383 
389  Int_t GetOnlineTriggerThresholdByName(const TString &name) const;
390 
398  Bool_t SelectFiredPatch(const TString &triggerclass, Int_t adc) const;
399 
404 
405 
407 
413  std::vector<TString> fSelectedTriggers;
415 
418 
420  AliOADBContainer *fDownscaleOADB;
423  AliOADBContainer *fMaskedFastorOADB;
424  std::vector<int> fMaskedFastors;
428 
437 
438 private:
441 };
442 
443 } /* namespace EMCalTriggerPtAnalysis */
444 
445 #endif /* ALIANALYSISTASKEMCALTRIGGERBASE_H */
std::vector< TString > fSelectedTriggers
! Triggers selected for given event
double Double_t
Definition: External.C:58
void SetExcludeNoiseEvents(Bool_t doExclude=true)
If true then noise events (events without recalc trigger patch above threshold) are excluded from the...
Int_t GetOnlineTriggerThresholdByIndex(AliEmcalTriggerOfflineSelection::EmcalTriggerClass trg) const
Bool_t fRejectNoiseEvents
Reject events triggered by noisy fastors.
Base task in the EMCAL framework.
void SetOnlineTriggerThreshold(const TString &triggerclass, Int_t threshold)
Setting trigger threshold for online trigger selection.
void EnableDCALTriggers(Bool_t doEnable)
Enable / Disable histograms for the DCAL triggers.
TString GetFiredTriggerClassesFromPatches(const TClonesArray *triggerpatches) const
AliEmcalTriggerOfflineSelection * fTriggerSelection
Offline trigger selection.
AliAnalysisTaskEmcalTriggerBase & operator=(const AliAnalysisTaskEmcalTriggerBase &)
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 PrepareDownscaleFactorsFormOCDB()
Read the downscale factors from the OCDB.
void SetRequireBunchCrossing(Bool_t doRequire)
Defining whether to require bunch crossing events.
TObjArray fOnlineTriggerThresholds
Trigger thresholds applied at online level.
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.
void SetCaloTriggerPatchInfoName(const char *n)
TString fNameMaskedFastorOADB
Name of the masked fastor OADB container.
Bool_t fRequireAnalysisUtils
Switch whether to require event selection in AliAnalysisUtils.
bool SelectOnlineTrigger(AliEmcalTriggerOfflineSelection::EmcalTriggerClass trigger) const
void SetRequireL0ForL1(Bool_t doRequire=true)
Specify whether L0 is needed for L1.
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.
EmcalTriggerClass
Definition of the various supported trigger types.
const Double_t zmin
TString fNameDownscaleOADB
Name of the downscale OADB container.
void UseTriggerPatches(Bool_t doUse)
Specify whether the trigger decision should be done from trigger patches.
Bool_t fEnableT0Triggers
Enable triggers depending on T0 (INT8, EMC8, EMC8EGA, EMC8EJE)
TString fNameAcceptanceOADB
Name of the OADB container with the trigger acceptance.
AliOADBContainer * fMaskedFastorOADB
! Container with masked fastors
Bool_t fSelectNoiseEvents
Explicitly select events triggered only by noisy fastors.
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)
Bool_t fTriggerStringFromPatches
Do rebuild the trigger string from trigger patches.
void SetSelectNoiseEvents(Bool_t doSelect=true)
If true then noise events (events without recalc trigger patch above threshold) are explicitly select...
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.
void AddMaskedFastor(int fastorID)
Add absolute ID of a FastOR to be masked (excluded from trigger patches)
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
Bool_t SelectFiredPatch(const TString &triggerclass, Int_t adc) const
void SetNameTriggerSelectionContainer(TString &nameCont)
Set the name of the trigger decision container.
Bool_t fUseTriggerSelectionContainer
Use trigger decision in trigger selection container.
std::vector< TString > GetSupportedTriggers(Bool_t useExclusiveTriggers=true) const
void SetRequireAnalysisUtils(Bool_t doRequire)
Define whether cuts in AliAnalysisUtils are used in the event selection.
void SetMaskedFastorOADB(TString oadbname)
Set the name of the file with the OADB container containing the masked FastORs.
void SetVertexCut(double zmin, double zmax)
Set z-range of the primary vertex which is selected.