AliPhysics  b095172 (b095172)
 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; }
31  // Mixed events
32  virtual void SetEventMixing(Bool_t enable) { fDoEventMixing = enable;}
33  virtual void SetNumberOfMixingTracks(Int_t tracks) { fNMixingTracks = tracks; }
36  virtual void SetNCentBinsMixedEvent(Bool_t centbins) { fNCentBinsMixedEvent = centbins; }
37  // Switch to cut out some unneeded sparse axis
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
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
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
89  // Event Mixing
95  AliEventPoolManager *fPoolMgr;
96  // Event selection types
99  // Efficiency correction
102  // Embedding correction
104  // Histogram binning variables
107 
108  // TODO: Consider moving to THistManager
113 
116  TH2 *fHistJetH[6][5][3];
117  TH2 *fHistJetHBias[6][5][3];
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
double Double_t
Definition: External.C:58
Int_t fMinNEventsMixedEvents
threshold to use event pool # events
Definition: External.C:236
UInt_t fNCentBinsMixedEvent
N cent bins for the event mixing pool.
Definition: External.C:244
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 &)
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
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)
Definition: External.C:220
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)
const char Option_t
Definition: External.C:48
virtual void SetMinNEventsForMixedEvents(Int_t nme)
virtual void SetEffCorrFunc(Double_t efffunc)
const Int_t nbins
bool Bool_t
Definition: External.C:53
Int_t fNMixingTracks
size of track buffer for event mixing
virtual Double_t EffCorrection(Double_t trkETA, Double_t trkPT, Int_t effswitch) const
Definition: External.C:196
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)