Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F10664214
Boost2010.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Subscribers
None
Boost2010.py
View Options
#!/usr/bin/env python
# $Id: Boost2010.py 404 2011-05-24 14:17:32Z cvermilion $
#----------------------------------------------------------------------
# Copyright (c) 2010-11, Pierre-Antoine Delsart, Kurtis Geerlings, Joey Huston,
# Brian Martin, and Christopher Vermilion
#
#----------------------------------------------------------------------
# This file is part of SpartyJet.
#
# SpartyJet 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 3 of the License, or
# (at your option) any later version.
#
# SpartyJet 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 SpartyJet; if not, write to the Free Software
# Foundation, Inc.:
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#----------------------------------------------------------------------
# This script implements all of the top taggers used in the Boost 2010
# proceedings. All parameters are for the 50% efficiency working point. For
# the most part cuts are not made, since this can be done afterward if the
# variables are stored.
from
SpartyJetConfig
import
*
from
math
import
pi
from
sys
import
argv
#===============================================
infile
=
argv
[
1
]
outfile
=
argv
[
2
]
# Create a jet builder---------------------------
builder
=
SJ
.
JetBuilder
(
SJ
.
WARNING
)
# Configure input -------------------------------
input
=
getInputMaker
(
infile
)
builder
.
configure_input
(
input
)
# Run Anti-kt 1.0
AntiKt10
=
SJ
.
FastJet
.
FastJetFinder
(
'AntiKt10'
,
fj
.
antikt_algorithm
,
1.0
,
False
)
builder
.
add_analysis
(
SJ
.
JetAnalysis
(
AntiKt10
))
# cut on pT *before* forking to save time
builder
.
add_jetTool
(
SJ
.
JetPtSelectorTool
(
200.0
,
2
),
'AntiKt10'
)
# two highest-pt jets over 200
AKTparent
=
SJ
.
ForkToolParent
(
'AntiKt10Parent'
)
builder
.
add_jetTool
(
AKTparent
,
'AntiKt10'
)
# recluster with CA, then fork again for different taggers
builder
.
add_analysis
(
SJ
.
JetAnalysis
(
SJ
.
ForkToolChild
(
AKTparent
,
'CA10'
)))
builder
.
add_jetTool
(
SJ
.
FastJet
.
FastJetRecluster
(
'CA10cluster'
,
fj
.
cambridge_algorithm
,
1.0
,
False
),
'CA10'
)
CAparent
=
SJ
.
ForkToolParent
(
'CA10Parent'
)
builder
.
add_jetTool
(
CAparent
,
'CA10'
)
# recluster with kT
builder
.
add_analysis
(
SJ
.
JetAnalysis
(
SJ
.
ForkToolChild
(
AKTparent
,
'KT10'
)))
builder
.
add_jetTool
(
SJ
.
FastJet
.
FastJetRecluster
(
'KT10cluster'
,
fj
.
kt_algorithm
,
1.0
,
False
),
'KT10'
)
# PDG id cut -- remove muons (13) and neutrinos (12, 14, 16)
ids
=
stdVector
(
-
12
,
12
,
14
,
-
14
,
16
,
-
16
,
13
,
-
13
)
builder
.
add_jetTool_input
(
SJ
.
JetInputPdgIdSelectorTool
(
ids
))
# Input eta cut
builder
.
add_jetTool_input
(
SJ
.
JetEtaCentralSelectorTool
(
-
5.0
,
5.0
))
# some tools for use below
recluster
=
SJ
.
FastJet
.
FastJetRecluster
(
'Recluster'
,
fj
.
cambridge_algorithm
,
pi
*
0.5
,
False
)
massCut
=
SJ
.
JetMassSelectorTool
(
100.0
)
pTcut
=
SJ
.
JetPtSelectorTool
(
100.0
)
# ---------------- Analyses -------------------------------
# pruning
big_CA_def
=
fj
.
JetDefinition
(
fj
.
cambridge_algorithm
,
3.14
*
0.5
)
builder
.
add_analysis
(
SJ
.
JetAnalysis
(
SJ
.
ForkToolChild
(
AKTparent
,
"Pruned"
)))
prune
=
SJ
.
FastJet
.
FastPruneTool
(
big_CA_def
,
0.05
,
0.1
)
builder
.
add_jetTool
(
prune
,
"Pruned"
)
# trimming
trimPlugin
=
fj
.
QCDTrimmingFast
(
fj
.
JetDefinition
(
fj
.
antikt_algorithm
,
1.0
),
200.0
)
trimPlugin
.
SetRsubPtfrac
(
0.35
,
0.03
)
trimPlugin
.
UseEffMass
(
False
)
builder
.
add_default_analysis
(
SJ
.
FastJet
.
FastJetFinder
(
fj
.
JetDefinition
(
trimPlugin
),
"Trimmed"
,
False
))
builder
.
add_jetTool
(
recluster
,
"Trimmed"
)
# filtering
builder
.
add_analysis
(
SJ
.
JetAnalysis
(
SJ
.
ForkToolChild
(
CAparent
,
"Filtered"
)))
filter
=
fj
.
Filter
(
0.35
,
3
)
builder
.
add_jetTool
(
SJ
.
FastJet
.
FilterTool
(
filter
,
1.0
),
"Filtered"
)
builder
.
add_jetTool
(
recluster
,
"Filtered"
)
# Set up JH top tagger
builder
.
add_analysis
(
SJ
.
JetAnalysis
(
SJ
.
ForkToolChild
(
CAparent
,
"CA10JH"
)))
JHtagger
=
fj
.
JHTopTagger
(
0.04
,
0.19
,
81.0
)
JHtool
=
SJ
.
FastJet
.
TopTaggerTool
(
fj
.
JHTopTagger
)(
JHtagger
)
builder
.
add_jetTool
(
JHtool
,
'CA10JH'
)
# add a cut on cos_theta_h, which is stored by the tagger
builder
.
add_jetTool
(
SJ
.
JetMomentSelectorTool
(
float
)(
'cosThetaH'
,
-
0.95
,
0.95
),
'CA10JH'
)
# Set up CMS top tagger
builder
.
add_analysis
(
SJ
.
JetAnalysis
(
SJ
.
ForkToolChild
(
CAparent
,
"CA10CMS"
)))
CMStagger
=
fj
.
CMSTopTagger
()
CMStool
=
SJ
.
FastJet
.
TopTaggerTool
(
fj
.
CMSTopTagger
)(
CMStagger
)
builder
.
add_jetTool
(
CMStool
,
'CA10CMS'
)
# ATLAS z_cut variables
zcut
=
SJ
.
zcutMoment
()
builder
.
add_jetTool
(
SJ
.
JetMomentTool
(
"zcutTool"
,
zcut
),
'KT10'
)
# Thaler-Wang z_cell
zcell
=
SJ
.
zcellMoment
()
builder
.
add_jetTool
(
SJ
.
JetMomentTool
(
"zcellTool"
,
zcell
),
'KT10'
)
# ----------------------------------------------------------
# Measure heavier subjet mass
subjetMoment
=
SJ
.
HeavierSubjetMass
(
"subjetM"
)
builder
.
add_jetTool
(
SJ
.
JetMomentTool
(
"SubjetMassTool"
,
subjetMoment
))
# Add a min-mass tool to non-top-tagging analyses (the top-taggers already find mW)
for
alg
in
[
"Pruned"
,
"Filtered"
,
"Trimmed"
,
"AntiKt10"
,
"CA10"
,
"KT10"
]:
builder
.
add_jetTool
(
SJ
.
UnclusterTool
(
3
),
alg
)
builder
.
add_jetTool
(
SJ
.
MinMassTool
(
"mW"
),
alg
)
# Configure output--------------------------------
builder
.
configure_output
(
"Jets"
,
outfile
)
# Run SpartyJet
builder
.
print_event_every
(
100
)
builder
.
process_events
()
# Save this script in the ROOT file (needs to go after process_events or it
# gets over-written!)
writeCurrentFile
(
outfile
)
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Thu, Apr 24, 6:33 AM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4884304
Default Alt Text
Boost2010.py (5 KB)
Attached To
rSPARTYJETSVN spartyjetsvn
Event Timeline
Log In to Comment