]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/EMCAL/AliEmcalPatchFromCellMaker.h
AliAnalysisMuMu classes update
[u/mrichter/AliRoot.git] / PWG / EMCAL / AliEmcalPatchFromCellMaker.h
1 #ifndef ALIEMCALPATCHFROMCELLMAKER_H
2 #define ALIEMCALPATCHFROMCELLMAKER_H
3
4 class TClonesArray;
5 class TH3F;
6
7 #include "AliEMCALTriggerTypes.h"
8 #include "AliAnalysisTaskEmcal.h"
9
10 class AliEmcalPatchFromCellMaker : public AliAnalysisTaskEmcal {
11  public:
12   AliEmcalPatchFromCellMaker();
13   AliEmcalPatchFromCellMaker(const char *name);
14   virtual ~AliEmcalPatchFromCellMaker();
15
16   void               SetCaloTriggersOutName(const char *name)          { fCaloTriggersOutName = name; }
17   void               SetPatchDimension(Int_t i)                        { fPatchDim            = i;    }
18   void               SetMinCellE(Double_t e)                           { fMinCellE            = e;    }
19   void               SetCellTimeCuts(Double_t min, Double_t max)       { fCellTimeMin = min; fCellTimeMax = max; }
20   void               ActivateSlidingPatch(Bool_t b)                    { fL1Slide             = b;    }
21
22  protected:
23   enum{
24     kPatchCols = 48,
25     kPatchRows = 64
26   };
27
28   void               ExecOnce();
29   Bool_t             Run();
30   // Bool_t             FillHistograms();
31   void               UserCreateOutputObjects();
32
33   Bool_t             FillPatchADCSimple();
34   void               RunSimpleOfflineTrigger();
35
36   //Getters
37   Int_t              GetPatchDimension() const                         { return fPatchDim;  }
38   Double_t           GetPatchArea() const                              { return (Double_t)(fPatchDim*fPatchDim)*0.014*0.014; }
39   Int_t              GetDimFastor() const;
40   Int_t              GetSlidingStepSizeFastor() const;
41
42   TString            fCaloTriggersOutName;  // name of output patch array
43   TClonesArray      *fCaloTriggersOut;      //!trigger array out
44       
45   Double_t           fPatchADCSimple[kPatchCols][kPatchRows];   // patch map for simple offline trigger
46   Double_t           fPatchESimple[kPatchCols][kPatchRows];     // patch map for simple offline trigger
47
48   Int_t              fPatchDim;             // dimension of patch in #cells
49   Double_t           fMinCellE;             // minimum cell energy
50   Double_t           fCellTimeMin;          // minimum time cell
51   Double_t           fCellTimeMax;          // maximum time cell
52   Bool_t             fL1Slide;              // sliding window on
53
54  private:
55   TH3F     *fh3EEtaPhiCell;                    //! cell E, eta, phi
56   TH2F     *fh2CellEnergyVsTime;               //! emcal cell energy vs time
57   TH1F     *fh1CellEnergySum;                  //! sum of energy in all emcal cells
58
59   AliEmcalPatchFromCellMaker(const AliEmcalPatchFromCellMaker&);            // not implemented
60   AliEmcalPatchFromCellMaker &operator=(const AliEmcalPatchFromCellMaker&); // not implemented
61
62   ClassDef(AliEmcalPatchFromCellMaker, 1); // Task to make PicoTracks in a grid corresponding to EMCAL/DCAL acceptance
63 };
64 #endif