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 = 'addJetCollection' |
Add a new collection of jets. Takes the configuration from the already configured standard jet collection as starting point; replaces before calling addJetCollection will also affect the new jet collections
Definition at line 495 of file jetTools.py.
def jetTools::AddJetCollection::__init__ | ( | self | ) |
Definition at line 505 of file jetTools.py.
00506 : 00507 ConfigToolBase.__init__(self) 00508 self.addParameter(self._defaultParameters,'jetCollection',self._defaultValue,'Input jet collection', cms.InputTag) 00509 self.addParameter(self._defaultParameters,'algoLabel',self._defaultValue, "label to indicate the jet algorithm (e.g.'AK5')",str) 00510 self.addParameter(self._defaultParameters,'typeLabel',self._defaultValue, "label to indicate the type of constituents (e.g. 'Calo', 'Pflow', 'Jpt', ...)",str) 00511 self.addParameter(self._defaultParameters,'btagInfo',_defaultBTagInfos,"input btag info",allowedValues=_allowedBTagInfos,Type=list) 00512 self.addParameter(self._defaultParameters,'btagdiscriminators',_defaultBTagDiscriminators,"input btag discriminators",allowedValues=_allowedBTagDiscriminators,Type=list) 00513 self.addParameter(self._defaultParameters,'doJTA',True, "run b tagging sequence for new jet collection and add it to the new pat jet collection") 00514 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)') 00515 self.addParameter(self._defaultParameters,'jetCorrLabel',None, "payload and list of new jet correction labels, such as (\'AK5Calo\',[\'L2Relative\', \'L3Absolute\'])", tuple,acceptNoneValue=True ) 00516 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 colllection; at the moment it must be 'False' for non CaloJets otherwise the JetMET POG module crashes. ") 00517 self.addParameter(self._defaultParameters,'doL1Cleaning',True, "copy also the producer modules for cleanLayer1 will be set to 'True' automatically when doL1Counters is 'True'") 00518 self.addParameter(self._defaultParameters,'doL1Counters',False, "copy also the filter modules that accept/reject the event looking at the number of jets") 00519 self.addParameter(self._defaultParameters,'genJetCollection',cms.InputTag("ak5GenJets"), "GenJet collection to match to") 00520 self.addParameter(self._defaultParameters,'doJetID',True, "add jetId variables to the added jet collection?") 00521 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") 00522 self.addParameter(self._defaultParameters,'standardAlgo',"AK5", "standard algorithm label of the collection from which the clones for the new jet collection will be taken from (note that this jet collection has to be available in the event before hand)") 00523 self.addParameter(self._defaultParameters,'standardType',"Calo", "standard constituent type label of the collection from which the clones for the new jet collection will be taken from (note that this jet collection has to be available in the event before hand)") 00524 self.addParameter(self._defaultParameters,'outputModules', ['out'], "output module labels, empty list of label indicates no output, default: ['out']") 00525 00526 self._parameters=copy.deepcopy(self._defaultParameters) 00527 self._comment = ""
def jetTools::AddJetCollection::__call__ | ( | self, | |
process, | |||
jetCollection = None , |
|||
algoLabel = None , |
|||
typeLabel = None , |
|||
doJTA = None , |
|||
doBTagging = None , |
|||
jetCorrLabel = None , |
|||
doType1MET = None , |
|||
doL1Cleaning = None , |
|||
doL1Counters = None , |
|||
genJetCollection = None , |
|||
doJetID = None , |
|||
jetIdLabel = None , |
|||
outputModule = None , |
|||
outputModules = None , |
|||
btagInfo = None , |
|||
btagdiscriminators = None |
|||
) |
Definition at line 531 of file jetTools.py.
00550 : 00551 00552 ## stop processing if 'outputModule' exists and show the new alternative 00553 if not outputModule is None: 00554 depricatedOptionOutputModule(self) 00555 if jetCollection is None: 00556 jetCollection=self._defaultParameters['jetCollection'].value 00557 if algoLabel is None: 00558 algoLabel=self._defaultParameters['algoLabel'].value 00559 if typeLabel is None: 00560 typeLabel=self._defaultParameters['typeLabel'].value 00561 if doJTA is None: 00562 doJTA=self._defaultParameters['doJTA'].value 00563 if doBTagging is None: 00564 doBTagging=self._defaultParameters['doBTagging'].value 00565 if jetCorrLabel is None: 00566 jetCorrLabel=self._defaultParameters['jetCorrLabel'].value 00567 if doType1MET is None: 00568 doType1MET=self._defaultParameters['doType1MET'].value 00569 if doL1Cleaning is None: 00570 doL1Cleaning=self._defaultParameters['doL1Cleaning'].value 00571 if doL1Counters is None: 00572 doL1Counters=self._defaultParameters['doL1Counters'].value 00573 if genJetCollection is None: 00574 genJetCollection=self._defaultParameters['genJetCollection'].value 00575 if doJetID is None: 00576 doJetID=self._defaultParameters['doJetID'].value 00577 if jetIdLabel is None: 00578 jetIdLabel=self._defaultParameters['jetIdLabel'].value 00579 if outputModules is None: 00580 outputModules=self._defaultParameters['outputModules'].value 00581 if btagInfo is None: 00582 btagInfo=self._defaultParameters['btagInfo'].value 00583 if btagdiscriminators is None: 00584 btagdiscriminators=self._defaultParameters['btagdiscriminators'].value 00585 00586 self.setParameter('jetCollection',jetCollection) 00587 self.setParameter('algoLabel',algoLabel) 00588 self.setParameter('typeLabel',typeLabel) 00589 self.setParameter('doJTA',doJTA) 00590 self.setParameter('doBTagging',doBTagging) 00591 self.setParameter('jetCorrLabel',jetCorrLabel) 00592 self.setParameter('doType1MET',doType1MET) 00593 self.setParameter('doL1Cleaning',doL1Cleaning) 00594 self.setParameter('doL1Counters',doL1Counters) 00595 self.setParameter('genJetCollection',genJetCollection) 00596 self.setParameter('doJetID',doJetID) 00597 self.setParameter('jetIdLabel',jetIdLabel) 00598 self.setParameter('outputModules',outputModules) 00599 self.setParameter('btagInfo',btagInfo) 00600 self.setParameter('btagdiscriminators',btagdiscriminators) 00601 00602 self.apply(process)
def jetTools::AddJetCollection::getDefaultParameters | ( | self | ) |
Definition at line 528 of file jetTools.py.
def jetTools::AddJetCollection::toolCode | ( | self, | |
process | |||
) |
Definition at line 603 of file jetTools.py.
00604 : 00605 00606 jetCollection=self._parameters['jetCollection'].value 00607 algoLabel=self._parameters['algoLabel'].value 00608 typeLabel=self._parameters['typeLabel'].value 00609 doJTA=self._parameters['doJTA'].value 00610 doBTagging=self._parameters['doBTagging'].value 00611 jetCorrLabel=self._parameters['jetCorrLabel'].value 00612 doType1MET =self._parameters['doType1MET'].value 00613 doL1Cleaning=self._parameters['doL1Cleaning'].value 00614 doL1Counters=self._parameters['doL1Counters'].value 00615 genJetCollection=self._parameters['genJetCollection'].value 00616 doJetID=self._parameters['doJetID'].value 00617 jetIdLabel=self._parameters['jetIdLabel'].value 00618 outputModules=self._parameters['outputModules'].value 00619 btagInfo=self._parameters['btagInfo'].value 00620 btagdiscriminators=self._parameters['btagdiscriminators'].value 00621 00622 00623 ## create old module label from standardAlgo 00624 ## and standardType and return 00625 def oldLabel(prefix=''): 00626 return jetCollectionString(prefix, '', '') 00627 00628 ## create new module label from old module 00629 ## label and return 00630 def newLabel(oldLabel): 00631 newLabel=oldLabel 00632 oldLabel=oldLabel+algoLabel+typeLabel 00633 return oldLabel 00634 00635 ## clone module and add it to the patDefaultSequence 00636 def addClone(hook, **replaceStatements): 00637 ## create a clone of the hook with corresponding 00638 ## parameter replacements 00639 newModule = getattr(process, hook).clone(**replaceStatements) 00640 ## add the module to the sequence 00641 addModuleToSequence(hook, newModule) 00642 00643 ## add module to the patDefaultSequence 00644 def addModuleToSequence(hook, newModule): 00645 hookModule = getattr(process, hook) 00646 ## add the new module with standardAlgo & 00647 ## standardType replaced in module label 00648 setattr( process, newLabel(hook), newModule) 00649 ## add new module to default sequence 00650 ## just behind the hookModule 00651 process.patDefaultSequence.replace( hookModule, hookModule*newModule ) 00652 00653 ## add a clone of patJets 00654 addClone(oldLabel(), jetSource = jetCollection) 00655 ## add a clone of selectedPatJets 00656 addClone(oldLabel('selected'), src=cms.InputTag(newLabel(oldLabel()))) 00657 ## add a clone of cleanPatJets 00658 if( doL1Cleaning ): 00659 addClone(oldLabel('clean'), src=cms.InputTag(newLabel(oldLabel('selected')))) 00660 ## add a clone of countPatJets 00661 if( doL1Counters ): 00662 if( doL1Cleaning ): 00663 addClone(oldLabel('count'), src=cms.InputTag(newLabel(oldLabel('clean')))) 00664 else: 00665 addClone(oldLabel('count'), src=cms.InputTag(newLabel(oldLabel('selected')))) 00666 00667 ## get attributes of new module 00668 l1Jets = getattr(process, newLabel(oldLabel())) 00669 00670 ## add a clone of gen jet matching 00671 addClone('patJetPartonMatch', src = jetCollection) 00672 addClone('patJetGenJetMatch', src = jetCollection, matched = genJetCollection) 00673 00674 ## add a clone of parton and flavour associations 00675 addClone('patJetPartonAssociation', jets = jetCollection) 00676 addClone('patJetFlavourAssociation', srcByReference = cms.InputTag(newLabel('patJetPartonAssociation'))) 00677 00678 ## fix label for input tag 00679 def fixInputTag(x): x.setModuleLabel(newLabel(x.moduleLabel)) 00680 ## fix label for vector of input tags 00681 def fixVInputTag(x): x[0].setModuleLabel(newLabel(x[0].moduleLabel)) 00682 00683 ## provide allLayer1Jet inputs with individual labels 00684 fixInputTag(l1Jets.genJetMatch) 00685 fixInputTag(l1Jets.genPartonMatch) 00686 fixInputTag(l1Jets.JetPartonMapSource) 00687 00688 ## make VInputTag from strings 00689 def vit(*args) : return cms.VInputTag( *[ cms.InputTag(x) for x in args ] ) 00690 00691 if (doJTA or doBTagging): 00692 ## add clone of jet track association 00693 ###process.load("RecoJets.JetAssociationProducers.ak5JTA_cff") 00694 from RecoJets.JetAssociationProducers.ak5JTA_cff import ak5JetTracksAssociatorAtVertex 00695 ## add jet track association module to processes 00696 jtaLabel = 'jetTracksAssociatorAtVertex'+algoLabel+typeLabel 00697 setattr( process, jtaLabel, ak5JetTracksAssociatorAtVertex.clone(jets = jetCollection) ) 00698 process.patDefaultSequence.replace(process.patJetCharge, getattr(process,jtaLabel)+process.patJetCharge) 00699 l1Jets.trackAssociationSource = cms.InputTag(jtaLabel) 00700 addClone('patJetCharge', src=cms.InputTag(jtaLabel)), 00701 fixInputTag(l1Jets.jetChargeSource) 00702 else: 00703 ## switch embedding of track association and jet 00704 ## charge estimate to 'False' 00705 l1Jets.addAssociatedTracks = False 00706 l1Jets.addJetCharge = False 00707 00708 if (doBTagging): 00709 ## define postfixLabel 00710 postfixLabel=algoLabel+typeLabel 00711 ## add b tagging sequence 00712 (btagSeq, btagLabels) = runBTagging(process, jetCollection, postfixLabel,"", btagInfo,btagdiscriminators) 00713 ## add b tagging sequence before running the allLayer1Jets modules 00714 ## nedded only after first call to runBTagging(), existing sequence modified in place otherwise 00715 if not btagSeq == None: 00716 process.patDefaultSequence.replace(getattr(process,jtaLabel), getattr(process,jtaLabel)+btagSeq) 00717 ## replace corresponding tags for pat jet production 00718 l1Jets.trackAssociationSource = cms.InputTag(btagLabels['jta']) 00719 l1Jets.tagInfoSources = cms.VInputTag( *[ cms.InputTag(x) for x in btagLabels['tagInfos'] ] ) 00720 l1Jets.discriminatorSources = cms.VInputTag( *[ cms.InputTag(x) for x in btagLabels['jetTags'] ] ) 00721 else: 00722 ## switch general b tagging info switch off 00723 l1Jets.addBTagInfo = False 00724 ## adjust output 00725 if len(outputModules) > 0: 00726 for outMod in outputModules: 00727 if hasattr(process,outMod): 00728 getattr(process,outMod).outputCommands.append("drop *_"+newLabel(oldLabel('selected'))+"_tagInfos_*") 00729 else: 00730 raise KeyError, "process has no OutModule named", outMod 00731 00732 if (doJetID): 00733 l1Jets.addJetID = cms.bool(True) 00734 jetIdLabelNew = jetIdLabel + 'JetID' 00735 l1Jets.jetIDMap = cms.InputTag( jetIdLabelNew ) 00736 else : 00737 l1Jets.addJetID = cms.bool(False) 00738 00739 if (jetCorrLabel != None): 00740 ## add clone of jet energy corrections; 00741 ## catch a couple of exceptions first 00742 if (jetCorrLabel == False ): 00743 raise ValueError, "In addJetCollection 'jetCorrLabel' must be set to 'None', not 'False'" 00744 if (jetCorrLabel == "None"): 00745 raise ValueError, "In addJetCollection 'jetCorrLabel' must be set to 'None' (without quotes)" 00746 ## check for the correct format 00747 if type(jetCorrLabel) != type(('AK5Calo',['L2Relative'])): 00748 raise ValueError, "In addJetCollection 'jetCorrLabel' must be 'None', or of type ('payload',['correction1', 'correction2'])" 00749 00750 ## add clone of jetCorrFactors 00751 addClone('patJetCorrFactors', src = jetCollection) 00752 switchJetCorrLevels(process, jetCorrLabel = jetCorrLabel, postfix=algoLabel+typeLabel) 00753 getattr(process, newLabel('patJets')).jetCorrFactorsSource = cms.VInputTag( cms.InputTag(newLabel('patJetCorrFactors')) ) 00754 00755 ## find out type of jet collection, switch type1MET corrections off for JPTJets 00756 jetCollType = '' 00757 if ( 'CaloJets' in jetCollection.getModuleLabel() ): 00758 jetCollType = 'Calo' 00759 elif ( 'PFJets' in jetCollection.getModuleLabel() or jetCollection.getModuleLabel().startswith('pfNo') or jetCollection.getModuleLabel() == 'particleFlow'): 00760 jetCollType = 'PF' 00761 else: 00762 print '=============================================' 00763 print 'Type1MET corrections are switched off for ' 00764 print 'JPT Jets. Users are recommened to use tcMET ' 00765 print 'together with JPT jets. ' 00766 print '=============================================' 00767 doType1MET=False 00768 00769 ## add a clone of the type1MET correction for the new jet collection 00770 if (doType1MET): 00771 ## create jet correctors for MET corrections 00772 from JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff import ak5PFL1Fastjet, ak5PFL1Offset, ak5PFL2Relative, ak5PFL3Absolute, ak5PFResidual 00773 setattr(process, jetCorrLabel[0]+'L1FastJet' , ak5PFL1Fastjet.clone ( algorithm=jetCorrLabel[0] 00774 , srcRho=cms.InputTag(newLabel('kt6PFJets'),'rho') ) ) 00775 setattr(process, jetCorrLabel[0]+'L1Offset' , ak5PFL1Offset.clone ( algorithm=jetCorrLabel[0] ) ) 00776 setattr(process, jetCorrLabel[0]+'L2Relative' , ak5PFL2Relative.clone( algorithm=jetCorrLabel[0] ) ) 00777 setattr(process, jetCorrLabel[0]+'L3Absolute' , ak5PFL3Absolute.clone( algorithm=jetCorrLabel[0] ) ) 00778 setattr(process, jetCorrLabel[0]+'L2L3Residual', ak5PFResidual.clone ( algorithm=jetCorrLabel[0] ) ) 00779 ## combinded corrections 00780 setattr(process, jetCorrLabel[0]+'CombinedCorrector', cms.ESProducer( 'JetCorrectionESChain' 00781 , correctors = cms.vstring() ) ) 00782 00783 for corrLbl in jetCorrLabel[1]: 00784 if corrLbl != 'L1FastJet' and corrLbl != 'L1Offset' and corrLbl != 'L2Relative' and corrLbl != 'L3Absolute' and corrLbl != 'L2L3Residual': 00785 print '=========================================' 00786 print ' Type1MET corrections are currently only ' 00787 print ' supported for the following corrections: ' 00788 print ' - L1FastJet' 00789 print ' - L1Offset' 00790 print ' - L2Relative' 00791 print ' - L3Absolute' 00792 print ' - L2L3Residual' 00793 print ' But given was:' 00794 print ' -', corrLbl 00795 print '=============================================' 00796 raise ValueError, 'unsupported JEC for TypeI MET correction: '+corrLbl 00797 else: 00798 getattr(process, jetCorrLabel[0]+'CombinedCorrector').correctors.append(jetCorrLabel[0]+corrLbl) 00799 00800 ## configuration of MET corrections 00801 if jetCollType == 'Calo': 00802 from JetMETCorrections.Type1MET.caloMETCorrections_cff import caloJetMETcorr,caloType1CorrectedMet,caloType1p2CorrectedMet,produceCaloMETCorrections 00803 00804 setattr(process,jetCorrLabel[0]+'JetMETcorr', caloJetMETcorr.clone(srcMET = "corMetGlobalMuons")) 00805 setattr(process,jetCorrLabel[0]+'Type1CorMet', caloType1CorrectedMet.clone(src = "corMetGlobalMuons")) 00806 setattr(process,jetCorrLabel[0]+'Type1p2CorMet',caloType1p2CorrectedMet.clone(src = "corMetGlobalMuons")) 00807 00808 getattr(process,jetCorrLabel[0]+'JetMETcorr' ).src = cms.InputTag(jetCollection.getModuleLabel()) 00809 if ('L1FastJet' in jetCorrLabel[1] or 'L1Fastjet' in jetCorrLabel[1]): 00810 getattr(process,jetCorrLabel[0]+'JetMETcorr' ).offsetCorrLabel = cms.string(jetCorrLabel[0]+'L1FastJet') 00811 elif ('L1Offset' in jetCorrLabel[1]): 00812 getattr(process,jetCorrLabel[0]+'JetMETcorr' ).offsetCorrLabel = cms.string(jetCorrLabel[0]+'L1Offset') 00813 else: 00814 getattr(process,jetCorrLabel[0]+'JetMETcorr' ).offsetCorrLabel = cms.string('') 00815 getattr(process,jetCorrLabel[0]+'JetMETcorr' ).jetCorrLabel = cms.string(jetCorrLabel[0]+'CombinedCorrector') 00816 00817 getattr(process,jetCorrLabel[0]+'Type1CorMet' ).srcType1Corrections = cms.VInputTag( 00818 cms.InputTag(jetCorrLabel[0]+'JetMETcorr', 'type1') 00819 ) 00820 00821 getattr(process,jetCorrLabel[0]+'Type1p2CorMet').srcType1Corrections = cms.VInputTag( 00822 cms.InputTag(jetCorrLabel[0]+'JetMETcorr', 'type1') 00823 ) 00824 getattr(process,jetCorrLabel[0]+'Type1p2CorMet').srcUnclEnergySums = cms.VInputTag( 00825 cms.InputTag(jetCorrLabel[0]+'JetMETcorr', 'type2'), 00826 cms.InputTag(jetCorrLabel[0]+'JetMETcorr', 'offset'), 00827 cms.InputTag('muonCaloMETcorr') 00828 ) 00829 00830 ## add MET corrections to sequence 00831 setattr(process,'patMETs'+jetCorrLabel[0],getattr(process,'patMETs').clone(metSource = cms.InputTag(jetCorrLabel[0]+'Type1CorMet'),addMuonCorrections = False)) 00832 00833 setattr(process,'produce'+jetCorrLabel[0]+'METCorrections',produceCaloMETCorrections.copy()) 00834 getattr(process,'produce'+jetCorrLabel[0]+'METCorrections').replace(getattr(process,'caloJetMETcorr'), getattr(process,jetCorrLabel[0]+'JetMETcorr')) 00835 getattr(process,'produce'+jetCorrLabel[0]+'METCorrections').replace(getattr(process,'caloType1CorrectedMet'), getattr(process,jetCorrLabel[0]+'Type1CorMet')) 00836 getattr(process,'produce'+jetCorrLabel[0]+'METCorrections').replace(getattr(process,'caloType1p2CorrectedMet'),getattr(process,jetCorrLabel[0]+'Type1p2CorMet')) 00837 00838 process.patDefaultSequence.replace( getattr(process,'patMETs'+jetCorrLabel[0]), 00839 getattr(process,'produce'+jetCorrLabel[0]+'METCorrections') 00840 *getattr(process,'patMETs'+jetCorrLabel[0])) 00841 00842 elif jetCollType == 'PF': 00843 from JetMETCorrections.Type1MET.pfMETCorrections_cff import pfCandsNotInJet,pfJetMETcorr,pfCandMETcorr,pfType1CorrectedMet,pfType1p2CorrectedMet,producePFMETCorrections 00844 setattr(process,jetCorrLabel[0]+'CandsNotInJet',pfCandsNotInJet.clone(topCollection = jetCollection)) 00845 setattr(process,jetCorrLabel[0]+'JetMETcorr', pfJetMETcorr.clone(src = jetCollection)) 00846 setattr(process,jetCorrLabel[0]+'CandMETcorr', pfCandMETcorr.clone(src = cms.InputTag(jetCorrLabel[0]+'CandsNotInJet'))) 00847 setattr(process,jetCorrLabel[0]+'Type1CorMet', pfType1CorrectedMet.clone()) 00848 setattr(process,jetCorrLabel[0]+'Type1p2CorMet',pfType1p2CorrectedMet.clone()) 00849 00850 if ('L1FastJet' in jetCorrLabel[1] or 'L1Fastjet' in jetCorrLabel[1]): 00851 getattr(process,jetCorrLabel[0]+'JetMETcorr' ).offsetCorrLabel = cms.string(jetCorrLabel[0]+'L1FastJet') 00852 elif ('L1Offset' in jetCorrLabel[1]): 00853 getattr(process,jetCorrLabel[0]+'JetMETcorr' ).offsetCorrLabel = cms.string(jetCorrLabel[0]+'L1Offset') 00854 else: 00855 getattr(process,jetCorrLabel[0]+'JetMETcorr' ).offsetCorrLabel = cms.string('') 00856 getattr(process,jetCorrLabel[0]+'JetMETcorr').jetCorrLabel = cms.string(jetCorrLabel[0]+'CombinedCorrector') 00857 00858 getattr(process,jetCorrLabel[0]+'Type1CorMet').applyType0Corrections = cms.bool(False) 00859 getattr(process,jetCorrLabel[0]+'Type1CorMet').srcType1Corrections = cms.VInputTag( 00860 cms.InputTag(jetCorrLabel[0]+'JetMETcorr', 'type1') 00861 ) 00862 getattr(process,jetCorrLabel[0]+'Type1p2CorMet').srcType1Corrections = cms.VInputTag( 00863 cms.InputTag(jetCorrLabel[0]+'JetMETcorr', 'type1') 00864 ) 00865 getattr(process,jetCorrLabel[0]+'Type1p2CorMet').applyType0Corrections = cms.bool(False) 00866 getattr(process,jetCorrLabel[0]+'Type1p2CorMet').srcUnclEnergySums = cms.VInputTag( 00867 cms.InputTag(jetCorrLabel[0]+'JetMETcorr', 'type2'), 00868 cms.InputTag(jetCorrLabel[0]+'JetMETcorr', 'offset'), 00869 cms.InputTag(jetCorrLabel[0]+'CandMETcorr') 00870 ) 00871 00872 ## add MET corrections to sequence 00873 setattr(process,'patMETs'+jetCorrLabel[0],getattr(process,'patMETs').clone(metSource = cms.InputTag(jetCorrLabel[0]+'Type1CorMet'),addMuonCorrections = False)) 00874 00875 setattr(process,'produce'+jetCorrLabel[0]+'METCorrections',producePFMETCorrections.copy()) 00876 getattr(process,'produce'+jetCorrLabel[0]+'METCorrections').replace(getattr(process,'pfCandsNotInJet'), getattr(process,jetCorrLabel[0]+'CandsNotInJet')) 00877 getattr(process,'produce'+jetCorrLabel[0]+'METCorrections').replace(getattr(process,'pfJetMETcorr'), getattr(process,jetCorrLabel[0]+'JetMETcorr')) 00878 getattr(process,'produce'+jetCorrLabel[0]+'METCorrections').replace(getattr(process,'pfCandMETcorr'), getattr(process,jetCorrLabel[0]+'CandMETcorr')) 00879 getattr(process,'produce'+jetCorrLabel[0]+'METCorrections').replace(getattr(process,'pfType1CorrectedMet'), getattr(process,jetCorrLabel[0]+'Type1CorMet')) 00880 getattr(process,'produce'+jetCorrLabel[0]+'METCorrections').replace(getattr(process,'pfType1p2CorrectedMet'),getattr(process,jetCorrLabel[0]+'Type1p2CorMet')) 00881 00882 process.patDefaultSequence.replace( getattr(process,'patMETs'+jetCorrLabel[0]), 00883 getattr(process,'produce'+jetCorrLabel[0]+'METCorrections') 00884 *getattr(process,'patMETs'+jetCorrLabel[0])) 00885 00886 else: 00887 ## switch jetCorrFactors off 00888 l1Jets.addJetCorrFactors = False 00889 00890 addJetCollection=AddJetCollection() 00891
jetTools::AddJetCollection::_comment [private] |
Definition at line 505 of file jetTools.py.
tuple jetTools::AddJetCollection::_defaultParameters = dicttypes.SortedKeysDict() [static, private] |
Definition at line 503 of file jetTools.py.
string jetTools::AddJetCollection::_label = 'addJetCollection' [static, private] |
Definition at line 502 of file jetTools.py.
jetTools::AddJetCollection::_parameters [private] |
Definition at line 505 of file jetTools.py.