AliPhysics  114179e (114179e)
 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
32  void ActivateJetMatching(const char* matchArray, Double_t maxDistance, Double_t minSharedFraction, Double_t maxSharedFraction, Double_t maxEmbeddingOffset, Double_t matchMinPt, Double_t matchMaxPt, Int_t nLeading, const char* vetoArray = 0, Double_t minVetoJetPt = 0, Double_t maxVetoJetPt = 0, Bool_t jetVetoJetByJet = kFALSE)
33  {
34  fJetMatchingMaxDistance = maxDistance;
35  fJetMatchingArrayName = matchArray;
36  fJetMatchingMinSharedFraction = minSharedFraction;
37  fJetMatchingMaxSharedFraction = maxSharedFraction;
38  fJetMatchingMaxEmbeddingOffset = maxEmbeddingOffset;
39 
40  fJetMatchingMinPt = matchMinPt;
41  fJetMatchingMaxPt = matchMaxPt;
42  fJetMatchingUseOnlyNLeading = nLeading; // currently only 1,2, or 0 (all) possible
43 
44  fJetVetoArrayName = vetoArray;
45  fJetVetoMinPt = minVetoJetPt;
46  fJetVetoMaxPt = maxVetoJetPt;
47  fJetVetoJetByJet = jetVetoJetByJet;
48  }
49 
52  void SetJetParticleArrayName(const char* name) { fJetParticleArrayName = name; }
53  void SetTrackParticleArrayName(const char* name) { fTrackParticleArrayName = name; }
54 
57 
61 
62  void ActivateJetExtraction(Double_t percentage, Double_t minPt, Double_t maxPt) {fExtractionPercentage = percentage; fExtractionMinPt = minPt; fExtractionMaxPt = maxPt;}
63  void ActivateEventExtraction(Double_t percentage, Double_t minJetPt, Double_t maxJetPt) {fEventExtractionPercentage = percentage; fEventExtractionMinJetPt = minJetPt; fEventExtractionMaxJetPt = maxJetPt;}
64 
65  protected:
66  void ExecOnce();
67  Bool_t Run();
68 
69  // ######### META FUNCTIONS
70  void BinLogAxis(const THn *h, Int_t axisNumber);
71  void AddJetToTree(AliEmcalJet* jet);
72  void AddEventToTree();
74  void AddTrackToOutputArray(AliVTrack* track);
75  void FillHistogramsTracks(AliVTrack* track);
80 
91 
94  TClonesArray *fJetsOutput;
95  TClonesArray *fTracksOutput;
98  TClonesArray *fJetMatchingArray;
107  TClonesArray *fJetVetoArray;
112  std::vector<AliEmcalJet*> fMatchedJets;
113  std::vector<AliEmcalJet*> fMatchedJetsReference;
114  TRandom3* fRandom;
115 
116 
117  // Criteria for the selection of jets that are passed to the correlation task
128 
129  // Event properties
136 
137  // ######### HISTOGRAM FUNCTIONS
138  void FillHistogram(const char * key, Double_t x);
139  void FillHistogram(const char * key, Double_t x, Double_t y);
140  void FillHistogram(const char * key, Double_t x, Double_t y, Double_t add);
141  void FillHistogram3D(const char * key, Double_t x, Double_t y, Double_t z, Double_t add = 0);
142 
143  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");
144  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");
145  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");
146 
147  // ######### HELPER FUNCTIONS
149  Bool_t IsTrackInCone(AliVParticle* track, Double_t eta, Double_t phi, Double_t radius);
152  void GetMatchingJets();
153 
154  void GetLeadingJets(const char* opt, AliEmcalJet*& jetLeading, AliEmcalJet*& jetSubLeading);
156 
157 
158  private:
161 
163  ClassDef(AliAnalysisTaskChargedJetsHadronCF, 7) // Charged jet+h analysis support task
165 };
166 
167 
168 //###############################################################################################################################################3
169 
179 //
181 {
182  public:
183  AliBasicJetConstituent() : fEta(0), fPhi(0), fpT(0), fCharge(0), fPID(0) {}
185  : fEta(eta), fPhi(phi), fpT(pt), fCharge(charge), fPID(pid)
186  {
187  }
189 
190  Bool_t IsEqual(const TObject* obj) { return (obj->GetUniqueID() == GetUniqueID()); }
191  Double_t Pt() { return fpT; }
192  Double_t Phi() { return fPhi; }
193  Double_t Eta() { return fEta; }
194  Short_t Charge() { return fCharge; }
195  Short_t PID() { return fPID; }
196 
197  private:
203  ClassDef( AliBasicJetConstituent, 2); // very basic jet constituent object
206 };
207 
208 //###############################################################################################################################################3
219 //
220 class AliBasicJet : public TObject
221 {
222  public:
224  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)
225  : fEta(eta), fPhi(phi), fpT(pt), fCharge(charge), fRadius(radius), fArea(area), fPDGCode(partid), fBackgroundDensity(bgrd), fEventID(id), fCentrality(cent), fConstituents()
226  {}
227  ~AliBasicJet();
228 
229  // Basic jet properties
230  Bool_t IsEqual(const TObject* obj) { return (obj->GetUniqueID() == GetUniqueID()); }
231  Double_t Pt() { return fpT; }
232  Double_t TruePt() { return fTruepT; }
233  Double_t Phi() { return fPhi; }
234  Double_t Eta() { return fEta; }
235  Short_t Charge() { return fCharge; }
236  Double_t Radius() { return fRadius; }
237  Double_t Area() { return fArea; }
238  Int_t PDGCode() { return fPDGCode; }
240  Long64_t EventID() { return fEventID; }
243 
244  // Basic constituent functions
247  {
248  AliBasicJetConstituent c (eta, phi, pt, charge, pid);
249  AddJetConstituent(&c);
250  }
251  void AddJetConstituent(AliBasicJetConstituent* constituent) {fConstituents.push_back(*constituent); }
252  void SetTruePt(Double_t val) {fTruepT = val;}
253 
254 
255  private:
267 
268  std::vector<AliBasicJetConstituent> fConstituents;
269 
271  ClassDef( AliBasicJet, 4); // very basic jet object
273 };
274 #endif
Int_t charge
Double_t fEventExtractionMaxJetPt
maximum jet pt of recorded events
Double_t fEventCriteriumMinSubleadingJetPt
Min subleading jet.
double Double_t
Definition: External.C:58
Bool_t fJetVetoJetByJet
If true, the jet veto will be applied on a jet-by-jet basis.
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.
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)
Double_t fJetMatchingMaxEmbeddingOffset
An embedded jet must NOT carry more than max fraction + max embedding offset.
Int_t fJetOutputMode
mode which jets are written to array (0: all accepted, 1: leading, 2: subleading, 3: leading+subleadi...
Double_t fEventExtractionMinJetPt
minimum jet pt of recorded events
std::vector< AliEmcalJet * > fMatchedJetsReference
Jets matched in an event (reference)
Double_t fEventExtractionPercentage
percentage of events that is recorded
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.
int Int_t
Definition: External.C:63
void SetEventCriteriumLeadingJets(Double_t leading, Double_t subleading, Double_t dphi)
Double_t fJetMatchingMaxPt
Max pt cut applied on the matchArray jets.
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.
std::vector< AliEmcalJet * > fMatchedJets
Jets matched in an event (embedded)
Int_t fPDGCode
PDG code of source particle.
Double_t fExtractionPercentage
percentage that is recorded
Double_t fJetVetoMinPt
Min pt cut applied on the fJetVetoArray jets.
Double_t fJetVetoMaxPt
Max pt cut applied on the fJetVetoArray jets.
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)
Double_t fJetMatchingMaxSharedFraction
An embedded jet must NOT carry more than max fraction + max embedding offset.
Bool_t IsTrackInCone(AliVParticle *track, Double_t eta, Double_t phi, Double_t radius)
TString fJetVetoArrayName
Name of array used for veto jets.
Double_t fMaxFakeFactorPercentage
max fake factor (percentage relative to cut profile)
TClonesArray * fJetMatchingArray
! Array of generated jets imported into task (toy model/embedding)
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...
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 &)
void ActivateJetMatching(const char *matchArray, Double_t maxDistance, Double_t minSharedFraction, Double_t maxSharedFraction, Double_t maxEmbeddingOffset, Double_t matchMinPt, Double_t matchMaxPt, Int_t nLeading, const char *vetoArray=0, Double_t minVetoJetPt=0, Double_t maxVetoJetPt=0, Bool_t jetVetoJetByJet=kFALSE)
const char Option_t
Definition: External.C:48
void ActivateEventExtraction(Double_t percentage, Double_t minJetPt, Double_t maxJetPt)
Double_t fExtractionMaxPt
maximum pt of recorded jets
Double_t fMinFakeFactorPercentage
min fake factor (percentage relative to cut profile)
Double_t fJetMatchingMaxDistance
Max distance allowed to accept a matching jet (for embedding)
bool Bool_t
Definition: External.C:53
Double_t fJetMatchingMinPt
Min pt cut applied on the matchArray jets.
Int_t fJetMatchingUseOnlyNLeading
Number of matched leading jets that will be used.
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)
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.
TClonesArray * fJetVetoArray
! Array of jets imported into task used for veto a matching/embedding
Int_t fAcceptedTracks
! number accepted tracks (calculated event-by-event)
Double_t fJetMatchingMinSharedFraction
An embedded jet must carry this pt fraction to be accepted.
Float_t fTruepT
true pT (optional, e.g. from matching)
Int_t fConstPtFilterBit
For const pt plot, filter bit.