From bda539e7c1a40ed34c9b793d73a2bfa2ecccf47c Mon Sep 17 00:00:00 2001 From: Alex Pearce Date: Tue, 21 Feb 2017 17:58:13 +0100 Subject: [PATCH 1/4] Run the packing after making MC relations. Otherwise the MC relations aren't packed, because they don't exist when the packer runs. D'oh! --- Phys/Tesla/python/Tesla/Configuration.py | 52 ++++++++++++------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/Phys/Tesla/python/Tesla/Configuration.py b/Phys/Tesla/python/Tesla/Configuration.py index bffbcc7d..7d163c82 100644 --- a/Phys/Tesla/python/Tesla/Configuration.py +++ b/Phys/Tesla/python/Tesla/Configuration.py @@ -288,32 +288,6 @@ class Tesla(LHCbConfigurableUser): if self.getProp('DuplicateCheck'): TeslaReportAlgoSeq.Members += [dplic] - if self.getProp('Pack'): - packer = PackParticlesAndVertices( name = "TurboPacker", - InputStream = "/Event"+"/"+self.base.rstrip('/'), - DeleteInput = False, - EnableCheck = False, - AlwaysCreateOutput = True) - TeslaReportAlgoSeq.Members +=[packer] - - from Configurables import PackCaloHypo as PackCaloHypos - hypopacker = PackCaloHypos( name = "PackCaloHypos", - AlwaysCreateOutput = True, - DeleteInput = False, - OutputLevel = self.getProp('OutputLevel'), - InputName = self.base+"CaloHypos", - OutputName = self.base+"pRec/neutral/Hypos" ) - from Configurables import DataPacking__Pack_LHCb__CaloClusterPacker_ as PackCaloClusters - clusterpacker = PackCaloClusters( name = "PackCaloClusters", - AlwaysCreateOutput = True, - DeleteInput = False, - OutputLevel = self.getProp('OutputLevel'), - InputName = self.base+"CaloClusters", - OutputName = self.base+"pRec/neutral/Clusters" ) - TeslaReportAlgoSeq.Members +=[hypopacker,clusterpacker] - - packer.OutputLevel = min(self.getProp('OutputLevel'),self.getProp('PackerOutputLevel')) - # Make protoparticle -> truth tables ***************************************** inputType = self.getProp('InputType') if (inputType=='XDST') or (inputType=='LDST'): @@ -405,6 +379,32 @@ class Tesla(LHCbConfigurableUser): # Add final sequences TeslaReportAlgoSeq.Members+=[ChargedProtoSeq,NeutralProtoSeq] + if self.getProp('Pack'): + packer = PackParticlesAndVertices( name = "TurboPacker", + InputStream = "/Event"+"/"+self.base.rstrip('/'), + DeleteInput = False, + EnableCheck = False, + AlwaysCreateOutput = True) + TeslaReportAlgoSeq.Members +=[packer] + + from Configurables import PackCaloHypo as PackCaloHypos + hypopacker = PackCaloHypos( name = "PackCaloHypos", + AlwaysCreateOutput = True, + DeleteInput = False, + OutputLevel = self.getProp('OutputLevel'), + InputName = self.base+"CaloHypos", + OutputName = self.base+"pRec/neutral/Hypos" ) + from Configurables import DataPacking__Pack_LHCb__CaloClusterPacker_ as PackCaloClusters + clusterpacker = PackCaloClusters( name = "PackCaloClusters", + AlwaysCreateOutput = True, + DeleteInput = False, + OutputLevel = self.getProp('OutputLevel'), + InputName = self.base+"CaloClusters", + OutputName = self.base+"pRec/neutral/Clusters" ) + TeslaReportAlgoSeq.Members +=[hypopacker,clusterpacker] + + packer.OutputLevel = min(self.getProp('OutputLevel'),self.getProp('PackerOutputLevel')) + TeslaOutputStreamsSequence = GaudiSequencer('TeslaOutputStreamsSequence') TeslaOutputStreamsSequence.ModeOR = True; -- GitLab From db0fd14f7802578eab49eb3f5da91918b53beed7 Mon Sep 17 00:00:00 2001 From: Alex Pearce Date: Thu, 23 Feb 2017 13:49:25 +0100 Subject: [PATCH 2/4] Build MC relations only for Turbo and PersistReco. The default list of the MC associator (ChargedPP2MC) contains the default Brunel output locations, like Rec/ProtoP/Charged, but the PersistReco links will populate these locations with PersistReco objects. Because we already explicitly add the unpacked PersistReco locations to the associator's input list, there's no need for the associator to also run over the Brunel locations. --- Phys/Tesla/python/Tesla/Configuration.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Phys/Tesla/python/Tesla/Configuration.py b/Phys/Tesla/python/Tesla/Configuration.py index 7d163c82..67088759 100644 --- a/Phys/Tesla/python/Tesla/Configuration.py +++ b/Phys/Tesla/python/Tesla/Configuration.py @@ -311,6 +311,9 @@ class Tesla(LHCbConfigurableUser): assocpp.VetoEmpty=True tesROOT="/Event/"+self.base assocpp.RootInTES=tesROOT + # Start with an empty input list, so we don't accidentally create + # relations for non-Turbo/non-PersistReco objects + assocpp.InputData = [] # Add Turbo++ track and protoparticle locations truthSeqStandard = self._configureTrackTruth(assocpp,trackcont) -- GitLab From 5a09e85c135f7e94c0db9b88419730df50bbbb57 Mon Sep 17 00:00:00 2001 From: Alex Pearce Date: Fri, 24 Feb 2017 16:45:50 +0100 Subject: [PATCH 3/4] Make sure we don't re-pack PersistReco. --- Phys/Tesla/python/Tesla/Configuration.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Phys/Tesla/python/Tesla/Configuration.py b/Phys/Tesla/python/Tesla/Configuration.py index 67088759..c24ae5a4 100644 --- a/Phys/Tesla/python/Tesla/Configuration.py +++ b/Phys/Tesla/python/Tesla/Configuration.py @@ -610,6 +610,9 @@ class Tesla(LHCbConfigurableUser): if self.getProp('Simulation')==True: self._unpackMC() TurboConf().setProp("PersistReco",True) + # We don't want the PersistReco reconstruction under + # /Event/Turbo, else it will be packed + TurboConf().setProp("RootInTES", "/Event") self._configureOutput() # -- GitLab From 2b2e5d9012916a621f1799b6bc517e7dac716c96 Mon Sep 17 00:00:00 2001 From: Alex Pearce Date: Fri, 24 Feb 2017 16:46:31 +0100 Subject: [PATCH 4/4] Create MC tables for merged HLT2 ProtoParticles. --- Phys/Tesla/python/Tesla/Configuration.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Phys/Tesla/python/Tesla/Configuration.py b/Phys/Tesla/python/Tesla/Configuration.py index c24ae5a4..6df7c89f 100644 --- a/Phys/Tesla/python/Tesla/Configuration.py +++ b/Phys/Tesla/python/Tesla/Configuration.py @@ -329,6 +329,13 @@ class Tesla(LHCbConfigurableUser): assocpp.InputData += [ matchedProtos[0] ] ChargedProtoSeq.Members+=[trackTruthSeq] + # Add container of merged long and downstream PersistReco PPs + # TODO this should be in the list in the configuration file + assocpp.InputData += ['Hlt2/Protos/Charged'] + print("Adding additional PR protoparticles for truth matching: "+assocpp.InputData[-1]) + trackTruthSeq = self._configureTrackTruth(assocpp, '/Event/Hlt2/TrackFitted/Charged') + ChargedProtoSeq.Members += [trackTruthSeq] + # Add standard Turbo ProtoParticles assocpp.InputData += [ protocont ] -- GitLab