Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DaVinci
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Marcelo Vilaca Pinheiro Soares
DaVinci
Commits
6fc9415d
Commit
6fc9415d
authored
7 years ago
by
Michel De Cian
Committed by
Alex Pearce
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Commit latest try for neutral association in TurboSP
parent
8e646c9a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Phys/Tesla/python/Tesla/Configuration.py
+57
-10
57 additions, 10 deletions
Phys/Tesla/python/Tesla/Configuration.py
with
57 additions
and
10 deletions
Phys/Tesla/python/Tesla/Configuration.py
+
57
−
10
View file @
6fc9415d
...
...
@@ -224,19 +224,21 @@ class Tesla(LHCbConfigurableUser):
assocdigits
=
CaloDigit2MCLinks2Table
(
"
TurboDigitAssoc
"
)
return
def
_configureClustersAndProtosTruth
(
self
,
digits
,
clusters
,
protos
)
:
def
_configureClustersAndProtosTruth
(
self
,
digits
,
clusters
,
protos
,
protoTabLoc
=
"
Relations/Turbo/NeutralPP2MC
"
)
:
retSeq
=
GaudiSequencer
(
"
NeutralTruth
"
)
clusterTabLoc
=
self
.
base
+
"
Relations/CaloClusters
"
assoccluster
=
CaloClusterMCTruth
(
"
TurboClusterAssoc
"
)
assoccluster
.
OutputLevel
=
self
.
getProp
(
'
OutputLevel
'
)
assoccluster
.
Input
=
digits
assoccluster
.
Output
=
clusterTabLoc
assoccluster
.
Clusters
+=
clusters
#assoccluster.OutputLevel = self.getProp('OutputLevel')
#assoccluster.OutputLevel = 1
assoccluster
.
Input
=
digits
assoccluster
.
Output
=
clusterTabLoc
#assoccluster.Clusters += clusters
assoccluster
.
Clusters
+=
[
"
/Event/Turbo/PID/Calo/EcalClusters
"
,
"
/Event/Turbo/PID/Calo/EcalSplitClusters
"
,
"
/Event/Turbo/PID/Calo/CaloClusters
"
]
# When filtering MC, the relations table cloners will copy the tables
# to /Event/Turbo for us. Otherwise we create them there directly
protoTabLoc
=
"
Relations/Turbo/NeutralPP2MC
"
#
protoTabLoc = "Relations/Turbo/NeutralPP2MC"
if
not
self
.
getProp
(
"
FilterMC
"
):
protoTabLoc
=
os
.
path
.
join
(
self
.
base
,
protoTabLoc
)
assocneutral
=
NeutralPP2MC
(
"
TurboNeutralPP2MC
"
)
...
...
@@ -476,6 +478,7 @@ class Tesla(LHCbConfigurableUser):
assocdigits
.
OutputLevel
=
self
.
getProp
(
'
OutputLevel
'
)
outputiDigiLoc
=
tesROOT
+
"
Relations/CaloDigits
"
assocdigits
.
Output
=
outputDigiLoc
## Add the cluster associator
## Finally configure the neutral PP2MC associator
...
...
@@ -606,6 +609,7 @@ class Tesla(LHCbConfigurableUser):
assocpp
.
OutputLevel
=
self
.
getProp
(
'
OutputLevel
'
)
#assocpp.OutputLevel = 1
assocpp
.
VetoEmpty
=
True
#assocpp.RootInTES = '/Event/Turbo'
# Make all track -> MCParticle linker tables
for
loc
in
track_locs
:
truthSeq
=
self
.
_configureTrackTruth
(
assocpp
,
loc
)
...
...
@@ -621,13 +625,52 @@ class Tesla(LHCbConfigurableUser):
relationsLocations
=
[
loc
.
replace
(
'
/Event
'
,
'
/Event/Relations
'
)
for
loc
in
proto_locs
]
print
relationsLocations
print
"
++++++++++++++++
"
#relationsLocations = [ "/Event/Relations/Turbo/Long/Protos" ]
filterMCSeq
=
self
.
_filterMCParticlesSequence
(
relationsLocations
)
ChargedProtoSeq
.
Members
+=
[
filterMCSeq
]
return
ChargedProtoSeq
# NEUTRAL STUFF ################################################################
NeutralProtoSeq
=
GaudiSequencer
(
"
NeutralTruthSequencer
"
)
## Add the digits associator
assocdigits
=
CaloDigit2MCLinks2Table
(
"
TurboDigitAssoc
"
)
#assocdigits.OutputLevel = self.getProp('OutputLevel')
#assocdigits.OutputLevel = 1
outputDigiLoc
=
self
.
base
+
"
Relations/CaloDigits
"
assocdigits
.
Output
=
outputDigiLoc
assocdigits
.
Inputs
=
[
"
Turbo/Raw/Ecal/Digits
"
,
"
Turbo/Raw/Hcal/Digits
"
]
## Finally configure the neutral PP2MC associator
NeutralProtoSeq
.
Members
+=
[
assocdigits
]
# Gather all protos and clusters
neutralClustersTot
=
[]
neutralProtosTot
=
[]
print
"
------> Neutral stuff <-------------
"
print
self
.
base
print
"
------> Neutral stuff <-------------
"
# Add standard Turbo
#neutralClustersTot+=[self.base+"Hlt2/Rec/Neutral/CaloClusters"]
neutralClustersTot
+=
[
self
.
base
+
"
CaloClusters
"
]
neutralProtosTot
+=
[
self
.
base
+
"
Protos
"
]
print
"
------> Neutral stuff <-------------
"
print
neutralClustersTot
print
"
------> Neutral stuff <-------------
"
# Configure
self
.
_configureDigitsTruth
()
protoneutral
,
retSeq
=
self
.
_configureClustersAndProtosTruth
(
outputDigiLoc
,
neutralClustersTot
,
neutralProtosTot
,
"
Turbo/Relations/NeutralPP2MC
"
)
NeutralProtoSeq
.
Members
+=
[
retSeq
]
return
NeutralProtoSeq
def
_configureOutputStream
(
self
,
stream
,
lines_dict
):
...
...
@@ -814,6 +857,7 @@ class Tesla(LHCbConfigurableUser):
for
name
in
decoder_names
:
from
DAQSys.Decoders
import
DecoderDB
decoder
=
DecoderDB
[
name
].
setup
()
#decoder.OutputLevel = 1
decoders_seq
.
Members
.
append
(
decoder
)
DecodeRawEvent
().
DataOnDemand
=
False
...
...
@@ -826,6 +870,9 @@ class Tesla(LHCbConfigurableUser):
prpacking
=
PersistRecoConf
.
PersistRecoPacking
(
datatype
)
prunpackers
=
prpacking
.
unpackers
()
#for p in prunpackers:
# p.OutputLevel = 1
unpackers_seq
=
GaudiSequencer
(
'
TeslaUnpackers
'
)
# Need to run the packers in reverse order, due to object dependencies
unpackers_seq
.
Members
+=
prunpackers
[::
-
1
]
...
...
@@ -1212,7 +1259,7 @@ class Tesla(LHCbConfigurableUser):
#
if
self
.
getProp
(
'
Mode
'
)
is
"
Online
"
:
self
.
setProp
(
'
WriteFSR
'
,
True
)
self
.
_configureLumi
()
#
self._configureLumi()
else
:
DecodeRawEvent
().
DataOnDemand
=
True
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment