AliPhysics  63d3444 (63d3444)
 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 
86  void SetDownscaleOADB(TString oadbname) { fNameDownscaleOADB = oadbname; }
87 
93  void SetExcludeNoiseEvents(Bool_t doExclude = true) { fRejectNoiseEvents = doExclude; }
94 
100  void SetSelectNoiseEvents(Bool_t doSelect = true) { fSelectNoiseEvents = doSelect; }
101 
106  void AddMaskedFastor(int fastorID) { fMaskedFastors.push_back(fastorID); }
107 
112  void SetMaskedFastorOADB(TString oadbname) { fNameMaskedFastorOADB = oadbname; }
113 
120 
126  void SetVertexCut(double zmin, double zmax) { fVertexCut.SetLimits(zmin, zmax); }
127 
133 
139  void SetOnlineTriggerThreshold(const TString &triggerclass, Int_t threshold);
140 
148  void SetTriggerAcceptanceOADB(const TString &nameAcceptanceOADB) { fNameAcceptanceOADB = nameAcceptanceOADB; }
149 
150 protected:
157  virtual void UserCreateOutputObjects();
158 
168  virtual bool IsEventSelected();
169 
175  virtual bool IsUserEventSelected() { return true; }
176 
182  virtual void CreateUserHistos() = 0;
183 
188  virtual void CreateUserObjects() = 0;
189 
196  virtual void ExecOnce();
197 
205  virtual void RunChanged(Int_t runnuber);
206 
212 
218 
225  std::vector<TString> GetSupportedTriggers();
226 
235  Double_t GetTriggerWeight(const TString &triggerclass) const;
236 
242  TString GetFiredTriggerClassesFromPatches(const TClonesArray* triggerpatches) const;
243 
251  void TriggerSelection();
252 
261 
267  bool OnlineThresholdsInitialized() const;
268 
275 
281  Int_t GetOnlineTriggerThresholdByName(const TString &name) const;
282 
290  Bool_t SelectFiredPatch(const TString &triggerclass, Int_t adc) const;
291 
292 
294 
297  std::vector<TString> fSelectedTriggers;
298 
300 
302  AliOADBContainer *fDownscaleOADB;
305  AliOADBContainer *fMaskedFastorOADB;
306  std::vector<int> fMaskedFastors;
309 
312 
313 private:
316 };
317 
318 } /* namespace EMCalTriggerPtAnalysis */
319 
320 #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.
void SetOfflineTriggerSelection(AliEmcalTriggerOfflineSelection *sel)
TString fNameMaskedFastorOADB
Name of the masked fastor OADB container.
bool SelectOnlineTrigger(AliEmcalTriggerOfflineSelection::EmcalTriggerClass trigger) const
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 fTriggerStringFromPatches
Do rebuild the trigger string from trigger patches.
AliOADBContainer * fDownscaleOADB
! Container with downscale factors for different triggers
Container class for histograms for the high- charged particle analysis.
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