AliPhysics  de71be2 (de71be2)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
AliEmcalTriggerMakerKernel.h
Go to the documentation of this file.
1 #ifndef ALIEMCALTRIGGERMAKERKERNEL_H
2 #define ALIEMCALTRIGGERMAKERKERNEL_H
3 /* Copyright(c) 1998-2015, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 #include <TObject.h>
7 
8 #include "AliEMCALTriggerChannelContainer.h"
9 
10 class TObjArray;
11 class AliEMCALTriggerPatchInfo;
12 class AliEMCALTriggerRawPatch;
13 class AliEMCALGeometry;
14 class AliVCaloCells;
15 class AliVCaloTrigger;
16 class AliVEvent;
17 class AliVVZERO;
18 template<class T> class AliEMCALTriggerDataGrid;
19 template<class T> class AliEMCALTriggerAlgorithm;
20 template<class T> class AliEMCALTriggerPatchFinder;
21 
22 // To be moved to AliRoot in AliEMCALTriggerConstants.h at the first occasion
23 namespace EMCALTrigger {
24 const Double_t kEMCL0ADCtoGeV_AP = 0.019;
25 }
26 
41 class AliEmcalTriggerMakerKernel : public TObject {
42 public:
43 
48 
53 
62  void Init();
63 
78  TObjArray *CreateTriggerPatches(const AliVEvent *inputevent, Bool_t useL0amp=kFALSE);
79 
80  void SetTriggerThresholdJetLow ( Int_t a, Int_t b, Int_t c ) { fThresholdConstants[2][0] = a; fThresholdConstants[2][1] = b; fThresholdConstants[2][2] = c; }
81  void SetTriggerThresholdJetHigh ( Int_t a, Int_t b, Int_t c ) { fThresholdConstants[0][0] = a; fThresholdConstants[0][1] = b; fThresholdConstants[0][2] = c; }
82  void SetTriggerThresholdGammaLow ( Int_t a, Int_t b, Int_t c ) { fThresholdConstants[3][0] = a; fThresholdConstants[3][1] = b; fThresholdConstants[3][2] = c; }
83  void SetTriggerThresholdGammaHigh( Int_t a, Int_t b, Int_t c ) { fThresholdConstants[1][0] = a; fThresholdConstants[1][1] = b; fThresholdConstants[1][2] = c; }
84  void SetBackgroundThreshold(Int_t t) { fBkgThreshold = t; }
85  void SetL0Threshold(Int_t t) { fL0Threshold = t; }
90  void SetJetPatchsize(Int_t patchsize) { fJetPatchsize = patchsize; }
95  void SetIsMC(Bool_t isMC) { fIsMC = isMC; }
96 
101  void SetGeometry(const AliEMCALGeometry *const geo) { fGeometry = geo; }
102 
107  void SetTriggerBitConfig(const AliEMCALTriggerBitConfig *const config) { fTriggerBitConfig = config; }
108 
112  void Reset();
113 
118  void ReadTriggerData(AliVCaloTrigger *trigger);
119 
124  void ReadCellData(AliVCaloCells *cells);
125 
130  void BuildL1ThresholdsOffline(const AliVVZERO *vzdata);
131 
132 protected:
133  enum{
134  kColsEta = 48
135  };
136 
143  Bool_t CheckForL0(Int_t col, Int_t row) const;
144 
151  AliEMCALTriggerAlgorithm<double> *CreateGammaTriggerAlgorithm(Int_t rowmin, Int_t rowmax) const;
158  AliEMCALTriggerAlgorithm<double> *CreateJetTriggerAlgorithm(Int_t rowmin, Int_t rowmax) const;
165  AliEMCALTriggerAlgorithm<double> *CreateBkgTriggerAlgorithm(Int_t rowmin, Int_t rowmax) const;
166 
172  Bool_t IsGammaPatch(const AliEMCALTriggerRawPatch &patch) const;
178  Bool_t IsJetPatch(const AliEMCALTriggerRawPatch &patch) const;
184  Bool_t IsBkgPatch(const AliEMCALTriggerRawPatch &patch) const;
185 
186  AliEMCALTriggerChannelContainer fBadChannels;
187  const AliEMCALTriggerBitConfig *fTriggerBitConfig;
188  const AliEMCALGeometry *fGeometry;
189 
195 
198 
199  Double_t fADCtoGeV;
200 
202  Int_t fThresholdConstants[4][3];
203  ULong64_t fL1ThresholdsOffline[4];
205  Int_t fL0Threshold;
206  Bool_t fIsMC;
207  Int_t fDebugLevel;
208 
210  ClassDef(AliEmcalTriggerMakerKernel, 1);
212 };
213 
214 #endif
Int_t fBkgThreshold
threshold for the background patches (8x8)
AliEMCALTriggerChannelContainer fBadChannels
Container of bad channels.
Bool_t IsGammaPatch(const AliEMCALTriggerRawPatch &patch) const
Bool_t IsBkgPatch(const AliEMCALTriggerRawPatch &patch) const
TObjArray * CreateTriggerPatches(const AliVEvent *inputevent, Bool_t useL0amp=kFALSE)
AliEMCALTriggerDataGrid< int > * fTriggerBitMap
! Map of trigger bits
void SetTriggerBitConfig(const AliEMCALTriggerBitConfig *const config)
void ReadTriggerData(AliVCaloTrigger *trigger)
const AliEMCALTriggerBitConfig * fTriggerBitConfig
Trigger bit configuration, aliroot-dependent.
const AliEMCALGeometry * fGeometry
! Underlying EMCAL geometry
ULong64_t fL1ThresholdsOffline[4]
container for V0-dependent offline thresholds
Int_t fThresholdConstants[4][3]
simple offline trigger thresholds constants
AliEMCALTriggerAlgorithm< double > * CreateGammaTriggerAlgorithm(Int_t rowmin, Int_t rowmax) const
void SetTriggerThresholdGammaHigh(Int_t a, Int_t b, Int_t c)
Double_t fADCtoGeV
! Conversion factor from ADC to GeV
void SetTriggerThresholdGammaLow(Int_t a, Int_t b, Int_t c)
Int_t fL0Threshold
threshold for the L0 patches (2x2)
AliEMCALTriggerDataGrid< double > * fPatchAmplitudes
! TRU Amplitudes (for L0)
void BuildL1ThresholdsOffline(const AliVVZERO *vzdata)
AliEMCALTriggerDataGrid< double > * fPatchADC
! ADC values map
Bool_t isMC
void SetGeometry(const AliEMCALGeometry *const geo)
AliEMCALTriggerAlgorithm< double > * CreateBkgTriggerAlgorithm(Int_t rowmin, Int_t rowmax) const
AliEMCALTriggerPatchFinder< double > * fPatchFinder
! The actual patch finder
AliEMCALTriggerDataGrid< double > * fPatchADCSimple
! patch map for simple offline trigger
Kernel of the EMCAL trigger patch makerThe trigger maker kernel contains the core functionality of th...
void SetTriggerThresholdJetHigh(Int_t a, Int_t b, Int_t c)
AliEMCALTriggerDataGrid< char > * fLevel0TimeMap
! Map needed to store the level0 times
AliEMCALTriggerAlgorithm< double > * fLevel0PatchFinder
! Patch finder for Level0 patches
Bool_t IsJetPatch(const AliEMCALTriggerRawPatch &patch) const
Int_t fJetPatchsize
Size of a jet patch.
Bool_t CheckForL0(Int_t col, Int_t row) const
void ReadCellData(AliVCaloCells *cells)
void SetTriggerThresholdJetLow(Int_t a, Int_t b, Int_t c)
AliEMCALTriggerAlgorithm< double > * CreateJetTriggerAlgorithm(Int_t rowmin, Int_t rowmax) const
const Double_t kEMCL0ADCtoGeV_AP
Conversion from EMCAL Level0 ADC to energy.