AliPhysics  e469bb5 (e469bb5)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskEmcalJetHMEC.h
Go to the documentation of this file.
1 #ifndef AliAnalysisTaskEmcalJetHMEC_H
2 #define AliAnalysisTaskEmcalJetHMEC_H
3 
4 class TH1;
5 class TH2;
6 class TH3;
7 class THnSparse;
8 class AliEmcalJet;
9 class AliEventPoolManager;
10 
12 
14  public:
15  enum jetBias_t {
16  kDisableBias = 10000
17  };
18 
20  AliAnalysisTaskEmcalJetHMEC(const char *name);
22 
23 
24  // Jet bias - setters
25  virtual void SetTrackBias(Double_t b) { fTrackBias = b; } //require a track with pt > b in jet
26  virtual void SetClusterBias(Double_t b) { fClusterBias = b; } //require a cluster with pt > b in jet
27  // Event trigger/mixed selection - setters
28  virtual void SetTriggerType(UInt_t te) { fTriggerType = te; }
29  virtual void SetMixedEventTriggerType(UInt_t me) { fMixingEventType = me; }
30  // Mixed events
31  virtual void SetEventMixing(Bool_t enable) { fDoEventMixing = enable;}
32  virtual void SetNumberOfMixingTracks(Int_t tracks) { fNMixingTracks = tracks; }
33  virtual void SetMinNTracksForMixedEvents(Int_t nmt) { fMinNTracksMixedEvents = nmt; }
34  virtual void SetMinNEventsForMixedEvents(Int_t nme) { fMinNEventsMixedEvents = nme; }
35  virtual void SetNCentBinsMixedEvent(Bool_t centbins) { fNCentBinsMixedEvent = centbins; }
36  // Switch to cut out some unneeded sparse axis
37  void SetDoLessSparseAxes(Bool_t dlsa) { fDoLessSparseAxes = dlsa; }
38  void SetDoWiderTrackBin(Bool_t wtrbin) { fDoWiderTrackBin = wtrbin; }
39  // set efficiency correction
40  void SetDoEffCorr(Int_t effcorr) { fDoEffCorrection = effcorr; }
41  virtual void SetEffCorrFunc(Double_t efffunc) { fEffFunctionCorrection = efffunc; }
42  // Set embedding correction
44 
45  virtual void UserCreateOutputObjects();
46  virtual void Terminate(Option_t *);
47 
48  protected:
49 
50  // NOTE: This is not an ideal way to resolve the size of histogram initialization.
51  // Will be resolved when we move fully to the THnSparse
58  };
59 
60  // EMCal framework functions
61  void ExecOnce();
62  Bool_t Run();
63 
64  // Reduce event mixing memory usage
65  TObjArray* CloneAndReduceTrackList();
66  // Histogram helper functions
67  virtual THnSparse* NewTHnSparseF(const char* name, UInt_t entries);
68  virtual void GetDimParams(Int_t iEntry,TString &label, Int_t &nbins, Double_t &xmin, Double_t &xmax);
69  // Binning helper functions
70  virtual Int_t GetEtaBin(Double_t eta) const;
71  virtual Int_t GetTrackPtBin(Double_t pt) const;
72  virtual Int_t GetJetPtBin(Double_t pt) const;
73  // Helper functions
75  void GetDeltaEtaDeltaPhiDeltaR(AliVParticle * particleOne, AliVParticle * particleTwo, Double_t & deltaPhi, Double_t & deltaEta, Double_t & deltaR);
76  // Test for biased jet
77  Bool_t BiasedJet(AliEmcalJet * jet);
78  // Corrections
79  virtual Double_t EffCorrection(Double_t trkETA, Double_t trkPT, Int_t effswitch) const; // efficiency correction function
80  // Fill methods which allow for the embedding correction
81  void FillHist(TH1 * hist, Double_t fillValue, Double_t weight = 1.0, Bool_t noCorrection = kTRUE);
82  void FillHist(THnSparse * hist, Double_t *fillValue, Double_t weight = 1.0, Bool_t noCorrection = kTRUE);
83  void accessSetOfYBinValues(TH2F * hist, Int_t xBin, std::vector <Double_t> & yBinsContent, Double_t scaleFactor = -1.0);
84 
85  // Jet bias
86  Double_t fTrackBias;
87  Double_t fClusterBias;
88  // Event Mixing
89  Bool_t fDoEventMixing;
94  AliEventPoolManager *fPoolMgr;
95  // Event selection types
96  UInt_t fTriggerType;
98  // Efficiency correction
101  // Embedding correction
103  // Histogram binning variables
106 
107  // TODO: Consider moving to THistManager
112 
113  TH1 *fHistJetPt[6];
114  TH1 *fHistJetPtBias[6];
115  TH2 *fHistJetH[6][5][3];
116  TH2 *fHistJetHBias[6][5][3];
117  TH3 *fHistJHPsi;
118  THnSparse *fhnMixedEvents;
119  THnSparse *fhnJH;
120 
121  private:
122 
123  AliAnalysisTaskEmcalJetHMEC(const AliAnalysisTaskEmcalJetHMEC&); // not implemented
125 
127 };
128 #endif
void accessSetOfYBinValues(TH2F *hist, Int_t xBin, std::vector< Double_t > &yBinsContent, Double_t scaleFactor=-1.0)
virtual void SetTriggerType(UInt_t te)
Bool_t fDoEventMixing
flag to do evt mixing
Int_t fMinNEventsMixedEvents
threshold to use event pool # events
UInt_t fNCentBinsMixedEvent
N cent bins for the event mixing pool.
virtual Int_t GetTrackPtBin(Double_t pt) const
ClassDef(AliAnalysisTaskEmcalJetHMEC, 11)
void GetDeltaEtaDeltaPhiDeltaR(AliVParticle *particleOne, AliVParticle *particleTwo, Double_t &deltaPhi, Double_t &deltaEta, Double_t &deltaR)
AliEventPoolManager * fPoolMgr
! Event pool manager
virtual Int_t GetJetPtBin(Double_t pt) const
Int_t fMinNTracksMixedEvents
threshold to use event pool # tracks
virtual THnSparse * NewTHnSparseF(const char *name, UInt_t entries)
AliAnalysisTaskEmcalJetHMEC & operator=(const AliAnalysisTaskEmcalJetHMEC &)
TH3 * fHistJHPsi
! Psi angle distribution
virtual void SetMinNTracksForMixedEvents(Int_t nmt)
virtual Int_t GetEtaBin(Double_t eta) const
void FillHist(TH1 *hist, Double_t fillValue, Double_t weight=1.0, Bool_t noCorrection=kTRUE)
Double_t fClusterBias
Jet cluster bias.
virtual void SetClusterBias(Double_t b)
virtual void SetEventMixing(Bool_t enable)
virtual void SetNumberOfMixingTracks(Int_t tracks)
THnSparse * fhnMixedEvents
! Mixed events THnSparse
virtual void SetMixedEventTriggerType(UInt_t me)
virtual void SetMinNEventsForMixedEvents(Int_t nme)
virtual void SetEffCorrFunc(Double_t efffunc)
const Int_t nbins
Int_t fNMixingTracks
size of track buffer for event mixing
virtual Double_t EffCorrection(Double_t trkETA, Double_t trkPT, Int_t effswitch) const
virtual void SetNCentBinsMixedEvent(Bool_t centbins)
virtual void SetTrackBias(Double_t b)
THnSparse * fhnJH
! JetH THnSparse
virtual void GetDimParams(Int_t iEntry, TString &label, Int_t &nbins, Double_t &xmin, Double_t &xmax)