AliPhysics  db95e02 (db95e02)
 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  static Double_t AddMCDaughters(AliAODMCParticle* mcDmeson, TObjArray& mcdaughters, TClonesArray* mcArray);
94 
95  static Int_t CheckOrigin(AliAODRecoDecay* cand, TClonesArray* mcArray); // AOD
96  static Int_t CheckOrigin(AliAODMCParticle* part, TClonesArray* mcArray); // AOD
97  static Int_t CheckOrigin(AliAODRecoDecay* cand, AliStack* stack); // ESD
98  static Int_t CheckOrigin(Int_t ipart, AliStack* stack); // ESD
99 
100  static Int_t CheckDecayChannel(AliAODMCParticle* part, TClonesArray* mcArray); // AOD
101  static Int_t CheckDecayChannel(Int_t ipart, AliStack* stack); // ESD
102 
103  protected:
104  void ExecOnce();
105  void ProcessD0(AliAODRecoDecayHF2Prong* charmCand, Int_t isSelected);
106  void ProcessDstar(AliAODRecoCascadeHF* dstar, Int_t isSelected);
107  void FillD0MCTruthKinHistos(AliAODRecoDecayHF2Prong* charmCand, Int_t isSelected, Int_t isD0);
108  void FillDStarMCTruthKinHistos(AliAODRecoCascadeHF* dstar, Int_t /*isSelected*/, Int_t isDstar);
110  void AddEventTracks(TClonesArray* coll, AliParticleContainer* tracks);
111  void AddMCEventTracks(TClonesArray* coll, AliParticleContainer* mctracks);
112 
113  Bool_t fUseMCInfo; // Use MC info
114  Bool_t fUseReco; // use reconstructed tracks when running on MC
115  UInt_t fCandidateType; // Dstar or D0
116  TString fCandidateName; // Dstar or D0
117  Int_t fPDGmother; // PDG code of D meson
118  Int_t fNProngs; // number of prong of the decay channel
119  Int_t fPDGdaughters[4]; // PDG codes of daughters
120  Float_t fSigmaD0[30]; // D0 sigma for Dstar
121  TString fBranchName; // AOD branch name
122  AliRDHFCuts *fCuts; // cuts
123  Double_t fMinMass; // mass lower limit histogram
124  Double_t fMaxMass; // mass upper limit histogram
126  Bool_t fCombineDmesons; // create an additional collection with D meson candidates and the rest of the tracks (for jet finding)
127  Bool_t fMultCand; // In case of multiple candidates per event
128  Int_t fAnalyseCand; // Number of the candidate to be analysed
129  Bool_t fRejectQuarkNotFound; // reject D mesons for which the original charm or bottom quark could not be found (MC)
130  Bool_t fRejectDfromB; // reject D mesons coming from a B meson decay (MC)
131  Bool_t fKeepOnlyDfromB; // only accept D mesons coming from a B meson decay (MC)
133  TClonesArray *fArrayDStartoD0pi;
134  TClonesArray *fMCarray;
135  TClonesArray *fCandidateArray;
136  TClonesArray *fSideBandArray;
137  TClonesArray *fCombinedDmesons;
138  TClonesArray *fCombinedDmesonsBkg;
139  TClonesArray *fMCCombinedDmesons;
171 
172  private:
173 
176 
177  ClassDef(AliAnalysisTaskSEDmesonsFilterCJ, 6); // task for selecting D mesons to be used as an input for D-Jet correlations
178 };
179 
180 #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
static Double_t AddMCDaughters(AliAODMCParticle *mcDmeson, TObjArray &mcdaughters, TClonesArray *mcArray)
ClassDef(AliAnalysisTaskSEDmesonsFilterCJ, 6)
Container for particles within the EMCAL framework.
Int_t fNCand
contains MC D0 and MC event particles
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
TClonesArray * fMCCombinedDmesons
contains bkg candidates selected by AliRDHFCuts and the rest of the event tracks
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
void AddMCEventTracks(TClonesArray *coll, AliParticleContainer *mctracks)
Int_t nptbins
Definition: External.C:196
TClonesArray * fCombinedDmesons
contains candidates selected by AliRDHFCuts::IsSelected(kTracks), to be used for side bands (DStar ca...