AliPhysics  5eaf189 (5eaf189)
AliEmcalTriggerMaker.h
Go to the documentation of this file.
1 
24 #ifndef ALIEMCALTRIGGERMAKER_H
25 #define ALIEMCALTRIGGERMAKER_H
26 
27 /* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
28  * See cxx source for full Copyright notice */
29 
30 class TClonesArray;
32 class AliAODCaloTrigger;
33 class AliVVZERO;
34 class THistManager;
35 
36 template<class T> class AliEMCALTriggerDataGrid;
37 
38 #include "AliLog.h"
39 #include "AliEMCALTriggerBitConfig.h"
40 #include "AliEMCALTriggerChannelContainer.h"
41 #include "AliAnalysisTaskEmcal.h"
42 
62  public:
76  };
78  kTMOnline = 0,
81  };
86  };
87 
89  kRecalcBitmask = 0x00FF0000,
90  kOfflineBitmask = 0xFF000000
91  };
92 
93  /***
94  * \enum TriggerMakerTriggerBitConfig_t
95  * \brief Definition of trigger bit configurations
96  *
97  * This enumeration handles different trigger bit configurations for the
98  * EMCAL Level1 triggers (with and without different thresholds) applied
99  * in the reconstruction of different samples.
100  */
104  };
105 
107  AliEmcalTriggerMaker(const char *name, Bool_t doQA = kFALSE);
108  virtual ~AliEmcalTriggerMaker();
109 
110  void SetRunQA(Bool_t doQA = kTRUE) { fDoQA = doQA; }
111  void SetCaloTriggersOutName(const char *name) { fCaloTriggersOutName = name; }
112  void SetCaloTriggerSetupOutName(const char *name) { fCaloTriggerSetupOutName = name; }
117  void SetDebugLevel(Int_t debugLevel) { fDebugLevel = debugLevel; }
118  void SetV0InName(const char *name) { fV0InName = name; }
119  void AddHotFastor(int col, int row) { fBadChannels.AddChannel(col, row); }
120 
122  void SetTriggerBitConfig(const AliEMCALTriggerBitConfig *conf) { fTriggerBitConfig = conf; }
123 
128  void SetRejectOffAcceptancePatches(Bool_t doReject = kTRUE) { fRejectOffAcceptancePatches = doReject; }
129 
130  inline Bool_t IsEJE(Int_t tBits) const;
131  inline Bool_t IsEGA(Int_t tBits) const;
132  inline Bool_t IsLevel0(Int_t tBits) const;
133 
134  inline Bool_t IsOfflineSimple(Int_t tBits) const;
135  inline Bool_t IsRecalc(Int_t tBits) const;
136 
137  protected:
138  static const TString fgkTriggerTypeNames[5];
139  static const int kColsEta;
140 
142  void ExecOnce();
143  Bool_t Run();
145  Bool_t NextTrigger( Bool_t &isOfflineSimple );
146  AliEMCALTriggerPatchInfo* ProcessPatch(TriggerMakerTriggerType_t type, TriggerMakerPatchSource_t patchSource);
147  Bool_t CheckForL0(const AliVCaloTrigger &trg) const;
148 
149  AliEMCALTriggerChannelContainer fBadChannels;
155  const AliEMCALTriggerBitConfig *fTriggerBitConfig;
156  TClonesArray *fCaloTriggersOut;
158  AliAODCaloTrigger *fSimpleOfflineTriggers;
159  AliVVZERO *fV0;
168 
170 
171  private:
172  AliEmcalTriggerMaker(const AliEmcalTriggerMaker&); // not implemented
173  AliEmcalTriggerMaker &operator=(const AliEmcalTriggerMaker&); // not implemented
174 
176  ClassDef(AliEmcalTriggerMaker, 6) // Task to make array of EMCAL trigger patches
178 };
179 
186  if( tBits & ( 1 << (fTriggerBitConfig->GetTriggerTypesEnd() + fTriggerBitConfig->GetJetLowBit()) | 1 << (fTriggerBitConfig->GetTriggerTypesEnd() + fTriggerBitConfig->GetJetHighBit()) | 1 << (fTriggerBitConfig->GetJetLowBit()) | 1 << (fTriggerBitConfig->GetJetHighBit()) ))
187  return kTRUE;
188  else
189  return kFALSE;
190 }
191 
198  if( tBits & ( 1 << (fTriggerBitConfig->GetTriggerTypesEnd() + fTriggerBitConfig->GetGammaLowBit()) | 1 << (fTriggerBitConfig->GetTriggerTypesEnd() + fTriggerBitConfig->GetGammaHighBit()) | 1 << (fTriggerBitConfig->GetGammaLowBit()) | 1 << (fTriggerBitConfig->GetGammaHighBit()) ))
199  return kTRUE;
200  else
201  return kFALSE;
202 }
203 
210  if( tBits & (1 << (fTriggerBitConfig->GetLevel0Bit() + fTriggerBitConfig->GetLevel0Bit()) | (1 << fTriggerBitConfig->GetLevel0Bit())))
211  return kTRUE;
212  return kFALSE;
213 }
214 
221  return (tBits & kOfflineBitmask);
222 }
223 
230  return (tBits & kRecalcBitmask);
231 }
232 
233 #endif
Bool_t fRejectOffAcceptancePatches
Switch for rejection of patches outside the acceptance.
void SetTriggerBitConfig(const AliEMCALTriggerBitConfig *conf)
void SetCaloTriggerSetupOutName(const char *name)
TString fCaloTriggersOutName
name of output track array
AliEMCALTriggerPatchInfo * ProcessPatch(TriggerMakerTriggerType_t type, TriggerMakerPatchSource_t patchSource)
Old configuration, no distinction between high and low threshold.
AliEMCALTriggerDataGrid< double > * fPatchADCSimple
! patch map for simple offline trigger
Bool_t IsLevel0(Int_t tBits) const
void SetTriggerThresholdJetHigh(Int_t a, Int_t b, Int_t c)
TriggerMakerBitConfig_t fUseTriggerBitConfig
type of trigger config
Base task in the EMCAL framework.
TriggerMakerTriggerType_t
Definition of different trigger patch types.
Bool_t fDoQA
Fill QA histograms.
TCanvas * c
Definition: TestFitELoss.C:172
void SetTriggerThresholdGammaHigh(Int_t a, Int_t b, Int_t c)
Int_t fITrigger
! trigger counter
AliEmcalTriggerMaker & operator=(const AliEmcalTriggerMaker &)
void SetDebugLevel(Int_t debugLevel)
void SetCaloTriggersOutName(const char *name)
static const int kColsEta
Number of columns in eta direction.
New configuration, distiction between high and low threshold.
static const TString fgkTriggerTypeNames[5]
Histogram name tags.
const AliEMCALTriggerBitConfig * fTriggerBitConfig
Trigger bit configuration, aliroot-dependent.
int Int_t
Definition: External.C:63
Trigger bit indicating the main (highest energy) trigger patch of a given type per event...
AliEMCALTriggerDataGrid< float > * fPatchAmplitudes
! TRU Amplitudes (for L0)
Bool_t IsEGA(Int_t tBits) const
Bool_t IsOfflineSimple(Int_t tBits) const
Int_t fThresholdConstants[4][3]
simple offline trigger thresholds constants
Bool_t IsEJE(Int_t tBits) const
AliEMCALTriggerChannelContainer fBadChannels
Container of bad channels.
void SetUseTriggerBitConfig(TriggerMakerBitConfig_t bitConfig)
TString fV0InName
name of output track array
Bool_t IsRecalc(Int_t tBits) const
void SetRejectOffAcceptancePatches(Bool_t doReject=kTRUE)
AliEmcalTriggerSetupInfo * fCaloTriggerSetupOut
! trigger setup
Int_t fDebugLevel
Debug lebel;.
AliVVZERO * fV0
! V0 object
AliAODCaloTrigger * fSimpleOfflineTriggers
! simple offline trigger
void SetTriggerThresholdGammaLow(Int_t a, Int_t b, Int_t c)
EMCAL trigger patch maker.
void SetV0InName(const char *name)
TClonesArray * fCaloTriggersOut
! trigger array out
THistManager * fQAHistos
! Histograms for QA
Container class for histograms.
Definition: THistManager.h:99
bool Bool_t
Definition: External.C:53
AliEMCALTriggerDataGrid< char > * fLevel0TimeMap
! Map needed to store the level0 times
TString fCaloTriggerSetupOutName
name of output track array
void SetRunQA(Bool_t doQA=kTRUE)
void SetTriggerThresholdJetLow(Int_t a, Int_t b, Int_t c)
Settings manager for the trigger patch algorithmThis class contains the main settings (trigger thresh...
Bitmask for Offline simple patches.
Bool_t NextTrigger(Bool_t &isOfflineSimple)
void AddHotFastor(int col, int row)
Bool_t CheckForL0(const AliVCaloTrigger &trg) const
AliEMCALTriggerDataGrid< int > * fPatchADC
! ADC values map