AliPhysics  6cf2591 (6cf2591)
 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 
73  AliAnalysisTaskEmcalTriggerBase(const char *name);
74 
79 
86  void EnableDCALTriggers(Bool_t doEnable) { fEnableDCALTriggers = doEnable; }
87 
97  void SetDownscaleOADB(TString oadbname) { fNameDownscaleOADB = oadbname; }
98 
104  void SetExcludeNoiseEvents(Bool_t doExclude = true) { fRejectNoiseEvents = doExclude; }
105 
111  void SetSelectNoiseEvents(Bool_t doSelect = true) { fSelectNoiseEvents = doSelect; }
112 
117  void AddMaskedFastor(int fastorID) { fMaskedFastors.push_back(fastorID); }
118 
123  void SetMaskedFastorOADB(TString oadbname) { fNameMaskedFastorOADB = oadbname; }
124 
135 
145 
151  void SetVertexCut(double zmin, double zmax) { fVertexCut.SetLimits(zmin, zmax); }
152 
158 
164  void SetOnlineTriggerThreshold(const TString &triggerclass, Int_t threshold);
165 
172  void SetUseTriggerBits(Bool_t doUse) { fUseTriggerBits = doUse; }
173 
180  void SetRequireBunchCrossing(Bool_t doRequire) { fRequireBunchCrossing = doRequire; }
181 
187  void SetRequireAnalysisUtils(Bool_t doRequire) { fRequireAnalysisUtils = doRequire; }
188 
196  void SetTriggerAcceptanceOADB(const TString &nameAcceptanceOADB) { fNameAcceptanceOADB = nameAcceptanceOADB; }
197 
203  void SetExclusiveMinBias(Bool_t exclusivemb) { fExclusiveMinBias = exclusivemb; }
204 
205 protected:
206 
213  virtual void UserCreateOutputObjects();
214 
224  virtual bool IsEventSelected();
225 
231  virtual bool IsUserEventSelected() { return true; }
232 
238  virtual void CreateUserHistos() = 0;
239 
244  virtual void CreateUserObjects() = 0;
245 
252  virtual void ExecOnce();
253 
261  virtual void RunChanged(Int_t runnuber);
262 
268 
274 
281  std::vector<TString> GetSupportedTriggers();
282 
291  Double_t GetTriggerWeight(const TString &triggerclass) const;
292 
298  TString GetFiredTriggerClassesFromPatches(const TClonesArray* triggerpatches) const;
299 
307  void TriggerSelection();
308 
317 
323  void SetClusterContainer(TString clustercontname) { fNameClusterContainer = clustercontname; }
324 
330  bool OnlineThresholdsInitialized() const;
331 
338 
344  Int_t GetOnlineTriggerThresholdByName(const TString &name) const;
345 
353  Bool_t SelectFiredPatch(const TString &triggerclass, Int_t adc) const;
354 
355 
357 
362  std::vector<TString> fSelectedTriggers;
364 
367 
369  AliOADBContainer *fDownscaleOADB;
372  AliOADBContainer *fMaskedFastorOADB;
373  std::vector<int> fMaskedFastors;
376 
381 
382 private:
385 };
386 
387 } /* namespace EMCalTriggerPtAnalysis */
388 
389 #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)
Set an offline trigger selection.
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)
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
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