Inherits FWCore::GuiBrowsers::ConfigToolBase::ConfigToolBase.
Public Member Functions | |
def | __call__ |
def | __init__ |
def | getDefaultParameters |
def | toolCode |
Private Attributes | |
_comment | |
_parameters | |
Static Private Attributes | |
tuple | _defaultParameters = dicttypes.SortedKeysDict() |
string | _label = 'switchJetCollection' |
Switch the collection of jets in PAT from the default value to a new jet collection
Definition at line 596 of file jetTools.py.
def jetTools::SwitchJetCollection::__init__ | ( | self | ) |
Definition at line 603 of file jetTools.py.
00604 : 00605 ConfigToolBase.__init__(self) 00606 self.addParameter(self._defaultParameters,'jetCollection',self._defaultValue,'Input jet collection', cms.InputTag) 00607 self.addParameter(self._defaultParameters,'btagInfo',['impactParameterTagInfos','secondaryVertexTagInfos','softMuonTagInfos','secondaryVertexNegativeTagInfos'],"input btag info",allowedValues=['impactParameterTagInfos','secondaryVertexTagInfos','softMuonTagInfos','secondaryVertexNegativeTagInfos'],Type=list) 00608 self.addParameter(self._defaultParameters, 'btagdiscriminators',['jetBProbabilityBJetTags','jetProbabilityBJetTags','trackCountingHighPurBJetTags','trackCountingHighEffBJetTags','simpleSecondaryVertexHighEffBJetTags','simpleSecondaryVertexHighPurBJetTags','combinedSecondaryVertexBJetTags','combinedSecondaryVertexMVABJetTags','softMuonBJetTags','softMuonByPtBJetTags','softMuonByIP3dBJetTags','simpleSecondaryVertexNegativeHighEffBJetTags','simpleSecondaryVertexNegativeHighPurBJetTags','negativeTrackCountingHighEffJetTags','negativeTrackCountingHighPurJetTags'],"input btag discriminators", allowedValues=['jetBProbabilityBJetTags', 'jetProbabilityBJetTags','trackCountingHighPurBJetTags', 'trackCountingHighEffBJetTags','simpleSecondaryVertexHighEffBJetTags','simpleSecondaryVertexHighPurBJetTags','combinedSecondaryVertexBJetTags','combinedSecondaryVertexMVABJetTags','softMuonBJetTags','softMuonByPtBJetTags','softMuonByIP3dBJetTags','simpleSecondaryVertexNegativeHighEffBJetTags','simpleSecondaryVertexNegativeHighPurBJetTags','negativeTrackCountingHighEffJetTags','negativeTrackCountingHighPurJetTags'],Type=list) 00609 self.addParameter(self._defaultParameters,'doJTA',True, "run b tagging sequence for new jet collection and add it to the new pat jet collection") 00610 self.addParameter(self._defaultParameters,'doBTagging',True, 'run JetTracksAssociation and JetCharge and add it to the new pat jet collection (will autom. be true if doBTagging is set to true)') 00611 self.addParameter(self._defaultParameters,'jetCorrLabel',None, "payload and list of new jet correction labels, such as (\'AK5Calo\',[\'L2Relative\', \'L3Absolute\'])", tuple,acceptNoneValue=True ) 00612 self.addParameter(self._defaultParameters,'doType1MET',True, "if jetCorrLabel is not 'None', set this to 'True' to redo the Type1 MET correction for the new jet colleection; at the moment it must be 'False' for non CaloJets otherwise the JetMET POG module crashes. ") 00613 self.addParameter(self._defaultParameters,'genJetCollection',cms.InputTag("ak5GenJets"), "GenJet collection to match to") 00614 self.addParameter(self._defaultParameters,'doJetID',True, "add jetId variables to the added jet collection") 00615 self.addParameter(self._defaultParameters,'jetIdLabel',"ak5", " specify the label prefix of the xxxJetID object; in general it is the jet collection tag like ak5, kt4 sc5, aso. For more information have a look to SWGuidePATTools#add_JetCollection") 00616 self.addParameter(self._defaultParameters,'postfix',"", "postfix of default sequence") 00617 self.addParameter(self._defaultParameters, 'outputModules', ['out'], "Output module labels, empty list of label indicates no output, default: ['out']") 00618 00619 self._parameters=copy.deepcopy(self._defaultParameters) 00620 self._comment = ""
def jetTools::SwitchJetCollection::__call__ | ( | self, | |
process, | |||
jetCollection = None , |
|||
doJTA = None , |
|||
doBTagging = None , |
|||
jetCorrLabel = None , |
|||
doType1MET = None , |
|||
genJetCollection = None , |
|||
doJetID = None , |
|||
jetIdLabel = None , |
|||
postfix = None , |
|||
outputModule = None , |
|||
outputModules = None , |
|||
btagInfo = None , |
|||
btagdiscriminators = None |
|||
) |
Definition at line 624 of file jetTools.py.
00638 : 00639 00640 00641 00642 00643 ## stop processing if 'outputModule' exists and show the new alternative 00644 if not outputModule is None: 00645 depricatedOptionOutputModule(self) 00646 if jetCollection is None: 00647 jetCollection=self._defaultParameters['jetCollection'].value 00648 if doJTA is None: 00649 doJTA=self._defaultParameters['doJTA'].value 00650 if doBTagging is None: 00651 doBTagging=self._defaultParameters['doBTagging'].value 00652 if jetCorrLabel is None: 00653 jetCorrLabel=self._defaultParameters['jetCorrLabel'].value 00654 if doType1MET is None: 00655 doType1MET=self._defaultParameters['doType1MET'].value 00656 if genJetCollection is None: 00657 genJetCollection=self._defaultParameters['genJetCollection'].value 00658 if doJetID is None: 00659 doJetID=self._defaultParameters['doJetID'].value 00660 if jetIdLabel is None: 00661 jetIdLabel=self._defaultParameters['jetIdLabel'].value 00662 if outputModules is None: 00663 outputModules=self._defaultParameters['outputModules'].value 00664 if postfix is None: 00665 postfix=self._defaultParameters['postfix'].value 00666 if btagInfo is None: 00667 btagInfo=self._defaultParameters['btagInfo'].value 00668 if btagdiscriminators is None: 00669 btagdiscriminators=self._defaultParameters['btagdiscriminators'].value 00670 00671 00672 00673 00674 self.setParameter('jetCollection',jetCollection) 00675 self.setParameter('doJTA',doJTA) 00676 self.setParameter('doBTagging',doBTagging) 00677 self.setParameter('jetCorrLabel',jetCorrLabel) 00678 self.setParameter('doType1MET',doType1MET) 00679 self.setParameter('genJetCollection',genJetCollection) 00680 self.setParameter('doJetID',doJetID) 00681 self.setParameter('jetIdLabel',jetIdLabel) 00682 self.setParameter('outputModules',outputModules) 00683 self.setParameter('postfix',postfix) 00684 self.setParameter('btagInfo',btagInfo) 00685 self.setParameter('btagdiscriminators',btagdiscriminators) 00686 00687 self.apply(process) 00688
def jetTools::SwitchJetCollection::getDefaultParameters | ( | self | ) |
Definition at line 621 of file jetTools.py.
def jetTools::SwitchJetCollection::toolCode | ( | self, | |
process | |||
) |
Definition at line 689 of file jetTools.py.
00690 : 00691 jetCollection=self._parameters['jetCollection'].value 00692 doJTA=self._parameters['doJTA'].value 00693 doBTagging=self._parameters['doBTagging'].value 00694 jetCorrLabel=self._parameters['jetCorrLabel'].value 00695 doType1MET =self._parameters['doType1MET'].value 00696 genJetCollection=self._parameters['genJetCollection'].value 00697 doJetID=self._parameters['doJetID'].value 00698 jetIdLabel=self._parameters['jetIdLabel'].value 00699 outputModules=self._parameters['outputModules'].value 00700 postfix=self._parameters['postfix'].value 00701 btagInfo=self._parameters['btagInfo'].value 00702 btagdiscriminators=self._parameters['btagdiscriminators'].value 00703 00704 ## save label of old input jet collection 00705 oldLabel = applyPostfix(process, "patJets", postfix).jetSource; 00706 00707 ## replace input jet collection for generator matches if the 00708 ## genJetCollection is no empty 00709 if (process.patJets.addGenPartonMatch): 00710 applyPostfix(process, "patJetPartonMatch", postfix).src = jetCollection 00711 if (process.patJets.addGenJetMatch): 00712 applyPostfix(process, "patJetGenJetMatch", postfix).src = jetCollection 00713 applyPostfix(process, "patJetGenJetMatch", postfix).matched = genJetCollection 00714 if (process.patJets.getJetMCFlavour): 00715 applyPostfix(process, "patJetPartonAssociation", postfix).jets = jetCollection 00716 00717 ## replace input jet collection for pat jet production 00718 applyPostfix(process, "patJets", postfix).jetSource = jetCollection 00719 00720 ## make VInputTag from strings 00721 def vit(*args) : return cms.VInputTag( *[ cms.InputTag(x) for x in args ] ) 00722 00723 if (doJTA or doBTagging): 00724 ## replace jet track association 00725 process.load("RecoJets.JetAssociationProducers.ak5JTA_cff") 00726 from RecoJets.JetAssociationProducers.ak5JTA_cff import ak5JetTracksAssociatorAtVertex 00727 setattr(process, "jetTracksAssociatorAtVertex"+postfix, ak5JetTracksAssociatorAtVertex.clone(jets = jetCollection)) 00728 getattr(process, "patDefaultSequence"+postfix).replace( 00729 applyPostfix(process, "patJetCharge", postfix), 00730 getattr(process, "jetTracksAssociatorAtVertex" + postfix) #module with postfix that is not n patDefaultSequence 00731 + applyPostfix(process, "patJetCharge", postfix) 00732 ) 00733 00734 applyPostfix(process, "patJetCharge", postfix).src = 'jetTracksAssociatorAtVertex'+postfix 00735 applyPostfix(process, "patJets", postfix).trackAssociationSource = 'jetTracksAssociatorAtVertex'+postfix 00736 else: 00737 ## remove the jet track association from the std 00738 ## sequence 00739 removeIfInSequence(process, "patJetCharge", "patDefaultSequence", postfix) 00740 ## switch embedding of track association and jet 00741 ## charge estimate to 'False' 00742 applyPostfix(process, "patJets", postfix).addAssociatedTracks = False 00743 applyPostfix(process, "patJets", postfix).addJetCharge = False 00744 00745 if (doBTagging): 00746 ## replace b tagging sequence; add postfix label 'AOD' as crab will 00747 ## crash when confronted with empy labels 00748 ##(btagSeq, btagLabels) = runBTagging(process, jetCollection, 'AOD',postfix) 00749 (btagSeq, btagLabels) = runBTagging(process, jetCollection,"AOD",postfix,btagInfo,btagdiscriminators) 00750 ## add b tagging sequence before running the allLayer1Jets modules 00751 getattr(process, "patDefaultSequence"+postfix).replace( 00752 getattr( process,"jetTracksAssociatorAtVertex"+postfix), 00753 getattr( process,"jetTracksAssociatorAtVertex"+postfix) + btagSeq 00754 ) 00755 00756 ## replace corresponding tags for pat jet production 00757 applyPostfix(process, "patJets", postfix).trackAssociationSource = btagLabels['jta'] 00758 applyPostfix(process, "patJets", postfix).tagInfoSources = cms.VInputTag( *[ cms.InputTag(x) for x in btagLabels['tagInfos'] ] ) 00759 applyPostfix(process, "patJets", postfix).discriminatorSources = cms.VInputTag( *[ cms.InputTag(x) for x in btagLabels['jetTags'] ] ) 00760 else: 00761 ## remove b tagging from the std sequence 00762 removeIfInSequence(process, "secondaryVertexNegativeTagInfos", "patDefaultSequence", postfix) 00763 removeIfInSequence(process, "simpleSecondaryVertexNegativeBJetTags", "patDefaultSequence", postfix) 00764 ## switch embedding of b tagging for pat 00765 ## jet production to 'False' 00766 applyPostfix(process, "patJets", postfix).addBTagInfo = False 00767 ## adjust output 00768 if len(outputModules) > 0: 00769 for outMod in outputModules: 00770 if hasattr(process,outMod): 00771 getattr(process,outMod).outputCommands.append("drop *_selectedPatJets_tagInfos_*") 00772 else: 00773 raise KeyError, "process has no OutModule named", outMod 00774 00775 if (doJetID): 00776 jetIdLabelNew = jetIdLabel + 'JetID' 00777 applyPostfix(process, "patJets", postfix).jetIDMap = cms.InputTag( jetIdLabelNew ) 00778 else: 00779 applyPostfix(process, "patJets", postfix).addJetID = cms.bool(False) 00780 00781 if (jetCorrLabel!=None): 00782 ## replace jet energy corrections; catch 00783 ## a couple of exceptions first 00784 if (jetCorrLabel == False ): 00785 raise ValueError, "In switchJetCollection 'jetCorrLabel' must be set to 'None', not 'False'" 00786 if (jetCorrLabel == "None"): 00787 raise ValueError, "In switchJetCollection 'jetCorrLabel' must be set to 'None' (without quotes)" 00788 ## check for the correct format 00789 if type(jetCorrLabel) != type(('AK5Calo',['L2Relative'])): 00790 raise ValueError, "In addJetCollection 'jetCorrLabel' must be 'None', or of type ('payload',['correction1', 'correction2'])" 00791 00792 ## switch JEC parameters to the new jet collection 00793 applyPostfix(process, "patJetCorrFactors", postfix).src = jetCollection 00794 switchJetCorrLevels(process, jetCorrLabel = jetCorrLabel, postfix=postfix) 00795 getattr( process, "patJets" + postfix).jetCorrFactorsSource = cms.VInputTag( cms.InputTag("patJetCorrFactors" + postfix ) ) 00796 00797 ## find out type of jet collection, switch type1MET corrections off for JPTJets 00798 jetCollType = '' 00799 if ( 'CaloJets' in jetCollection.getModuleLabel() ): 00800 jetCollType = 'Calo' 00801 elif ( 'PFJets' in jetCollection.getModuleLabel() or jetCollection.getModuleLabel().startswith('pfNo') or jetCollection.getModuleLabel() == 'particleFlow'): 00802 jetCollType = 'PF' 00803 else: 00804 print '=============================================' 00805 print 'Type1MET corrections are switched off for ' 00806 print 'JPT Jets. Users are recommened to use tcMET ' 00807 print 'together with JPT jets. ' 00808 print '=============================================' 00809 doType1MET=False 00810 00811 ## add a clone of the type1MET correction for the new jet collection 00812 if (doType1MET): 00813 ## create jet correctors for MET corrections 00814 from JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff import ak5PFL1Fastjet, ak5PFL1Offset, ak5PFL2Relative, ak5PFL3Absolute, ak5PFResidual 00815 setattr(process, jetCorrLabel[0]+'L1FastJet' , ak5PFL1Fastjet.clone ( algorithm=jetCorrLabel[0] 00816 , srcRho=cms.InputTag('kt6'+jetCollType+'Jets','rho') ) ) 00817 setattr(process, jetCorrLabel[0]+'L1Offset' , ak5PFL1Offset.clone ( algorithm=jetCorrLabel[0] ) ) 00818 setattr(process, jetCorrLabel[0]+'L2Relative' , ak5PFL2Relative.clone( algorithm=jetCorrLabel[0] ) ) 00819 setattr(process, jetCorrLabel[0]+'L3Absolute' , ak5PFL3Absolute.clone( algorithm=jetCorrLabel[0] ) ) 00820 setattr(process, jetCorrLabel[0]+'L2L3Residual', ak5PFResidual.clone ( algorithm=jetCorrLabel[0] ) ) 00821 ## combinded corrections 00822 setattr(process, jetCorrLabel[0]+'CombinedCorrector', cms.ESProducer( 'JetCorrectionESChain' 00823 , correctors = cms.vstring() ) ) 00824 for corrLbl in jetCorrLabel[1]: 00825 if corrLbl != 'L1FastJet' and corrLbl != 'L1Offset' and corrLbl != 'L2Relative' and corrLbl != 'L3Absolute' and corrLbl != 'L2L3Residual': 00826 print '=========================================' 00827 print ' Type1MET corrections are currently only ' 00828 print ' supported for the following corrections: ' 00829 print ' - L1FastJet' 00830 print ' - L1Offset' 00831 print ' - L2Relative' 00832 print ' - L3Absolute' 00833 print ' - L2L3Residual' 00834 print ' But given was:' 00835 print ' -', corrLbl 00836 print '=============================================' 00837 raise ValueError, 'unsupported JEC for TypeI MET correction: '+corrLbl 00838 else: 00839 getattr(process, jetCorrLabel[0]+'CombinedCorrector').correctors.append(jetCorrLabel[0]+corrLbl) 00840 00841 ## configuration of MET corrections 00842 if jetCollType == 'Calo': 00843 from JetMETCorrections.Type1MET.caloMETCorrections_cff import caloJetMETcorr,caloType1CorrectedMet,caloType1p2CorrectedMet,produceCaloMETCorrections 00844 00845 setattr(process,'caloJetMETcorr'+ postfix, caloJetMETcorr.clone(srcMET = "corMetGlobalMuons")) 00846 setattr(process,'caloType1CorrectedMet'+ postfix, caloType1CorrectedMet.clone(src = "corMetGlobalMuons")) 00847 setattr(process,'caloType1p2CorrectedMet'+postfix, caloType1p2CorrectedMet.clone(src = "corMetGlobalMuons")) 00848 00849 getattr(process,'caloJetMETcorr'+postfix).src = cms.InputTag(jetCollection.getModuleLabel()) 00850 if ('L1FastJet' in jetCorrLabel[1] or 'L1Fastjet' in jetCorrLabel[1]): 00851 getattr(process,'caloJetMETcorr'+postfix ).offsetCorrLabel = cms.string(jetCorrLabel[0]+'L1FastJet') 00852 elif ('L1Offset' in jetCorrLabel[1]): 00853 getattr(process,'caloJetMETcorr'+postfix ).offsetCorrLabel = cms.string(jetCorrLabel[0]+'L1Offset') 00854 else: 00855 getattr(process,'caloJetMETcorr'+postfix ).offsetCorrLabel = cms.string('') 00856 getattr(process,'caloJetMETcorr'+postfix ).jetCorrLabel = cms.string(jetCorrLabel[0]+'CombinedCorrector') 00857 00858 getattr(process,'caloType1CorrectedMet'+postfix ).srcType1Corrections = cms.VInputTag( 00859 cms.InputTag('caloJetMETcorr'+postfix, 'type1') 00860 ) 00861 00862 getattr(process,'caloType1p2CorrectedMet'+postfix).srcType1Corrections = cms.VInputTag( 00863 cms.InputTag('caloJetMETcorr'+postfix, 'type1') 00864 ) 00865 getattr(process,'caloType1p2CorrectedMet'+postfix).srcUnclEnergySums = cms.VInputTag( 00866 cms.InputTag('caloJetMETcorr'+postfix, 'type2'), 00867 cms.InputTag('caloJetMETcorr'+postfix, 'offset'), 00868 cms.InputTag('muonCaloMETcorr') 00869 ) 00870 00871 ## add MET corrections to sequence 00872 getattr(process, 'patMETs'+ postfix).metSource = cms.InputTag('caloType1CorrectedMet'+postfix) 00873 getattr(process,'produceCaloMETCorrections'+postfix) 00874 getattr(process,"patDefaultSequence"+postfix).replace( getattr(process,'patMETs'+postfix), 00875 getattr(process,'produceCaloMETCorrections'+postfix) 00876 *getattr(process,'patMETs'+postfix) ) 00877 elif jetCollType == 'PF': 00878 from JetMETCorrections.Type1MET.pfMETCorrections_cff import pfCandsNotInJet,pfJetMETcorr,pfCandMETcorr,pfType1CorrectedMet,pfType1p2CorrectedMet,producePFMETCorrections 00879 setattr(process,'producePFMETCorrections'+postfix,producePFMETCorrections.copy()) 00880 setattr(process,'pfCandsNotInJet' +postfix,pfCandsNotInJet.clone(topCollection = jetCollection)) 00881 setattr(process,'pfCandMETcorr' +postfix,pfCandMETcorr.clone(src = cms.InputTag('pfCandsNotInJet'+postfix))) 00882 setattr(process,'pfJetMETcorr' +postfix,pfJetMETcorr.clone(src = jetCollection)) 00883 00884 if ('L1FastJet' in jetCorrLabel[1] or 'L1Fastjet' in jetCorrLabel[1]): 00885 getattr(process,'pfJetMETcorr' +postfix).offsetCorrLabel = cms.string(jetCorrLabel[0]+'L1FastJet') 00886 elif ('L1Offset' in jetCorrLabel[1]): 00887 getattr(process,'pfJetMETcorr' +postfix).offsetCorrLabel = cms.string(jetCorrLabel[0]+'L1Offset') 00888 else: 00889 getattr(process,'pfJetMETcorr'+postfix).offsetCorrLabel = cms.string('') 00890 getattr(process,'pfJetMETcorr'+postfix).jetCorrLabel = cms.string(jetCorrLabel[0]+'CombinedCorrector') 00891 00892 getattr(process,'pfType1CorrectedMet'+postfix).srcCHSSums = cms.VInputTag( 00893 cms.InputTag("pfchsMETcorr"+postfix,"type0") 00894 ) 00895 getattr(process,'pfType1CorrectedMet'+postfix).srcType1Corrections = cms.VInputTag( 00896 cms.InputTag('pfJetMETcorr'+postfix, 'type1') 00897 ) 00898 00899 getattr(process,'pfType1p2CorrectedMet'+postfix).srcCHSSums = cms.VInputTag( 00900 cms.InputTag("pfchsMETcorr"+postfix,"type0") 00901 ) 00902 getattr(process,'pfType1p2CorrectedMet'+postfix).srcType1Corrections = cms.VInputTag( 00903 cms.InputTag('pfJetMETcorr'+postfix, 'type1') 00904 ) 00905 getattr(process,'pfType1p2CorrectedMet'+postfix).srcUnclEnergySums = cms.VInputTag( 00906 cms.InputTag('pfJetMETcorr' +postfix, 'type2'), 00907 cms.InputTag('pfJetMETcorr' +postfix, 'offset'), 00908 cms.InputTag('pfCandMETcorr'+postfix) 00909 ) 00910 00911 ## add MET corrections to sequence 00912 getattr(process, 'patMETs'+ postfix).metSource = cms.InputTag('pfType1CorrectedMet'+postfix) 00913 getattr(process, 'patMETs'+ postfix).addMuonCorrections = False 00914 #getattr(process,'producePFMETCorrections'+postfix).remove(getattr(process,'kt6PFJets'))#, getattr(process,'kt6PFJets' +postfix)) 00915 #getattr(process,'producePFMETCorrections'+postfix).remove(getattr(process,'ak5PFJets'))#, getattr(process,'ak5PFJets' +postfix)) 00916 getattr(process,'producePFMETCorrections'+postfix).replace(getattr(process,'pfCandsNotInJet'), getattr(process,'pfCandsNotInJet' +postfix)) 00917 getattr(process,'producePFMETCorrections'+postfix).replace(getattr(process,'pfJetMETcorr'), getattr(process,'pfJetMETcorr' +postfix)) 00918 getattr(process,'producePFMETCorrections'+postfix).replace(getattr(process,'pfCandMETcorr'), getattr(process,'pfCandMETcorr' +postfix)) 00919 getattr(process,'producePFMETCorrections'+postfix).replace(getattr(process,'pfchsMETcorr'), getattr(process,'pfchsMETcorr' +postfix)) 00920 getattr(process,'producePFMETCorrections'+postfix).replace(getattr(process,'pfType1CorrectedMet'), getattr(process,'pfType1CorrectedMet' +postfix)) 00921 getattr(process,'producePFMETCorrections'+postfix).replace(getattr(process,'pfType1p2CorrectedMet'),getattr(process,'pfType1p2CorrectedMet'+postfix)) 00922 00923 getattr(process,"patDefaultSequence"+postfix).replace( getattr(process,'patMETs'+postfix), 00924 getattr(process,'producePFMETCorrections'+postfix) 00925 *getattr(process,'patMETs'+postfix) ) 00926 00927 getattr(process,'patDefaultSequence'+postfix).replace(getattr(process,'patJetCorrFactors'+postfix), 00928 getattr(process,'kt6PFJets'+postfix) 00929 *getattr(process,'patJetCorrFactors'+postfix)) 00930 else: 00931 ## remove the jetCorrFactors from the std sequence 00932 process.patJetMETCorrections.remove(process.patJetCorrFactors) 00933 ## switch embedding of jetCorrFactors off 00934 ## for pat jet production 00935 applyPostfix(process, "patJets", postfix).addJetCorrFactors = False 00936 applyPostfix(process, "patJets", postfix).jetCorrFactorsSource=[] 00937 00938 ## adjust output when switching to PFJets 00939 if ( 'PFJets' in jetCollection.getModuleLabel() or jetCollection.getModuleLabel().startswith("pfNo") or jetCollection.getModuleLabel() == 'particleFlow' ): 00940 ## in this case we can omit caloTowers and should keep pfCandidates 00941 if len(outputModules) > 0: 00942 for outMod in outputModules: 00943 if hasattr(process,outMod): 00944 getattr(process, outMod).outputCommands.append("keep *_selectedPatJets_pfCandidates_*") 00945 getattr(process, outMod).outputCommands.append("drop *_selectedPatJets_caloTowers_*") 00946 else: 00947 raise KeyError, "process has no OutModule named", outMod 00948 00949 switchJetCollection=SwitchJetCollection() 00950
jetTools::SwitchJetCollection::_comment [private] |
Definition at line 603 of file jetTools.py.
tuple jetTools::SwitchJetCollection::_defaultParameters = dicttypes.SortedKeysDict() [static, private] |
Definition at line 602 of file jetTools.py.
string jetTools::SwitchJetCollection::_label = 'switchJetCollection' [static, private] |
Definition at line 601 of file jetTools.py.
Definition at line 603 of file jetTools.py.