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