예제 #1
0
    def initialize(self):
        self.msg.info('************************************')
        self.msg.info('==> initialize %s...', self.name())
        self.msg.info('  jetCollectionType       = %r', self.jetCollectionType)
        self.msg.info('  jetCollectionName       = %r', self.jetCollectionName)
        self.msg.info('  recordGoodJets          = %r', self.recordGoodJets)
        self.msg.info('  goodJetCollectionName   = %r',
                      self.goodJetCollectionName)
        self.msg.info('Will apply the following cuts:')
        self.msg.info('  useUncalibratedJets     = %r',
                      self.useUncalibratedJets)
        self.msg.info('  EtMin (GeV)             = %r',
                      self.cutEtMin / Units.GeV)
        self.msg.info('  EtMax (GeV)             = %r',
                      self.cutEtMax / Units.GeV)
        self.msg.info('  EtaMin                  = %r', self.cutEtaMin)
        self.msg.info('  EtaMax                  = %r', self.cutEtaMax)
        self.msg.info('  cutSumPtTrkMax          = %r', self.cutSumPtTrkMax)
        self.msg.info('  removeOverlap           = %r', self.removeOverlap)
        self.msg.info('  deltaR                  = %r', self.deltaR)
        self.msg.info('  leptonContainerTypeList = %r',
                      self.leptonContainerTypeList)
        self.msg.info('  leptonContainerNameList = %r',
                      self.leptonContainerNameList)
        self.msg.info('  nLeadingsForCheck       = %r', self.nLeadingsForCheck)
        self.msg.info('  minNumberPassed         = %r', self.minNumberPassed)
        self.msg.info('  passAll                 = %r', self.passAll)
        self.msg.info('************************************')

        ## Initialize the counters
        self.nProcessed = 0
        self.nJets = 0
        self.nEventPassed = 0

        ## Import needed modules
        import PyUtils.RootUtils as ru
        ROOT = ru.import_root()

        ## Get the StoreGate service
        self.storeGateSvc = PyAthena.py_svc('StoreGateSvc')
        if self.storeGateSvc is None:
            self.msg.error("Problem retrieving StoreGateSvc pointer !!")
            return StatusCode.Failure

        ## Eagerly load library due to reflex bug (autoloading enums/namespaces doesn't work)
        PyAthena.load_library('FourMomUtils')

        ## Get the JetSignalState helper
        self.jss = PyAthena.SignalStateHelper(PyAthena.P4SignalState.JETFINAL)

        ## import some 4-mom utils
        import FourMomUtils.Bindings
        self.utils = {'deltaR': PyAthena.P4Helpers.deltaR}

        return StatusCode.Success
예제 #2
0
    def initialize(self):
        self.msg.info('************************************')
        self.msg.info('==> initialize %s...', self.name())
        self.msg.info('  jetCollectionTypeList = %r',
                      self.jetCollectionTypeList)
        self.msg.info('  jetCollectionNameList = %r',
                      self.jetCollectionNameList)
        self.msg.info('Will apply the following cuts:')
        self.msg.info('  MetMin                = %r', self.cutMetMin)
        self.msg.info('  minDeltaPhi           = %r', self.minDeltaPhi)
        self.msg.info('  useLeadingJet         = %r', self.useLeadingJet)
        self.msg.info('  requireMet            = %r', self.requireMet)
        self.msg.info('************************************')

        ## Get the StoreGate service
        self.storeGateSvc = PyAthena.py_svc('StoreGateSvc')
        if self.storeGateSvc is None:
            self.msg.error("Problem retrieving StoreGateSvc pointer !!")
            return StatusCode.Failure

        ## Import needed modules
        import PyUtils.RootUtils as ru
        ROOT = ru.import_root()

        ## Eagerly load library due to reflex bug (autoloading enums/namespaces doesn't work)
        #PyAthena.load_library ('FourMomUtils')

        ## Get the JetSignalState helper
        #self.jss = PyAthena.JetSignalState()
        self.jss = PyAthena.SignalStateHelper(PyAthena.P4SignalState.JETFINAL)

        ## import some 4-mom utils
        import FourMomUtils.Bindings
        self.utils = {
            'deltaR': PyAthena.P4Helpers.deltaR,
            'deltaEta': PyAthena.P4Helpers.deltaEta,
            'deltaPhi': PyAthena.P4Helpers.deltaPhi
        }

        return StatusCode.Success