Beispiel #1
0
    def __init__(self, name, config):
        LineBuilder.__init__(self, name, config)

        #######################################################################
        ###                                                                 ###
        ###     VELO BASED VERTEXING SEQUENCE                               ###
        ###                                                                 ###
        #######################################################################

        bestTracks = AutomaticData("Rec/Track/Best")

        withVeloTracksForVertexing = bestTracks
        if self.configurationParameter("FilterVelo")["Apply"]:
            from GaudiConfUtils.ConfigurableGenerators import SelectVeloTracksNotFromPV

            veloWithIP = SelectVeloTracksNotFromPV()
            self.validatedSetProps("FilterVelo",
                                   DisplVerticesLinesConf.veloWithIPCuts,
                                   veloWithIP)

            withVeloTracksForVertexing = Selection(
                "%sVeloFilteredTracks" % self.name(),
                RequiredSelections=[bestTracks],
                Algorithm=veloWithIP)

        # Displaced Vertex reconstruction with best tracks (dominated by those with a Velo segment)
        from Configurables import PatPV3D, PVOfflineTool, PVSeed3DTool, LSAdaptPV3DFitter, LSAdaptPVFitter

        withVeloVertexFinder = PVOfflineTool("%sWithVeloVertexFinder" %
                                             self.name(),
                                             PVsChi2Separation=0,
                                             PVsChi2SeparationLowMult=0,
                                             PVSeedingName="PVSeed3DTool",
                                             PVFitterName="LSAdaptPV3DFitter")
        withVeloVertexFinder.addTool(PVSeed3DTool)
        withVeloVertexFinder.PVSeed3DTool.MinCloseTracks = 3

        withVeloVertexFinder.addTool(LSAdaptPV3DFitter)
        withVeloVertexFinder.LSAdaptPV3DFitter.maxIP2PV = 2.0 * units.mm
        withVeloVertexFinder.LSAdaptPV3DFitter.MinTracks = 4

        withVeloVertexAlg = PatPV3D("%sWithVeloVertexAlg")
        withVeloVertexAlg.addTool(withVeloVertexFinder, name="PVOfflineTool")

        withVeloVertexing = SelectionPatPV3DWrapper(
            "%sWithVeloVertexing" % self.name(),
            withVeloVertexAlg,
            RequiredSelections=[withVeloTracksForVertexing])

        # Make Particles out of the RecVertices
        from GaudiConfUtils.ConfigurableGenerators import LLParticlesFromRecVertices

        rv2pWithVelo = LLParticlesFromRecVertices(VerticesFromVeloOnly=False,
                                                  WriteP2PVRelations=False,
                                                  ForceP2PVBuild=False)
        self.validatedSetProps(
            "RV2PWithVelo", DisplVerticesLinesConf.recoCuts +
            DisplVerticesLinesConf.singleCuts, rv2pWithVelo)

        withVeloCandidates = Selection("%sWithVeloCandidates" % self.name(),
                                       RequiredSelections=[withVeloVertexing],
                                       Algorithm=rv2pWithVelo,
                                       InputDataSetter="RecVertexLocations")

        #######################################################################
        ###                                                                 ###
        ###     DOWNSTREAM VERTEXING SEQUENCE                               ###
        ###                                                                 ###
        #######################################################################

        from GaudiConfUtils.ConfigurableGenerators import CopyDownstreamTracks

        downTracks = Selection("%sDownstreamTracks" % self.name(),
                               RequiredSelections=[bestTracks],
                               Algorithm=CopyDownstreamTracks())

        # Displaced Vertex reconstruction from downstream tracks
        downVertexFinder = PVOfflineTool("%sDownVertexFinder" % self.name(),
                                         RequireVelo=False,
                                         PVsChi2Separation=0,
                                         PVsChi2SeparationLowMult=0,
                                         PVSeedingName="PVSeed3DTool",
                                         PVFitterName="LSAdaptPVFitter")
        downVertexFinder.addTool(PVSeed3DTool)
        downVertexFinder.PVSeed3DTool.TrackPairMaxDistance = 2.0 * units.mm
        downVertexFinder.PVSeed3DTool.zMaxSpread = 20.0 * units.mm
        downVertexFinder.PVSeed3DTool.MinCloseTracks = 4
        downVertexFinder.addTool(LSAdaptPVFitter)
        downVertexFinder.LSAdaptPVFitter.MinTracks = 4
        downVertexFinder.LSAdaptPVFitter.maxChi2 = 400.0
        downVertexFinder.LSAdaptPVFitter.maxDeltaZ = 0.0005 * units.mm
        downVertexFinder.LSAdaptPVFitter.maxDeltaChi2NDoF = 0.002
        downVertexFinder.LSAdaptPVFitter.acceptTrack = 0.000000001
        downVertexFinder.LSAdaptPVFitter.trackMaxChi2 = 9
        downVertexFinder.LSAdaptPVFitter.trackMaxChi2Remove = 64

        downVertexAlg = PatPV3D("%sDownVertexAlg" % self.name())
        downVertexAlg.addTool(downVertexFinder, name="PVOfflineTool")

        downVertexing = SelectionPatPV3DWrapper(
            "%sDownVertexing" % self.name(),
            downVertexAlg,
            RequiredSelections=[downTracks])

        # Make Particles out of the RecVertices
        rv2pDown = LLParticlesFromRecVertices(VerticesFromVeloOnly=False,
                                              WriteP2PVRelations=False,
                                              ForceP2PVBuild=False
                                              #, OutputLevel          = VERBOSE
                                              )
        self.validatedSetProps(
            "RV2PDown", DisplVerticesLinesConf.recoCuts +
            DisplVerticesLinesConf.singleCuts, rv2pDown)

        downCandidates = Selection("%sDownCandidates" % self.name(),
                                   RequiredSelections=[downVertexing],
                                   Algorithm=rv2pDown,
                                   InputDataSetter="RecVertexLocations")

        #######################################################################
        ###                                                                 ###
        ###     LINE DEFINITIONS                                            ###
        ###                                                                 ###
        #######################################################################

        ##============================== Single ===================================##

        singleLineNames = [
            p.split("Single")[1].split("Selection")[0]
            for p in self.configKeys()
            if p.startswith("Single") and p.endswith("Selection")
        ]

        for lAcroName in singleLineNames:
            lShortName = "Single%s" % lAcroName  # SingleMedium
            lSelName = "%sSelection" % lShortName  # SingleMediumSelection
            lLineName = "%s%s" % (self.name(), lShortName
                                  )  # DisplVerticesSingleMedium

            # Choose between Velo-based and downstream vertexing input
            candidates = withVeloCandidates
            code = None
            if "Down" in lAcroName:
                candidates = downCandidates
                code = self.getLLPSelection(
                    self.validatedGetProps(
                        lSelName, DisplVerticesLinesConf.singleCuts +
                        DisplVerticesLinesConf.downCuts))
            else:
                code = self.getLLPSelection(
                    self.validatedGetProps(lSelName,
                                           DisplVerticesLinesConf.singleCuts))

            lineFilter = FilterDesktop(
                DecayDescriptor=LLPLHCbName,
                Preambulo=DisplVerticesLinesConf.llpSelectionPreambulo,
                Code=code,
                WriteP2PVRelations=False,
                ForceP2PVBuild=False
                #, OutputLevel        = VERBOSE
            )

            lineSel = Selection("".join((self.name(), lSelName)),
                                RequiredSelections=[candidates],
                                Algorithm=lineFilter)

            line = StrippingLine(
                lLineName,
                prescale=self.validatedGetProps(lSelName,
                                                ["PreScale"])["PreScale"],
                selection=lineSel
                ## , FILTER    = { "Preambulo" : [ "nVeloTracks   = RECSUMMARY(13,  0)"
                ##                               , "nVeloClusters = RECSUMMARY(30, -1)"
                ##                               , "from LoKiCore.functions import *" ]
                ##               , "Code"      : "monitor( 1.*nVeloTracks/nVeloClusters , Gaudi.Histo1DDef('Number of Velo Tracks / Clusters', 0., 1., 100) , 'NumVeloTracksPerCluster' ) < 0.2" }
            )
            if lShortName in self.configurationParameter("HLT"):
                line.HLT = self.configurationParameter("HLT")[lShortName]

            self.registerLine(line)

        ##============================== Double ===================================##

        doubleLineNames = [
            p.split("Double")[1].split("Selection")[0]
            for p in self.configKeys()
            if p.startswith("Double") and p.endswith("Selection")
        ]
        for lAcroName in doubleLineNames:
            lShortName = "Double%s" % lAcroName
            lSelName = "%sSelection" % lShortName
            lLineName = "%s%s" % (self.name(), lShortName)

            combinationCut, motherCut = self.getResonanceSelection(
                self.validatedGetProps(
                    lSelName, DisplVerticesLinesConf.doubleResonanceCuts))
            lineFilter = CombineParticles(
                DecayDescriptor="H_10 -> %s %s" % (LLPLHCbName, LLPLHCbName),
                Preambulo=DisplVerticesLinesConf.llpSelectionPreambulo,
                DaughtersCuts={
                    LLPLHCbName:
                    self.getLLPSelection(
                        self.validatedGetProps(
                            lSelName, DisplVerticesLinesConf.singleCuts))
                },
                CombinationCut=combinationCut,
                MotherCut=motherCut,
                WriteP2PVRelations=False,
                ForceP2PVBuild=False
                #, OutputLevel        = VERBOSE
            )
            lineSel = Selection("".join((self.name(), lSelName)),
                                RequiredSelections=[withVeloCandidates],
                                Algorithm=lineFilter)
            line = StrippingLine(lLineName,
                                 prescale=self.validatedGetProps(
                                     lSelName, ["PreScale"])["PreScale"],
                                 selection=lineSel)
            if lShortName in self.configurationParameter("HLT"):
                line.HLT = self.configurationParameter("HLT")[lShortName]

            self.registerLine(line)

        ##============================== HLT PS ===================================##

        hltPSLineNames = [
            p.split("HLTPS")[0] for p in self.configKeys()
            if p.endswith("HLTPS")
        ]
        for lAcroName in hltPSLineNames:
            lShortName = "%sHLTPS" % lAcroName
            lLineName = "%s%s" % (self.name(), lShortName
                                  )  # DisplVerticesSingleMedium

            line = StrippingLine(
                lLineName,
                prescale=self.validatedGetProps(lShortName,
                                                ["PreScale"])["PreScale"]
                # these lines MUST have an HLT filter
                ,
                HLT=self.validatedGetProps("HLT", [lShortName])[lShortName],
                selection=withVeloCandidates)

            self.registerLine(line)

        ##============================== OTHER  ===================================##

        hltEffLineNames = [
            p.split("HltEff")[1].split("Selection")[0]
            for p in self.configKeys()
            if p.startswith("HltEff") and p.endswith("Selection")
        ]
        for lShortName in hltEffLineNames:
            lSelName = "HltEff%sSelection" % lShortName
            lLineName = "%s%s" % (self.name(), lShortName)

            # HltEff lines are single, Velo-vertexing based lines
            lineFilter = FilterDesktop(
                DecayDescriptor=LLPLHCbName,
                Preambulo=DisplVerticesLinesConf.llpSelectionPreambulo,
                Code=self.getLLPSelection(
                    self.validatedGetProps(lSelName,
                                           DisplVerticesLinesConf.singleCuts)),
                WriteP2PVRelations=False,
                ForceP2PVBuild=False
                #, OutputLevel        = VERBOSE
            )

            lineSel = Selection("".join((self.name(), lSelName)),
                                RequiredSelections=[withVeloCandidates],
                                Algorithm=lineFilter)

            line = StrippingLine(
                lLineName,
                prescale=self.validatedGetProps(lSelName,
                                                ["PreScale"])["PreScale"]
                # these lines MUST have an HLT filter
                ,
                HLT=self.configurationParameter("HLT")[lShortName],
                selection=lineSel)

            self.registerLine(line)
Beispiel #2
0
    def __init__(self, name, config):
        LineBuilder.__init__(self, name, config)

        #######################################################################
        ###                                                                 ###
        ###     VELO BASED VERTEXING SEQUENCE                               ###
        ###                                                                 ###
        #######################################################################

        bestTracks = AutomaticData("Rec/Track/Best")

        withVeloTracksForVertexing = bestTracks

        if self.configurationParameter("VeloGEC")["Apply"]:
            from GaudiConfUtils.ConfigurableGenerators import VeloEventShapeCutsS20p3

            veloGEC = VeloEventShapeCutsS20p3()
            self.validatedSetProps("VeloGEC",
                                   DisplVerticesLinesConf.veloGECCuts, veloGEC)

            withVeloTracksForVertexing = PassThroughSelection(
                "%sVeloGEC" % self.name(),
                RequiredSelection=withVeloTracksForVertexing,
                Algorithm=veloGEC)

        if self.configurationParameter("FilterVelo")["Apply"]:
            from GaudiConfUtils.ConfigurableGenerators import SelectVeloTracksNotFromPVS20p3

            veloWithIP = SelectVeloTracksNotFromPVS20p3()
            self.validatedSetProps("FilterVelo",
                                   DisplVerticesLinesConf.veloWithIPCuts,
                                   veloWithIP)

            withVeloTracksForVertexing = Selection(
                "%sVeloFilteredTracks" % self.name(),
                RequiredSelections=[withVeloTracksForVertexing],
                Algorithm=veloWithIP)

        # Displaced Vertex reconstruction with best tracks (dominated by those with a Velo segment)
        from Configurables import PatPV3D, PVOfflineTool, PVSeed3DTool, LSAdaptPV3DFitter, LSAdaptPVFitter

        withVeloVertexAlg = PatPV3D("%sWithVeloVertexAlg" % self.name())
        withVeloVertexFinder = addPrivateToolAndGet(withVeloVertexAlg,
                                                    PVOfflineTool)
        withVeloVertexFinder.PVsChi2Separation = 0
        withVeloVertexFinder.PVsChi2SeparationLowMult = 0
        withVeloSeeder = addPrivateToolAndGet(withVeloVertexFinder,
                                              PVSeed3DTool)
        withVeloVertexFinder.PVSeedingName = withVeloSeeder.getTitleName()
        withVeloSeeder.MinCloseTracks = 3
        withVeloFitter = addPrivateToolAndGet(withVeloVertexFinder,
                                              LSAdaptPV3DFitter)
        withVeloVertexFinder.PVFitterName = withVeloFitter.getTitleName()
        withVeloFitter.maxIP2PV = 2.0 * units.mm
        withVeloFitter.MinTracks = 4

        withVeloVertexing = SelectionPatPV3DWrapper(
            "%sWithVeloVertexing" % self.name(),
            withVeloVertexAlg,
            RequiredSelections=[withVeloTracksForVertexing])

        # Make Particles out of the RecVertices
        from GaudiConfUtils.ConfigurableGenerators import LLParticlesFromRecVertices

        rv2pWithVelo = LLParticlesFromRecVertices(
            VerticesFromVeloOnly=False,
            RequireUpstreamPV=False,
            WriteP2PVRelations=False,
            ForceP2PVBuild=False,
            VeloProtoParticlesLocation="Phys/%s/VeloProtoP" % self.name())
        self.validatedSetProps(
            "RV2PWithVelo", DisplVerticesLinesConf.recoCuts +
            DisplVerticesLinesConf.singleCuts, rv2pWithVelo)

        withVeloCandidates = Selection("%sWithVeloCandidates" % self.name(),
                                       RequiredSelections=[withVeloVertexing],
                                       Algorithm=rv2pWithVelo,
                                       InputDataSetter="RecVertexLocations")

        #######################################################################
        ###                                                                 ###
        ###     DOWNSTREAM VERTEXING SEQUENCE                               ###
        ###                                                                 ###
        #######################################################################

        from GaudiConfUtils.ConfigurableGenerators import CopyDownstreamTracks

        downTracks = Selection("%sDownstreamTracks" % self.name(),
                               RequiredSelections=[bestTracks],
                               Algorithm=CopyDownstreamTracks())

        # Displaced Vertex reconstruction from downstream tracks
        downVertexAlg = PatPV3D("%sDownVertexAlg" % self.name())
        downVertexFinder = addPrivateToolAndGet(downVertexAlg, PVOfflineTool)
        downVertexFinder.RequireVelo = False
        downVertexFinder.PVsChi2Separation = 0
        downVertexFinder.PVsChi2SeparationLowMult = 0
        downSeeder = addPrivateToolAndGet(downVertexFinder, PVSeed3DTool)
        downVertexFinder.PVSeedingName = downSeeder.getTitleName()
        downSeeder.TrackPairMaxDistance = 2.0 * units.mm
        downSeeder.zMaxSpread = 20.0 * units.mm
        downSeeder.MinCloseTracks = 4
        downFitter = addPrivateToolAndGet(downVertexFinder, LSAdaptPVFitter)
        downVertexFinder.PVFitterName = downFitter.getTitleName()
        downFitter.MinTracks = 4
        downFitter.maxChi2 = 400.0
        downFitter.maxDeltaZ = 0.0005 * units.mm
        downFitter.maxDeltaChi2NDoF = 0.002
        downFitter.acceptTrack = 0.000000001
        downFitter.trackMaxChi2 = 9
        downFitter.trackMaxChi2Remove = 64

        downVertexing = SelectionPatPV3DWrapper(
            "%sDownVertexing" % self.name(),
            downVertexAlg,
            RequiredSelections=[downTracks])

        # Make Particles out of the RecVertices
        rv2pDown = LLParticlesFromRecVertices(VerticesFromVeloOnly=False,
                                              RequireUpstreamPV=False,
                                              WriteP2PVRelations=False,
                                              ForceP2PVBuild=False
                                              #, OutputLevel          = VERBOSE
                                              )
        self.validatedSetProps(
            "RV2PDown", DisplVerticesLinesConf.recoCuts +
            DisplVerticesLinesConf.singleCuts, rv2pDown)

        downCandidates = Selection("%sDownCandidates" % self.name(),
                                   RequiredSelections=[downVertexing],
                                   Algorithm=rv2pDown,
                                   InputDataSetter="RecVertexLocations")

        #######################################################################
        ###                                                                 ###
        ###     HLT JET SEQUENCE                                            ###
        ###                                                                 ###
        #######################################################################
        # timing is already fine, so one algo with loose JetID is sufficient

        # Hlt prefilter and vertex candidates from Hlt2
        from Configurables import HltVertexConverterS20p3
        revivedHlt2Candidates = "Phys/%sHlt2Cand/Particles" % self.name()
        hltCandReviver = GaudiSequenceroid(
            ModeOR=True,
            ShortCircuit=False,
            Members=[
                GaudiSequencer(
                    "%sHlt2CandFilterTCK%s-%s" %
                    (self.name(), tckBegin, tckEnd),
                    Members=[
                        ODINFilter("%sODINFilterTCK%s-%s" %
                                   (self.name(), tckBegin, tckEnd),
                                   Code="in_range( %s, ODIN_TCK, %s )" %
                                   (tckBegin, tckEnd)),
                        HltFilter("%sHltDecisionFilterTCK%s-%s" %
                                  (self.name(), tckBegin, tckEnd),
                                  Code=" | ".join("HLT_PASS('%s')" % ln
                                                  for ln in hltLines)),
                        HltVertexConverterS20p3(
                            "%sHltConverter%s-%s" %
                            (self.name(), tckBegin, tckEnd),
                            HltLines=hltLines,
                            Recursive=True,
                            Output=revivedHlt2Candidates,
                            WriteP2PVRelations=False,
                            ForceP2PVBuild=False)
                    ]) for (tckBegin, tckEnd), hltLines in
                self.configurationParameter("HLT")["SignalLines"]
            ])
        hltCandSelection = EventSelection("%sHltCandidates" % self.name(),
                                          Algorithm=hltCandReviver)

        hltVeloGEC = VeloEventShapeCutsS20p3()
        self.validatedSetProps("VeloGEC", DisplVerticesLinesConf.veloGECCuts,
                               hltVeloGEC)
        hltVeloGEC.HistoProduce = False
        hltVeloGECSel = EventSelection("%sHltVeloGEC" % self.name(),
                                       Algorithm=hltVeloGEC)

        hlt2CandAndGECSelection = Selection(
            "".join((self.name(), "Hlt2CandVertices")),
            RequiredSelections=[
                hltCandSelection,
                AutomaticData(revivedHlt2Candidates), hltVeloGECSel
            ],
            Algorithm=FilterDesktop(
                Code="( ABSID == '{pid}' )".format(pid=LLPLHCbName),
                WriteP2PVRelations=False,
                ForceP2PVBuild=False))

        hlt2CandWithJets = Selection(
            "".join((self.name(), "Hlt2CandWithJets")),
            RequiredSelections=[hlt2CandAndGECSelection],
            Algorithm=self.makeJetCandidateAlg("".join(
                (self.name(), "HltJetAlg"))))

        #######################################################################
        ###                                                                 ###
        ###     LINE DEFINITIONS                                            ###
        ###                                                                 ###
        #######################################################################
        # one line for every configuratoin key of the format
        # "Single.*Selection"
        # "JetSingle.*Selection"
        # "JetHltSingle.*Selection"
        # "Double.*Selection"
        # ".*HLTPS"
        # "HltEff.*Selection"

        ##============================== Single ===================================##

        singleLineNames = [
            p.split("Single")[1].split("Selection")[0]
            for p in self.configKeys()
            if p.startswith("Single") and p.endswith("Selection")
        ]

        for lAcroName in singleLineNames:
            lShortName = "Single%s" % lAcroName  # SingleMedium
            lSelName = "%sSelection" % lShortName  # SingleMediumSelection
            lLineName = "%s%s" % (self.name(), lShortName
                                  )  # DisplVerticesSingleMedium

            # Choose between Velo-based and downstream vertexing input
            candidates = withVeloCandidates
            code = None
            if "Down" in lAcroName:
                candidates = downCandidates
                code = self.getLLPSelection(
                    self.validatedGetProps(
                        lSelName, DisplVerticesLinesConf.singleCuts +
                        DisplVerticesLinesConf.downCuts))
            else:
                code = self.getLLPSelection(
                    self.validatedGetProps(lSelName,
                                           DisplVerticesLinesConf.singleCuts))

            lineFilter = FilterDesktop(
                DecayDescriptor=LLPLHCbName,
                Preambulo=DisplVerticesLinesConf.llpSelectionPreambulo,
                Code=code,
                WriteP2PVRelations=False,
                ForceP2PVBuild=False
                #, OutputLevel        = VERBOSE
            )

            lineSel = Selection("".join((self.name(), lSelName)),
                                RequiredSelections=[candidates],
                                Algorithm=lineFilter)

            line = StrippingLine(lLineName,
                                 prescale=self.validatedGetProps(
                                     lSelName, ["PreScale"])["PreScale"],
                                 selection=lineSel)
            if lShortName in self.configurationParameter("HLT"):
                line.HLT = self.configurationParameter("HLT")[lShortName]

            self.registerLine(line)

        ##========================= Single with jets ==============================##

        jetSingleLineNames = [
            p.split("JetSingle")[1].split("Selection")[0]
            for p in self.configKeys()
            if p.startswith("JetSingle") and p.endswith("Selection")
        ]

        for lAcroName in jetSingleLineNames:
            lShortName = "JetSingle%s" % lAcroName  # JetSingleMedium
            lSelName = "%sSelection" % lShortName  # JetSingleMediumSelection
            lLineName = "%s%s" % (self.name(), lShortName
                                  )  # DisplVerticesJetSingleMedium

            # Choose between Velo-based and downstream vertexing input
            vertexCandidates = withVeloCandidates
            code = self.getLLPSelection(
                self.validatedGetProps(lSelName,
                                       DisplVerticesLinesConf.singleCuts))

            vertexFilter = FilterDesktop(
                DecayDescriptor=LLPLHCbName,
                Preambulo=DisplVerticesLinesConf.llpSelectionPreambulo,
                Code=code,
                WriteP2PVRelations=False,
                ForceP2PVBuild=False
                #, OutputLevel        = VERBOSE
            )

            goodVertices = Selection("".join(
                (self.name(), lSelName, "Vertices")),
                                     RequiredSelections=[vertexCandidates],
                                     Algorithm=vertexFilter)

            jetProps = self.validatedGetProps(lSelName,
                                              DisplVerticesLinesConf.jetCuts)
            vertWithJets = Selection("".join((self.name(), lSelName, "Jets")),
                                     RequiredSelections=[goodVertices],
                                     Algorithm=self.makeJetCandidateAlg(
                                         "".join((self.name(), lSelName,
                                                  "JetAlg")),
                                         MinNumJets=jetProps["MinNumJets"]))
            jetCode = self.getLLPJetSelection(jetProps,
                                              JetIDCut=jetProps["JetIDCut"])
            jetCandFilter = FilterDesktop(DecayDescriptor=LLPLHCbName,
                                          Preambulo=self.jetSelectionPreambulo,
                                          Code=jetCode,
                                          WriteP2PVRelations=False,
                                          ForceP2PVBuild=False)
            lineSel = Selection("".join((self.name(), lSelName)),
                                RequiredSelections=[vertWithJets],
                                Algorithm=jetCandFilter)

            line = StrippingLine(lLineName,
                                 prescale=self.validatedGetProps(
                                     lSelName, ["PreScale"])["PreScale"],
                                 selection=lineSel)
            if lShortName in self.configurationParameter("HLT"):
                line.HLT = self.configurationParameter("HLT")[lShortName]

            self.registerLine(line)

        ##============= Single with jets based on Hlt candidate ==================##

        jetHltSingleLineNames = [
            p.split("JetHltSingle")[1].split("Selection")[0]
            for p in self.configKeys()
            if p.startswith("JetHltSingle") and p.endswith("Selection")
        ]

        for lAcroName in jetHltSingleLineNames:
            lShortName = "JetHltSingle%s" % lAcroName  # JetHltSingleMedium
            lSelName = "%sSelection" % lShortName  # JetHltSingleMediumSelection
            lLineName = "%s%s" % (self.name(), lShortName
                                  )  # DisplVerticesJetHltSingleMedium

            jetProps = self.validatedGetProps(lSelName,
                                              DisplVerticesLinesConf.jetCuts)
            jetCode = self.getLLPJetSelection(jetProps,
                                              JetIDCut=jetProps["JetIDCut"])
            jetCandFilter = FilterDesktop(DecayDescriptor=LLPLHCbName,
                                          Preambulo=self.jetSelectionPreambulo,
                                          Code=jetCode,
                                          WriteP2PVRelations=False,
                                          ForceP2PVBuild=False)
            lineSel = Selection("".join((self.name(), lSelName)),
                                RequiredSelections=[hlt2CandWithJets],
                                Algorithm=jetCandFilter)

            line = StrippingLine(lLineName,
                                 prescale=self.validatedGetProps(
                                     lSelName, ["PreScale"])["PreScale"],
                                 selection=lineSel)
            if lShortName in self.configurationParameter("HLT"):
                line.HLT = self.configurationParameter("HLT")[lShortName]

            self.registerLine(line)

        ##============================== Double ===================================##

        doubleLineNames = [
            p.split("Double")[1].split("Selection")[0]
            for p in self.configKeys()
            if p.startswith("Double") and p.endswith("Selection")
        ]
        for lAcroName in doubleLineNames:
            lShortName = "Double%s" % lAcroName
            lSelName = "%sSelection" % lShortName
            lLineName = "%s%s" % (self.name(), lShortName)

            combinationCut, motherCut = self.getResonanceSelection(
                self.validatedGetProps(
                    lSelName, DisplVerticesLinesConf.doubleResonanceCuts))
            lineFilter = CombineParticles(
                DecayDescriptor="H_10 -> %s %s" % (LLPLHCbName, LLPLHCbName),
                Preambulo=DisplVerticesLinesConf.llpSelectionPreambulo,
                DaughtersCuts={
                    LLPLHCbName:
                    self.getLLPSelection(
                        self.validatedGetProps(
                            lSelName, DisplVerticesLinesConf.singleCuts))
                },
                CombinationCut=combinationCut,
                MotherCut=motherCut,
                WriteP2PVRelations=False,
                ForceP2PVBuild=False
                #, OutputLevel        = VERBOSE
            )
            lineSel = Selection("".join((self.name(), lSelName)),
                                RequiredSelections=[withVeloCandidates],
                                Algorithm=lineFilter)
            line = StrippingLine(lLineName,
                                 prescale=self.validatedGetProps(
                                     lSelName, ["PreScale"])["PreScale"],
                                 selection=lineSel)
            if lShortName in self.configurationParameter("HLT"):
                line.HLT = self.configurationParameter("HLT")[lShortName]

            self.registerLine(line)

        ##============================== HLT PS ===================================##

        hltPSLineNames = [
            p.split("HLTPS")[0] for p in self.configKeys()
            if p.endswith("HLTPS")
        ]
        for lAcroName in hltPSLineNames:
            lShortName = "%sHLTPS" % lAcroName
            lLineName = "%s%s" % (self.name(), lShortName
                                  )  # DisplVerticesSingleMedium

            hltSelAlg = GaudiSequenceroid(
                ModeOR=True,
                ShortCircuit=False,
                Members=[
                    GaudiSequencer(
                        "%sHltFilterTCK%s-%s" % (lLineName, tckBegin, tckEnd),
                        Members=[
                            ODINFilter("%sODINFilterTCK%s-%s" %
                                       (lLineName, tckBegin, tckEnd),
                                       Code="in_range( %s, ODIN_TCK, %s )" %
                                       (tckBegin, tckEnd)),
                            HltFilter("%sHltDecisionFilterTCK%s-%s" %
                                      (lLineName, tckBegin, tckEnd),
                                      Code=hltFilter)
                        ]) for (tckBegin, tckEnd), hltFilter in
                    self.validatedGetProps("HLT", [lShortName])[lShortName]
                ])

            hltSelection = EventSelection("%sHltFilter" % lLineName,
                                          Algorithm=hltSelAlg)

            line = StrippingLine(lLineName,
                                 prescale=self.validatedGetProps(
                                     lShortName, ["PreScale"])["PreScale"],
                                 selection=hltSelection)

            self.registerLine(line)

        ##============================== OTHER  ===================================##

        hltEffLineNames = [
            p.split("HltEff")[1].split("Selection")[0]
            for p in self.configKeys()
            if p.startswith("HltEff") and p.endswith("Selection")
        ]
        for lShortName in hltEffLineNames:
            lSelName = "HltEff%sSelection" % lShortName
            lLineName = "%s%s" % (self.name(), lShortName)

            # HltEff lines are single, Velo-vertexing based lines
            lineFilter = FilterDesktop(
                DecayDescriptor=LLPLHCbName,
                Preambulo=DisplVerticesLinesConf.llpSelectionPreambulo,
                Code=self.getLLPSelection(
                    self.validatedGetProps(lSelName,
                                           DisplVerticesLinesConf.singleCuts)),
                WriteP2PVRelations=False,
                ForceP2PVBuild=False
                #, OutputLevel        = VERBOSE
            )

            lineSel = Selection("".join((self.name(), lSelName)),
                                RequiredSelections=[withVeloCandidates],
                                Algorithm=lineFilter)

            line = StrippingLine(
                lLineName,
                prescale=self.validatedGetProps(lSelName,
                                                ["PreScale"])["PreScale"]
                # these lines MUST have an HLT filter
                ,
                HLT=self.configurationParameter("HLT")[lShortName],
                selection=lineSel)

            self.registerLine(line)