AliPhysics  9fe175b (9fe175b)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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:
78  };
83  };
84 
85  /***
86  * \enum TriggerMakerTriggerBitConfig_t
87  * \brief Definition of trigger bit configurations
88  *
89  * This enumeration handles different trigger bit configurations for the
90  * EMCAL Level1 triggers (with and without different thresholds) applied
91  * in the reconstruction of different samples.
92  */
96  };
97 
99  AliEmcalTriggerMaker(const char *name, Bool_t doQA = kFALSE);
100  virtual ~AliEmcalTriggerMaker();
101 
102  void SetRunQA(Bool_t doQA = kTRUE) { fDoQA = doQA; }
103  void SetCaloTriggersOutName(const char *name) { fCaloTriggersOutName = name; }
104  void SetCaloTriggerSetupOutName(const char *name) { fCaloTriggerSetupOutName = name; }
105  void SetTriggerThresholdJetLow ( Int_t a, Int_t b, Int_t c ) { fThresholdConstants[2][0] = a; fThresholdConstants[2][1] = b; fThresholdConstants[2][2] = c; }
106  void SetTriggerThresholdJetHigh ( Int_t a, Int_t b, Int_t c ) { fThresholdConstants[0][0] = a; fThresholdConstants[0][1] = b; fThresholdConstants[0][2] = c; }
107  void SetTriggerThresholdGammaLow ( Int_t a, Int_t b, Int_t c ) { fThresholdConstants[3][0] = a; fThresholdConstants[3][1] = b; fThresholdConstants[3][2] = c; }
108  void SetTriggerThresholdGammaHigh( Int_t a, Int_t b, Int_t c ) { fThresholdConstants[1][0] = a; fThresholdConstants[1][1] = b; fThresholdConstants[1][2] = c; }
109  void SetDebugLevel(Int_t debugLevel) { fDebugLevel = debugLevel; }
110  void SetV0InName(const char *name) { fV0InName = name; }
111  void AddHotFastor(int col, int row) { fBadChannels.AddChannel(col, row); }
112 
113  void SetRunTriggerType(TriggerMakerTriggerType_t type, Bool_t doTrigger = kTRUE) { fRunTriggerType[type] = doTrigger; }
115  void SetTriggerBitConfig(const AliEMCALTriggerBitConfig *conf) { fTriggerBitConfig = conf; }
116 
121  void SetRejectOffAcceptancePatches(Bool_t doReject = kTRUE) { fRejectOffAcceptancePatches = doReject; }
122 
123  inline Bool_t IsEJE(Int_t tBits) const;
124  inline Bool_t IsEGA(Int_t tBits) const;
125  inline Bool_t IsLevel0(Int_t tBits) const;
126 
127  protected:
128  static const TString fgkTriggerTypeNames[5];
129  static const int kColsEta;
130 
132  void ExecOnce();
133  Bool_t Run();
135  Bool_t NextTrigger( Bool_t &isOfflineSimple );
136  AliEMCALTriggerPatchInfo* ProcessPatch(TriggerMakerTriggerType_t type, Bool_t isOfflineSimple);
137  Bool_t CheckForL0(const AliVCaloTrigger &trg) const;
138 
139  AliEMCALTriggerChannelContainer fBadChannels;
142  TString fV0InName;
144  Int_t fThresholdConstants[4][3];
145  const AliEMCALTriggerBitConfig *fTriggerBitConfig;
146  TClonesArray *fCaloTriggersOut;
148  AliAODCaloTrigger *fSimpleOfflineTriggers;
149  AliVVZERO *fV0;
154  Int_t fITrigger;
155  Bool_t fRunTriggerType[5];
156  Bool_t fDoQA;
159 
160  Int_t fDebugLevel;
161 
162  private:
163  AliEmcalTriggerMaker(const AliEmcalTriggerMaker&); // not implemented
164  AliEmcalTriggerMaker &operator=(const AliEmcalTriggerMaker&); // not implemented
165 
167  ClassDef(AliEmcalTriggerMaker, 6) // Task to make array of EMCAL trigger patches
169 };
170 
176 Bool_t AliEmcalTriggerMaker::IsEJE(Int_t tBits) const {
177  if( tBits & ( 1 << (fTriggerBitConfig->GetTriggerTypesEnd() + fTriggerBitConfig->GetJetLowBit()) | 1 << (fTriggerBitConfig->GetTriggerTypesEnd() + fTriggerBitConfig->GetJetHighBit()) | 1 << (fTriggerBitConfig->GetJetLowBit()) | 1 << (fTriggerBitConfig->GetJetHighBit()) ))
178  return kTRUE;
179  else
180  return kFALSE;
181 }
182 
188 Bool_t AliEmcalTriggerMaker::IsEGA(Int_t tBits) const {
189  if( tBits & ( 1 << (fTriggerBitConfig->GetTriggerTypesEnd() + fTriggerBitConfig->GetGammaLowBit()) | 1 << (fTriggerBitConfig->GetTriggerTypesEnd() + fTriggerBitConfig->GetGammaHighBit()) | 1 << (fTriggerBitConfig->GetGammaLowBit()) | 1 << (fTriggerBitConfig->GetGammaHighBit()) ))
190  return kTRUE;
191  else
192  return kFALSE;
193 }
194 
200 Bool_t AliEmcalTriggerMaker::IsLevel0(Int_t tBits) const {
201  if( tBits & (1 << (fTriggerBitConfig->GetLevel0Bit() + fTriggerBitConfig->GetLevel0Bit()) | (1 << fTriggerBitConfig->GetLevel0Bit())))
202  return kTRUE;
203  return kFALSE;
204 }
205 
206 #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
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.
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.
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
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
EMCAL Jet patches, recalculated.
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
void SetRunTriggerType(TriggerMakerTriggerType_t type, Bool_t doTrigger=kTRUE)
THistManager * fQAHistos
! Histograms for QA
Container class for histograms for the high- charged particle analysis.
Definition: THistManager.h:43
EMCAL Gamma patches, recalculated.
Bool_t fRunTriggerType[5]
Run patch maker for a given trigger type.
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...
Bool_t NextTrigger(Bool_t &isOfflineSimple)
AliEMCALTriggerPatchInfo * ProcessPatch(TriggerMakerTriggerType_t type, Bool_t isOfflineSimple)
void AddHotFastor(int col, int row)
Bool_t CheckForL0(const AliVCaloTrigger &trg) const
AliEMCALTriggerDataGrid< int > * fPatchADC
! ADC values map