AliPhysics  vAN-20150822 (d56cf94)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliEMCalTriggerAnaTriggerDecision.h
Go to the documentation of this file.
1 
10 #ifndef ALIEMCALTRIGGERANATRIGGERDECISION_H
11 #define ALIEMCALTRIGGERANATRIGGERDECISION_H
12 /* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
13  * See cxx source for full Copyright notice */
14 
15 #include <TObject.h>
16 
17 class TClonesArray;
18 class TString;
20 
28 namespace EMCalTriggerPtAnalysis {
29 
30 class AliEMCalTriggerEventData;
31 class AliEMCalTriggerDecisionConfig;
32 
42  kTAEMCJLow = 1,
44  kTAEMCGLow = 3,
45  kTAUndef = -1
46 };
47 
58 };
59 
72 };
73 
75 public:
77 
82 
87  void SetSwapThresholds(Bool_t doSwap = kTRUE) { fSwapThresholds = doSwap;}
88 
93  void SetUseOfflinePatches(Bool_t doUse = kTRUE ) { fUseOfflinePatches = doUse; }
94 
100  void SetEnergyThreshold(ETATriggerType trigger, double threshold){
101  fEnergyThresholds[trigger] = threshold;
102  }
103 
108  void SetPatchEnergyType(EPatchEnergyType_t energyType) { fEnergyType = energyType; }
109 
114  Bool_t IsSwapThresholds() const { return fSwapThresholds; }
115 
120  Bool_t IsUsingOfflinePatches() const { return fUseOfflinePatches; }
121 
127  Double_t GetEnergyThreshold(ETATriggerType trigger) const {
128  return fEnergyThresholds[trigger];
129  }
130 
136  Bool_t HasEnergyThreshold(ETATriggerType trigger) const {
137  return fEnergyThresholds[trigger] > 0;
138  }
139 
145 
146 private:
149  Double_t fEnergyThresholds[4];
151 
155 };
156 
169 class AliEMCalTriggerAnaTriggerDecision : public TObject {
170 public:
171 
172 
174 
179 
180  void Create(const AliEMCalTriggerEventData * const data);
181 
192  Bool_t IsTriggered(ETATriggerType trigger, ETriggerMethod_t method = kTriggerString) const {
193  Bool_t result = kFALSE;
194  switch(method){
195  case kTriggerString: result = fDecisionFromString[trigger]; break;
196  case kTriggerPatches: result = fDecisionFromPatches[trigger]; break;
197  case kTriggerMixed: result = fDecisionFromPatches[trigger] && fDecisionFromString[trigger]; break;
198  };
199  return result;
200  }
201 
207 
213 
214  void Reset();
215 
216  void Print(Option_t * opt = NULL) const;
217 
222  void SetDebugMode(Bool_t doDebug = true) { fDoDebug = doDebug; }
223 
224  bool CheckConsistency() const;
225 
226 protected:
227  void MakeDecisionFromString(const TString &triggerstring);
228  void MakeDecisionFromPatches(const TClonesArray &listOfPatches);
229 
230  Bool_t SelectTriggerPatch(ETATriggerType trigger, const AliEmcalTriggerPatchInfo * const recpatch) const;
231  Double_t GetPatchEnergy(EPatchEnergyType_t energytype, const AliEmcalTriggerPatchInfo *const patch) const;
232 
236 
237  Bool_t fDoDebug;
238 
240  ClassDef(AliEMCalTriggerAnaTriggerDecision, 1); // EMCal trigger decision
242 };
243 
244 } /* namespace EMCalTriggerPtAnalysis */
245 
246 #endif /* ALIEMCALTRIGGERANATRIGGERDECISION_H */
Bool_t SelectTriggerPatch(ETATriggerType trigger, const AliEmcalTriggerPatchInfo *const recpatch) const
ETriggerMethod_t
Methods available to select event as triggered events.
Class performing the selection of triggered events.
Online energy, estimated from L0 time sums.
Double_t GetPatchEnergy(EPatchEnergyType_t energytype, const AliEmcalTriggerPatchInfo *const patch) const
Offline amplitude, estimated from EMCAL cells.
Online amplitude of the patch, from L0 time sums.
Bool_t fUseOfflinePatches
Switch for using offline patches for event selection.
void ConfigureTriggerDecision(const AliEMCalTriggerAnaTriggerDecisionConfig &conf)
const AliEMCalTriggerAnaTriggerDecisionConfig * GetConfiguration() const
Bool_t IsTriggered(ETATriggerType trigger, ETriggerMethod_t method=kTriggerString) const
ETATriggerType
Trigger types defined for this analysis.
EPatchEnergyType_t fEnergyType
Energy type from patch used for the patch energy selection.
Main data structure storing all relevant information of EMCAL/DCAL trigger patches.
Bool_t fDecisionFromPatches[4]
Storage for result from trigger string.
Bool_t fSwapThresholds
Flag for swapping high and low energy threshold.
AliEMCalTriggerAnaTriggerDecisionConfig fConfiguration
Configuration for the trigger decision handler.
Double_t fEnergyThresholds[4]
Energy thresholds applied in the analysis.
Simple event container within the high- track analysis.
Bool_t fDecisionFromString[4]
Storage for result from trigger patches.
Offline energy, from cells, calibrated, exluding hot towers.