AliPhysics  ec707b8 (ec707b8)
 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 <set>
7 #include <iostream>
8 
9 #include <TObject.h>
10 
11 #include "AliEMCALTriggerChannelContainer.h"
12 
13 class TObjArray;
14 class AliEMCALTriggerPatchInfo;
15 class AliEMCALTriggerRawPatch;
16 class AliEMCALGeometry;
17 class AliVCaloCells;
18 class AliVCaloTrigger;
19 class AliVEvent;
20 class AliVVZERO;
21 template<class T> class AliEMCALTriggerDataGrid;
22 template<class T> class AliEMCALTriggerAlgorithm;
23 template<class T> class AliEMCALTriggerPatchFinder;
24 
25 // To be moved to AliRoot in AliEMCALTriggerConstants.h at the first occasion
26 namespace EMCALTrigger {
27 const Double_t kEMCL0ADCtoGeV_AP = 0.018970588*4; // 0.075882352; ///< Conversion from EMCAL Level0 ADC to energy
28 }
29 
44 class AliEmcalTriggerMakerKernel : public TObject {
45 public:
46 
48 
53 
58 
67  void Init();
68 
83  TObjArray *CreateTriggerPatches(const AliVEvent *inputevent, Bool_t useL0amp=kFALSE);
84 
85  void SetTriggerThresholdJetLow ( Int_t a, Int_t b, Int_t c ) { fThresholdConstants[2][0] = a; fThresholdConstants[2][1] = b; fThresholdConstants[2][2] = c; }
86  void SetTriggerThresholdJetHigh ( Int_t a, Int_t b, Int_t c ) { fThresholdConstants[0][0] = a; fThresholdConstants[0][1] = b; fThresholdConstants[0][2] = c; }
87  void SetTriggerThresholdGammaLow ( Int_t a, Int_t b, Int_t c ) { fThresholdConstants[3][0] = a; fThresholdConstants[3][1] = b; fThresholdConstants[3][2] = c; }
88  void SetTriggerThresholdGammaHigh( Int_t a, Int_t b, Int_t c ) { fThresholdConstants[1][0] = a; fThresholdConstants[1][1] = b; fThresholdConstants[1][2] = c; }
89  void SetBackgroundThreshold(Int_t t) { fBkgThreshold = t; }
90  void SetL0Threshold(Int_t t) { fL0Threshold = t; }
95  void SetJetPatchsize(Int_t patchsize) { fJetPatchsize = patchsize; }
100  void SetIsMC(Bool_t isMC) { fIsMC = isMC; }
101 
106  void SetGeometry(const AliEMCALGeometry *const geo) { fGeometry = geo; }
107 
112  void SetTriggerBitConfig(const AliEMCALTriggerBitConfig *const config) { fTriggerBitConfig = config; }
113 
119  void SetL0TimeRange(Int_t min, Int_t max) { fL0MinTime = min; fL0MaxTime = max; }
120 
125  void AddOfflineBadChannel(Short_t absId) { fOfflineBadChannels.insert(absId); }
126 
131  void ReadOfflineBadChannelFromStream(std::istream& stream);
132 
137  void ReadOfflineBadChannelFromFile(const char* fname);
138 
142  void Reset();
143 
151  void ReadTriggerData(AliVCaloTrigger *trigger);
152 
157  void ReadCellData(AliVCaloCells *cells);
158 
163  void BuildL1ThresholdsOffline(const AliVVZERO *vzdata);
164 
165 protected:
166  enum{
167  kColsEta = 48
168  };
169 
176  ELevel0TriggerStatus_t CheckForL0(Int_t col, Int_t row) const;
177 
184  AliEMCALTriggerAlgorithm<double> *CreateGammaTriggerAlgorithm(Int_t rowmin, Int_t rowmax) const;
191  AliEMCALTriggerAlgorithm<double> *CreateJetTriggerAlgorithm(Int_t rowmin, Int_t rowmax) const;
198  AliEMCALTriggerAlgorithm<double> *CreateBkgTriggerAlgorithm(Int_t rowmin, Int_t rowmax) const;
199 
205  Bool_t IsGammaPatch(const AliEMCALTriggerRawPatch &patch) const;
211  Bool_t IsJetPatch(const AliEMCALTriggerRawPatch &patch) const;
217  Bool_t IsBkgPatch(const AliEMCALTriggerRawPatch &patch) const;
218 
219  AliEMCALTriggerChannelContainer fBadChannels;
220  std::set<Short_t> fOfflineBadChannels;
221  const AliEMCALTriggerBitConfig *fTriggerBitConfig;
222  const AliEMCALGeometry *fGeometry;
223 
229 
232  Int_t fL0MinTime;
233  Int_t fL0MaxTime;
234  Double_t fADCtoGeV;
235 
237  Int_t fThresholdConstants[4][3];
238  ULong64_t fL1ThresholdsOffline[4];
240  Int_t fL0Threshold;
241  Bool_t fIsMC;
242 
243  Int_t fDebugLevel;
244 
246  ClassDef(AliEmcalTriggerMakerKernel, 1);
248 };
249 
250 #endif
Int_t fBkgThreshold
threshold for the background patches (8x8)
ELevel0TriggerStatus_t CheckForL0(Int_t col, Int_t row) const
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
void ReadOfflineBadChannelFromFile(const char *fname)
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 ReadOfflineBadChannelFromStream(std::istream &stream)
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 SetL0TimeRange(Int_t min, Int_t max)
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
std::set< Short_t > fOfflineBadChannels
Abd ID of offline bad channels.
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.
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