AliPhysics
88b7ad0 (88b7ad0)
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
AliHFTrackContainer.cxx
Go to the documentation of this file.
1
/*************************************************************************
2
* Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
3
* *
4
* Author: The ALICE Off-line Project. *
5
* Contributors are mentioned in the code where appropriate. *
6
* *
7
* Permission to use, copy, modify and distribute this software and its *
8
* documentation strictly for non-commercial purposes is hereby granted *
9
* without fee, provided that the above copyright notice appears in all *
10
* copies and that both the copyright notice and this permission notice *
11
* appear in the supporting documentation. The authors make no claims *
12
* about the suitability of this software for any purpose. It is *
13
* provided "as is" without express or implied warranty. *
14
**************************************************************************/
15
16
#include <TClonesArray.h>
17
#include <AliAODMCParticle.h>
18
#include <AliLog.h>
19
#include <AliAODRecoDecay.h>
20
#include <AliAODTrack.h>
21
22
#include "
AliHFTrackContainer.h
"
23
25
ClassImp(
AliHFAODMCParticleContainer
)
27
29
AliHFTrackContainer
::
AliHFTrackContainer
() :
30
AliTrackContainer
(),
31
fDMesonCandidate(0),
32
fDaughterList(10)
33
{
34
// Constructor.
35
36
fBaseClassName =
"AliAODTrack"
;
37
SetClassName(
"AliAODTrack"
);
38
fDaughterList.SetOwner(kFALSE);
39
}
40
44
AliHFTrackContainer::AliHFTrackContainer
(
const
char
*name) :
45
AliTrackContainer
(name),
46
fDMesonCandidate(0),
47
fDaughterList(10)
48
{
49
// Constructor.
50
51
fBaseClassName =
"AliAODTrack"
;
52
SetClassName(
"AliAODTrack"
);
53
fDaughterList
.SetOwner(kFALSE);
54
}
55
63
Bool_t
AliHFTrackContainer::ApplyTrackCuts
(
const
AliVTrack* vp,
UInt_t
&rejectionReason)
const
64
{
65
const
AliAODTrack* part =
static_cast<
const
AliAODTrack*
>
(vp);
66
67
if
(
IsDMesonDaughter
(part)) {
68
rejectionReason = kHFCut;
69
return
kFALSE;
// daughter the D meson candidate
70
}
71
72
// Not a daughter of the D meson. Apply regular cuts.
73
return
AliTrackContainer::ApplyTrackCuts
(vp, rejectionReason);
74
}
75
80
Bool_t
AliHFTrackContainer::IsDMesonDaughter
(
const
AliAODTrack* track)
const
81
{
82
if
(!
fDMesonCandidate
)
return
kFALSE;
83
84
if
(
fDaughterList
.FindObject(track))
return
kTRUE;
85
86
return
kFALSE;
87
}
88
92
void
AliHFTrackContainer::SetDMesonCandidate
(AliAODRecoDecay*
c
)
93
{
94
fDMesonCandidate
=
c
;
95
GenerateDaughterList
();
96
}
97
98
100
void
AliHFTrackContainer::GenerateDaughterList
()
101
{
102
fDaughterList
.Clear();
103
AddDaughters
(
fDMesonCandidate
);
104
}
105
106
// Add all the daughters of a D meson candidate in a TObjArray. Follows all the decay cascades.
109
void
AliHFTrackContainer::AddDaughters
(
const
AliAODRecoDecay* cand)
110
{
111
if
(!cand)
return
;
112
113
Int_t
n = cand->GetNDaughters();
114
115
for
(
Int_t
i = 0; i < n; i++) {
116
AliVTrack* track =
dynamic_cast<
AliVTrack*
>
(cand->GetDaughter(i));
117
if
(!track)
continue
;
118
119
AliAODRecoDecay* cand2 =
dynamic_cast<
AliAODRecoDecay*
>
(track);
120
121
if
(cand2) {
122
AddDaughters
(cand2);
123
}
124
else
{
125
if
(!track->InheritsFrom(
"AliAODTrack"
)) {
126
::Warning(
"AliHFTrackContainer::AddDaughters"
,
"One of the daughters is not of type 'AliAODTrack' nor 'AliAODRecoDecay'."
);
127
continue
;
128
}
129
fDaughterList
.AddLast(track);
130
}
131
}
132
}
AliHFTrackContainer::IsDMesonDaughter
Bool_t IsDMesonDaughter(const AliAODTrack *track) const
Definition:
AliHFTrackContainer.cxx:80
AliHFTrackContainer::SetDMesonCandidate
void SetDMesonCandidate(AliAODRecoDecay *c)
Definition:
AliHFTrackContainer.cxx:92
AliTrackContainer
Container with name, TClonesArray and cuts for particles.
Definition:
AliTrackContainer.h:56
c
TCanvas * c
Definition:
TestFitELoss.C:172
AliHFTrackContainer.h
AliHFTrackContainer
Select tracks based on specific prescriptions of HF analysis.
Definition:
AliHFTrackContainer.h:36
AliTrackContainer::ApplyTrackCuts
virtual Bool_t ApplyTrackCuts(const AliVTrack *vp, UInt_t &rejectionReason) const
Definition:
AliTrackContainer.cxx:580
Int_t
int Int_t
Definition:
External.C:63
UInt_t
unsigned int UInt_t
Definition:
External.C:33
AliHFTrackContainer::GenerateDaughterList
void GenerateDaughterList()
Generate the list of the daughters of the D meson candidate.
Definition:
AliHFTrackContainer.cxx:100
AliHFTrackContainer::AliHFTrackContainer
AliHFTrackContainer()
This is the default constructor, used for ROOT I/O purposes.
Definition:
AliHFTrackContainer.cxx:29
AliHFAODMCParticleContainer
Select MC particles based on specific prescriptions of HF analysis.
Definition:
AliHFAODMCParticleContainer.h:34
AliHFTrackContainer::ApplyTrackCuts
virtual Bool_t ApplyTrackCuts(const AliVTrack *vp, UInt_t &rejectionReason) const
Definition:
AliHFTrackContainer.cxx:63
Bool_t
bool Bool_t
Definition:
External.C:53
AliHFTrackContainer::fDMesonCandidate
AliAODRecoDecay * fDMesonCandidate
Exclude daughters of this D meson candidate.
Definition:
AliHFTrackContainer.h:52
AliHFTrackContainer::AddDaughters
void AddDaughters(const AliAODRecoDecay *cand)
Definition:
AliHFTrackContainer.cxx:109
AliHFTrackContainer::fDaughterList
TObjArray fDaughterList
Daughters of the D meson candidate.
Definition:
AliHFTrackContainer.h:53
PWGJE
FlavourJetTasks
AliHFTrackContainer.cxx
Generated on Sat Aug 4 2018 16:21:32 for AliPhysics by
1.8.11