AliPhysics  97a96ce (97a96ce)
 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 
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);
59 
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
96 
97  // ######### HISTOGRAM FUNCTIONS
98  void FillHistogram(const char * key, Double_t x);
99  void FillHistogram(const char * key, Double_t x, Double_t y);
100  void FillHistogram(const char * key, Double_t x, Double_t y, Double_t add);
101  void FillHistogram3D(const char * key, Double_t x, Double_t y, Double_t z, Double_t add = 0);
102 
103  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");
104  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");
105  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");
106 
107  // ######### HELPER FUNCTIONS
108  Bool_t IsTrackInCone(AliVParticle* track, Double_t eta, Double_t phi, Double_t radius);
111  void GetMatchingJets();
112 
113  void GetLeadingJets(const char* opt, AliEmcalJet*& jetLeading, AliEmcalJet*& jetSubLeading);
115 
116 
117  private:
120 
122  ClassDef(AliAnalysisTaskChargedJetsHadronCF, 7) // Charged jet+h analysis support task
124 };
125 
126 
127 //###############################################################################################################################################3
128 
138 //
140 {
141  public:
144  : fEta(eta), fPhi(phi), fpT(pt), fCharge(charge)
145  {
146  }
148 
149  Bool_t IsEqual(const TObject* obj) { return (obj->GetUniqueID() == GetUniqueID()); }
150  Double_t Pt() { return fpT; }
151  Double_t Phi() { return fPhi; }
152  Double_t Eta() { return fEta; }
153  Short_t Charge() { return fCharge; }
154 
155  private:
160 
162  ClassDef( AliBasicJetConstituent, 1); // very basic jet constituent object
164 };
165 
166 //###############################################################################################################################################3
177 //
178 class AliBasicJet : public TObject
179 {
180  public:
182  AliBasicJet(Float_t eta, Float_t phi, Float_t pt, Short_t charge, Float_t radius, Float_t area, Float_t partid, Float_t bgrd, Long64_t id, Short_t cent)
183  : fEta(eta), fPhi(phi), fpT(pt), fCharge(charge), fRadius(radius), fArea(area), fPDGCode(partid), fBackgroundDensity(bgrd), fEventID(id), fCentrality(cent), fConstituents()
184  {}
185  ~AliBasicJet();
186 
187  // Basic jet properties
188  Bool_t IsEqual(const TObject* obj) { return (obj->GetUniqueID() == GetUniqueID()); }
189  Double_t Pt() { return fpT; }
190  Double_t TruePt() { return fTruepT; }
191  Double_t Phi() { return fPhi; }
192  Double_t Eta() { return fEta; }
193  Short_t Charge() { return fCharge; }
194  Double_t Radius() { return fRadius; }
195  Double_t Area() { return fArea; }
196  Int_t PDGCode() { return fPDGCode; }
198  Long64_t EventID() { return fEventID; }
201 
202  // Basic constituent functions
205  {
206  AliBasicJetConstituent c (eta, phi, pt, charge);
207  AddJetConstituent(&c);
208  }
209  void AddJetConstituent(AliBasicJetConstituent* constituent) {fConstituents.push_back(*constituent); }
210  void SetTruePt(Double_t val) {fTruepT = val;}
211 
212 
213  private:
225 
226  std::vector<AliBasicJetConstituent> fConstituents;
227 
229  ClassDef( AliBasicJet, 4); // very basic jet object
231 };
232 #endif
Int_t charge
Double_t fEventCriteriumMinSubleadingJetPt
Min subleading jet.
Double_t fEventCriteriumMinBackground
Minimum background.
double Double_t
Definition: External.C:58
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)
long long Long64_t
Definition: External.C:43
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)
TCanvas * c
Definition: TestFitELoss.C:172
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)
UShort_t T(UShort_t m, UShort_t t)
Definition: RingBits.C:60
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.
int Int_t
Definition: External.C:63
void SetEventCriteriumLeadingJets(Double_t leading, Double_t subleading, Double_t dphi)
TString fJetParticleArrayName
Name of fJetsOutput array.
float Float_t
Definition: External.C:68
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.
Int_t fPDGCode
PDG code of source particle.
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
short Short_t
Definition: External.C:23
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)
AliEmcalJet * fInitialPartonMatchedJet1
! On PYTHIA data and fJetOutputMode=6, this holds the PDG code of the initial collisions that was mat...
AliEmcalJet * fInitialPartonMatchedJet2
! On PYTHIA data and fJetOutputMode=6, this holds the PDG code of the initial collisions that was mat...
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 &)
const char Option_t
Definition: External.C:48
Double_t fExtractionMaxPt
maximum pt of recorded jets
Double_t fMinFakeFactorPercentage
min fake factor (percentage relative to cut profile)
bool Bool_t
Definition: External.C:53
void ActivateJetExtraction(Double_t percentage, Double_t minPt, Double_t maxPt)
Int_t fAcceptedJets
! number accepted jets (calculated event-by-event)
AliBasicJet(Float_t eta, Float_t phi, Float_t pt, Short_t charge, Float_t radius, Float_t area, Float_t partid, Float_t bgrd, Long64_t id, Short_t cent)
AliEmcalJet * fMatchedJetReference
! matching input jet (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)