Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F8309331
example_isd.cc
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Subscribers
None
example_isd.cc
View Options
//----------------------------------------------------------------------
/// \file example_isd.cc
///
/// This example program is meant to illustrate how the
/// fastjet::contrib::IteratedSoftDrop class is used.
///
/// Run this example with
///
/// \verbatim
/// ./example_isd < ../data/single-event.dat
/// \endverbatim
//----------------------------------------------------------------------
// $Id: example_isd.cc 1018 2017-04-25 13:14:21Z jthaler $
//
// Copyright (c) 2017, Jesse Thaler, Kevin Zhou
// based on arXiv:1704.06266 by Christopher Frye, Andrew J. Larkoski,
// Jesse Thaler, Kevin Zhou
//
//----------------------------------------------------------------------
// This file is part of FastJet contrib.
//
// It is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2 of the License, or (at
// your option) any later version.
//
// It is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
// License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this code. If not, see <http://www.gnu.org/licenses/>.
//----------------------------------------------------------------------
#include
<iostream>
#include
<sstream>
#include
<sstream>
#include
<iomanip>
#include
<cmath>
#include
"fastjet/ClusterSequence.hh"
#include
"IteratedSoftDrop.hh" // In external code, this should be fastjet/contrib/IteratedSoftDrop.hh
using
namespace
std
;
using
namespace
fastjet
;
// forward declaration to make things clearer
void
read_event
(
vector
<
PseudoJet
>
&
event
);
//----------------------------------------------------------------------
int
main
(){
//----------------------------------------------------------
// read in input particles
vector
<
PseudoJet
>
event
;
read_event
(
event
);
cout
<<
"# read an event with "
<<
event
.
size
()
<<
" particles"
<<
endl
;
// first get some anti-kt jets
double
R
=
0.5
;
JetDefinition
jet_def
(
antikt_algorithm
,
R
);
double
ptmin
=
200.0
;
Selector
pt_min_selector
=
SelectorPtMin
(
ptmin
);
vector
<
PseudoJet
>
jets
=
pt_min_selector
(
jet_def
(
event
));
// Determine optimal scale from 1704.06266 for beta = -1
double
expected_jet_pt
=
1000
;
// in GeV
double
NP_scale
=
1
;
// approximately Lambda_QCD in GeV
double
optimal_z_cut
=
(
NP_scale
/
expected_jet_pt
/
R
);
// set up iterated soft drop objects
double
z_cut
=
optimal_z_cut
;
double
beta
=
-
1.0
;
double
theta_cut
=
0.0
;
contrib
::
IteratedSoftDropSymmetryFactors
isd
(
beta
,
z_cut
,
theta_cut
,
R
);
contrib
::
IteratedSoftDropSymmetryFactors
isd_ee
(
beta
,
z_cut
,
theta_cut
,
R
,
contrib
::
IteratedSoftDropSymmetryFactors
::
E_theta
);
contrib
::
IteratedSoftDropMultiplicity
nsd
(
beta
,
z_cut
,
theta_cut
,
0.0
,
R
);
contrib
::
IteratedSoftDropMultiplicity
nsdk0p5
(
beta
,
z_cut
,
theta_cut
,
0.5
,
R
);
contrib
::
IteratedSoftDropMultiplicity
nsdk1
(
beta
,
z_cut
,
theta_cut
,
1.0
,
R
);
contrib
::
IteratedSoftDropMultiplicity
nsdk2
(
beta
,
z_cut
,
theta_cut
,
2.0
,
R
);
cout
<<
"---------------------------------------------------"
<<
endl
;
cout
<<
"Iterated Soft Drop"
<<
endl
;
cout
<<
"---------------------------------------------------"
<<
endl
;
cout
<<
endl
;
cout
<<
"Computing Symmetry Factors with:"
<<
endl
;
cout
<<
" "
<<
isd
.
description
()
<<
endl
;
cout
<<
" "
<<
isd_ee
.
description
()
<<
endl
;
cout
<<
endl
;
cout
<<
"Computing Soft Drop Multiplicities with :"
<<
endl
;
cout
<<
" "
<<
nsd
.
description
()
<<
" (optimal at LL)"
<<
endl
;
cout
<<
" "
<<
nsdk0p5
.
description
()
<<
endl
;
cout
<<
" "
<<
nsdk1
.
description
()
<<
endl
;
cout
<<
" "
<<
nsdk2
.
description
()
<<
endl
;
cout
<<
endl
;
for
(
unsigned
ijet
=
0
;
ijet
<
jets
.
size
();
ijet
++
)
{
cout
<<
"---------------------------------------------------"
<<
endl
;
cout
<<
"Processing Jet "
<<
ijet
<<
endl
;
cout
<<
"---------------------------------------------------"
<<
endl
;
cout
<<
endl
;
cout
<<
"Jet pT: "
<<
jets
[
ijet
].
pt
()
<<
" GeV"
<<
endl
;
cout
<<
endl
;
// Run full iterated soft drop and show the symmetry factors
vector
<
double
>
syms
=
isd
(
jets
[
ijet
]);
cout
<<
"Symmetry Factors (pt_R measure, beta="
<<
beta
<<
", z_cut="
<<
z_cut
<<
"):"
<<
endl
;
for
(
unsigned
i
=
0
;
i
<
syms
.
size
();
i
++
){
cout
<<
syms
[
i
]
<<
" "
;
}
cout
<<
endl
;
cout
<<
endl
;
// Alternative version with e+e- measure
vector
<
double
>
syms_ee
=
isd_ee
(
jets
[
ijet
]);
cout
<<
"Symmetry Factors (E_theta measure, beta="
<<
beta
<<
", z_cut="
<<
z_cut
<<
"):"
<<
endl
;
for
(
unsigned
i
=
0
;
i
<
syms_ee
.
size
();
i
++
){
cout
<<
syms_ee
[
i
]
<<
" "
;
}
cout
<<
endl
;
cout
<<
endl
;
cout
<<
"Soft Drop Multiplicities (pt_R measure, beta="
<<
beta
<<
", z_cut="
<<
z_cut
<<
"):"
<<
endl
;
cout
<<
"kappa = 0: "
<<
nsd
(
jets
[
ijet
])
<<
endl
;
cout
<<
"kappa = 0.5: "
<<
nsdk0p5
(
jets
[
ijet
])
<<
endl
;
cout
<<
"kappa = 1: "
<<
nsdk1
(
jets
[
ijet
])
<<
endl
;
cout
<<
"kappa = 2: "
<<
nsdk2
(
jets
[
ijet
])
<<
endl
;
cout
<<
endl
;
}
return
0
;
}
//----------------------------------------------------------------------
/// read in input particles
void
read_event
(
vector
<
PseudoJet
>
&
event
){
string
line
;
while
(
getline
(
cin
,
line
))
{
istringstream
linestream
(
line
);
// take substrings to avoid problems when there are extra "pollution"
// characters (e.g. line-feed).
if
(
line
.
substr
(
0
,
4
)
==
"#END"
)
{
return
;}
if
(
line
.
substr
(
0
,
1
)
==
"#"
)
{
continue
;}
double
px
,
py
,
pz
,
E
;
linestream
>>
px
>>
py
>>
pz
>>
E
;
PseudoJet
particle
(
px
,
py
,
pz
,
E
);
// push event onto back of full_event vector
event
.
push_back
(
particle
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sat, Dec 21, 3:07 PM (1 d, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4023225
Default Alt Text
example_isd.cc (5 KB)
Attached To
rFASTJETSVN fastjetsvn
Event Timeline
Log In to Comment