AliPhysics  fc9925d (fc9925d)
 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 
39 
43 
44  void ActivateJetExtraction(Double_t percentage, Double_t minPt, Double_t maxPt) {fExtractionPercentage = percentage; fExtractionMinPt = minPt; fExtractionMaxPt = maxPt;}
45 
46  protected:
47  void ExecOnce();
48  Bool_t Run();
49 
50  // ######### META FUNCTIONS
51  void BinLogAxis(const THn *h, Int_t axisNumber);
52  void AddJetToTree(AliEmcalJet* jet);
54  void AddTrackToOutputArray(AliVTrack* track);
55  void FillHistogramsTracks(AliVTrack* track);
60 
69  TClonesArray *fJetsOutput;
70  TClonesArray *fTracksOutput;
71  TClonesArray *fJetsInput;
75  TRandom3* fRandom;
76 
77  // Criteria for the selection of jets that are passed to the correlation task
88 
89  // Event properties
98 
99  // ######### HISTOGRAM FUNCTIONS
100  void FillHistogram(const char * key, Double_t x);
101  void FillHistogram(const char * key, Double_t x, Double_t y);
102  void FillHistogram(const char * key, Double_t x, Double_t y, Double_t add);
103  void FillHistogram3D(const char * key, Double_t x, Double_t y, Double_t z, Double_t add = 0);
104 
105  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");
106  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");
107  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");
108 
109  // ######### HELPER FUNCTIONS
110  Bool_t IsTrackInCone(AliVParticle* track, Double_t eta, Double_t phi, Double_t radius);
113  void GetMatchingJets();
114 
115  void GetLeadingJets(const char* opt, AliEmcalJet*& jetLeading, AliEmcalJet*& jetSubLeading);
117 
118 
119  private:
122 
124  ClassDef(AliAnalysisTaskChargedJetsHadronCF, 7) // Charged jet+h analysis support task
126 };
127 
128 
129 //###############################################################################################################################################3
130 
140 //
142 {
143  public:
144  AliBasicJetConstituent() : fEta(0), fPhi(0), fpT(0), fCharge(0), fPID(0) {}
146  : fEta(eta), fPhi(phi), fpT(pt), fCharge(charge), fPID(pid)
147  {
148  }
150 
151  Bool_t IsEqual(const TObject* obj) { return (obj->GetUniqueID() == GetUniqueID()); }
152  Double_t Pt() { return fpT; }
153  Double_t Phi() { return fPhi; }
154  Double_t Eta() { return fEta; }
155  Short_t Charge() { return fCharge; }
156  Short_t PID() { return fPID; }
157 
158  private:
164  ClassDef( AliBasicJetConstituent, 2); // very basic jet constituent object
167 };
168 
169 //###############################################################################################################################################3
180 //
181 class AliBasicJet : public TObject
182 {
183  public:
185  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)
186  : fEta(eta), fPhi(phi), fpT(pt), fCharge(charge), fRadius(radius), fArea(area), fPDGCode(partid), fBackgroundDensity(bgrd), fEventID(id), fCentrality(cent), fConstituents()
187  {}
188  ~AliBasicJet();
189 
190  // Basic jet properties
191  Bool_t IsEqual(const TObject* obj) { return (obj->GetUniqueID() == GetUniqueID()); }
192  Double_t Pt() { return fpT; }
193  Double_t TruePt() { return fTruepT; }
194  Double_t Phi() { return fPhi; }
195  Double_t Eta() { return fEta; }
196  Short_t Charge() { return fCharge; }
197  Double_t Radius() { return fRadius; }
198  Double_t Area() { return fArea; }
199  Int_t PDGCode() { return fPDGCode; }
201  Long64_t EventID() { return fEventID; }
204 
205  // Basic constituent functions
208  {
209  AliBasicJetConstituent c (eta, phi, pt, charge, pid);
210  AddJetConstituent(&c);
211  }
212  void AddJetConstituent(AliBasicJetConstituent* constituent) {fConstituents.push_back(*constituent); }
213  void SetTruePt(Double_t val) {fTruepT = val;}
214 
215 
216  private:
228 
229  std::vector<AliBasicJetConstituent> fConstituents;
230 
232  ClassDef( AliBasicJet, 4); // very basic jet object
234 };
235 #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)
AliBasicJetConstituent(Float_t eta, Float_t phi, Float_t pt, Short_t charge, Short_t pid)
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.
Int_t fPythiaExtractionMode
Mode which PYTHIA-jets to extract for fJetOutputMode==6: 0: all, 1: quark-jets, 2: gluon jets...
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.
void AddJetConstituent(Float_t eta, Float_t phi, Float_t pt, Short_t charge, Short_t pid=0)
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)
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)