AliPhysics
vAN-20150328 (7755d27)
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Macros
AliReducedJetInfo.cxx
Go to the documentation of this file.
1
/**************************************************************************
2
* Copyright(c) 1998-2015, 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
#include <TLorentzVector.h>
16
#include <TObjArray.h>
17
18
#include "
AliReducedJetConstituent.h
"
19
#include "
AliReducedJetInfo.h
"
20
#include "
AliReducedJetParticle.h
"
21
23
ClassImp
(
HighPtTracks::AliReducedJetInfo
)
25
26
namespace HighPtTracks {
27
28
/***
29
* Dummy (I/O) constructor, not to be used by the user. Containers are not allocated.
30
*/
31
AliReducedJetInfo::AliReducedJetInfo() :
32
TObject(),
33
fPx(0.),
34
fPy(0.),
35
fPz(0.),
36
fE(0),
37
fConstituents(NULL),
38
fParticlesInCone(NULL)
39
{
40
}
41
52
AliReducedJetInfo::AliReducedJetInfo
(
double
px,
double
py,
double
pz,
double
e) :
53
TObject(),
54
fPx(px),
55
fPy(py),
56
fPz(pz),
57
fE(e),
58
fConstituents(NULL),
59
fParticlesInCone(NULL)
60
{
61
fParticlesInCone
=
new
TObjArray;
62
fParticlesInCone
->SetOwner(
true
);
63
fConstituents
=
new
TObjArray;
64
fConstituents
->SetOwner(
true
);
65
}
66
74
AliReducedJetInfo::AliReducedJetInfo
(
const
AliReducedJetInfo
& ref) :
75
TObject(ref),
76
fPx(ref.fPx),
77
fPy(ref.fPy),
78
fPz(ref.fPz),
79
fE(ref.fE),
80
fConstituents(NULL),
81
fParticlesInCone(NULL)
82
{
83
fParticlesInCone
=
new
TObjArray();
84
fParticlesInCone
->SetOwner(
true
);
85
fConstituents
=
new
TObjArray;
86
fConstituents
->SetOwner(
true
);
87
88
AliReducedJetParticle
*mypart(NULL);
89
TIter particleIter(ref.
fParticlesInCone
);
90
while
((mypart = dynamic_cast<AliReducedJetParticle *>(particleIter()))){
91
fParticlesInCone
->Add(
new
AliReducedJetParticle
(*mypart));
92
}
93
AliReducedJetConstituent
*myconst(NULL);
94
TIter constIter(ref.
fConstituents
);
95
while
((myconst = dynamic_cast<AliReducedJetConstituent *>(constIter()))){
96
fConstituents
->Add(
new
AliReducedJetConstituent
(*myconst));
97
}
98
}
99
108
AliReducedJetInfo
&
AliReducedJetInfo::operator=
(
const
AliReducedJetInfo
& ref) {
109
TObject::operator=(ref);
110
if
(&ref !=
this
){
111
fPx
= ref.
fPx
;
112
fPy
= ref.
fPy
;
113
fPz
= ref.
fPz
;
114
fE
= ref.
fE
;
115
116
fParticlesInCone
->Clear();
117
AliReducedJetParticle
*mypart(NULL);
118
TIter particleIter(ref.
fParticlesInCone
);
119
while
((mypart = dynamic_cast<AliReducedJetParticle *>(particleIter()))){
120
fParticlesInCone
->Add(
new
AliReducedJetParticle
(*mypart));
121
}
122
123
fConstituents
->Clear();
124
AliReducedJetConstituent
*myconst(NULL);
125
TIter constIter(ref.
fConstituents
);
126
while
((myconst = dynamic_cast<AliReducedJetConstituent *>(constIter()))){
127
fConstituents
->Add(
new
AliReducedJetConstituent
(*myconst));
128
}
129
}
130
return
*
this
;
131
}
132
136
AliReducedJetInfo::~AliReducedJetInfo
() {
137
delete
fParticlesInCone
;
138
delete
fConstituents
;
139
}
140
147
void
AliReducedJetInfo::AddParticleInCone
(
AliReducedJetParticle
* part) {
148
if
(
fParticlesInCone
)
fParticlesInCone
->Add(part);
149
}
150
156
void
AliReducedJetInfo::FillLorentzVector
(TLorentzVector& vec)
const
{
157
vec.SetPxPyPzE(
fPx
,
fPy
,
fPx
,
fE
);
158
}
159
165
int
AliReducedJetInfo::GetNumberOfMatchedParticles
()
const
{
166
if
(!
fParticlesInCone
)
return
0;
167
return
fParticlesInCone
->GetEntries();
168
}
169
176
void
AliReducedJetInfo::AddConstituent
(
AliReducedJetConstituent
* con) {
177
if
(
fConstituents
)
fConstituents
->Add(con);
178
}
179
186
AliReducedJetParticle
*
AliReducedJetInfo::GetMatchedParticle
(
int
ipart)
const
{
187
if
(!
fParticlesInCone
|| ipart >=
fParticlesInCone
->GetEntries())
return
NULL;
188
return
dynamic_cast<
AliReducedJetParticle
*
>
(
fParticlesInCone
->At(ipart));
189
}
190
191
}
/* namespace HighPtTracks */
HighPtTracks::AliReducedJetConstituent
Minimal stucture for jet constituents associated to a jet by the jet clustering algorithm.
Definition:
AliReducedJetConstituent.h:44
ClassImp
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
Definition:
AliAnalysisTaskTriggerRates.cxx:34
AliReducedJetParticle.h
Definintion of class AliReducedJetParticle, a structure for a reduced information set of particles as...
HighPtTracks::AliReducedJetInfo::fPy
double fPy
y-component of the 4-momentum vector
Definition:
AliReducedJetInfo.h:96
HighPtTracks::AliReducedJetInfo::AddParticleInCone
void AddParticleInCone(AliReducedJetParticle *part)
Definition:
AliReducedJetInfo.cxx:147
HighPtTracks::AliReducedJetInfo::fE
double fE
reconstructed jet energy
Definition:
AliReducedJetInfo.h:98
HighPtTracks::AliReducedJetInfo::AliReducedJetInfo
AliReducedJetInfo()
Definition:
AliReducedJetInfo.cxx:31
HighPtTracks::AliReducedJetInfo::AddConstituent
void AddConstituent(AliReducedJetConstituent *con)
Definition:
AliReducedJetInfo.cxx:176
HighPtTracks::AliReducedJetInfo::~AliReducedJetInfo
virtual ~AliReducedJetInfo()
Definition:
AliReducedJetInfo.cxx:136
HighPtTracks::AliReducedJetInfo::fPx
double fPx
x-component of the 4-momentum vector
Definition:
AliReducedJetInfo.h:95
HighPtTracks::AliReducedJetInfo::GetMatchedParticle
AliReducedJetParticle * GetMatchedParticle(int ipart) const
Definition:
AliReducedJetInfo.cxx:186
HighPtTracks::AliReducedJetInfo
Reduced information about a reconstructed jet.
Definition:
AliReducedJetInfo.h:49
HighPtTracks::AliReducedJetInfo::fConstituents
TObjArray * fConstituents
Constituents found by the jet clustering algorithm.
Definition:
AliReducedJetInfo.h:100
HighPtTracks::AliReducedJetParticle
Reduced information set of particles associated with a jet.
Definition:
AliReducedJetParticle.h:44
HighPtTracks::AliReducedJetInfo::FillLorentzVector
void FillLorentzVector(TLorentzVector &vec) const
Definition:
AliReducedJetInfo.cxx:156
AliReducedJetConstituent.h
Definition of class AliReducedJetConstituent, a minimal stucture for jet constituents associated to a...
HighPtTracks::AliReducedJetInfo::fParticlesInCone
TObjArray * fParticlesInCone
Particles associated to this jet via distance to the main jet axis.
Definition:
AliReducedJetInfo.h:101
HighPtTracks::AliReducedJetInfo::fPz
double fPz
z-component of the 4-momentum vector
Definition:
AliReducedJetInfo.h:97
HighPtTracks::AliReducedJetInfo::GetNumberOfMatchedParticles
int GetNumberOfMatchedParticles() const
Definition:
AliReducedJetInfo.cxx:165
HighPtTracks::AliReducedJetInfo::operator=
AliReducedJetInfo & operator=(const AliReducedJetInfo &ref)
Definition:
AliReducedJetInfo.cxx:108
AliReducedJetInfo.h
Definition of class AliReducedJetInfo, a structure for reduced information about a reconstructed jet...
PWGJE
EMCALJetTasks
Tracks
AliReducedJetInfo.cxx
Generated on Sat Mar 28 2015 16:21:03 for AliPhysics by
1.8.6