Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F10664342
testInput.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
testInput.py
View Options
from
ROOT
import
gSystem
gSystem
.
Load
(
"../libs/libJetCore.so"
)
#gSystem.Load("../libs/libCDFJet.so")
#gSystem.Load("../libs/libFastJet.so")
gSystem
.
Load
(
"../libs/libATLASJet.so"
)
#gSystem.Load("../libs/libUserJet.so")
from
ROOT
import
SpartyJet
as
SJ
# configure an interface to the tree --------------
#atlas::CBNTInput input
#input = atlas.CBNTTruthInput()
#input = atlas.PrivateTruthInput()
#input = NtupleInputMaker(NtupleInputMaker.PxPyPzE_vector_double)
#input.set_variables("px","py","pz","E")
#input.set_n_name("N")
#input.set_prefix("Clusters_")
if
0
:
input
=
SJ
.
NtupleInputMaker
(
SJ
.
NtupleInputMaker
.
EtaPhiPtE_vector_float
)
input
.
set_prefix
(
"cl_"
)
input
.
set_suffix
(
"_caltopo"
)
input
.
set_variables
(
"eta"
,
"phi"
,
"pt"
,
"e"
)
input
.
set_name
(
'Input_'
)
input
.
set_masslessMode
(
True
)
input
.
reject_bad_input
(
False
)
input
.
set_n_name
(
"nc"
)
input
.
setFileTree
(
"../data/AtlasClustersJ5.root"
,
"CollectionTree"
)
outname
=
"TestEtaPhiPtE_vector_float_out.root"
elif
0
:
input
=
SJ
.
NtupleInputMaker
(
SJ
.
NtupleInputMaker
.
EtaPhiPtE_array_float
)
input
.
set_prefix
(
"InputJet_"
)
input
.
set_variables
(
"eta"
,
"phi"
,
"p_T"
,
"e"
)
input
.
set_n_name
(
"N"
)
input
.
set_name
(
'Input_'
)
input
.
reject_bad_input
(
False
)
input
.
setFileTree
(
"../data/atlasinput.root"
,
"myTree"
)
outname
=
"TestEtaPhiPtE_array_float_out.root"
elif
0
:
input
=
SJ
.
NtupleInputMaker
(
SJ
.
NtupleInputMaker
.
EtaPhiPtM_array_float
)
input
.
set_prefix
(
"InputJet_"
)
input
.
set_variables
(
"eta"
,
"phi"
,
"p_T"
,
"mass"
)
input
.
set_n_name
(
"N"
)
input
.
set_name
(
'Input_'
)
input
.
reject_bad_input
(
False
)
input
.
setFileTree
(
"../data/atlasinput.root"
,
"myTree"
)
outname
=
"TestEtaPhiPtM_array_float_out.root"
elif
0
:
input
=
SJ
.
NtupleInputMaker
(
SJ
.
NtupleInputMaker
.
PxPyPzE_vector_double
)
input
.
set_prefix
(
"Clusters_"
)
input
.
set_variables
(
"px"
,
"py"
,
"pz"
,
"E"
)
input
.
set_n_name
(
"N"
)
input
.
set_name
(
'Input_'
)
input
.
setFileTree
(
"../data/AtlasClustersW4jets.root"
,
"FullRec0"
)
outname
=
"TestPxPyPzE_double_float_out.root"
elif
1
:
input
=
SJ
.
NtupleInputMaker
(
SJ
.
NtupleInputMaker
.
EtaPhiPtE_vector_float
)
input
.
set_prefix
(
"Cluster_"
)
input
.
set_variables
(
"eta"
,
"phi"
,
"p_T"
,
"e"
)
input
.
set_name
(
'InputJet_'
)
input
.
set_masslessMode
(
True
)
input
.
reject_bad_input
(
False
)
input
.
set_n_name
(
"N"
)
input
.
setFileTree
(
"../data/J2_clusters.root"
,
"clusterTree"
)
outname
=
"../data/output/TestEtaPhiPtE_vector_float_out.root"
# ------------------------------------------------
builder
=
SJ
.
JetBuilder
()
builder
.
configure_input
(
input
)
M_PI
=
3.1415926
def
addAtlasKt
(
name
,
type
,
par
):
alg
=
SJ
.
atlas
.
FastKtTool
(
name
)
alg
.
simple_config
(
type
,
par
)
if
type
==
"Hull"
:
alg
.
set_other_propery
(
"rmin"
,
1.28
)
if
type
==
"Hull"
:
alg
.
set_other_propery
(
"conemin"
,
0.15
)
if
type
==
"Hull"
:
alg
.
set_other_propery
(
"conemax"
,
2
*
0.6
*
M_PI
)
#if '12' in name :alg.set_other_propery("2steps",0.9)
builder
.
add_default_alg
(
alg
,
True
)
addAtlasKt
(
"FastKt3"
,
"Standard"
,
0.3
)
addAtlasKt
(
"FastKt6"
,
"Standard"
,
0.6
)
#builder.set_default_cut(0,1000)
#builder.set_default_cut(0,0)
#builder.use_std_vect()
outname
=
outname
.
replace
(
'.root'
,
'2.root'
)
builder
.
configure_output
(
"myTree"
,
outname
)
## mom = EtaPhiMomentTool("EtaPhiMom")
## builder.add_moments(mom)
## momh = HullMomentTool("HullMom")
## builder.add_moments(momh)
#builder.do_time_measure()
# ------------------------------------------------
#builder.silent_mode()
builder
.
process_events
(
10
)
#builder.process_events(6000)
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Thu, Apr 24, 6:36 AM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4848816
Default Alt Text
testInput.py (3 KB)
Attached To
rSPARTYJETSVN spartyjetsvn
Event Timeline
Log In to Comment