diff --git a/Phys/Tesla/python/Tesla/Configuration.py b/Phys/Tesla/python/Tesla/Configuration.py index f7db0c2a753e8b5ea7c99ffb0e625fd64b7cf57c..933a3468fdf0ea3bd86da434bf70237e39949ccf 100644 --- a/Phys/Tesla/python/Tesla/Configuration.py +++ b/Phys/Tesla/python/Tesla/Configuration.py @@ -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."""