618 runGhostMuonAssociation = None):
619 """Create a jet analysis algorithm sequence
620 The jet collection is interpreted and selects the correct function to call,
621 makeSmallRJetAnalysisConfig, makeRScanJetAnalysisConfig or
622 makeLargeRJetAnalysisConfig
623
624 Keyword arguments
625 jetCollection -- The jet container to run on.
626 """
627
628
629 btIndex = jetCollection.find('_BTagging')
630 if btIndex != -1:
631 jetCollection = jetCollection[:btIndex]
632
633 jetCollectionName=jetCollection
634
635 if(jetCollection==
"AnalysisJets") :
636 jetCollectionName="AntiKt4EMPFlowJets"
637 if(jetCollection==
"AnalysisLargeRJets") :
638 jetCollectionName="AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"
639
640
641 collection_pattern = re.compile(
642 r"AntiKt(\d+)(EMTopo|EMPFlow|LCTopo|TrackCaloCluster|UFO|Track|HI)(TrimmedPtFrac5SmallR20|CSSKSoftDropBeta100Zcut10)?Jets")
643 match = collection_pattern.match(jetCollectionName)
644 if not match:
645 raise ValueError(
646 "Jet collection {0} does not match expected pattern!".format(jetCollectionName) )
647 radius = int(match.group(1) )
648 if radius not in [2, 4, 6, 10]:
649 raise ValueError("Jet collection has an unsupported radius '{0}'!".format(radius) )
650 jetInput = match.group(2)
651
652 config = PreJetAnalysisConfig()
653 config.setOptionValue ('containerName', containerName)
654 config.setOptionValue ('jetCollection', jetCollection)
655 config.runOriginalObjectLink = (btIndex != -1)
656 config.setOptionValue ('runGhostMuonAssociation', runGhostMuonAssociation)
657 seq.append (config)
658
659 if radius == 4:
660 makeSmallRJetAnalysisConfig(seq, containerName,
661 jetCollection, jetInput=jetInput)
662 elif radius in [2, 6]:
663 makeRScanJetAnalysisConfig(seq, containerName,
664 jetCollection, jetInput=jetInput, radius=radius)
665 else:
666 trim = match.group(3)
667 if trim == "":
668 raise ValueError("Untrimmed large-R jets are not supported!")
669 makeLargeRJetAnalysisConfig(seq, containerName,
670 jetCollection, jetInput=jetInput)
671
672
673