AliPhysics  master (3d17d9d)
AliAnalysisTaskSEBPlustoD0Pi.h
Go to the documentation of this file.
1 #ifndef AliAnalysisTaskSEBPlustoD0Pi_H
2 #define AliAnalysisTaskSEBPlustoD0Pi_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 // Author Lennart van Doremalen
19 // Utrecht University - l.v.r.vandoremalen@uu.nl
20 //
21 // Several AliPhysics classes have been used as a basis for this code
22 //
24 
25 
26 /* $Id$ */
27 
29 
30 #include <vector>
31 #include <TH3F.h>
33 #include "AliAODVertex.h"
34 #include "AliAODMCHeader.h"
35 
36 #include "AliAnalysisTaskSE.h"
37 
39 
41 {
42 
43  public:
44 
48 
50  virtual void UserCreateOutputObjects();
51  virtual void Init();
52  virtual void LocalInit() {Init();}
53  virtual void UserExec(Option_t *option);
54  virtual void Terminate(Option_t *option);
55 
57  void DefineHistograms();
58 
59  //selection and reconstruction
60  void BPlustoD0PiSignalTracksInMC(TClonesArray * mcTrackArray,AliAODEvent* aodevent,TMatrix * BPlustoD0PiLabelMatrix, TList *listout);
61  Bool_t D0FirstDaughterSelection(AliAODTrack* aodTrack, AliAODVertex *primaryVertex, Double_t bz, TClonesArray * mcTrackArray, TMatrix * B0toDStarPiLabelMatrix, AliAODMCHeader * header, AliAODEvent* aodEvent);
62  Bool_t D0SecondDaughterSelection(AliAODTrack* aodTrack, AliAODVertex *primaryVertex, Double_t bz, TClonesArray * mcTrackArray, TMatrix * B0toDStarPiLabelMatrix, AliAODMCHeader * header, AliAODEvent* aodEvent);
63  void BPlusPionSelection(AliAODEvent* aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray * mcTrackArray, TMatrix * BPlustoD0PiLabelMatrix, AliAODMCHeader * header);
64 
65  void D0Selection(AliAODEvent* aodEvent, AliAODVertex *primaryVertex, Double_t bz,TClonesArray * mcTrackArray, TMatrix * BPlustoD0PiLabelMatrix, TClonesArray * D0TracksFromFriendFile, AliAODMCHeader * header);
66  void BPlusSelection(AliAODEvent* aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray * mcTrackArray, TMatrix * BPlustoD0PiLabelMatrix, TClonesArray * D0TracksFromFriendFile, AliAODMCHeader * header);
67  Int_t IsTrackInjected(AliAODTrack *part,AliAODMCHeader *header,TClonesArray *arrayMC);
68  Bool_t IsCandidateInjected(AliAODRecoDecayHF2Prong *part, AliAODMCHeader *header,TClonesArray *arrayMC);
69  void CutOptimizationLoop(Int_t variable, Int_t nVariables, Int_t nCuts, Int_t ptBin, Int_t fillNumber, Bool_t isDesiredCandidate, Int_t nSigmaBin);
71 
72  AliAODVertex* RecalculateVertex(const AliVVertex *primary,TObjArray *tracks,Double_t bField, Double_t dispersion, Bool_t optUseFitter, Bool_t optPropagate, Bool_t optUseDiamondConstraint);
73  void FillFinalTrackHistograms(AliAODRecoDecayHF2Prong * selectedBPlus, AliAODVertex *primaryVertex, Double_t bz, Bool_t isDesiredCandidate,TClonesArray * mcTrackArray);
74 
75  void FillD0Histograms(AliAODRecoDecayHF2Prong * selectedMother, AliAODVertex *primaryVertex, Double_t bz, Int_t motherType, Int_t histType, Int_t pdgCodeMother = -1);
76  void FillBPlusHistograms(AliAODRecoDecayHF2Prong * selectedMother, AliAODVertex *primaryVertex, Double_t bz, Int_t motherType, Int_t histType);
77  Int_t MatchCandidateToMonteCarlo(Int_t pdgabs, AliAODRecoDecayHF2Prong * candidate, TClonesArray *mcArray, TMatrix * B0toDStarPiLabelMatrix, Bool_t bCheckLabel = kFALSE) const;
78 
79  void TwoTrackCombinationInfo(AliExternalTrackParam * firstTrack, AliExternalTrackParam * secondTrack, AliAODVertex * primaryVertex, Double_t bz, Bool_t isDesiredCandidate, Int_t histogramNumber, UInt_t prongs[2]);
80  void ThreeTrackCombinationInfo(AliExternalTrackParam * firstTrack, AliExternalTrackParam * secondTrack, AliExternalTrackParam * thirdTrack, AliAODVertex * primaryVertex, Double_t bz, Bool_t isDesiredCandidate, Int_t histogramNumber, UInt_t prongs[3]);
81 
83  void SetMC(Bool_t bUseMCInfo) {fUseMCInfo = bUseMCInfo;}
84  Bool_t GetMC() const {return fUseMCInfo;}
85 
87 
89 
90  void SetShowMask(Bool_t bShowMask) {fShowMask = bShowMask;}
91  Bool_t GetShowMask() const {return fShowMask;}
92 
93  void SetShowRejection(Bool_t bShowRejection) {fShowRejection = bShowRejection;}
95 
98 
101 
104 
105  void SetPerformCutOptimization(Bool_t bPerformCutOptimization) {fPerformCutOptimization = bPerformCutOptimization;}
107 
108  void SetRemoveInjected(Bool_t bRemoveInjected) {fRemoveInjected = bRemoveInjected;}
110 
111  private:
112 
115 
117  Bool_t fUseMCInfo; // Use MC info
126 
136 
137  AliRDHFCutsBPlustoD0Pi *fCuts; // Cuts - sent to output
138 
139  TH1F *fCEvents;
140  TH1F *fCTrigger;
141  TH1F *fCRejected;
142 
143  std::vector<Int_t> * fBPlusPionTracks;
144  std::vector<Int_t> * fD0Tracks;
145 
153 
154 
155  TH1F* fDaughterHistogramArray[4][6][15];
158  TH1F* fMotherHistogramArray[6][99][60];
161  TH1F* fResultsHistogramArray[20][99];
163 
165  ClassDef(AliAnalysisTaskSEBPlustoD0Pi,3);
166 };
168 
169 #endif
170 
void ThreeTrackCombinationInfo(AliExternalTrackParam *firstTrack, AliExternalTrackParam *secondTrack, AliExternalTrackParam *thirdTrack, AliAODVertex *primaryVertex, Double_t bz, Bool_t isDesiredCandidate, Int_t histogramNumber, UInt_t prongs[3])
Int_t IsTrackInjected(AliAODTrack *part, AliAODMCHeader *header, TClonesArray *arrayMC)
void SetShowRejection(Bool_t bShowRejection)
double Double_t
Definition: External.C:58
AliAODVertex * RecalculateVertex(const AliVVertex *primary, TObjArray *tracks, Double_t bField, Double_t dispersion, Bool_t optUseFitter, Bool_t optPropagate, Bool_t optUseDiamondConstraint)
Double_t DeltaInvMassBPlusKpipi(AliAODRecoDecayHF2Prong *BPlus) const
Definition: External.C:236
Double_t bz
char Char_t
Definition: External.C:18
void BPlustoD0PiSignalTracksInMC(TClonesArray *mcTrackArray, AliAODEvent *aodevent, TMatrix *BPlustoD0PiLabelMatrix, TList *listout)
void SetPerformCutOptimization(Bool_t bPerformCutOptimization)
virtual void Terminate(Option_t *option)
void BPlusPionSelection(AliAODEvent *aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *BPlustoD0PiLabelMatrix, AliAODMCHeader *header)
Bool_t D0SecondDaughterSelection(AliAODTrack *aodTrack, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *B0toDStarPiLabelMatrix, AliAODMCHeader *header, AliAODEvent *aodEvent)
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
AliAnalysisTaskSEBPlustoD0Pi & operator=(const AliAnalysisTaskSEBPlustoD0Pi &source)
void SetMC(Bool_t bUseMCInfo)
set MC usage
Float_t fCutVariableValueArray[99]
[fnPtBinsD0forD0ptbinLimits]
virtual void UserCreateOutputObjects()
Implementation of interface methods.
Int_t MatchCandidateToMonteCarlo(Int_t pdgabs, AliAODRecoDecayHF2Prong *candidate, TClonesArray *mcArray, TMatrix *B0toDStarPiLabelMatrix, Bool_t bCheckLabel=kFALSE) const
void FillBPlusHistograms(AliAODRecoDecayHF2Prong *selectedMother, AliAODVertex *primaryVertex, Double_t bz, Int_t motherType, Int_t histType)
void CutOptimizationVariableValues(AliAODRecoDecayHF2Prong *candidateBPlus, AliAODEvent *aod)
void FillD0Histograms(AliAODRecoDecayHF2Prong *selectedMother, AliAODVertex *primaryVertex, Double_t bz, Int_t motherType, Int_t histType, Int_t pdgCodeMother=-1)
Bool_t D0FirstDaughterSelection(AliAODTrack *aodTrack, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *B0toDStarPiLabelMatrix, AliAODMCHeader *header, AliAODEvent *aodEvent)
void FillFinalTrackHistograms(AliAODRecoDecayHF2Prong *selectedBPlus, AliAODVertex *primaryVertex, Double_t bz, Bool_t isDesiredCandidate, TClonesArray *mcTrackArray)
Bool_t IsCandidateInjected(AliAODRecoDecayHF2Prong *part, AliAODMCHeader *header, TClonesArray *arrayMC)
void SetRemoveInjected(Bool_t bRemoveInjected)
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
virtual void UserExec(Option_t *option)
void TwoTrackCombinationInfo(AliExternalTrackParam *firstTrack, AliExternalTrackParam *secondTrack, AliAODVertex *primaryVertex, Double_t bz, Bool_t isDesiredCandidate, Int_t histogramNumber, UInt_t prongs[2])
void BPlusSelection(AliAODEvent *aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *BPlustoD0PiLabelMatrix, TClonesArray *D0TracksFromFriendFile, AliAODMCHeader *header)
void CutOptimizationLoop(Int_t variable, Int_t nVariables, Int_t nCuts, Int_t ptBin, Int_t fillNumber, Bool_t isDesiredCandidate, Int_t nSigmaBin)
void D0Selection(AliAODEvent *aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *BPlustoD0PiLabelMatrix, TClonesArray *D0TracksFromFriendFile, AliAODMCHeader *header)