ROOT logo
#ifndef ALIEMCALPATCHFROMCELLMAKER_H
#define ALIEMCALPATCHFROMCELLMAKER_H

class TClonesArray;
class TH3F;
class AliEmcalTriggerBitConfig;

#include "AliAnalysisTaskEmcal.h"

class AliEmcalPatchFromCellMaker : public AliAnalysisTaskEmcal {
 public:
  AliEmcalPatchFromCellMaker();
  AliEmcalPatchFromCellMaker(const char *name);
  virtual ~AliEmcalPatchFromCellMaker();

  void               SetCaloTriggersOutName(const char *name)          { fCaloTriggersOutName = name; }
  void               SetPatchDimension(Int_t i)                        { fPatchDim            = i;    }
  void               SetMinCellE(Double_t e)                           { fMinCellE            = e;    }
  void               SetCellTimeCuts(Double_t min, Double_t max)       { fCellTimeMin = min; fCellTimeMax = max; }
  void               ActivateSlidingPatch(Bool_t b)                    { fL1Slide             = b;    }

 protected:
  enum{
    kPatchCols = 48,
    kPatchRows = 64
  };

  void               ExecOnce();
  Bool_t             Run();
  // Bool_t             FillHistograms();
  void               UserCreateOutputObjects();

  Bool_t             FillPatchADCSimple();
  void               RunSimpleOfflineTrigger();

  //Getters
  Int_t              GetPatchDimension() const                         { return fPatchDim;  }
  Double_t           GetPatchArea() const                              { return (Double_t)(fPatchDim*fPatchDim)*0.014*0.014; }
  Int_t              GetDimFastor() const;
  Int_t              GetSlidingStepSizeFastor() const;

  TString            fCaloTriggersOutName;  // name of output patch array
  TClonesArray      *fCaloTriggersOut;      //!trigger array out
      
  Double_t           fPatchADCSimple[kPatchCols][kPatchRows];   // patch map for simple offline trigger
  Double_t           fPatchESimple[kPatchCols][kPatchRows];     // patch map for simple offline trigger

  Int_t              fPatchDim;             // dimension of patch in #cells
  Double_t           fMinCellE;             // minimum cell energy
  Double_t           fCellTimeMin;          // minimum time cell
  Double_t           fCellTimeMax;          // maximum time cell
  Bool_t             fL1Slide;              // sliding window on
  AliEmcalTriggerBitConfig *fTriggerBitConfig; // dummy trigger bit config

 private:
  TH3F     *fh3EEtaPhiCell;                    //! cell E, eta, phi
  TH2F     *fh2CellEnergyVsTime;               //! emcal cell energy vs time
  TH1F     *fh1CellEnergySum;                  //! sum of energy in all emcal cells

  AliEmcalPatchFromCellMaker(const AliEmcalPatchFromCellMaker&);            // not implemented
  AliEmcalPatchFromCellMaker &operator=(const AliEmcalPatchFromCellMaker&); // not implemented

  ClassDef(AliEmcalPatchFromCellMaker, 1); // Task to make PicoTracks in a grid corresponding to EMCAL/DCAL acceptance
};
#endif
 AliEmcalPatchFromCellMaker.h:1
 AliEmcalPatchFromCellMaker.h:2
 AliEmcalPatchFromCellMaker.h:3
 AliEmcalPatchFromCellMaker.h:4
 AliEmcalPatchFromCellMaker.h:5
 AliEmcalPatchFromCellMaker.h:6
 AliEmcalPatchFromCellMaker.h:7
 AliEmcalPatchFromCellMaker.h:8
 AliEmcalPatchFromCellMaker.h:9
 AliEmcalPatchFromCellMaker.h:10
 AliEmcalPatchFromCellMaker.h:11
 AliEmcalPatchFromCellMaker.h:12
 AliEmcalPatchFromCellMaker.h:13
 AliEmcalPatchFromCellMaker.h:14
 AliEmcalPatchFromCellMaker.h:15
 AliEmcalPatchFromCellMaker.h:16
 AliEmcalPatchFromCellMaker.h:17
 AliEmcalPatchFromCellMaker.h:18
 AliEmcalPatchFromCellMaker.h:19
 AliEmcalPatchFromCellMaker.h:20
 AliEmcalPatchFromCellMaker.h:21
 AliEmcalPatchFromCellMaker.h:22
 AliEmcalPatchFromCellMaker.h:23
 AliEmcalPatchFromCellMaker.h:24
 AliEmcalPatchFromCellMaker.h:25
 AliEmcalPatchFromCellMaker.h:26
 AliEmcalPatchFromCellMaker.h:27
 AliEmcalPatchFromCellMaker.h:28
 AliEmcalPatchFromCellMaker.h:29
 AliEmcalPatchFromCellMaker.h:30
 AliEmcalPatchFromCellMaker.h:31
 AliEmcalPatchFromCellMaker.h:32
 AliEmcalPatchFromCellMaker.h:33
 AliEmcalPatchFromCellMaker.h:34
 AliEmcalPatchFromCellMaker.h:35
 AliEmcalPatchFromCellMaker.h:36
 AliEmcalPatchFromCellMaker.h:37
 AliEmcalPatchFromCellMaker.h:38
 AliEmcalPatchFromCellMaker.h:39
 AliEmcalPatchFromCellMaker.h:40
 AliEmcalPatchFromCellMaker.h:41
 AliEmcalPatchFromCellMaker.h:42
 AliEmcalPatchFromCellMaker.h:43
 AliEmcalPatchFromCellMaker.h:44
 AliEmcalPatchFromCellMaker.h:45
 AliEmcalPatchFromCellMaker.h:46
 AliEmcalPatchFromCellMaker.h:47
 AliEmcalPatchFromCellMaker.h:48
 AliEmcalPatchFromCellMaker.h:49
 AliEmcalPatchFromCellMaker.h:50
 AliEmcalPatchFromCellMaker.h:51
 AliEmcalPatchFromCellMaker.h:52
 AliEmcalPatchFromCellMaker.h:53
 AliEmcalPatchFromCellMaker.h:54
 AliEmcalPatchFromCellMaker.h:55
 AliEmcalPatchFromCellMaker.h:56
 AliEmcalPatchFromCellMaker.h:57
 AliEmcalPatchFromCellMaker.h:58
 AliEmcalPatchFromCellMaker.h:59
 AliEmcalPatchFromCellMaker.h:60
 AliEmcalPatchFromCellMaker.h:61
 AliEmcalPatchFromCellMaker.h:62
 AliEmcalPatchFromCellMaker.h:63
 AliEmcalPatchFromCellMaker.h:64
 AliEmcalPatchFromCellMaker.h:65