Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F8723385
KtJets.cc
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
KtJets.cc
View Options
// -*- C++ -*-
#include
"Rivet/Tools/Logging.hh"
#include
"Rivet/Projections/KtJets.hh"
#include
"Rivet/Cmp.hh"
namespace
Rivet
{
int
KtJets
::
compare
(
const
Projection
&
p
)
const
{
const
KtJets
&
other
=
dynamic_cast
<
const
KtJets
&>
(
p
);
return
\
pcmp
(
*
_fsproj
,
*
other
.
_fsproj
)
||
cmp
(
_type
,
other
.
_type
)
||
cmp
(
_angle
,
other
.
_angle
)
||
cmp
(
_recom
,
other
.
_recom
)
||
cmp
(
_rparameter
,
other
.
_rparameter
);
}
void
KtJets
::
project
(
const
Event
&
e
)
{
// Project into final state
const
FinalState
&
fs
=
e
.
applyProjection
(
*
_fsproj
);
// Store 4 vector data about each particle into vecs
vector
<
KtJet
::
KtLorentzVector
>
vecs
;
for
(
ParticleVector
::
const_iterator
p
=
fs
.
particles
().
begin
();
p
!=
fs
.
particles
().
end
();
++
p
)
{
HepMC
::
FourVector
fv
=
p
->
getMomentum
();
// Store the FourVector in the KtLorentzVector form
KtJet
::
KtLorentzVector
ktlv
(
fv
.
px
(),
fv
.
py
(),
fv
.
pz
(),
fv
.
e
());
vecs
.
push_back
(
ktlv
);
}
if
(
_pktev
)
delete
_pktev
;
_pktev
=
new
KtJet
::
KtEvent
(
vecs
,
_type
,
_angle
,
_recom
,
_rparameter
);
}
vector
<
double
>
KtJets
::
getYSubJet
(
const
KtJet
::
KtLorentzVector
&
jet
)
const
{
map
<
int
,
vector
<
double
>
>::
iterator
iter
=
_yscales
.
find
(
jet
.
getID
());
if
(
iter
==
_yscales
.
end
())
{
KtJet
::
KtEvent
subj
=
KtJet
::
KtEvent
(
jet
,
_angle
,
_recom
);
vector
<
double
>
yMergeVals
;
for
(
int
i
=
1
;
i
<
5
;
++
i
)
{
if
(
subj
.
getNConstituents
()
>
i
){
yMergeVals
.
push_back
(
subj
.
getYMerge
(
i
));
}
}
_yscales
.
insert
(
make_pair
(
jet
.
getID
(),
yMergeVals
));
return
yMergeVals
;
}
else
{
// This was cached.
return
iter
->
second
;
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Mon, Jan 20, 8:24 PM (12 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4232090
Default Alt Text
KtJets.cc (1 KB)
Attached To
rRIVETSVN rivetsvn
Event Timeline
Log In to Comment