AliPhysics  b095172 (b095172)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskSEDmesonsFilterCJ.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKSEDMESONSFILTERCJ_H
2 #define ALIANALYSISTASKSEDMESONSFILTERCJ_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 : A. Grelli, Utrecht University
20 // C. Bianchin, Utrecht University
21 // X. Zhang, LBNL
22 // S. Aiola, Yale University
23 //-----------------------------------------------------------------------
24 
25 
26 #include "AliAnalysisTaskEmcal.h"
27 
28 class TH2;
29 class TString;
30 class TClonesArray;
31 class AliRDHFCuts;
34 class AliAODRecoDecay;
35 class AliStack;
36 
38 {
39 
40  public:
41 
45 
49 
51  Bool_t Run();
52  void Init();
53  void LocalInit() { Init(); }
54 
55  // inizializations
57 
58  // set MC usage
59  void SetMC(Bool_t theMCon) { fUseMCInfo = theMCon ; }
60  Bool_t GetMC() const { return fUseMCInfo ; }
61 
62  // set usage of generated or reconstucted quantities (relevant for MC)
63  void SetUseReco(Bool_t useReco=kTRUE) { fUseReco = useReco ; }
64  Bool_t GetUseReco() const { return fUseReco ; }
65 
68 
70  Bool_t GetMultipleCandidates() const { return fMultCand ; }
71 
74 
77 
79  Bool_t GetRejectDfromB() const { return fRejectDfromB ; }
80 
83 
84  void SetMassLimits(Double_t range, Int_t pdg);
85  void SetMassLimits(Double_t lowlimit, Double_t uplimit);
86 
87  // Array of D0 width for the Dstar
89 
90  Float_t DeltaR(AliVParticle *p1, AliVParticle *p2) const;
91 
92  static Double_t AddDaughters(AliAODRecoDecay* cand, TObjArray& daughters);
93 
94  static Int_t CheckOrigin(AliAODRecoDecay* cand, TClonesArray* mcArray); // AOD
95  static Int_t CheckOrigin(AliAODMCParticle* part, TClonesArray* mcArray); // AOD
96  static Int_t CheckOrigin(AliAODRecoDecay* cand, AliStack* stack); // ESD
97  static Int_t CheckOrigin(Int_t ipart, AliStack* stack); // ESD
98 
99  static Int_t CheckDecayChannel(AliAODMCParticle* part, TClonesArray* mcArray); // AOD
100  static Int_t CheckDecayChannel(Int_t ipart, AliStack* stack); // ESD
101 
102  protected:
103  void ExecOnce();
104  void ProcessD0(AliAODRecoDecayHF2Prong* charmCand, Int_t isSelected);
105  void ProcessDstar(AliAODRecoCascadeHF* dstar, Int_t isSelected);
106  void FillD0MCTruthKinHistos(AliAODRecoDecayHF2Prong* charmCand, Int_t isSelected, Int_t isD0);
107  void FillDStarMCTruthKinHistos(AliAODRecoCascadeHF* dstar, Int_t /*isSelected*/, Int_t isDstar);
109  void AddEventTracks(TClonesArray* coll, AliParticleContainer* tracks);
110 
111  Bool_t fUseMCInfo; // Use MC info
112  Bool_t fUseReco; // use reconstructed tracks when running on MC
113  UInt_t fCandidateType; // Dstar or D0
114  TString fCandidateName; // Dstar or D0
115  Int_t fPDGmother; // PDG code of D meson
116  Int_t fNProngs; // number of prong of the decay channel
117  Int_t fPDGdaughters[4]; // PDG codes of daughters
118  Float_t fSigmaD0[30]; // D0 sigma for Dstar
119  TString fBranchName; // AOD branch name
120  AliRDHFCuts *fCuts; // cuts
121  Double_t fMinMass; // mass lower limit histogram
122  Double_t fMaxMass; // mass upper limit histogram
124  Bool_t fCombineDmesons; // create an additional collection with D meson candidates and the rest of the tracks (for jet finding)
125  Bool_t fMultCand; // In case of multiple candidates per event
126  Int_t fAnalyseCand; // Number of the candidate to be analysed
127  Bool_t fRejectQuarkNotFound; // reject D mesons for which the original charm or bottom quark could not be found (MC)
128  Bool_t fRejectDfromB; // reject D mesons coming from a B meson decay (MC)
129  Bool_t fKeepOnlyDfromB; // only accept D mesons coming from a B meson decay (MC)
131  TClonesArray *fArrayDStartoD0pi;
132  TClonesArray *fMCarray;
133  TClonesArray *fCandidateArray;
134  TClonesArray *fSideBandArray;
135  TClonesArray *fCombinedDmesons;
136  TClonesArray *fCombinedDmesonsBkg;
168 
169  private:
170 
173 
174  ClassDef(AliAnalysisTaskSEDmesonsFilterCJ, 6); // task for selecting D mesons to be used as an input for D-Jet correlations
175 };
176 
177 #endif
void ProcessDstar(AliAODRecoCascadeHF *dstar, Int_t isSelected)
Int_t pdg
static Int_t CheckOrigin(AliAODRecoDecay *cand, TClonesArray *mcArray)
double Double_t
Definition: External.C:58
TClonesArray * fCombinedDmesonsBkg
contains candidates selected by AliRDHFCuts and the rest of the event tracks
void ProcessD0(AliAODRecoDecayHF2Prong *charmCand, Int_t isSelected)
Base task in the EMCAL framework.
char Char_t
Definition: External.C:18
void FillDStarMCTruthKinHistos(AliAODRecoCascadeHF *dstar, Int_t, Int_t isDstar)
void FillD0MCTruthKinHistos(AliAODRecoDecayHF2Prong *charmCand, Int_t isSelected, Int_t isD0)
static Double_t AddDaughters(AliAODRecoDecay *cand, TObjArray &daughters)
void AddEventTracks(TClonesArray *coll, AliParticleContainer *tracks)
TCanvas * c
Definition: TestFitELoss.C:172
ClassDef(AliAnalysisTaskSEDmesonsFilterCJ, 6)
Container for particles within the EMCAL framework.
Int_t fNCand
contains bkg candidates selected by AliRDHFCuts and the rest of the event tracks
void FillDstarSideBands(AliAODRecoCascadeHF *dstar)
TClonesArray * fSideBandArray
contains candidates selected by AliRDHFCuts
AliAnalysisTaskSEDmesonsFilterCJ & operator=(const AliAnalysisTaskSEDmesonsFilterCJ &source)
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
static Int_t CheckDecayChannel(AliAODMCParticle *part, TClonesArray *mcArray)
float Float_t
Definition: External.C:68
Bool_t SetD0WidthForDStar(Int_t nptbins, Float_t *width)
Definition: External.C:220
Int_t fNSBCand
number of selected D candidates already added to fCandidateArray
TH1 * fHistStat
number of selected side-band D candidates already added to fSideBandArray
Float_t DeltaR(AliVParticle *p1, AliVParticle *p2) const
bool Bool_t
Definition: External.C:53
Int_t nptbins
Definition: External.C:196
TClonesArray * fCombinedDmesons
contains candidates selected by AliRDHFCuts::IsSelected(kTracks), to be used for side bands (DStar ca...