AliPhysics  251aa1e (251aa1e)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends 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 #include <TArrayF.h>
11 
12 class TObjArray;
13 class AliEMCALTriggerPatchInfo;
14 class AliEMCALTriggerRawPatch;
15 class AliEMCALGeometry;
16 class AliVCaloCells;
17 class AliVCaloTrigger;
18 class AliVEvent;
19 class AliVVZERO;
20 template<class T> class AliEMCALTriggerDataGrid;
21 template<class T> class AliEMCALTriggerAlgorithm;
22 template<class T> class AliEMCALTriggerPatchFinder;
23 
24 // To be moved to AliRoot in AliEMCALTriggerConstants.h at the first occasion
25 namespace EMCALTrigger {
26 const Double_t kEMCL0ADCtoGeV_AP = 0.018970588*4; // 0.075882352; ///< Conversion from EMCAL Level0 ADC to energy
27 }
28 
47 public:
48 
50 
55 
60 
69  void Init();
70 
86  TObjArray *CreateTriggerPatches(const AliVEvent *inputevent, Bool_t useL0amp=kFALSE);
87 
92  const std::set<Short_t> &GetListOfBadFastORAbsIDs() const { return fBadChannels; }
93 
100  const std::set<Short_t> &GetListOfOfflineBadCellAbsIDs() const { return fOfflineBadChannels; }
101 
108 
113  void SetIsMC(Bool_t isMC) { fIsMC = isMC; }
114 
119  void SetGeometry(const AliEMCALGeometry *const geo) { fGeometry = geo; }
120 
125  void SetTriggerBitConfig(const AliEMCALTriggerBitConfig *const config);
126 
132  void SetL0TimeRange(Int_t min, Int_t max) { fL0MinTime = min; fL0MaxTime = max; }
133 
141 
146  void AddFastORBadChannel(Short_t absId) { fBadChannels.insert(absId); }
147 
152  void ReadFastORBadChannelFromStream(std::istream& stream);
153 
157  void ClearFastORBadChannels();
158 
163  void ReadFastORBadChannelFromFile(const char* fname);
164 
169  void AddOfflineBadChannel(Short_t absId) { fOfflineBadChannels.insert(absId); }
170 
175  void ReadOfflineBadChannelFromStream(std::istream& stream);
176 
181  void ReadOfflineBadChannelFromFile(const char* fname);
182 
187 
192  void ReadFastORPedestalFromStream(std::istream& stream);
193 
198  void ReadFastORPedestalFromFile(const char* fname);
199 
205  void SetFastORPedestal(Short_t absId, Float_t ped);
206 
211 
216  void SetMaxAbsCellTime(Double_t maxCellTime) { fCellTimeLimits[0] = -maxCellTime; fCellTimeLimits[1] = maxCellTime; }
217 
223  void SetAcceptCellTimeRange(Double_t minCellTime, Double_t maxCellTime) { fCellTimeLimits[0] = minCellTime; fCellTimeLimits[1] = maxCellTime; }
224 
229  void SetLowerCellTimeCut(Double_t minCellTime) { fCellTimeLimits[0] = minCellTime; }
230 
235  void SetUpperCellTimeCut(Double_t maxCellTime) { fCellTimeLimits[1] = maxCellTime; }
236 
241  void SetMinFEEAmplitude(Double_t minamp) { fMinCellAmplitude = minamp; }
242 
251 
255  void Reset();
256 
261  void ReadTriggerData(AliVCaloTrigger *trigger);
262 
267  void ReadCellData(AliVCaloCells *cells);
268 
273  void BuildL1ThresholdsOffline(const AliVVZERO *vzdata);
274 
283  void AddL1TriggerAlgorithm(Int_t rowmin, Int_t rowmax, UInt_t bitmask, Int_t patchSize, Int_t subregionSize);
284 
293  void SetL0TriggerAlgorithm(Int_t rowmin, Int_t rowmax, UInt_t bitmask, Int_t patchSize, Int_t subregionSize);
294 
300  Bool_t IsConfigured() const { return fConfigured; }
301 
305  void ConfigureForPbPb2015();
306 
310  void ConfigureForPP2015();
311 
315  void ConfigureForPPb2013();
316 
320  void ConfigureForPP2012();
321 
325  void ConfigureForPbPb2011();
326 
330  void ConfigureForPP2011();
331 
332 protected:
333  enum{
334  kColsEta = 48
335  };
336 
345 
351  Bool_t IsGammaPatch(const AliEMCALTriggerRawPatch &patch) const;
357  Bool_t IsJetPatch(const AliEMCALTriggerRawPatch &patch) const;
363  Bool_t IsBkgPatch(const AliEMCALTriggerRawPatch &patch) const;
364 
372  bool HasPHOSOverlap(const AliEMCALTriggerRawPatch &patch) const;
373 
374  std::set<Short_t> fBadChannels;
375  std::set<Short_t> fOfflineBadChannels;
376  TArrayF fFastORPedestal;
377  const AliEMCALTriggerBitConfig *fTriggerBitConfig;
378 
387  ULong64_t fL1ThresholdsOffline[4];
396 
397  const AliEMCALGeometry *fGeometry;
403 
405 
407  ClassDef(AliEmcalTriggerMakerKernel, 4);
409 };
410 
411 #endif
Int_t fBkgThreshold
threshold for the background patches (8x8)
ELevel0TriggerStatus_t CheckForL0(Int_t col, Int_t row) const
double Double_t
Definition: External.C:58
Double_t fCellTimeLimits[2]
Maximum allowed abs cell time (default [0] = - 10000, [1] = 10000)
Double_t fMinCellAmplitude
Minimum amplitude in cell required to be considered for filling the data grid.
Bool_t IsGammaPatch(const AliEMCALTriggerRawPatch &patch) const
Bool_t IsBkgPatch(const AliEMCALTriggerRawPatch &patch) const
TObjArray * CreateTriggerPatches(const AliVEvent *inputevent, Bool_t useL0amp=kFALSE)
bool HasPHOSOverlap(const AliEMCALTriggerRawPatch &patch) const
AliEMCALTriggerDataGrid< int > * fTriggerBitMap
! Map of trigger bits
void ReadFastORBadChannelFromStream(std::istream &stream)
TArrayF fFastORPedestal
FastOR pedestal.
TCanvas * c
Definition: TestFitELoss.C:172
void SetTriggerBitConfig(const AliEMCALTriggerBitConfig *const config)
Bool_t fConfigured
Switch specifying whether the trigger maker kernel has been configured for a given data set...
Int_t fMinCellAmp
Minimum offline amplitude of the cells used to generate the patches.
void SetUpperCellTimeCut(Double_t maxCellTime)
void ReadFastORBadChannelFromFile(const char *fname)
Bool_t fApplyOnlineBadChannelsToOffline
Apply online bad channels to offline ADC values.
void ReadTriggerData(AliVCaloTrigger *trigger)
Int_t fMinL1FastORAmp
Minimum L1 amplitude of the FastORs used to generate the patches.
const AliEMCALTriggerBitConfig * fTriggerBitConfig
Trigger bit configuration, aliroot-dependent.
const AliEMCALGeometry * fGeometry
! Underlying EMCAL geometry
void SetFastORandCellThresholds(Int_t l0, Int_t l1, Int_t cell)
ULong64_t fL1ThresholdsOffline[4]
container for V0-dependent offline thresholds
void SetAcceptCellTimeRange(Double_t minCellTime, Double_t maxCellTime)
void SetMinFEEAmplitude(Double_t minamp)
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
void ReadOfflineBadChannelFromFile(const char *fname)
Int_t fThresholdConstants[4][3]
simple offline trigger thresholds constants
float Float_t
Definition: External.C:68
void SetMaxAbsCellTime(Double_t maxCellTime)
void SetTriggerThresholdGammaHigh(Int_t a, Int_t b, Int_t c)
void SetApplyOnlineBadChannelMaskingToOffline(Bool_t doApply=kTRUE)
Double_t fADCtoGeV
! Conversion factor from ADC to GeV
void AddL1TriggerAlgorithm(Int_t rowmin, Int_t rowmax, UInt_t bitmask, Int_t patchSize, Int_t subregionSize)
void SetL0TriggerAlgorithm(Int_t rowmin, Int_t rowmax, UInt_t bitmask, Int_t patchSize, Int_t subregionSize)
const std::set< Short_t > & GetListOfOfflineBadCellAbsIDs() const
void ReadOfflineBadChannelFromStream(std::istream &stream)
void SetFastORPedestal(Short_t absId, Float_t ped)
std::set< Short_t > fBadChannels
Container of bad channels.
void SetTriggerThresholdGammaLow(Int_t a, Int_t b, Int_t c)
Int_t fL0Threshold
threshold for the L0 patches (2x2)
const std::set< Short_t > & GetListOfBadFastORAbsIDs() const
AliEMCALTriggerDataGrid< double > * fPatchAmplitudes
! TRU Amplitudes (for L0)
short Short_t
Definition: External.C:23
void SetL0TimeRange(Int_t min, Int_t max)
void BuildL1ThresholdsOffline(const AliVVZERO *vzdata)
AliEMCALTriggerDataGrid< double > * fPatchADC
! ADC values map
Bool_t isMC
Int_t fMinL0FastORAmp
Minimum L0 amplitude of the FastORs used to generate the patches.
void SetGeometry(const AliEMCALGeometry *const geo)
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 maker.
void ReadFastORPedestalFromFile(const char *fname)
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
bool Bool_t
Definition: External.C:53
void SetLowerCellTimeCut(Double_t minCellTime)
void ReadFastORPedestalFromStream(std::istream &stream)
void ReadCellData(AliVCaloCells *cells)
void SetTriggerThresholdJetLow(Int_t a, Int_t b, Int_t c)
const Double_t kEMCL0ADCtoGeV_AP