AliPhysics  d565ceb (d565ceb)
AliAnalysisTaskFlavourJetCorrelations.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKFLAVOURJETCORRELATIONS_H
2 #define ALIANALYSISTASKFLAVOURJETCORRELATIONS_H
3 /**************************************************************************
4 * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5 * *
6 * Author: The ALICE Off-line Project. *
7 * Contributors are mentioned in the code where appropriate. *
8 * *
9 * Permission to use, copy, modify and distribute this software and its *
10 * documentation strictly for non-commercial purposes is hereby granted *
11 * without fee, provided that the above copyright notice appears in all *
12 * copies and that both the copyright notice and this permission notice *
13 * appear in the supporting documentation. The authors make no claims *
14 * about the suitability of this software for any purpose. It is *
15 * provided "as is" without express or implied warranty. *
16 **************************************************************************/
17 
18 //-----------------------------------------------------------------------
19 // Author : S. Antônio (University of São Paulo) antonio.silva@cern.ch
20 // A. Grelli, Utrecht University
21 // C. Bianchin, Utrecht University
22 // X. Zhang, LBNL
23 // B. Trzeciak, Utrecht Univeristy
24 //-----------------------------------------------------------------------
25 
26 
27 #include <TH2F.h>
28 #include "AliAODEvent.h"
30 
31 class TParticle;
32 class TClonesArray;
33 class THnSparse;
34 class AliMCParticle;
35 class AliAODMCParticle;
36 class AliRDHFCuts;
37 class AliEmcalJet;
38 class AliAODRecoDecayHF;
40 class AliAODEvent;
43 class AliJetContainer;
44 
46 {
47 
48 public:
49 
52 
56 
57  virtual void UserCreateOutputObjects();
58  virtual Bool_t Run();
59  virtual void Terminate(Option_t *);
60  virtual void Init();
61  virtual void LocalInit() {Init();}
62 
63  // inizializations
65 
66  // set MC usage
67  void SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
68  Bool_t GetMC() const {return fUseMCInfo;}
69  // set use Pythia info only for MC
70  void SetUsePythia(Bool_t theUsePythia) {fUsePythia = theUsePythia; }
71  Bool_t GetUsePythia() const { return fUsePythia; }
72  // set usage of reconstructed tracks
73  void SetUseReco(Bool_t reco) {fUseReco=reco;}
74  Bool_t GetUseReco() const {return fUseReco;}
75 
76  void SetMassLimits(Double_t range, Int_t pdg);
77  void SetMassLimits(Double_t lowlimit, Double_t uplimit);
78 
81 
84 
86  Bool_t GetUseSBArray() const {return fUseSBArray;}
87 
88  // Array of D0 width for the Dstar
90  void ConstituentCorrelationMethod(Bool_t IsBkg, AliAODEvent* aodEvent);
91  void AngularCorrelationMethod(Bool_t IsBkg, AliAODEvent* aodEvent);
93  void CreateMCResponseMatrix(AliEmcalJet* MCjet, AliAODEvent* aodEvent);
94  void FillDJetHistograms(AliEmcalJet* jet, Double_t rho, Bool_t IsBkg, AliAODEvent* aodEvent);
95  void GetHFJet(AliEmcalJet*& jet, Bool_t IsBkg);
96  void FillHistogramsD0JetCorr(AliAODRecoDecayHF* candidate, Double_t z, Double_t ptD, Double_t ptj, Double_t jetEta, Bool_t IsBkg, Bool_t bDInEMCalAcc, Bool_t bJetInEMCalAcc, AliAODEvent* aodEvent);
97  void FillHistogramsDstarJetCorr(AliAODRecoCascadeHF* dstar, Double_t z, Double_t ptD, Double_t ptj, Double_t jetEta, Bool_t IsBkg, Bool_t bDInEMCalAcc, Bool_t bJetInEMCalAcc);
98  void FillHistogramsMCGenDJetCorr(Double_t z,Double_t ptD,Double_t ptjet, Double_t yD, Double_t jetEta, Bool_t bDInEMCalAcc, Bool_t bJetInEMCalAcc);
99  void FindMCJet(AliEmcalJet*& mcjet);
101  Bool_t InEMCalAcceptance(AliVParticle *vpart);
102 
109 
110 
111 private:
112 
115 
116  Double_t Z(AliVParticle* part, AliEmcalJet* jet, Double_t rho) const;
117  Double_t Z(AliVParticle* part, AliEmcalJet* jet) const;
118  Double_t Z(Double_t* p, Double_t *pj) const;
119  Double_t ZT(Double_t* p, Double_t *pj) const;
120  Float_t DeltaR(AliEmcalJet *p1, AliVParticle *p2, Double_t rho) const;
121  Float_t CheckDeltaR(AliEmcalJet *p1, AliVParticle *p2) const;
122 
123 
124  Bool_t fUseMCInfo; // Use MC info
125  Bool_t fUseReco; // use reconstructed tracks when running on MC
126  Bool_t fUsePythia; // Use Pythia info only for MC
127  Bool_t fBuildRM; // flag to switch on/off the Response Matrix (Needs MC)
128  Bool_t fBuildRMEff; // flag to switch on/off the Response Matrix with efficiencies (Needs MC)
129 
130  Int_t fCandidateType; // Dstar or D0
131  Int_t fCorrelationMethod; // Method to correlate D mesons and jets
132  Int_t fPDGmother; // PDG code of D meson
133  Int_t fNProngs; // number of prong of the decay channel
134  Int_t fPDGdaughters[4]; // PDG codes of daughters
135  Float_t fSigmaD0[30]; // Sigma of D0 for D*
136  TString fBranchName; // AOD branch name
137  AliRDHFCuts *fCuts; // Cuts
138 
139  Double_t fMinMass; // mass lower limit histogram
140  Double_t fMaxMass; // mass upper limit histogram
141 
142  TClonesArray *fCandidateArray;
143  TClonesArray *fSideBandArray;
144  Bool_t fAnalyseDBkg; // flag to switch off/on the SB analysis (default is off)
145 
146 
147  Int_t fNAxesBigSparse; // number of axis
150 
151  // Histograms
153  TH1F* fhCentDjet;
154  //generic jet and jet track distributions
155  TH1F* fhPtJetTrks;
156  TH1F* fhPhiJetTrks;
157  TH1F* fhEtaJetTrks;
158  TH1F* fhPtJet;
159  TH1F* fhPhiJet;
160  TH1F* fhEtaJet;
161 
162  //D mesons
166  TH1F* fhPtPion;
167  //main histograms
169  THnSparse* fhsDphiz;
170  THnSparse* fResponseMatrix;
171 
172 
173  ClassDef(AliAnalysisTaskFlavourJetCorrelations,8); // class for charm-jet CorrelationsExch
174 };
175 
176 #endif
Int_t pdg
double Double_t
Definition: External.C:58
Definition: External.C:236
Double_t Z(AliVParticle *part, AliEmcalJet *jet, Double_t rho) const
AliAnalysisTaskFlavourJetCorrelations & operator=(const AliAnalysisTaskFlavourJetCorrelations &source)
char Char_t
Definition: External.C:18
void FillHistogramsMCGenDJetCorr(Double_t z, Double_t ptD, Double_t ptjet, Double_t yD, Double_t jetEta, Bool_t bDInEMCalAcc, Bool_t bJetInEMCalAcc)
TCanvas * c
Definition: TestFitELoss.C:172
void FillHistogramsDstarJetCorr(AliAODRecoCascadeHF *dstar, Double_t z, Double_t ptD, Double_t ptj, Double_t jetEta, Bool_t IsBkg, Bool_t bDInEMCalAcc, Bool_t bJetInEMCalAcc)
void AngularCorrelationMethod(Bool_t IsBkg, AliAODEvent *aodEvent)
TString part
use mixed event to constrain combinatorial background
Definition: InvMassFit.C:52
Container for particles within the EMCAL framework.
int Int_t
Definition: External.C:63
void FillDJetHistograms(AliEmcalJet *jet, Double_t rho, Bool_t IsBkg, AliAODEvent *aodEvent)
Definition: External.C:204
float Float_t
Definition: External.C:68
virtual Bool_t Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
Float_t CheckDeltaR(AliEmcalJet *p1, AliVParticle *p2) const
void FillHistogramsD0JetCorr(AliAODRecoDecayHF *candidate, Double_t z, Double_t ptD, Double_t ptj, Double_t jetEta, Bool_t IsBkg, Bool_t bDInEMCalAcc, Bool_t bJetInEMCalAcc, AliAODEvent *aodEvent)
void ConstituentCorrelationMethod(Bool_t IsBkg, AliAODEvent *aodEvent)
void CreateMCResponseMatrix(AliEmcalJet *MCjet, AliAODEvent *aodEvent)
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
Bool_t SetD0WidthForDStar(Int_t nptbins, Float_t *width)
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
Container structure for EMCAL clusters.
Float_t DeltaR(AliEmcalJet *p1, AliVParticle *p2, Double_t rho) const
Int_t nptbins
Container for jet within the EMCAL jet framework.
TClonesArray * fSideBandArray
contains candidates selected by AliRDHFCuts
Bool_t fAnalyseDBkg
contains candidates selected by AliRDHFCuts::IsSelected(kTracks), to be used for side bands (DStar ca...