Skip to content
Snippets Groups Projects
Commit 50a11af3 authored by Eduardo Rodrigues's avatar Eduardo Rodrigues
Browse files

Merge branch 'apearce-persistreco-calo-cloners' into '2018-patches'

Make CaloDigit cloning behaviour consistent in Tesla

See merge request !139

(cherry picked from commit ac98d6c8)

d29cbdb4 Make CaloDigit cloning behaviour consistent, and also always-on for PersistReco.
fb4d7326 Add missing imports, fix typo.
parent 7463d7af
No related branches found
No related tags found
3 merge requests!1103Draft: Add AnalysisHelpers to DaVinci Stack,!167Remove Phys/KaliCalo,!142Cherry-pick MR !139 to master
......@@ -5,9 +5,11 @@ import re
from Configurables import (
AddressKillerAlg,
AuditorSvc,
CaloClusterCloner,
CaloClusterMCTruth,
CaloDigit2MCLinks2Table,
CaloDigitCloner,
CaloHypoCloner,
ChargedPP2MC,
CopyLinePersistenceLocations,
CopyParticle2PVRelationsFromLinePersistenceLocations,
......@@ -866,6 +868,7 @@ class Tesla(LHCbConfigurableUser):
namer = lambda x: '{0}ForStream{1}'.format(x, output_prefix)
pack = self.getProp('Pack')
write_fsr = self.getProp('WriteFSR')
simulation = self.getProp('Simulation')
stream_seq = GaudiSequencer(namer('TeslaStreamSequence'))
......@@ -922,6 +925,30 @@ class Tesla(LHCbConfigurableUser):
ppc.ICloneTrack = "TrackClonerWithClusters"
tcwc.CloneAncestors = False
# We do two things here:
# 1. Configure the CaloCluster and CaloHypo cloners to have
# consistent behaviour;
# 2. Force digits to always be cloned when running over simulated
# data.
ccc = container_cloner.addTool(CaloClusterCloner, name='CaloClusterCloner')
chc = container_cloner.addTool(CaloHypoCloner, name='CaloHypoCloner')
ccc.CloneEntriesNeuP = True
ccc.CloneEntriesChP = False
ccc.CloneEntriesAlways = simulation
chc.CloneClustersNeuP = True
chc.CloneClustersChP = False
chc.CloneDigitsNeuP = True
chc.CloneDigitsChP = False
chc.CloneClustersAlways = simulation
# We *always* want associated digits to be cloned in PersistReco
ccc_pp = ccc.clone("CaloClusterClonerForTurboPP")
ccc_pp.CloneEntriesAlways = True
container_cloner.TurboPPICloneCaloCluster = container_cloner.addTool(ccc_pp).getFullName()
chc_pp = chc.clone("CaloHypoClonerForTurboPP")
chc_pp.CloneClustersAlways = True
container_cloner.TurboPPICloneCaloHypo = container_cloner.addTool(chc_pp).getFullName()
# Look for input objects under /Event/Turbo
def prepend_base(configurable, property):
"""Prepend Tesla.base to the configurable's property value."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment