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