AliPhysics  323987d (323987d)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
70  AliAnalysisTaskEmcalTriggerBase(const char *name);
71 
76 
83  void EnableDCALTriggers(Bool_t doEnable) { fEnableDCALTriggers = doEnable; }
84 
94  void SetDownscaleOADB(TString oadbname) { fNameDownscaleOADB = oadbname; }
95 
101  void SetExcludeNoiseEvents(Bool_t doExclude = true) { fRejectNoiseEvents = doExclude; }
102 
108  void SetSelectNoiseEvents(Bool_t doSelect = true) { fSelectNoiseEvents = doSelect; }
109 
114  void AddMaskedFastor(int fastorID) { fMaskedFastors.push_back(fastorID); }
115 
120  void SetMaskedFastorOADB(TString oadbname) { fNameMaskedFastorOADB = oadbname; }
121 
128 
134  void SetVertexCut(double zmin, double zmax) { fVertexCut.SetLimits(zmin, zmax); }
135 
141 
147  void SetOnlineTriggerThreshold(const TString &triggerclass, Int_t threshold);
148 
155  void SetUseTriggerBits(Bool_t doUse) { fUseTriggerBits = doUse; }
156 
163  void SetRequireBunchCrossing(Bool_t doRequire) { fRequireBunchCrossing = doRequire; }
164 
170  void SetRequireAnalysisUtils(Bool_t doRequire) { fRequireAnalysisUtils = doRequire; }
171 
179  void SetTriggerAcceptanceOADB(const TString &nameAcceptanceOADB) { fNameAcceptanceOADB = nameAcceptanceOADB; }
180 
181 protected:
188  virtual void UserCreateOutputObjects();
189 
199  virtual bool IsEventSelected();
200 
206  virtual bool IsUserEventSelected() { return true; }
207 
213  virtual void CreateUserHistos() = 0;
214 
219  virtual void CreateUserObjects() = 0;
220 
227  virtual void ExecOnce();
228 
236  virtual void RunChanged(Int_t runnuber);
237 
243 
249 
256  std::vector<TString> GetSupportedTriggers();
257 
266  Double_t GetTriggerWeight(const TString &triggerclass) const;
267 
273  TString GetFiredTriggerClassesFromPatches(const TClonesArray* triggerpatches) const;
274 
282  void TriggerSelection();
283 
292 
298  void SetClusterContainer(TString clustercontname) { fNameClusterContainer = clustercontname; }
299 
305  bool OnlineThresholdsInitialized() const;
306 
313 
319  Int_t GetOnlineTriggerThresholdByName(const TString &name) const;
320 
328  Bool_t SelectFiredPatch(const TString &triggerclass, Int_t adc) const;
329 
330 
332 
337  std::vector<TString> fSelectedTriggers;
339 
342 
344  AliOADBContainer *fDownscaleOADB;
347  AliOADBContainer *fMaskedFastorOADB;
348  std::vector<int> fMaskedFastors;
351 
355 
356 private:
359 };
360 
361 } /* namespace EMCalTriggerPtAnalysis */
362 
363 #endif /* ALIANALYSISTASKEMCALTRIGGERBASE_H */
std::vector< TString > fSelectedTriggers
! Triggers selected for given event
double Double_t
Definition: External.C:58
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)
TString GetFiredTriggerClassesFromPatches(const TClonesArray *triggerpatches) const
AliEmcalTriggerOfflineSelection * fTriggerSelection
Offline trigger selection.
AliAnalysisTaskEmcalTriggerBase & operator=(const AliAnalysisTaskEmcalTriggerBase &)
Helper class selecting events on the presence of a trigger patch for the given type above threshold...
TObjArray fOnlineTriggerThresholds
Trigger thresholds applied at online level.
Bool_t fEnableDCALTriggers
Enable / Disable event selection for DCAL trigger classes.
void SetOfflineTriggerSelection(AliEmcalTriggerOfflineSelection *sel)
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
Bool_t fRequireBunchCrossing
Require bunch-bunch events (tag -B- in trigger string)
TString fNameClusterContainer
Name of the cluster container in the event.
int Int_t
Definition: External.C:63
EmcalTriggerClass
Definition of the various supported trigger types.
const Double_t zmin
TString fNameDownscaleOADB
Name of the downscale OADB container.
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.
Bool_t fUseTriggerBits
Switch whether using trigger bits (relies on physics selection)
Bool_t fTriggerStringFromPatches
Do rebuild the trigger string from trigger patches.
AliOADBContainer * fDownscaleOADB
! Container with downscale factors for different triggers
Container class for histograms.
Definition: THistManager.h:43
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