AliPhysics  e59a9ba (e59a9ba)
 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 class AliTLorentzVector;
11 
13 
15  public:
16  enum jetBias_t {
17  kDisableBias = 10000
18  };
19 
21  AliAnalysisTaskEmcalJetHMEC(const char *name);
23 
24 
25  // Jet bias - setters
26  virtual void SetTrackBias(Double_t b) { fTrackBias = b; } //require a track with pt > b in jet
27  virtual void SetClusterBias(Double_t b) { fClusterBias = b; } //require a cluster with pt > b in jet
28  // Event trigger/mixed selection - setters
29  virtual void SetTriggerType(UInt_t te) { fTriggerType = te; }
30  virtual void SetMixedEventTriggerType(UInt_t me) { fMixingEventType = me; }
31  // Mixed events
32  virtual void SetEventMixing(Bool_t enable) { fDoEventMixing = enable;}
33  virtual void SetNumberOfMixingTracks(Int_t tracks) { fNMixingTracks = tracks; }
34  virtual void SetMinNTracksForMixedEvents(Int_t nmt) { fMinNTracksMixedEvents = nmt; }
35  virtual void SetMinNEventsForMixedEvents(Int_t nme) { fMinNEventsMixedEvents = nme; }
36  virtual void SetNCentBinsMixedEvent(Bool_t centbins) { fNCentBinsMixedEvent = centbins; }
37  // Switch to cut out some unneeded sparse axis
38  void SetDoLessSparseAxes(Bool_t dlsa) { fDoLessSparseAxes = dlsa; }
39  void SetDoWiderTrackBin(Bool_t wtrbin) { fDoWiderTrackBin = wtrbin; }
40  // set efficiency correction
41  void SetDoEffCorr(Int_t effcorr) { fDoEffCorrection = effcorr; }
42  virtual void SetEffCorrFunc(Double_t efffunc) { fEffFunctionCorrection = efffunc; }
43  // Set embedding correction
45 
46  virtual void UserCreateOutputObjects();
47  virtual void Terminate(Option_t *);
48 
49  protected:
50 
51  // NOTE: This is not an ideal way to resolve the size of histogram initialization.
52  // Will be resolved when we move fully to the THnSparse
59  };
60 
61  // EMCal framework functions
62  void ExecOnce();
63  Bool_t Run();
64 
65  // Reduce event mixing memory usage
66  TObjArray* CloneAndReduceTrackList();
67  // Histogram helper functions
68  virtual THnSparse* NewTHnSparseF(const char* name, UInt_t entries);
69  virtual void GetDimParams(Int_t iEntry,TString &label, Int_t &nbins, Double_t &xmin, Double_t &xmax);
70  // Binning helper functions
71  virtual Int_t GetEtaBin(Double_t eta) const;
72  virtual Int_t GetTrackPtBin(Double_t pt) const;
73  virtual Int_t GetJetPtBin(Double_t pt) const;
74  // Helper functions
76  void GetDeltaEtaDeltaPhiDeltaR(AliTLorentzVector & particleOne, AliVParticle * particleTwo, Double_t & deltaEta, Double_t & deltaPhi, Double_t & deltaR);
77  // Test for biased jet
78  Bool_t BiasedJet(AliEmcalJet * jet);
79  // Corrections
80  virtual Double_t EffCorrection(Double_t trkETA, Double_t trkPT, Int_t effswitch) const; // efficiency correction function
81  // Fill methods which allow for the embedding correction
82  void FillHist(TH1 * hist, Double_t fillValue, Double_t weight = 1.0, Bool_t noCorrection = kTRUE);
83  void FillHist(THnSparse * hist, Double_t *fillValue, Double_t weight = 1.0, Bool_t noCorrection = kTRUE);
84  void accessSetOfYBinValues(TH2F * hist, Int_t xBin, std::vector <Double_t> & yBinsContent, Double_t scaleFactor = -1.0);
85 
86  // Jet bias
87  Double_t fTrackBias;
88  Double_t fClusterBias;
89  // Event Mixing
90  Bool_t fDoEventMixing;
95  AliEventPoolManager *fPoolMgr;
96  // Event selection types
97  UInt_t fTriggerType;
99  // Efficiency correction
102  // Embedding correction
104  // Histogram binning variables
107 
108  // TODO: Consider moving to THistManager
113 
114  TH1 *fHistJetPt[6];
115  TH1 *fHistJetPtBias[6];
116  TH2 *fHistJetH[6][5][3];
117  TH2 *fHistJetHBias[6][5][3];
118  TH3 *fHistJHPsi;
119  THnSparse *fhnMixedEvents;
120  THnSparse *fhnJH;
121 
122  private:
123 
124  AliAnalysisTaskEmcalJetHMEC(const AliAnalysisTaskEmcalJetHMEC&); // not implemented
126 
128 };
129 #endif
void accessSetOfYBinValues(TH2F *hist, Int_t xBin, std::vector< Double_t > &yBinsContent, Double_t scaleFactor=-1.0)
virtual void SetTriggerType(UInt_t te)
void GetDeltaEtaDeltaPhiDeltaR(AliTLorentzVector &particleOne, AliVParticle *particleTwo, Double_t &deltaEta, Double_t &deltaPhi, Double_t &deltaR)
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)
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
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:44
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)