AliPhysics  vAN-20150427 (e6e7aad)
 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;
19 class AliEmcalTriggerPatchInfo;
20 
28 namespace EMCalTriggerPtAnalysis {
29 
30 class AliEMCalTriggerEventData;
31 class AliEMCalTriggerDecisionConfig;
32 
42  kTAEMCJLow = 1,
45 };
46 
57 };
58 
71 };
72 
74 public:
76 
81 
86  void SetSwapThresholds(Bool_t doSwap = kTRUE) { fSwapThresholds = doSwap;}
87 
92  void SetUseOfflinePatches(Bool_t doUse = kTRUE ) { fUseOfflinePatches = doUse; }
93 
99  void SetEnergyThreshold(ETATriggerType trigger, double threshold){
100  fEnergyThresholds[trigger] = threshold;
101  }
102 
107  void SetPatchEnergyType(EPatchEnergyType_t energyType) { fEnergyType = energyType; }
108 
113  Bool_t IsSwapThresholds() const { return fSwapThresholds; }
114 
119  Bool_t IsUsingOfflinePatches() const { return fUseOfflinePatches; }
120 
126  Double_t GetEnergyThreshold(ETATriggerType trigger) const {
127  return fEnergyThresholds[trigger];
128  }
129 
135  Bool_t HasEnergyThreshold(ETATriggerType trigger) const {
136  return fEnergyThresholds[trigger] > 0;
137  }
138 
144 
145 private:
148  Double_t fEnergyThresholds[4];
150 
154 };
155 
168 class AliEMCalTriggerAnaTriggerDecision : public TObject {
169 public:
170 
171 
173 
178 
179  void Create(const AliEMCalTriggerEventData * const data);
180 
191  Bool_t IsTriggered(ETATriggerType trigger, ETriggerMethod_t method = kTriggerString) const {
192  Bool_t result = kFALSE;
193  switch(method){
194  case kTriggerString: result = fDecisionFromString[trigger]; break;
195  case kTriggerPatches: result = fDecisionFromPatches[trigger]; break;
196  case kTriggerMixed: result = fDecisionFromPatches[trigger] && fDecisionFromString[trigger]; break;
197  };
198  return result;
199  }
200 
206 
211  void SetIsMinBias(Bool_t isMB = kTRUE) { fIsMinBias = isMB; }
212 
218 
219  void Reset();
220 
225  Bool_t IsMinBias() const { return fIsMinBias; }
226 
227  void Print(Option_t * opt = NULL) const;
228 
233  void SetDebugMode(Bool_t doDebug = true) { fDoDebug = doDebug; }
234 
235  bool CheckConsistency() const;
236 
237 protected:
238  void MakeDecisionFromString(const TString &triggerstring);
239  void MakeDecisionFromPatches(const TClonesArray &listOfPatches);
240 
241  Bool_t SelectTriggerPatch(ETATriggerType trigger, const AliEmcalTriggerPatchInfo * const recpatch) const;
242  Double_t GetPatchEnergy(EPatchEnergyType_t energytype, const AliEmcalTriggerPatchInfo *const patch) const;
243 
247  Bool_t fIsMinBias;
248 
249  Bool_t fDoDebug;
250 
252  ClassDef(AliEMCalTriggerAnaTriggerDecision, 1); // EMCal trigger decision
254 };
255 
256 } /* namespace EMCalTriggerPtAnalysis */
257 
258 #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.
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.
Bool_t fDecisionFromString[4]
Storage for result from trigger patches.
Offline energy, from cells, calibrated, exluding hot towers.