AliPhysics  e59a9ba (e59a9ba)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskChargedJetsHadronCF.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKCHARGEDJETSHADRONCF_H
2 #define ALIANALYSISTASKCHARGEDJETSHADRONCF_H
3 /* Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
17 //
18 
19 class THn;
20 
22  public:
23 
25  AliAnalysisTaskChargedJetsHadronCF(const char *name);
27 
29  void Terminate(Option_t *option);
30 
31  // ######### SETTERS/GETTERS
33  void SetJetParticleArrayName(const char* name) { fJetParticleArrayName = name; }
34  void SetTrackParticleArrayName(const char* name) { fTrackParticleArrayName = name; }
35  void SetJetMatchingArrayName(const char* name) { fJetMatchingArrayName = name; }
36 
38 
39  void SetEventCriteriumBackground(Double_t minValue, Double_t maxValue) {fEventCriteriumMinBackground = minValue; fEventCriteriumMaxBackground = maxValue;}
40  void SetEventCriteriumLeadingJets(Double_t leading, Double_t subleading, Double_t dphi) {fEventCriteriumMinLeadingJetPt = leading; fEventCriteriumMinSubleadingJetPt = subleading; fEventCriteriumMinJetDeltaPhi = dphi;}
41  void SetEventCriteriumSelection(Int_t type);
42 
43  void ActivateJetExtraction(Double_t percentage, Double_t minPt, Double_t maxPt) {fExtractionPercentage = percentage; fExtractionMinPt = minPt; fExtractionMaxPt = maxPt;}
44 
45  protected:
46  void ExecOnce();
47  Bool_t Run();
48 
49  // ######### META FUNCTIONS
50  void BinLogAxis(const THn *h, Int_t axisNumber);
51  void AddJetToTree(AliEmcalJet* jet);
53  void AddTrackToOutputArray(AliVTrack* track);
54  void FillHistogramsTracks(AliVTrack* track);
57  Bool_t IsJetSelected(AliEmcalJet* jet);
59 
62  TTree* fJetsTree;
65  Double_t fExtractionMinPt;
66  Double_t fExtractionMaxPt;
68  TClonesArray *fJetsOutput;
69  TClonesArray *fTracksOutput;
70  TClonesArray *fJetsInput;
74  TRandom3* fRandom;
75 
76  // Criteria for the selection of jets that are passed to the correlation task
86 
87  // Event properties
91  Int_t fAcceptedJets;
93 
94  // ######### HISTOGRAM FUNCTIONS
95  void FillHistogram(const char * key, Double_t x);
96  void FillHistogram(const char * key, Double_t x, Double_t y);
97  void FillHistogram(const char * key, Double_t x, Double_t y, Double_t add);
98  void FillHistogram3D(const char * key, Double_t x, Double_t y, Double_t z, Double_t add = 0);
99 
100  template <class T> T* AddHistogram1D(const char* name = "CustomHistogram", const char* title = "NO_TITLE", const char* options = "", Int_t xBins = 100, Double_t xMin = 0.0, Double_t xMax = 20.0, const char* xTitle = "x axis", const char* yTitle = "y axis");
101  template <class T> T* AddHistogram2D(const char* name = "CustomHistogram", const char* title = "NO_TITLE", const char* options = "", Int_t xBins = 100, Double_t xMin = 0.0, Double_t xMax = 20.0, Int_t yBins = 100, Double_t yMin = 0.0, Double_t yMax = 20.0, const char* xTitle = "x axis", const char* yTitle = "y axis", const char* zTitle = "z axis");
102  template <class T> T* AddHistogram3D(const char* name = "CustomHistogram", const char* title = "NO_TITLE", const char* options = "", Int_t xBins = 100, Double_t xMin = 0.0, Double_t xMax = 20.0, Int_t yBins = 100, Double_t yMin = 0.0, Double_t yMax = 20.0, Int_t zBins = 100, Double_t zMin = 0.0, Double_t zMax = 20.0, const char* xTitle = "x axis", const char* yTitle = "y axis", const char* zTitle = "z axis");
103 
104  // ######### HELPER FUNCTIONS
105  Bool_t IsTrackInCone(AliVParticle* track, Double_t eta, Double_t phi, Double_t radius);
106  Double_t CalculateFakeFactor(AliEmcalJet* jet);
107  void GetLeadingJets(const char* opt, AliEmcalJet*& jetLeading, AliEmcalJet*& jetSubLeading);
109 
110 
111  private:
114 
116  ClassDef(AliAnalysisTaskChargedJetsHadronCF, 7) // Charged jet+h analysis support task
118 };
119 
120 
121 //###############################################################################################################################################3
122 
132 //
133 class AliBasicJetConstituent : public TObject
134 {
135  public:
137  AliBasicJetConstituent(Float_t eta, Float_t phi, Float_t pt, Short_t charge)
138  : fEta(eta), fPhi(phi), fpT(pt), fCharge(charge)
139  {
140  }
142 
143  Bool_t IsEqual(const TObject* obj) { return (obj->GetUniqueID() == GetUniqueID()); }
144  Double_t Pt() { return fpT; }
145  Double_t Phi() { return fPhi; }
146  Double_t Eta() { return fEta; }
147  Short_t Charge() { return fCharge; }
148 
149  private:
150  Float_t fEta;
151  Float_t fPhi;
152  Float_t fpT;
153  Short_t fCharge;
154 
156  ClassDef( AliBasicJetConstituent, 1); // very basic jet constituent object
158 };
159 
160 //###############################################################################################################################################3
171 //
172 class AliBasicJet : public TObject
173 {
174  public:
176  AliBasicJet(Float_t eta, Float_t phi, Float_t pt, Short_t charge, Float_t radius, Float_t area, Float_t bgrd, Long64_t id, Short_t cent)
177  : fEta(eta), fPhi(phi), fpT(pt), fCharge(charge), fRadius(radius), fArea(area), fBackgroundDensity(bgrd), fEventID(id), fCentrality(cent), fConstituents()
178  {}
179  ~AliBasicJet();
180 
181  // Basic jet properties
182  Bool_t IsEqual(const TObject* obj) { return (obj->GetUniqueID() == GetUniqueID()); }
183  Double_t Pt() { return fpT; }
184  Double_t TruePt() { return fTruepT; }
185  Double_t Phi() { return fPhi; }
186  Double_t Eta() { return fEta; }
187  Short_t Charge() { return fCharge; }
188  Double_t Radius() { return fRadius; }
189  Double_t Area() { return fArea; }
190  Double_t BackgroundDensity() { return fBackgroundDensity; }
191  Long64_t EventID() { return fEventID; }
192  Short_t Centrality() { return fCentrality; }
193  Int_t GetNumbersOfConstituents() { return fConstituents.size(); }
194 
195  // Basic constituent functions
196  AliBasicJetConstituent* GetJetConstituent(Int_t index) { return &fConstituents[index]; }
197  void AddJetConstituent(Float_t eta, Float_t phi, Float_t pt, Short_t charge)
198  {
199  AliBasicJetConstituent c (eta, phi, pt, charge);
200  AddJetConstituent(&c);
201  }
202  void AddJetConstituent(AliBasicJetConstituent* constituent) {fConstituents.push_back(*constituent); }
203  void SetTruePt(Double_t val) {fTruepT = val;}
204 
205 
206  private:
207  Float_t fEta;
208  Float_t fPhi;
209  Float_t fpT;
210  Float_t fTruepT;
211  Short_t fCharge;
212  Float_t fRadius;
213  Float_t fArea;
215  Long64_t fEventID;
216  Short_t fCentrality;
217 
218  std::vector<AliBasicJetConstituent> fConstituents;
219 
221  ClassDef( AliBasicJet, 3); // very basic jet object
223 };
224 #endif
Int_t charge
Double_t fEventCriteriumMinSubleadingJetPt
Min subleading jet.
Double_t fEventCriteriumMinBackground
Minimum background.
T * AddHistogram1D(const char *name="CustomHistogram", const char *title="NO_TITLE", const char *options="", Int_t xBins=100, Double_t xMin=0.0, Double_t xMax=20.0, const char *xTitle="x axis", const char *yTitle="y axis")
const char * title
Definition: MakeQAPdf.C:26
void GetLeadingJets(const char *opt, AliEmcalJet *&jetLeading, AliEmcalJet *&jetSubLeading)
TString fJetMatchingArrayName
Name of array used to match jets.
AliEmcalJet * fMatchedJet
! jet matched to input jet (calculated event-by-event)
AliBasicJetConstituent * GetJetConstituent(Int_t index)
void * fJetsTreeBuffer
! buffer for one jet (that will be saved to the tree)
void SetEventCriteriumBackground(Double_t minValue, Double_t maxValue)
Container with name, TClonesArray and cuts for particles.
Support task for (charged) jet-hadron correlations.
AliBasicJetConstituent(Float_t eta, Float_t phi, Float_t pt, Short_t charge)
void AddJetConstituent(AliBasicJetConstituent *constituent)
void BinLogAxis(const THn *h, Int_t axisNumber)
Int_t fJetOutputMode
mode which jets are written to array (0: all accepted, 1: leading, 2: subleading, 3: leading+subleadi...
Simple class containing basic information for a constituent.
Float_t fBackgroundDensity
background
AliEmcalJet * fSubleadingJet
! subleading jet (calculated event-by-event)
Simple class containing basic information for a jet.
void FillHistogram3D(const char *key, Double_t x, Double_t y, Double_t z, Double_t add=0)
Double_t fEventCriteriumMinJetDeltaPhi
Min jet delta phi in dijet criterium.
Bool_t IsEqual(const TObject *obj)
Long64_t fEventID
Unique event id.
Double_t fEventCriteriumMaxBackground
Maximum background.
void SetEventCriteriumLeadingJets(Double_t leading, Double_t subleading, Double_t dphi)
TString fJetParticleArrayName
Name of fJetsOutput array.
T * AddHistogram3D(const char *name="CustomHistogram", const char *title="NO_TITLE", const char *options="", Int_t xBins=100, Double_t xMin=0.0, Double_t xMax=20.0, Int_t yBins=100, Double_t yMin=0.0, Double_t yMax=20.0, Int_t zBins=100, Double_t zMin=0.0, Double_t zMax=20.0, const char *xTitle="x axis", const char *yTitle="y axis", const char *zTitle="z axis")
Int_t fNumberOfCentralityBins
Number of centrality bins.
Double_t fExtractionPercentage
percentage that is recorded
TClonesArray * fJetsOutput
! Array of basic correlation particles attached to the event (jets)
TString fTrackParticleArrayName
Name of fTracksOutput array.
Int_t mode
Definition: anaM.C:40
TClonesArray * fTracksOutput
! Array of basic correlation particles attached to the event (tracks)
AliEmcalJet * fLeadingJet
! leading jet (calculated event-by-event)
Double_t fExtractionMinPt
minimum pt of recorded jets
TTree * fJetsTree
! Jets that will be saved to a tree (optionally)
Bool_t IsTrackInCone(AliVParticle *track, Double_t eta, Double_t phi, Double_t radius)
void AddJetConstituent(Float_t eta, Float_t phi, Float_t pt, Short_t charge)
Double_t fMaxFakeFactorPercentage
max fake factor (percentage relative to cut profile)
AliBasicJet(Float_t eta, Float_t phi, Float_t pt, Short_t charge, Float_t radius, Float_t area, Float_t bgrd, Long64_t id, Short_t cent)
TClonesArray * fJetsInput
! Array of generated jets imported into task (toy model)
std::vector< AliBasicJetConstituent > fConstituents
vector of constituents
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:44
AliAnalysisTaskChargedJetsHadronCF & operator=(const AliAnalysisTaskChargedJetsHadronCF &)
Double_t fExtractionMaxPt
maximum pt of recorded jets
Double_t fMinFakeFactorPercentage
min fake factor (percentage relative to cut profile)
void ActivateJetExtraction(Double_t percentage, Double_t minPt, Double_t maxPt)
Int_t fAcceptedJets
! number accepted jets (calculated event-by-event)
T * AddHistogram2D(const char *name="CustomHistogram", const char *title="NO_TITLE", const char *options="", Int_t xBins=100, Double_t xMin=0.0, Double_t xMax=20.0, Int_t yBins=100, Double_t yMin=0.0, Double_t yMax=20.0, const char *xTitle="x axis", const char *yTitle="y axis", const char *zTitle="z axis")
Container for jet within the EMCAL jet framework.
Int_t fAcceptedTracks
! number accepted tracks (calculated event-by-event)
Float_t fTruepT
true pT (optional, e.g. from matching)