Exemple #1
0
    def checkInput(self):
        self.checkFileMetaData()

        log = logging.getLogger( "TriggerConfigGetter.py" )
        if "ReadPool" in self._environment or "WritePool" in self._environment:
            log.info("Flags are ignored, since 'ReadPool' or  'WritePool' is specified")
            return True

        if rec.readESD() or rec.readAOD(): # and globalflags.DataSource()=='data':  # need this for MC as well
            protectedInclude("TriggerJobOpts/TriggerConfigCheckMetadata.py")

        if rec.readRDO() and globalflags.InputFormat()=='bytestream' and globalflags.DataSource()=='data' and TriggerFlags.configForStartup()!='HLToffline':
            protectedInclude("TriggerJobOpts/TriggerConfigCheckHLTpsk.py")

        log.info("The following flags are set:")
        log.info("globalflags.InputFormat             : %s", globalflags.InputFormat())
        log.info("rec.read.*                          : RDO: %s, ESD: %s, AOD: %s, TAG: %s", rec.readRDO(), rec.readESD(), rec.readAOD(), rec.readTAG())
        log.info("rec.doWrite.*                       : ESD: %s, AOD: %s, TAG: %s", rec.doWriteESD(), rec.doWriteAOD(), rec.doWriteTAG())
        log.info("globalflags.DataSource              : %s", globalflags.DataSource())
        log.info("TriggerFlags.configForStartup       : %s", TriggerFlags.configForStartup())
        log.info("TriggerFlags.dataTakingConditions   : %s", TriggerFlags.dataTakingConditions())
        log.info("TriggerFlags.configurationSourceList: %s", TriggerFlags.configurationSourceList())

        count = len([1 for x in [rec.readRDO(),rec.readESD(),rec.readAOD()] if x ]) #readTAG is only set with another input
        if count == 0:
            log.warning("Don't know what the input format is.")
            return False
        if count >= 2:
            log.warning("More than one input format specified, please set only the appropriate one.")
            return False
        return True
Exemple #2
0
def inputFileNames():
    from AthenaCommon.AthenaCommonFlags import athenaCommonFlags

    if athenaCommonFlags.FilesInput() != []:
        return athenaCommonFlags.FilesInput()
    from RecExConfig.RecFlags import rec
    inFiles = None

    # highest flag have precedence
    if rec.readTAG():
        inFiles = athenaCommonFlags.PoolTAGInput()
    elif rec.readAOD():
        inFiles = athenaCommonFlags.PoolAODInput()
    elif rec.readESD():
        inFiles = athenaCommonFlags.PoolESDInput()
    elif rec.readRDO():
        from AthenaCommon.GlobalFlags import globalflags
        if globalflags.InputFormat == 'bytestream':
            inFiles = athenaCommonFlags.BSRDOInput()
        else:
            inFiles = athenaCommonFlags.PoolRDOInput()
    else:
        raise RutimeError("Unable to determine input file")

    return inFiles
Exemple #3
0
    def addMetaData(self):
        '''standard function to apply metadata, can overload if necessary for complicated scenarios.'''
        if self.doAODFix:
            logAODFix.debug("in addMetaData")

            from RecExConfig.RecFlags import rec

            suffix="_RAW"
            if rec.readESD():
                suffix="_ESD"
            elif rec.readAOD():
                suffix="_AOD"

            # remove any metadata we don't want to write out (in order to rerun again)
            metadataList = self.newAODFix.split("-")
            excludeFromMetadata = self.excludeFromMetadata()

            for excl in excludeFromMetadata:
                if excl in metadataList:
                    metadataList.remove(excl)

            metastr = "AODFix_" + "-".join(metadataList) + suffix

            logAODFix.info("executing addMetaData, will add as AODFixVersion %s" % metastr)
            from AthenaCommon.AppMgr import ServiceMgr as svcMgr
            svcMgr.TagInfoMgr.ExtraTagValuePairs["AODFixVersion"]=metastr
def _fixJetTiming(c, **kw):
    # Check version number of the input data.
    # If no version is found, assume old.
    rlist = release_version()
    if rlist:
        if rlist[0] >= 16: return
        if rlist[0] == 15 and rlist[1] >= 7: return
        if rlist[0] == 15 and rlist[1] == 6 and rlist[2] >= 8: return

    sgkey_in = c.Getter.SGKey
    sgkey_in = resolveSGKey('JetCollection', sgkey_in)
    sgkey_out = sgkey_in + '_timing'

    seq = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName())
    if not hasattr(seq, sgkey_out):
        tools = []
        caloqual_kw = {
            'doCellBasedVariables': True,
            'doConstituentBasedVariables': True,
            'doSamplingBasedVariables': True,
            'cutOnTile': 254,
            'cutOnLAr': 4000,
            'doTileQuality': True,
            'doLArQuality': True
        }

        if hasattr(JetRecToolsConf, 'JetTimeQualityTool'):
            # rel 15 setup
            tool1 = JetRecToolsConf.JetTimeQualityTool(sgkey_out + 'TimeTool',
                                                       DoTime=False,
                                                       DoQuality=False,
                                                       UseCells=False)
            if rec.readESD() or rec.readRDO():
                tool1.DoTime = True
                tool1.DoQuality = True
                tool1.UseCells = True
            if rec.readAOD() and (sgkey_in.find('H1Topo') >= 0
                                  or sgkey_in.find('LCTopo') >= 0):
                tool1.DoTime = True
            tools.append(tool1)
        else:
            # rel 16
            caloqual_kw['doTiming'] = True

        tool2 = JetCaloQualityTool(sgkey_out + 'QualTool', **caloqual_kw)
        tools.append(tool2)

        alg = JetD3PDMaker.JetFixupAlg(sgkey_out,
                                       InputKey=sgkey_in,
                                       OutputKey=sgkey_out,
                                       Tools=tools)
        for t in tools:
            alg += t

        seq += alg

    c.Getter.SGKey = sgkey_out
    return
Exemple #5
0
def egammaBuilderAvailable():
    " Return true if egammaBuilder is available."
    flag = False
    if rec.readRDO() or rec.readESD() and not rec.readAOD():
        from AthenaCommon.AlgSequence import AlgSequence
        topSequence = AlgSequence()
        if hasattr(topSequence, 'egamma'):
            flag = True
    return flag
Exemple #6
0
    def configure(self):

        log = logging.getLogger("TrigDecisionGetterRun2")

        from AthenaCommon.AlgSequence import AlgSequence
        topSequence = AlgSequence()

        #if hasOnlyLVL1:
        #from RecExConfig.ObjKeyStore import objKeyStore
        #objKeyStore.addStreamESD('TrigDec::TrigDecision','TrigDecision')
        #objKeyStore.addStreamAOD('TrigDec::TrigDecision','TrigDecision')

        from RecExConfig.RecFlags import rec
        if ( rec.doWriteESD() or rec.doWriteAOD() or rec.doESD() or rec.doAOD() ) and \
               ( not ( rec.readAOD() or rec.readESD() or rec.doWriteBS()) ):
            log.info("Will write TrigDecision object to storegate")

            from TrigDecisionMaker.TrigDecisionMakerConfig import WriteTrigDecision
            trigDecWriter = WriteTrigDecision()  # noqa: F841

            #           WritexAODTrigDecision() is called within WriteTrigDecision()

            # inform TD maker that some parts may be missing
            if TriggerFlags.dataTakingConditions() == 'Lvl1Only':
                topSequence.TrigDecMaker.doL2 = False
                topSequence.TrigDecMaker.doEF = False
                topSequence.TrigDecMaker.doHLT = False
                topSequence.TrigNavigationCnvAlg.doL2 = False
                topSequence.TrigNavigationCnvAlg.doEF = False
                topSequence.TrigNavigationCnvAlg.doHLT = False
            elif TriggerFlags.dataTakingConditions() == 'HltOnly':
                from AthenaCommon.AlgSequence import AlgSequence
                topSequence.TrigDecMaker.doL1 = False
            # Decide based on the doMergedHLTResult to assume a merged, or a
            # split HLT:
            if not TriggerFlags.doMergedHLTResult():
                topSequence.TrigDecMaker.doHLT = False
                topSequence.TrigNavigationCnvAlg.doL2 = False
                topSequence.TrigNavigationCnvAlg.doHLT = False
            else:
                topSequence.TrigDecMaker.doL2 = False
                topSequence.TrigDecMaker.doEF = False
                topSequence.TrigNavigationCnvAlg.doL2 = False
                topSequence.TrigNavigationCnvAlg.doEF = False
                pass

        else:
            log.info("Will not write TrigDecision object to storegate")

        return True
def getTruthJetIsolationTool(toolname, doTruthPileup=False, **options):
    """We need special options for truth jets.
    """
    isot = getJetIsolationTool(toolname, **options)

    from RecExConfig.RecFlags import rec
    defaultCollName = "SpclMC"  if rec.readAOD()  else "INav4MomTruthEvent"
    defaultContList = [defaultCollName] if not doTruthPileup else [defaultCollName, defaultCollName+'INTIME']
    truthCont = options.get('TruthInputContainers', defaultContList)

    isot.TruthInputContainers = truthCont
    
    # make sure we have a truth jet selector.
    isot.TruthSelector = _getTruthJetIsoSelector()

    return isot
Exemple #8
0
def getTruthJetIsolationTool(toolname, doTruthPileup=False, **options):
    """We need special options for truth jets.
    """
    isot = getJetIsolationTool(toolname, **options)

    from RecExConfig.RecFlags import rec
    defaultCollName = "SpclMC" if rec.readAOD() else "INav4MomTruthEvent"
    defaultContList = [defaultCollName] if not doTruthPileup else [
        defaultCollName, defaultCollName + 'INTIME'
    ]
    truthCont = options.get('TruthInputContainers', defaultContList)

    isot.TruthInputContainers = truthCont

    # make sure we have a truth jet selector.
    isot.TruthSelector = _getTruthJetIsoSelector()

    return isot
Exemple #9
0
def GetDefaultTagRefStream(streams):
    # spot the most downstream target : this will be the default
    # except if one readXYZ is locked
    from RecExConfig.RecFlags import rec

    if rec.readRDO.is_locked() and rec.readRDO():
        if 'Stream1_ref' in streams:
            return 'Stream1_ref'
        if 'StreamRDO_ref' in streams:
            return 'StreamRDO_ref'
        elif 'StreamRAW_ref' in streams:
            return 'StreamRAW_ref'
        else:
            raise RuntimeError(
                " readRDO locked True and no Stream1 nor StreamRDO nor StreamRAW !"
            )
    if rec.readESD.is_locked() and rec.readESD():
        if 'StreamESD_ref' in streams:
            return 'StreamESD_ref'
        else:
            raise RuntimeError(" readESD locked True and no StreamESD !")

    if rec.readAOD.is_locked() and rec.readAOD():
        if 'StreamAOD_ref' in streams:
            return 'StreamAOD_ref'
        else:
            raise RuntimeError(" readAOD locked True and no StreamAOD !")

    # now deal with default case
    if 'StreamAOD_ref' in streams:
        return 'StreamAOD_ref'
    elif 'StreamESD_ref' in streams:
        return 'StreamESD_ref'
    elif 'Stream1_ref' in streams:
        return 'Stream1_ref'
    elif 'StreamRDO_ref' in streams:
        return 'StreamRDO_ref'
    elif 'StreamRAW_ref' in streams:
        return 'StreamRAW_ref'
    else:
        raise RuntimeError(" no known streams !")

    return None
Exemple #10
0
    def configure(self):
        #         from AthenaServices.AthenaServicesConf import AthenaOutputStream
        #         from AthenaCommon.AppMgr import ServiceMgr
        #         from AthenaCommon.AlgSequence import AlgSequence
        #         topSequence = AlgSequence()

        #         ### the following was gotten from the LVL1TriggerGetter not sure if needed when not simulation
        #         if not (TriggerFlags.fakeLVL1() or TriggerFlags.doLVL1()):
        #            DetFlags.readRIOPool.LVL1_setOn()

        #         # ***Temp : needed to enable required combination of thresholds
        #         #           mu4,mu6,mu10,mu11,mu20,mu40
        #         # Will be replaced by config. from Lvl1ConfigSvc
        #         if hasattr(ServiceMgr,'RPCcablingSimSvc'):
        #             ServiceMgr.RPCcablingSimSvc.HackFor1031 = True
        if jobproperties.Global.InputFormat() == 'bytestream':
            theApp.Dlls += ["TrigT1Calo"]
            include("TrigT1CaloByteStream/ReadLVL1CaloBS_jobOptions.py")
        #         ###

        from AthenaCommon.AlgSequence import AlgSequence
        topSequence = AlgSequence()

        if recAlgs.doTrigger():
            if (rec.doESD() or rec.doAOD()) and (not(rec.readAOD() or \
                                                         rec.readESD())):
                if jobproperties.Global.InputFormat() == 'bytestream':
                    # Decode ROIB::RoIBResult from ByteStream
                    from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1ByteStreamDecodersRecExSetup
                    L1ByteStreamDecodersRecExSetup()
                from AnalysisTriggerAlgs.AnalysisTriggerAlgsConfig import \
                    RoIBResultToAOD
                topSequence += RoIBResultToAOD("RoIBResultToxAOD")
                pass
            pass

        from TrigEDMConfig.TriggerEDM import getLvl1ESDList
        objKeyStore.addManyTypesStreamESD(getLvl1ESDList())
        from TrigEDMConfig.TriggerEDM import getLvl1AODList
        objKeyStore.addManyTypesStreamAOD(getLvl1AODList())

        return True
Exemple #11
0
 def checkFileMetaData(self):
     log = logging.getLogger("TriggerConfigGetter.py")
     from RecExConfig.InputFilePeeker import inputFileSummary
     self.hasLBwiseHLTPrescalesAndL1ItemDef = True
     if rec.readESD() or rec.readAOD() or "ReadPool" in self._environment:
         self.hasLBwiseHLTPrescalesAndL1ItemDef = inputFileSummary[
             'metadata'].has_key(
                 '/TRIGGER/HLT/Prescales'
             )  # they were all added at the same time (Repro with 15.6.3.2 Prod)
     # protection against early runs
     if inputFileSummary.has_key(
             'run_number'
     ) and self._environment == "" and globalflags.DataSource(
     ) == 'data' and rec.readRDO() and any(
         [run < 134230 for run in inputFileSummary['run_number']]):
         self.hasLBwiseHLTPrescalesAndL1ItemDef = False
     if self.hasLBwiseHLTPrescalesAndL1ItemDef:
         log.info("Using LB-wise HLT prescales")
     else:
         log.info("Using run-wise HLT prescales")
Exemple #12
0
def setMetaData():
    '''
   Write the input source on which the InDet decoration algorithm was running to the meta data
   '''

    from AthenaCommon.AppMgr import ServiceMgr as svcMgr
    if metaDataKey() in svcMgr.TagInfoMgr.ExtraTagValuePairs:
        return

    from RecExConfig.RecFlags import rec
    str = ''
    if rec.readRDO():
        str = 'fromRDO'
    elif rec.readESD():
        str = 'fromESD'
    elif rec.readAOD():
        str = 'fromAOD'

    if metaDataKey() not in svcMgr.TagInfoMgr.ExtraTagValuePairs:
        svcMgr.TagInfoMgr.ExtraTagValuePairs[metaDataKey()] = str
Exemple #13
0
def OutputFileName(suffix=""):
    from RecExConfig.RecFlags import rec
    OutFileName = ""
    if rec.OutputFileNameForRecoStep() == "":
        if rec.readRDO():
            if globalflags.InputFormat() == "bytestream":
                OutFileName = "bs"
            else:
                OutFileName = "rdo"
        elif rec.readESD():
            OutFileName = "esd"
        elif rec.readAOD():
            OutFileName = "aod"
        else:
            OutFileName = "in"

        OutFileName = OutFileName + "to"
        if rec.doWriteBS():
            OutFileName = OutFileName + "bs"
        elif rec.doWriteRDO():
            OutFileName = OutFileName + "rdo"

        if rec.doESD():
            OutFileName = OutFileName + "esd"
        if rec.doAOD():
            OutFileName = OutFileName + "aod"
        if rec.doDPD():
            OutFileName = OutFileName + "dpd"
        if rec.doWriteTAG():
            OutFileName = OutFileName + "tag"

        if suffix != "":
            OutFileName = OutFileName + "_" + suffix
        print("Generated OutFileName", OutFileName)
    else:
        OutFileName = rec.OutputFileNameForRecoStep()
        print("User defined OutFileName", OutFileName)
    return OutFileName
Exemple #14
0
def InputFileNames():
    from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
    if athenaCommonFlags.FilesInput() != []:
        return athenaCommonFlags.FilesInput()
    from RecExConfig.RecFlags import rec
    inFiles = None

    ## FIXME
    ##     if (not athenaCommonFlags.PoolTAGInput.isDefault() or rec.readTAG() ):
    ##         inFiles=athenaCommonFlags.PoolTAGInput()
    ##     elif (not athenaCommonFlags.PoolAODInput.isDefault() or rec.readAOD() ):
    ##         inFiles=athenaCommonFlags.PoolAODInput()
    ##     elif (not athenaCommonFlags.PoolESDInput.isDefault() or rec.readESD() ):
    ##         inFiles=athenaCommonFlags.PoolESDInput()
    ##     elif not athenaCommonFlags.BSRDOInput.isDefault():
    ##         inFiles=athenaCommonFlags.BSRDOInput()
    ##     elif not athenaCommonFlags.PoolRDOInput.isDefault():
    ##         inFiles=athenaCommonFlags.PoolRDOInput()

    if rec.readTAG():
        inFiles = athenaCommonFlags.PoolTAGInput()
    elif rec.readAOD():
        inFiles = athenaCommonFlags.PoolAODInput()
    elif rec.readESD():
        inFiles = athenaCommonFlags.PoolESDInput()

    elif rec.readRDO():
        from AthenaCommon.GlobalFlags import globalflags
        if globalflags.InputFormat == 'bytestream':
            inFiles = athenaCommonFlags.BSRDOInput()
        else:
            inFiles = athenaCommonFlags.PoolRDOInput()
    else:
        raise RuntimeError("Unable to determine input file")

    return inFiles
Exemple #15
0
from AthenaCommon.GlobalFlags import globalflags
from RecExConfig.RecFlags import rec
from RecExConfig.RecAlgsFlags import recAlgs

if rec.Commissioning:
    CBNTAthenaAware = True

if rec.doTruth():
    protectedInclude("RecExCommon/CBNT_Truth_jobOptions.py")

    if not (globalflags.DetDescrVersion()[0:3] == "DC1"
            or globalflags.DetDescrVersion()[0:3] == "DC2"):
        protectedInclude("MCTruthAlgs/CBNT_TrackRecord.py")

if (DetFlags.haveRIO.ID_on() or rec.readESD() or rec.readAOD()):
    # no CBNT for ID anymore (use track validation ntuple)
    if jobproperties.Beam.beamType() == "collisions":

        #
        # functionality : put tracks from any tracking algorithm in combined ntuple
        #

        protectedInclude("InDetPriVxCBNT/InDetPriVxCBNT_jobOptions.py")

        if rec.readAOD():
            try:
                CBNTAA_VxPrimary.useTrkTrack = False
                CBNTAA_VxPrimary.McEventCollectionName = "GEN_AOD"
            except Exception:
                logCBNT_config.warning("CBNTAA_VxPrimary undefined")
#==================================
# RecExCommon specific options
#==================================

if QcdD3PDMakerFlags.doRecJet() or QcdD3PDMakerFlags.doRecMET(
) or QcdD3PDMakerFlags.doRecTruthJet():
    rec.oldFlagTopSteering.set_Value_and_Lock(True)

#==================================
#Setting AOD flags. Not much needs to be done if you read an ESD 'cause everything's already built.
#See https://twiki.cern.ch/twiki/bin/view/Atlas/UserAnalysisTest#The_AOD_Production_Flags
#==================================
#other settings
jetFlags.noStandardConfig = True

if rec.readAOD() or not (QcdD3PDMakerFlags.doRecJet()
                         or QcdD3PDMakerFlags.doRecMET()):
    jobproperties.CaloRecFlags.Enabled.set_Value_and_Lock(False)
    jobproperties.CaloRecFlags.doCaloCluster.set_Value_and_Lock(False)
    jobproperties.CaloRecFlags.doCaloTopoCluster.set_Value_and_Lock(False)
else:
    jobproperties.CaloRecFlags.Enabled.set_Value_and_Lock(True)
    jobproperties.CaloRecFlags.doCaloCluster.set_Value_and_Lock(True)
    jobproperties.CaloRecFlags.doCaloTopoCluster.set_Value_and_Lock(True)

#Disable AODFix and run _local
rec.doApplyAODFix.set_Value_and_Lock(False)
#rec.UserAlgs += ["QcdD3PDMaker/AODFix_local.py"]

#==================================
# reconstruction of jet, etmiss
Exemple #17
0
def AODFix_Init():
    ''' This function is called to correctly setup AODFix.'''

    global _aodFixInstance

    from RecExConfig.RecFlags import rec

    ##################
    # exit if locked to false
    ##################
    if rec.doApplyAODFix.is_locked() and rec.doApplyAODFix.get_Value(
    ) == False:
        logAODFix.info(
            "doApplyAODFix is locked to False; not applying anything")
        return

    ##################
    # deterimine in what release we are running (and fill some rec variables
    ##################

    import os
    curRelease = os.getenv("AtlasVersion") or ''

    logAODFix.debug("curRelease set to " + curRelease)

    ##################
    # determine athena with which input file was created and previous AODFix
    ##################

    # RDO doesn't have MetaData
    prevAODFix = ''
    prevRelease = ''
    isMC = False
    isHI = rec.doHeavyIon()
    isHIP = rec.doHIP()

    # is it better to do this or to look at GlobalFlags?
    from RecExConfig.InputFilePeeker import inputFileSummary
    try:
        isMC = (inputFileSummary['evt_type'][0] == "IS_SIMULATION")
    except Exception:
        logAODFix.warning(
            "Could not tell if the input file is data or MC; setting to data")
        isMC = False

    if not rec.readRDO():

        try:
            AtlasReleaseVersionString = inputFileSummary['metadata'][
                '/TagInfo']['AtlasRelease']
            rv = AtlasReleaseVersionString.split('-')
            if len(rv) > 1:
                prevRelease = rv[1]
        except Exception:
            logAODFix.warning(
                "no AthenRelease found in input file, setting to <none> !!")
            prevRelease = ''

        ##################
        # determine which is the previous verion of the AODFix
        ##################
        try:
            prevAODFix = inputFileSummary['tag_info']['AODFixVersion']
            if prevAODFix.startswith("AODFix_"):
                prevAODFix = prevAODFix[7:]
                prevAODFix = prevAODFix.split("_")[0]
        except Exception:
            logAODFix.debug(
                "no AODFixVersion found in input file, setting to <none>.")
            prevAODFix = ''

    logAODFix.info("Summary of MetaData for AODFix:")
    if isMC:
        logAODFix.info(" Input file is MC")
    else:
        logAODFix.info(" Input file is DATA")
    logAODFix.info(" Input file produced with Athena version <%s>." %
                   prevRelease)
    logAODFix.info(" AODFix version <%s> was previously applied." % prevAODFix)
    if rec.doApplyAODFix.is_locked():
        logAODFix.info(" AODFix is forced to run!")

    ##################
    # determine which AODFix to run (if actually running--to be determined later)
    ##################

    doAODFix = False
    if rec.readAOD():  # change in policy: no AODFix if reading ESD.
        doAODFix = True
        # check to see if it's a DAOD; do not run by default in DAODs
        from RecExConfig.InputFilePeeker import inputFileSummary
        try:
            streamNames = inputFileSummary['stream_names']
            if any(map(lambda x: "StreamDAOD" in x,
                       streamNames)) and not rec.doApplyAODFix.is_locked():
                logAODFix.info("Running on a DAOD, so not scheduling AODFix")
                doAODFix = False
        except Exception:
            logAODFix.warning("Could not determine the stream name")

    elif rec.readESD() and rec.doApplyAODFix.is_locked():
        # only run on ESDs if forcing
        doAODFix = True

    #exit if not doing AODFix
    if not doAODFix:
        return

    curReleaseSplit = curRelease.split('.')
    prevReleaseSplit = prevRelease.split('.')
    if len(curReleaseSplit) >= 2 and (rec.doApplyAODFix.is_locked()
                                      or len(prevReleaseSplit) >= 2):
        ### If adding an AODFix for a release family that does not have it,
        ### please add it to the if-elif... statement below
        # if (curReleaseSplit[0] == '21' and (curReleaseSplit[1] == '0' or curReleaseSplit[1] == '2') and
        #       (rec.doApplyAODFix.is_locked() or
        #        (prevReleaseSplit[0] == '21' and (prevReleaseSplit[1] == '0' or prevReleaseSplit[1] == '2')))):
        #     _aodFixInstance = AODFix_r210(prevAODFix, isMC, rec.doApplyAODFix.is_locked(), isHI, isHIP)
        # else:
        #     logAODFix.info("No AODFix scheduled for this release.")
        logAODFix.info("AODFix disabled.")

    else:
        logAODFix.info("Current release is of strange form: %s" % curRelease)
elif DQMonFlags.monType=='BSonly':
   DQMonFlags.monManEnvironment='tier0Raw'
   if rec.readESD(): 
      DQMonFlags.doMonitoring=False

elif DQMonFlags.monType=='ESDonly':  
   DQMonFlags.monManEnvironment='tier0ESD' 
   if rec.readRDO(): 
      DQMonFlags.doMonitoring=False

elif (DQMonFlags.monType=='BS_ESD'):
   if rec.readRDO():
      DQMonFlags.monManEnvironment='tier0Raw'
   if rec.readESD(): 
      DQMonFlags.monManEnvironment='tier0ESD'
   if rec.readAOD():
      DQMonFlags.monManEnvironment='AOD'

elif DQMonFlags.monType=='BSall':
   DQMonFlags.monManEnvironment='tier0'
   if rec.readESD(): 
      DQMonFlags.doMonitoring=False
else:
   local_logger.warning("invalid DQMonFlags.monType: %s, using default monManEnvironment", DQMonFlags.monType())

if not DQMonFlags.doMonitoring():
   local_logger.info("monitoring globally switched off")
   DQMonFlags.doGlobalMon=False
   DQMonFlags.doLVL1CaloMon=False
   DQMonFlags.doCTPMon=False
   DQMonFlags.doHLTMon=False
Exemple #19
0
    # include DetFlags
    # by default everything is off
    from AthenaCommon.DetFlags import DetFlags
    # switch on tasks for all detectors
    DetFlags.detdescr.all_setOn()
    # switch on dcs for all detectors
    try:
        # need AthenaCommon
        DetFlags.dcs.all_setOn()
    except Exception:
        logRecExCommon_DetFlags.warning("could not set DetFlags.dcs")
        pass

    from RecExConfig.RecFlags import rec
    if not rec.readESD() and not rec.readAOD() and not rec.doWriteRDO():
        DetFlags.makeRIO.all_setOn()
    else:
        DetFlags.makeRIO.all_setOff()
        #calo cells are there on ESD
        if rec.readESD():
            DetFlags.readRIOPool.Calo_setOn()
            # savannah 73686
            from RecExConfig.AutoConfiguration import IsInInputFile
            from InDetRecExample.InDetKeys import InDetKeys
            if IsInInputFile('InDet::PixelClusterContainer',
                             InDetKeys.PixelClusters()):
                DetFlags.readRIOPool.pixel_setOn()
            if IsInInputFile('InDet::SCT_ClusterContainer',
                             InDetKeys.SCT_Clusters()):
                DetFlags.readRIOPool.SCT_setOn()
Exemple #20
0
def ConfigureInputType():
    from PyUtils.MetaReaderPeeker import metadata

    from AthenaCommon.GlobalFlags import globalflags
    streamsName = []

    if metadata['file_type'] == 'BS':
        #byte stream
        logAutoConfiguration.info("Input BS detected")
        globalflags.InputFormat = 'bytestream'
        rec.readRDO = True
        rec.readESD = False
        rec.readAOD = False
        rec.doAOD = False
        rec.doESD = True
        rec.doWriteAOD = False
        logAutoConfiguration.info(
            "BS format: setting globalflags.InputFormat=%s " %
            globalflags.InputFormat())
        logAutoConfiguration.info("BS format: setting rec.readRDO=%s " %
                                  rec.readRDO())
        logAutoConfiguration.info("BS format: setting rec.doAOD=%s " %
                                  rec.doAOD())
        logAutoConfiguration.info("BS format: setting rec.doESD=%s " %
                                  rec.doESD())
        logAutoConfiguration.info("BS format: setting rec.doWriteAOD=%s " %
                                  rec.doWriteAOD())
    else:
        globalflags.InputFormat = 'pool'
        #Get streamsName
        streamsName = []
        if 'processingTags' in metadata:
            streamsName = metadata['processingTags']
        if streamsName == None:
            streamsName = []
        logAutoConfiguration.info("Extracted streams %s from input file " %
                                  streamsName)

        if len(streamsName) == 0:
            logAutoConfiguration.warning(
                "ConfigureInputType: no stream in input file.")
        elif len(streamsName) > 1:
            logAutoConfiguration.warning(
                "ConfigureInputType: more than one stream: %s in input file. Default action. Consider the highest one."
            )
        else:
            rec.mergingStreamName = streamsName[0]

    from RecExConfig.RecoFunctions import OverlapLists
    try:
        from PrimaryDPDMaker.PrimaryDPDFlags import listRAWtoDPD, listESDtoDPD, listAODtoDPD
    except:
        logAutoConfiguration.warning(
            "Unable to import PrimaryDPDFlags. OK for ATN tests below AtlasAnalysis, otherwise suspicious."
        )
        listRAWtoDPD = []
        listESDtoDPD = []
        listAODtoDPD = []

    ## these lines have been added to guarantee the backward compatibility for the old DPD naming convention cosmics
    try:
        from PrimaryDPDMaker.PrimaryDPDFlags import listBackwardCompatibleAODtoDPD, listBackwardCompatibleESDtoDPD
        listESDtoDPD.extend(listBackwardCompatibleESDtoDPD)
        listAODtoDPD.extend(listBackwardCompatibleAODtoDPD)
    except:
        logAutoConfiguration.warning(
            "Primary DPDMake does not support the old naming convention!!")

    if 'TagStreamsRef' in metadata and metadata['TagStreamsRef'] != None:
        logAutoConfiguration.info("Input TAG detected")
        rec.readTAG = True
        logAutoConfiguration.info("Auto configured rec.readTAG=%s " %
                                  rec.readTAG())

    from RecExConfig.RecoFunctions import ItemInListStartsWith
    if ItemInListStartsWith("StreamAOD", streamsName) or ItemInListStartsWith(
            'StreamDAOD', streamsName) or ItemInListStartsWith(
                'StreamD2AOD', streamsName) or OverlapLists(
                    streamsName, listAODtoDPD) or ItemInListStartsWith(
                        'DAOD', streamsName) or ItemInListStartsWith(
                            'D2AOD', streamsName):
        logAutoConfiguration.info("Input AOD detected")
        rec.readRDO = False
        rec.readESD = False
        rec.readAOD = True
        rec.doAOD = False
        rec.doESD = False
        logAutoConfiguration.info("setting rec.readAOD=%s " % rec.readAOD())
    elif ItemInListStartsWith(
            "StreamESD", streamsName) or ItemInListStartsWith(
                'StreamDESD', streamsName) or ItemInListStartsWith(
                    'StreamD2ESD', streamsName) or OverlapLists(
                        streamsName, listESDtoDPD) or ItemInListStartsWith(
                            'DESD', streamsName) or ItemInListStartsWith(
                                'D2ESD', streamsName):
        logAutoConfiguration.info("Input ESD detected")
        rec.readRDO = False
        rec.readESD = True
        rec.readAOD = False
        rec.doAOD = True
        rec.doESD = False
        logAutoConfiguration.info("setting rec.readESD=%s " % rec.readESD())
        logAutoConfiguration.info("setting rec.doAOD=%s " % rec.doAOD())
    elif ItemInListStartsWith("Stream1", streamsName) or ItemInListStartsWith(
            "StreamRDO", streamsName) or ItemInListStartsWith(
                "OutputStreamRDO", streamsName) or OverlapLists(
                    streamsName, listRAWtoDPD):
        logAutoConfiguration.info("Input RDO detected")
        rec.readRDO = True
        rec.readESD = False
        rec.readAOD = False
        rec.doAOD = False
        rec.doESD = True
        logAutoConfiguration.info("setting rec.readRDO=%s " % rec.readRDO())
        logAutoConfiguration.info("setting rec.doESD=%s " % rec.doESD())
    elif ItemInListStartsWith("StreamEVGEN", streamsName):
        logAutoConfiguration.info("Input EVGEN detected")
        rec.readRDO = False
        rec.readESD = False
        rec.readAOD = False
        rec.doAOD = False
        rec.doESD = False
        logAutoConfiguration.info(
            "setting all unlocked rec.readXXX and rec.doXXX to False")
    elif ItemInListStartsWith("StreamHITS", streamsName):
        logAutoConfiguration.info("Input StreamEVGEN detected")

    elif metadata['file_type'] != 'BS':
        raise RuntimeError("ConfigureInputType cannot handle streamsName==%s" %
                           streamsName)
    return
Exemple #21
0
    # switch off all algorithms
    rec.doESD = False
    rec.doAOD = False
    rec.doWriteESD = False
    rec.doWriteAOD = False
    rec.doWriteTAG = False
    rec.doCBNT = False
    if rec.readESD or rec.readAOD:
        raise RuntimeError, "Cannot have readESD or readAOD if doWriteRDO"

    if rec.readRDO() and globalflags.InputFormat() != 'bytestream':
        # this is a RDO to RDO copy, do not put detector status
        rec.doDetStatus = False

# in case several read specified, favour the highest one
if rec.readAOD():
    logRecExCommon_flags.info("read AOD : all algs switched off ")

    # switch off all algorithms
    rec.doESD = False
    rec.doAOD = False
    rec.doWriteESD = False
    rec.doWriteAOD = False
    if rec.readRDO:
        logRecExCommon_flags.info("readAOD : switch readRDO off ")
        rec.readRDO = False
    if rec.readESD():
        logRecExCommon_flags.info("readESD : switch readRDO off ")
        rec.readRDO = False

if rec.readESD():
Exemple #22
0
    # Get instance to the metadata builder:
    CRMetaBuilder = CaloRingerMetaDataBuilder(disable=True)

    if CRBuilder.usable():
        for cType, cKeys in CRBuilder.output().items():
            for cKey in cKeys:
                for dictKey, value in CaloRingerKeysDict.outputs.items():
                    if value[0] == cType:
                        auxOption = CaloRingerKeysDict.outputs[dictKey][2]
                        addOutputToList(caloRingerAODList, cType, cKey,
                                        auxOption)
                        mlog.debug(
                            "Added container with type/key %s/%s to StoreGateSvc",
                            cType, cKey)
                        break
    if rec.readESD() or rec.readAOD():  # In this case, we assume that the
        # joboption was added to add input file ringer containers
        # to the output file.
        # add the event store information:
        addRingerInputEventToList(caloRingerAODList, outputCaloRingsType())
        addRingerInputEventToList(caloRingerAODList, outputCaloRingsAuxType())
        addRingerInputEventToList(caloRingerAODList, outputRingSetType())
        addRingerInputEventToList(caloRingerAODList, outputRingSetAuxType())

    if CRMetaBuilder.usable() and caloRingerFlags.buildCaloRingsOn():
        for cType, cKeys in CRMetaBuilder.output().items():
            for cKey in cKeys:
                for dictKey, value in CaloRingerKeysDict.outputsMetaData.items(
                ):
                    if value[0] == cType:
                        auxOption = CaloRingerKeysDict.outputsMetaData[
Exemple #23
0
from RecExConfig.RecFlags import rec
from JetRec.JetMomentGetter import make_JetMomentGetter
from JetMomentTools.SetupJetMomentTools import getJetVertexAssociationTool

jvatool = getJetVertexAssociationTool('AntiKt', 0.4, 'Topo')
jvatool.StoreQualityVariables = True
# jvatool.JVFMomentName = "JVF2"
make_JetMomentGetter('AntiKt4TopoEMNewJets', [jvatool])
#make_JetMomentGetter( 'AntiKt6TopoEMNewJets' , [jvatool] )
#make_JetMomentGetter( 'AntiKt4TopoJets' , [jvatool] )
#make_JetMomentGetter( 'AntiKt6TopoJets' , [jvatool] )
make_JetMomentGetter('AntiKt4LCTopoJets', [jvatool])
#make_JetMomentGetter( 'AntiKt6LCTopoJets' , [jvatool] )
#make_JetMomentGetter( 'AntiKt4TowerJets' , [jvatool] )
#make_JetMomentGetter( 'AntiKt6TowerJets' , [jvatool] )

from D3PDMakerConfig.CommonD3PDMakerFlags import CommonD3PDMakerFlags
if CommonD3PDMakerFlags.doRecJet():
    make_JetMomentGetter('AntiKt4TopoEMNewJets', [jvatool])
    #make_JetMomentGetter( 'AntiKt6TopoEMNewJets' , [jvatool] )
    #make_JetMomentGetter( 'AntiKt4TopoNewJets' , [jvatool] )
    #make_JetMomentGetter( 'AntiKt6TopoNewJets' , [jvatool] )
    make_JetMomentGetter('AntiKt4LCTopoNewJets', [jvatool])
    #make_JetMomentGetter( 'AntiKt6LCTopoNewJets' , [jvatool] )
    if not rec.readAOD():
        make_JetMomentGetter('AntiKt4TowerEMNewJets', [jvatool])
        #make_JetMomentGetter( 'AntiKt6TowerEMNewJets' , [jvatool] )
        make_JetMomentGetter('AntiKt4TowerNewJets', [jvatool])
        #make_JetMomentGetter( 'AntiKt6TowerNewJets' , [jvatool] )
Exemple #24
0
from AthenaCommon.BeamFlags import jobproperties
import traceback

#switch off TauDiscriminant for cosmic
if jobproperties.Beam.beamType()=="cosmics":
    jobproperties.tauRecFlags.doRunTauDiscriminant=False

# #disable tau in case we run on RDO/RAW and jets are disabled as well:
# if jobproperties.tauRecFlags.doTauRec() and rec.readRDO() and not rec.doJetMissingETTag():
#     from AthenaCommon.Logging import logging
#     logTauRecConfig = logging.getLogger( 'tauRecAOD_config' )
#     logTauRecConfig.warning("Running on RDO/RAW files but doJetMissingETTag=False. Tau reco need jets --> tau reconstruction disabled!!")
#     jobproperties.tauRecFlags.doTauRec=False


if rec.readAOD() :
    _tauFail=True

    # the main tau reconstruction part
    try:    
        include( "tauRec/tauRecAOD_jobOptions.py" )
        _tauFail=False
    except Exception:
        print traceback.format_exc()        
        treatException("Could not set up merged tauRec. Switched off !")
         
    if not _tauFail:  
        # commenting out for now, so we can reactivate possibly later
        # call eflowRec in tau mode now
        #if recAlgs.doEFlow():        
        #    try:
Exemple #25
0
    def configure(self):

        log = logging.getLogger("HLTTriggerResultGetter.py")
        from RecExConfig.ObjKeyStore import objKeyStore

        # set EDMDecodingVersion
        EDMDecodingVersion()

        # Set AODFULL for data unless it was set explicitly already
        if TriggerFlags.AODEDMSet.isDefault() and globalflags.DataSource(
        ) == 'data':
            TriggerFlags.AODEDMSet = 'AODFULL'

        from AthenaCommon.AlgSequence import AlgSequence
        topSequence = AlgSequence()
        log.info("BS unpacking (TF.readBS): %d", TriggerFlags.readBS())
        if TriggerFlags.readBS():
            if TriggerFlags.EDMDecodingVersion() <= 2:
                bs = ByteStreamUnpackGetterRun2()  # noqa: F841
            else:
                bs = ByteStreamUnpackGetter()  # noqa: F841

        xAODContainers = {}
        #        if not recAlgs.doTrigger():      #only convert when running on old data
        if TriggerFlags.EDMDecodingVersion() == 1:
            xaodcnvrt = xAODConversionGetter()
            xAODContainers = xaodcnvrt.xaodlist

        if recAlgs.doTrigger() or TriggerFlags.doTriggerConfigOnly():
            if TriggerFlags.EDMDecodingVersion() <= 2:
                tdt = TrigDecisionGetterRun2()  # noqa: F841
            else:
                tdt = TrigDecisionGetter()  # noqa: F841

        # Temporary hack to add Run-3 navigation to ESD and AOD
        if (rec.doESD()
                or rec.doAOD()) and TriggerFlags.EDMDecodingVersion() == 3:
            # The hack with wildcards is needed for BS->ESD because we don't know the exact keys
            # of HLT navigation containers before unpacking them from the BS event.
            objKeyStore._store['streamESD'].allowWildCard(True)
            objKeyStore._store['streamAOD'].allowWildCard(True)
            objKeyStore.addManyTypesStreamESD([
                'xAOD::TrigCompositeContainer#HLTNav*',
                'xAOD::TrigCompositeAuxContainer#HLTNav*'
            ])
            objKeyStore.addManyTypesStreamAOD([
                'xAOD::TrigCompositeContainer#HLTNav*',
                'xAOD::TrigCompositeAuxContainer#HLTNav*'
            ])

        # TrigJetRec additions
        if rec.doWriteESD():
            objKeyStore.addStreamESD("JetKeyDescriptor", "JetKeyMap")
            objKeyStore.addStreamESD("JetMomentMap", "TrigJetRecMomentMap")

        if rec.doWriteAOD():
            objKeyStore.addStreamAOD("JetKeyDescriptor", "JetKeyMap")
            objKeyStore.addStreamAOD("JetMomentMap", "TrigJetRecMomentMap")

        # ID truth
        if not rec.readESD() and (not rec.readAOD()) and TriggerFlags.doID() \
                and rec.doTruth():
            try:
                from TrigInDetTruthAlgs.TrigInDetTruthAlgsConfig import \
                    TrigIDTruthMaker
                topSequence += TrigIDTruthMaker()
            except Exception:
                log.warning("Couldn't set up the trigger ID truth maker")
                pass

        if rec.doESD() or rec.doAOD():
            from TrigEDMConfig.TriggerEDM import getTrigIDTruthList
            objKeyStore.addManyTypesStreamESD(
                getTrigIDTruthList(TriggerFlags.ESDEDMSet()))
            objKeyStore.addManyTypesStreamAOD(
                getTrigIDTruthList(TriggerFlags.AODEDMSet()))

        if (rec.doESD() or rec.doAOD()) and TriggerFlags.writeL1TopoValData():
            objKeyStore.addManyTypesStreamESD([
                'xAOD::TrigCompositeContainer#HLT_xAOD__TrigCompositeContainer_L1TopoValData',
                'xAOD::TrigCompositeAuxContainer#HLT_xAOD__TrigCompositeContainer_L1TopoValDataAux.'
            ])
            objKeyStore.addManyTypesStreamAOD([
                'xAOD::TrigCompositeContainer#HLT_xAOD__TrigCompositeContainer_L1TopoValData',
                'xAOD::TrigCompositeAuxContainer#HLT_xAOD__TrigCompositeContainer_L1TopoValDataAux.'
            ])
            log.debug(
                "HLT_xAOD__TrigCompositeContainer_L1TopoValData(Aux.) for L1Topo validation added to the data."
            )

        if rec.doAOD() or rec.doWriteAOD():
            # schedule the RoiDescriptorStore conversion
            # log.warning( "HLTTriggerResultGetter - setting up RoiWriter" )
            roiWriter = RoiWriter()
            # Add fictional input to ensure data dependency in AthenaMT
            roiWriter.ExtraInputs += [("TrigBSExtractionOutput",
                                       "StoreGateSvc+TrigBSExtractionOutput")]
            topSequence += roiWriter
            # write out the RoiDescriptorStores
            from TrigEDMConfig.TriggerEDMRun2 import TriggerRoiList
            objKeyStore.addManyTypesStreamAOD(TriggerRoiList)

        #Are we adding operational info objects in ESD?
        added = self._AddOPIToESD()
        if added:
            log.debug(
                "Operational Info object HLT_EXPRESS_OPI_HLT with extra information about express stream prescaling added to the data."
            )

        # ESD objects definitions
        _TriggerESDList = {}

        from TrigEDMConfig.TriggerEDM import getTriggerEDMList
        # we have to store xAOD containers in the root file, NOT AOD,
        # if the xAOD container list is not empty
        if (xAODContainers):
            _TriggerESDList.update(xAODContainers)
        else:
            _TriggerESDList.update(
                getTriggerEDMList(TriggerFlags.ESDEDMSet(),
                                  TriggerFlags.EDMDecodingVersion()))

        log.info(
            "ESD content set according to the ESDEDMSet flag: %s and EDM version %d",
            TriggerFlags.ESDEDMSet(), TriggerFlags.EDMDecodingVersion())

        # AOD objects choice
        _TriggerAODList = {}

        #from TrigEDMConfig.TriggerEDM import getAODList
        _TriggerAODList.update(
            getTriggerEDMList(TriggerFlags.AODEDMSet(),
                              TriggerFlags.EDMDecodingVersion()))

        log.info(
            "AOD content set according to the AODEDMSet flag: %s and EDM version %d",
            TriggerFlags.AODEDMSet(), TriggerFlags.EDMDecodingVersion())

        log.debug("ESD EDM list: %s", _TriggerESDList)
        log.debug("AOD EDM list: %s", _TriggerAODList)

        # Highlight what is in AOD list but not in ESD list, as this can cause
        # the "different number of entries in branch" problem, when it is in the
        # AOD list but the empty container per event is not created
        # Just compares keys of dicts, which are the class names, not their string keys in StoreGate
        not_in = [
            element for element in _TriggerAODList
            if element not in _TriggerESDList
        ]
        if (len(not_in) > 0):
            log.warning("In AOD list but not in ESD list: ")
            log.warning(not_in)
        else:
            log.info("AOD list is subset of ESD list - good.")

        def _addSlimming(stream, edm):
            from TrigNavTools.TrigNavToolsConfig import navigationThinningSvc

            edmlist = list(y.split('-')[0] for x in edm.values()
                           for y in x)  #flatten names

            svc = navigationThinningSvc({
                'name': 'HLTNav_%s' % stream,
                'mode': 'cleanup',
                'result': 'HLTResult_HLT',
                'features': edmlist
            })

            from OutputStreamAthenaPool.CreateOutputStreams import registerTrigNavThinningSvc
            registerTrigNavThinningSvc(stream, svc)

            log.info("Configured slimming of HLT for %s", stream)
            print(svc)  # noqa: ATL901
            del edmlist

        if TriggerFlags.doNavigationSlimming() and rec.readRDO(
        ) and rec.doWriteAOD():
            _addSlimming('StreamAOD',
                         _TriggerESDList)  #Use ESD item list also for AOD!
            log.info("configured navigation slimming for AOD output")

        if TriggerFlags.doNavigationSlimming() and rec.readRDO(
        ) and rec.doWriteESD():
            _addSlimming('StreamESD', _TriggerESDList)
            log.info("configured navigation slimming for ESD output")

        objKeyStore.addManyTypesStreamESD(_TriggerESDList)
        objKeyStore.addManyTypesStreamAOD(_TriggerAODList)

        return True
Exemple #26
0
if globalflags.InputFormat.is_pool():
    logAnaCommon_topOptions.info("Pool file : storing in objKeyStore the list of input object directly from file")
    try:
        from PyUtils.MetaReaderPeeker import convert_itemList
        objKeyStore.addManyTypesInputFile(convert_itemList(layout = '#join'))

        pass
    except:
        logAnaCommon_topOptions.error("no input file defined in flags. If using RTT please use tag <athenaCommonFlags/>. Now continuing at own riske")
        pass
    pass
# for BS file this cannot be done already, see later



if not rec.readESD() and not rec.readAOD():
    ##objKeyStore.readInputFile('RecExPers/OKS_streamRDO.py')
    pass
elif rec.readESD():
    ##objKeyStore.readInputFile('RecExPers/OKS_streamESD.py')
    ##objKeyStore.readInputBackNav('RecExPers/OKS_streamRDO.py')
    # still need to read in AOD content built at ESD stage
    objKeyStore.readStreamAOD('RecExPers/OKS_streamAOD_fromESD.py')
    # at this point all streamAOD there should already be in ESD
    for k in objKeyStore['streamAOD'].list():
        if not objKeyStore['inputFile'].has_item (k):
            logAnaCommon_topOptions.info("Warning item %s scheduled co be copied from ESD to  AOD, but missing in ESD! Dropped. " % k )
            objKeyStore['streamAOD'].removeItem (k)
            pass
        pass
    pass
def addJetsInfo(alg=None,
                file='physics.root',
                tuplename='physics',
                tmpFlag=True,
                **kw):

    print "adding Jets info..."

    if not alg:
        from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
        alg = MSMgr.NewRootStream(tuplename, file)

    flags = CommonD3PDMakerFlags

    #ExtendedJetD3PDObject = JetD3PDObject.copy()

    # add track index for track jets
    if not kw.has_key('AntiKt4Track_' +
                      JetTagD3PDKeys.JetTrackAssocBlockName() + '_target'):
        kw['AntiKt4Track_' + JetTagD3PDKeys.JetTrackAssocBlockName() +
           '_target'] = "trk"
    if not kw.has_key('AntiKt3Track_' +
                      JetTagD3PDKeys.JetTrackAssocBlockName() + '_target'):
        kw['AntiKt3Track_' + JetTagD3PDKeys.JetTrackAssocBlockName() +
           '_target'] = "trk"
    if not kw.has_key('AntiKt2Track_' +
                      JetTagD3PDKeys.JetTrackAssocBlockName() + '_target'):
        kw['AntiKt2Track_' + JetTagD3PDKeys.JetTrackAssocBlockName() +
           '_target'] = "trk"
    if not kw.has_key('Kt3Track_' + JetTagD3PDKeys.JetTrackAssocBlockName() +
                      '_target'):
        kw['Kt3Track_' + JetTagD3PDKeys.JetTrackAssocBlockName() +
           '_target'] = "trk"
    if not kw.has_key('AntiKt4TopoEMJets_' +
                      JetTagD3PDKeys.JetTrackAssocBlockName() + '_target'):
        kw['AntiKt4TopoEMJets_' + JetTagD3PDKeys.JetTrackAssocBlockName() +
           '_target'] = "trk"
    if not kw.has_key('AntiKt4LCTopoJets_' +
                      JetTagD3PDKeys.JetTrackAssocBlockName() + '_target'):
        kw['AntiKt4LCTopoJets_' + JetTagD3PDKeys.JetTrackAssocBlockName() +
           '_target'] = "trk"
    if not kw.has_key('AntiKt5LCTopo_' +
                      JetTagD3PDKeys.JetTrackAssocBlockName() + '_target'):
        kw['AntiKt5LCTopo_' + JetTagD3PDKeys.JetTrackAssocBlockName() +
           '_target'] = "trk"

    AddConstitIndex(ExtendedJetD3PDObject,
                    typename='CaloCluster',
                    target='cl_lc_',
                    level=99)
    AddTrackAssocIndex(ExtendedJetD3PDObject, level=99)
    from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags

    # Jet information
    jetInclude = flags.smallJetInclude()
    jetIncludeTrack = jetInclude[:]
    jetIncludeTrack += [
        'Rec::TrackParticleNavigableConstituentAssociationTool', 'WIDTH',
        'DQMoments'
    ]
    jetIncludeTower = jetInclude[:]
    jetIncludeTower += ['JVtx', 'JetVertexFraction']
    jetInclude += [
        'Samplings', 'CaloClusterNavigableConstituentAssociationTool',
        'TrackAssocblockindex', 'TracksMoments', 'Special', 'TrackMF',
        'JetClusterMoment'
    ]
    jetIncludeLC = jetInclude[:]
    jetIncludeLC += ['ConstituentScale']
    jetIncludeALL = jetInclude[:]

    btagging_blocks = [
        JetTagD3PDKeys.BTagWeightsBlockName(),
        JetTagD3PDKeys.TruthInfoBlockName(),
        JetTagD3PDKeys.IP2DInfoBaseBlockName(),
        JetTagD3PDKeys.IP2DIPInfoBaseBlockName(),
        JetTagD3PDKeys.IP3DInfoBaseBlockName(),
        JetTagD3PDKeys.IP3DIPInfoBaseBlockName(),
        JetTagD3PDKeys.JetFitterInfoBaseBlockName(),
        JetTagD3PDKeys.JetFitterTagInfoBlockName(),
        JetTagD3PDKeys.SVInfoPlusBlockName(),
        JetTagD3PDKeys.JetFitterCombInfoBaseBlockName(),
        "JetTag_Gaia",
        JetTagD3PDKeys.JetFitterCharmInfoBaseBlockName(),
        JetTagD3PDKeys.JetFitterCharmTagInfoBlockName(),  # "JetTag_GaiaNeg",]
        JetTagD3PDKeys.JetJFTwoTrackVertexAssocBlockName(),
        JetTagD3PDKeys.JetFitterVxAssocBlockName(),
        JetTagD3PDKeys.SV1InfoBaseBlockName(),
        JetTagD3PDKeys.SV0InfoPlusBlockName()
    ]

    #jetIncludeALL += btagging_blocks
    jetIncludeALL += [
        'Uncertainties', 'BeamBackground', 'JetVertexFraction', 'CaloQual'
    ]

    jetIncludeALL_LC = jetIncludeALL[:]
    jetIncludeALL_LC += ['ConstituentScale']

    jetExclude = flags.smallJetExclude()[:]
    jetExclude += ['JES', 'JESMoments', 'Layer']

    alg += ExtendedJetD3PDObject(**_args(
        3,
        'AntiKt4TopoEMJets',
        kw,
        #sgkey='AntiKt4TopoEMJetsReTagged', prefix='jet_AntiKt4TopoEM_',
        sgkey='AntiKt4TopoEMNewJets',
        prefix='jet_AntiKt4TopoEM_',
        include=jetIncludeALL + ['SplitInfo', 'ConstituentScale'] +
        btagging_blocks,
        exclude=jetExclude,
        JetVertexFraction_FromUD=True,
        JetVertexFraction_FillFullJVF=True,
        #AssocTrackCont_target="trk",
        JetTag_SoftMuonChi2InfoMuonAssoc_target="mu_staco_",
        allowMissing=True))

    #alg += ExtendedJetD3PDObject              (**_args ( 3, 'AntiKt6TopoEMJets', kw,
    #                                             sgkey='AntiKt6TopoEMNewJets', prefix='jet_AntiKt6TopoEM_',
    #                                             include = jetIncludeALL+['SplitInfo'],
    #                                             exclude = jetExclude,
    #                                             JetVertexFraction_FromUD=True,
    #                                             JetVertexFraction_FillFullJVF=True,
    #                                             allowMissing = True))

    alg += ExtendedJetD3PDObject(
        **_args(3,
                'AntiKt4LCTopoJets',
                kw,
                sgkey='AntiKt4LCTopoNewJets',
                prefix='jet_AntiKt4LCTopo_',
                include=jetIncludeALL_LC + ['SplitInfo'] + btagging_blocks,
                exclude=jetExclude,
                JetVertexFraction_FromUD=True,
                JetVertexFraction_FillFullJVF=True,
                JetTag_SoftMuonChi2InfoMuonAssoc_target="mu_staco_",
                allowMissing=True))

    #alg += ExtendedJetD3PDObject              (**_args ( 3, 'AntiKt6LCTopoJets', kw,
    #                                             sgkey='AntiKt6LCTopoNewJets', prefix='jet_AntiKt6LCTopo_',
    #                                             include = jetIncludeALL_LC+['SplitInfo'],
    #                                             exclude = jetExclude,
    #                                             JetVertexFraction_FromUD=True,
    #                                             JetVertexFraction_FillFullJVF=True,
    #                                             allowMissing = True))

    alg += ExtendedJetD3PDObject(
        **_args(2,
                'JetElectronContainer90',
                kw,
                sgkey='JetElectronContainer90',
                prefix='eljet_',
                include=flags.eljetInclude(),
                exclude=[
                    'Constituents', 'ConstituentScale', 'JetShape', 'WIDTH',
                    'DQMoments', 'ActiveArea', 'OriginCorrection'
                ],
                allowMissing=True))

    ### add the MSV block
    MSVJetCollections = []
    MSVJetCollections += ['AntiKt4TopoEMNewJets', 'AntiKt4LCTopoNewJets'
                          ]  #, 'AntiKt6LCTopoNewJets', 'AntiKt6TopoEMNewJets']

    ### link multisv to tracks
    if not kw.has_key('msvvtxinfo_JetTag_JetMultiSVVtxAssoc_target'):
        kw['msvvtxinfo_JetTag_JetMultiSVVtxAssoc_target'] = "trk"
    #from JetTagD3PDMaker.JetTagMSVVtxInJetD3PDObject import getJetTagMSVVtxInfoInJetD3PDObject
    alg += getJetTagMSVVtxInfoInJetD3PDObject(
        **_args(1, "msvvtxinfo", kw, jetCollections=MSVJetCollections))

    # add TwoTrackVertex object
    alg += getJetTagTwoTrackVertexD3PDObject(level=0,
                                             jetCollections=MSVJetCollections)

    if rec.doTruth():
        AddConstitTruthIndex(ExtendedJetD3PDObject,
                             typename='TruthParticle',
                             target='mc_',
                             level=99)

# below all for QCD group

#TopoJets (EM, GCW)

# lowPt jets
    if flags.doRecJet() and flags.doTopoEMLowPtJet() and objKeyStore.isInInput(
            "CaloClusterContainer", "CaloCalTopoCluster"):
        alg += ExtendedJetD3PDObject(
            **_args(flags.smallJetLevel(),
                    'AntiKt4TopoEMLowPt',
                    kw,
                    prefix='jet_AntiKt4TopoEMLowPt_',
                    sgkey='AntiKt4TopoEMLowPtJets',
                    include=jetInclude,
                    exclude=jetExclude,
                    JetVertexFraction_FromUD=True,
                    JetVertexFraction_FillFullJVF=True))

        #alg += ExtendedJetD3PDObject (**_args(flags.smallJetLevel(), 'AntiKt6TopoEMLowPt', kw, prefix = 'jet_AntiKt6TopoEMLowPt_', sgkey = 'AntiKt6TopoEMLowPtJets',
        #                              include = jetInclude, exclude = jetExclude, JetVertexFraction_FromUD=True,
        #                              JetVertexFraction_FillFullJVF=True))

    # Tower Jets (EM)
    if flags.doTowerJet() and rec.readAOD():
        #alg += ExtendedJetD3PDObject (**_args(flags.towerJetLevel(), 'AntiKt6Tower', kw, prefix = 'jet_AntiKt6Tower_', sgkey = 'AntiKt6TowerAODJets',
        #                              include = jetIncludeTower, exclude = jetExclude, JetVertexFraction_FromUD=True, JetVertexFraction_FillFullJVF=True))
        pass

    # additional: TowerEM
    if not rec.readAOD() and flags.doRecJet() and flags.doTowerEMJet():
        alg += ExtendedJetD3PDObject(
            **_args(flags.towerJetLevel(),
                    'AntiKt4TowerEM',
                    kw,
                    prefix='jet_AntiKt4TowerEMNew_',
                    sgkey='AntiKt4TowerEMNewJets',
                    include=jetIncludeTower,
                    exclude=jetExclude,
                    JetVertexFraction_FromUD=True,
                    JetVertexFraction_FillFullJVF=True))
        #alg += ExtendedJetD3PDObject (**_args(flags.towerJetLevel(), 'AntiKt6TowerEM', kw, prefix = 'jet_AntiKt6TowerEMNew_', sgkey = 'AntiKt6TowerEMNewJets',
        #                              include = jetIncludeTower, exclude = jetExclude, JetVertexFraction_FromUD=True, JetVertexFraction_FillFullJVF=True))

    # additional: LCTopo addional R-sizes
    if flags.doRecJet() and flags.doLCTopoJet() and objKeyStore.isInInput(
            "CaloClusterContainer", "CaloCalTopoCluster"):
        alg += ExtendedJetD3PDObject(
            **_args(flags.smallJetLevel(),
                    'AntiKt5LCTopo',
                    kw,
                    prefix='jet_AntiKt5LCTopo_',
                    sgkey='AntiKt5LCTopoNewJets',
                    include=btagging_blocks,
                    exclude=jetExclude + ['DQMoments'],
                    JetVertexFraction_FromUD=True,
                    JetVertexFraction_FillFullJVF=True))
        #alg += ExtendedJetD3PDObject (**_args(flags.smallJetLevel(), 'AntiKt7LCTopo', kw, prefix = 'jet_AntiKt7LCTopo_', sgkey = 'AntiKt7LCTopoNewJets',
        #                              exclude = jetExclude+['DQMoments'], JetVertexFraction_FromUD=True, JetVertexFraction_FillFullJVF=True))
        alg += ExtendedJetD3PDObject(
            **_args(flags.smallJetLevel(),
                    'AntiKt2LCTopo',
                    kw,
                    prefix='jet_AntiKt2LCTopo_',
                    sgkey='AntiKt2LCTopoNewJets',
                    exclude=jetExclude + ['DQMoments'],
                    JetVertexFraction_FromUD=True,
                    JetVertexFraction_FillFullJVF=True))
        alg += ExtendedJetD3PDObject(
            **_args(flags.smallJetLevel(),
                    'AntiKt3LCTopo',
                    kw,
                    prefix='jet_AntiKt3LCTopo_',
                    sgkey='AntiKt3LCTopoNewJets',
                    exclude=jetExclude + ['DQMoments'],
                    JetVertexFraction_FromUD=True,
                    JetVertexFraction_FillFullJVF=True))

    # additional: LCTopoLowPt
    if flags.doRecJet() and flags.doLCTopoLowPtJet() and objKeyStore.isInInput(
            "CaloClusterContainer", "CaloCalTopoCluster"):
        alg += ExtendedJetD3PDObject(
            **_args(flags.smallJetLevel(),
                    'AntiKt4LCTopoLowPt',
                    kw,
                    prefix='jet_AntiKt4LCTopoLowPt_',
                    sgkey='AntiKt4LCTopoLowPtJets',
                    include=jetIncludeLC,
                    exclude=jetExclude,
                    JetVertexFraction_FromUD=True,
                    JetVertexFraction_FillFullJVF=True))

        #alg += ExtendedJetD3PDObject (**_args(flags.smallJetLevel(), 'AntiKt6LCTopoLowPt', kw, prefix = 'jet_AntiKt6LCTopoLowPt_', sgkey = 'AntiKt6LCTopoLowPtJets',
        #                              include = jetIncludeLC, exclude = jetExclude, JetVertexFraction_FromUD=True, JetVertexFraction_FillFullJVF=True))

    # additional: LCTopo CB
    if flags.doRecJet() and flags.doLCTopoCBJet() and objKeyStore.isInInput(
            "CaloClusterContainer", "CaloCalTopoCluster"):
        alg += ExtendedJetD3PDObject(
            **_args(flags.smallJetLevel(),
                    'AntiKt4LCTopoCB',
                    kw,
                    prefix='jet_AntiKt4LCTopoCB_',
                    sgkey='AntiKt4LCTopoCBJets',
                    include=jetIncludeLC,
                    exclude=jetExclude,
                    JetVertexFraction_FromUD=True,
                    JetVertexFraction_FillFullJVF=True))

        #alg += ExtendedJetD3PDObject (**_args(flags.smallJetLevel(), 'AntiKt6LCTopoCB', kw, prefix = 'jet_AntiKt6LCTopoCB_', sgkey = 'AntiKt6LCTopoCBJets',
        #                              include = jetIncludeLC, exclude = jetExclude, JetVertexFraction_FromUD=True, JetVertexFraction_FillFullJVF=True))

    # GhostJets
    if ((not flags.doRecJet())
            or flags.doRecJetOnlyAdditional()) and rec.readAOD():
        if flags.doGhostJet():
            #alg += ExtendedJetD3PDObject (**_args(0, 'AntiKt6GhostTower', kw, prefix = 'jet_AntiKt6GhostTower_', sgkey = 'AntiKt6GhostTowerAODJets',
            #                              include = jetIncludeTower, exclude = jetExclude))
            pass
    else:
        if not rec.readAOD() and flags.doRecJet() and flags.doGhostJet():
            alg += ExtendedJetD3PDObject(
                **_args(0,
                        'AntiKt4GhostTowerNew',
                        kw,
                        prefix='jet_AntiKt4GhostTowerNew_',
                        sgkey='AntiKt4GhostTowerNewJets',
                        include=jetIncludeTower,
                        exclude=jetExclude))

            #alg += ExtendedJetD3PDObject (**_args(0, 'AntiKt6GhostTowerNew', kw, prefix = 'jet_AntiKt6GhostTowerNew_', sgkey = 'AntiKt6GhostTowerNewJets',
            #                              include = jetIncludeTower, exclude = jetExclude))

    # TrackJets

    trackjets_btag_include = btagging_blocks
    jetExcludeTrack = jetExclude[:]
    #jetExcludeTrack += ['JetSamplingsFrac','EMFraction','ActiveArea','JES','JESMoments','EMScale']

    AddConstitIndex(ExtendedJetD3PDObject,
                    typename='Rec::TrackParticle',
                    target='trk',
                    level=99)
    if flags.doRecJet() and flags.doTrackJet():
        alg += ExtendedJetD3PDObject(
            **_args(0,
                    'AntiKt4Track',
                    kw,
                    prefix='jet_AntiKt4Track_',
                    sgkey='AntiKt4TrackJets',
                    include=jetIncludeTrack +
                    ['SplitInfo', 'substructureblocks'] +
                    trackjets_btag_include,
                    exclude=jetExcludeTrack,
                    JetVertexFraction_FromUD=False,
                    JetVertexFraction_FillFullJVF=False))

        #alg += ExtendedJetD3PDObject (**_args(0, 'AntiKt6Track', kw, prefix = 'jet_AntiKt6Track_', sgkey = 'AntiKt6TrackJets',
        #                              include = jetIncludeTrack, exclude = jetExcludeTrack, JetVertexFraction_FromUD=False, JetVertexFraction_FillFullJVF=False))

        #alg += ExtendedJetD3PDObject (**_args(0, 'AntiKt5Track', kw, prefix = 'jet_AntiKt5Track_', sgkey = 'AntiKt5TrackJets',
        #                              include = jetIncludeTrack, exclude = jetExcludeTrack, JetVertexFraction_FromUD=False, JetVertexFraction_FillFullJVF=False))

        #alg += ExtendedJetD3PDObject (**_args(0, 'AntiKt7Track', kw, prefix = 'jet_AntiKt7Track_', sgkey = 'AntiKt7TrackJets',
        #                              include = jetIncludeTrack, exclude = jetExcludeTrack, JetVertexFraction_FromUD=False, JetVertexFraction_FillFullJVF=False))

        alg += ExtendedJetD3PDObject(
            **_args(0,
                    'AntiKt2Track',
                    kw,
                    prefix='jet_AntiKt2Track_',
                    sgkey='AntiKt2TrackJets',
                    include=jetIncludeTrack + trackjets_btag_include,
                    exclude=jetExcludeTrack,
                    JetVertexFraction_FromUD=False,
                    JetVertexFraction_FillFullJVF=False))

        alg += ExtendedJetD3PDObject(
            **_args(0,
                    'AntiKt3Track',
                    kw,
                    prefix='jet_AntiKt3Track_',
                    sgkey='AntiKt3TrackJets',
                    include=jetIncludeTrack + trackjets_btag_include,
                    exclude=jetExcludeTrack,
                    JetVertexFraction_FromUD=False,
                    JetVertexFraction_FillFullJVF=False))

        alg += ExtendedJetD3PDObject(
            **_args(0,
                    'Kt3Track',
                    kw,
                    prefix='jet_Kt3Track_',
                    sgkey='Kt3TrackJets',
                    include=jetIncludeTrack + trackjets_btag_include,
                    exclude=jetExcludeTrack,
                    JetVertexFraction_FromUD=False,
                    JetVertexFraction_FillFullJVF=False))

    # Truth
    if rec.doTruth():
        D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True)
        #if ( stdTruthParticleContainer != 'None'):
        #    alg += TruthParticleD3PDObject (**_args(1, 'TruthParticle', kw, sgkey = stdTruthParticleContainer, prefix='mcQCD_', exclude=['child_TruthParticleChildAssociation','parent_TruthParticleParentAssociation']))
        truthjetInclude = flags.truthJetInclude()
        truthjetInclude += [
            'TruthParticleNavigableConstituentAssociationTool', 'WIDTH'
        ]

        if flags.doTruthJet():
            if flags.doRecTruthJet():
                alg += ExtendedJetD3PDObject(
                    **_args(flags.truthJetLevel(),
                            'AntiKt4TruthNew',
                            kw,
                            sgkey='AntiKt4TruthNewJets',
                            prefix='AntiKt4Truth_',
                            include=truthjetInclude +
                            [JetTagD3PDKeys.TruthInfoBlockName()],
                            exclude=flags.truthJetExclude()))
                #alg += ExtendedJetD3PDObject (**_args(flags.truthJetLevel(), 'AntiKt6TruthNew', kw, sgkey='AntiKt6TruthNewJets', prefix='AntiKt6Truth_',
                #                              include=truthjetInclude, exclude=flags.truthJetExclude()))
                alg += ExtendedJetD3PDObject(
                    **_args(flags.truthJetLevel(),
                            'AntiKt4TruthWithNu',
                            kw,
                            sgkey='AntiKt4TruthWithNuJets',
                            prefix='AntiKt4TruthWithNu_',
                            include=truthjetInclude,
                            exclude=flags.truthJetExclude()))
                #alg += ExtendedJetD3PDObject (**_args(flags.truthJetLevel(), 'AntiKt6TruthWithNu', kw, sgkey='AntiKt6TruthWithNuJets', prefix='AntiKt6TruthWithNu_',
                #                              include=truthjetInclude, exclude=flags.truthJetExclude()))
                alg += ExtendedJetD3PDObject(
                    **_args(flags.truthJetLevel(),
                            'AntiKt4TruthWithMuNu',
                            kw,
                            sgkey='AntiKt4TruthWithMuNuJets',
                            prefix='AntiKt4TruthWithMuNu_',
                            include=truthjetInclude,
                            exclude=flags.truthJetExclude()))
                #alg += ExtendedJetD3PDObject (**_args(flags.truthJetLevel(), 'AntiKt6TruthWithMuNu', kw, sgkey='AntiKt6TruthWithMuNuJets', prefix='AntiKt6TruthWithMuNu_',
                #                              include=truthjetInclude, exclude=flags.truthJetExclude()))
                alg += ExtendedJetD3PDObject(
                    **_args(flags.truthJetLevel(),
                            'AntiKt4TruthWithMu',
                            kw,
                            sgkey='AntiKt4TruthWithMuJets',
                            prefix='AntiKt4TruthWithMu_',
                            include=truthjetInclude,
                            exclude=flags.truthJetExclude()))
                #alg += ExtendedJetD3PDObject (**_args(flags.truthJetLevel(), 'AntiKt6TruthWithMu', kw, sgkey='AntiKt6TruthWithMuJets', prefix='AntiKt6TruthWithMu_',
                #                              include=truthjetInclude, exclude=flags.truthJetExclude()))

                alg += ExtendedJetD3PDObject(
                    **_args(flags.truthJetLevel(),
                            'AntiKt5TruthNew',
                            kw,
                            sgkey='AntiKt5TruthNewJets',
                            prefix='AntiKt5Truth_',
                            include=truthjetInclude,
                            exclude=flags.truthJetExclude()))
                #alg += ExtendedJetD3PDObject (**_args(flags.truthJetLevel(), 'AntiKt7TruthNew', kw, sgkey='AntiKt7TruthNewJets', prefix='AntiKt7Truth_',
                #                              include=truthjetInclude, exclude=flags.truthJetExclude()))
                alg += ExtendedJetD3PDObject(
                    **_args(flags.truthJetLevel(),
                            'AntiKt5TruthWithNu',
                            kw,
                            sgkey='AntiKt5TruthWithNuJets',
                            prefix='AntiKt5TruthWithNu_',
                            include=truthjetInclude,
                            exclude=flags.truthJetExclude()))
                #alg += ExtendedJetD3PDObject (**_args(flags.truthJetLevel(), 'AntiKt7TruthWithNu', kw, sgkey='AntiKt7TruthWithNuJets', prefix='AntiKt7TruthWithNu_',
                #                              include=truthjetInclude, exclude=flags.truthJetExclude()))
                alg += ExtendedJetD3PDObject(
                    **_args(flags.truthJetLevel(),
                            'AntiKt5TruthWithMuNu',
                            kw,
                            sgkey='AntiKt5TruthWithMuNuJets',
                            prefix='AntiKt5TruthWithMuNu_',
                            include=truthjetInclude,
                            exclude=flags.truthJetExclude()))
                #alg += ExtendedJetD3PDObject (**_args(flags.truthJetLevel(), 'AntiKt7TruthWithMuNu', kw, sgkey='AntiKt7TruthWithMuNuJets', prefix='AntiKt7TruthWithMuNu_',
                #                              include=truthjetInclude, exclude=flags.truthJetExclude()))
                alg += ExtendedJetD3PDObject(
                    **_args(flags.truthJetLevel(),
                            'AntiKt5TruthWithMu',
                            kw,
                            sgkey='AntiKt5TruthWithMuJets',
                            prefix='AntiKt5TruthWithMu_',
                            include=truthjetInclude,
                            exclude=flags.truthJetExclude()))
                #alg += ExtendedJetD3PDObject (**_args(flags.truthJetLevel(), 'AntiKt7TruthWithMu', kw, sgkey='AntiKt7TruthWithMuJets', prefix='AntiKt7TruthWithMu_',
                #                              include=truthjetInclude, exclude=flags.truthJetExclude()))

                alg += ExtendedJetD3PDObject(
                    **_args(flags.truthJetLevel(),
                            'AntiKt2TruthNew',
                            kw,
                            sgkey='AntiKt2TruthNewJets',
                            prefix='AntiKt2Truth_',
                            include=truthjetInclude,
                            exclude=flags.truthJetExclude()))
                alg += ExtendedJetD3PDObject(
                    **_args(flags.truthJetLevel(),
                            'AntiKt3TruthNew',
                            kw,
                            sgkey='AntiKt3TruthNewJets',
                            prefix='AntiKt3Truth_',
                            include=truthjetInclude,
                            exclude=flags.truthJetExclude()))
                alg += ExtendedJetD3PDObject(
                    **_args(flags.truthJetLevel(),
                            'AntiKt2TruthWithNu',
                            kw,
                            sgkey='AntiKt2TruthWithNuJets',
                            prefix='AntiKt2TruthWithNu_',
                            include=truthjetInclude,
                            exclude=flags.truthJetExclude()))
                alg += ExtendedJetD3PDObject(
                    **_args(flags.truthJetLevel(),
                            'AntiKt3TruthWithNu',
                            kw,
                            sgkey='AntiKt3TruthWithNuJets',
                            prefix='AntiKt3TruthWithNu_',
                            include=truthjetInclude,
                            exclude=flags.truthJetExclude()))
                alg += ExtendedJetD3PDObject(
                    **_args(flags.truthJetLevel(),
                            'AntiKt2TruthWithMuNu',
                            kw,
                            sgkey='AntiKt2TruthWithMuNuJets',
                            prefix='AntiKt2TruthWithMuNu_',
                            include=truthjetInclude,
                            exclude=flags.truthJetExclude()))
                alg += ExtendedJetD3PDObject(
                    **_args(flags.truthJetLevel(),
                            'AntiKt3TruthWithMuNu',
                            kw,
                            sgkey='AntiKt3TruthWithMuNuJets',
                            prefix='AntiKt3TruthWithMuNu_',
                            include=truthjetInclude,
                            exclude=flags.truthJetExclude()))
                alg += ExtendedJetD3PDObject(
                    **_args(flags.truthJetLevel(),
                            'AntiKt2TruthWithMu',
                            kw,
                            sgkey='AntiKt2TruthWithMuJets',
                            prefix='AntiKt2TruthWithMu_',
                            include=truthjetInclude,
                            exclude=flags.truthJetExclude()))
                alg += ExtendedJetD3PDObject(
                    **_args(flags.truthJetLevel(),
                            'AntiKt3TruthWithMu',
                            kw,
                            sgkey='AntiKt3TruthWithMuJets',
                            prefix='AntiKt3TruthWithMu_',
                            include=truthjetInclude,
                            exclude=flags.truthJetExclude()))

                # truth WZ jets
                alg += JetD3PDObject(**_args(1,
                                             'AK4TruthJetWZ',
                                             kw,
                                             sgkey='AntiKt4TruthJets_WZ',
                                             prefix='jet_AntiKt4TruthWZ_',
                                             allowMissing=True))

        if flags.doTruthPileupJet():
            if objKeyStore.isInInput("JetCollection",
                                     "InTimeAntiKt4TruthJets"):
                alg += ExtendedJetD3PDObject(
                    **_args(flags.truthJetLevel(),
                            'InTimeAntiKt4Truth',
                            kw,
                            sgkey='InTimeAntiKt4TruthJets',
                            prefix='InTimeAntiKt4Truth_',
                            include=truthjetInclude,
                            exclude=flags.truthJetExclude()))
            if objKeyStore.isInInput("JetCollection",
                                     "OutOfTimeAntiKt4TruthJets"):
                alg += ExtendedJetD3PDObject(
                    **_args(flags.truthJetLevel(),
                            'OutOfTimeAntiKt4Truth',
                            kw,
                            sgkey='OutOfTimeAntiKt4TruthJets',
                            prefix='OutOfTimeAntiKt4Truth_',
                            include=truthjetInclude,
                            exclude=flags.truthJetExclude()))
            pass

    return alg
Exemple #28
0
def trackIsolationTool(name,
                       doTrackIsolation=False,
                       doSumConversionTracks=True,
                       trackParticleCollection='TrackParticleCandidate',
                       conversionContainer='ConversionCandidate',
                       calorimeterCellContainer=None,
                       onlyEM=False,
                       coreDeltaR=0.05,
                       trackToVertexTool=None,
                       trackSummaryTool=None,
                       extrapolator=None,
                       trackSelector=None,
                       pTMin=1000 * MeV,
                       IPd0Max=10.0 * mm,
                       IPz0Max=10.0 * mm,
                       z0Max=10.0 * mm,
                       useTrackSummaryInfo=True,
                       nHitBLayer=0,
                       nHitPix=0,
                       nHitBLayerPlusPix=0,
                       nHitSct=0,
                       nHitSi=4,
                       nHitTrt=0,
                       useTrackQualityInfo=False,
                       **kw):

    from AthenaCommon.AppMgr import ToolSvc

    if calorimeterCellContainer == None:
        calorimeterCellContainer = \
          'AODCellContainer' if rec.readAOD() else 'AllCalo'

    if trackToVertexTool == None:
        from TrackToVertex.TrackToVertexConf import Reco__TrackToVertex
        trackToVertexTool = Reco__TrackToVertex()
        ToolSvc += trackToVertexTool

    if trackSummaryTool == None:
        from TrkTrackSummaryTool.AtlasTrackSummaryTool import AtlasTrackSummaryTool
        trackSummaryTool = AtlasTrackSummaryTool()
        ToolSvc += trackSummaryTool

    if extrapolator == None:
        from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
        extrapolator = AtlasExtrapolator()
        ToolSvc += extrapolator

    if trackSelector == None:
        selname = name + 'TrackSelector'
        from AthenaCommon.BeamFlags import jobproperties
        if (jobproperties.Beam.beamType() == 'cosmics'
                or jobproperties.Beam.beamType() == 'singlebeam'):

            trackSelector = InDet__InDetDetailedTrackSelectorTool(
                name=selname,
                pTMin=0 * MeV,
                IPd0Max=9999 * mm,
                IPz0Max=9999 * mm,
                z0Max=9999 * mm,
                useTrackSummaryInfo=False,
                useTrackQualityInfo=False,
                TrackSummaryTool=trackSummaryTool,
                Extrapolator=extrapolator)
        else:
            trackSelector = InDet__InDetDetailedTrackSelectorTool(
                name=selname,
                pTMin=pTMin,
                IPd0Max=IPd0Max,
                IPz0Max=IPz0Max,
                z0Max=z0Max,
                useTrackSummaryInfo=useTrackSummaryInfo,
                nHitBLayer=nHitBLayer,
                nHitPix=nHitPix,
                nHitBLayerPlusPix=nHitBLayerPlusPix,
                nHitSct=nHitSct,
                nHitSi=nHitSi,
                nHitTrt=nHitTrt,
                useTrackQualityInfo=useTrackQualityInfo,
                TrackSummaryTool=trackSummaryTool,
                Extrapolator=extrapolator,
                **kw)
        ToolSvc += trackSelector

    tool = TrackIsolationTool(name,
                              DoTrackIsolation=doTrackIsolation,
                              DoSumConversionTracks=doSumConversionTracks,
                              TrackParticleCollection=trackParticleCollection,
                              ConversionContainer=conversionContainer,
                              CaloCellContainer=calorimeterCellContainer,
                              OnlyEM=onlyEM,
                              CoreDeltaR=coreDeltaR,
                              ExtrapolTrackToCaloTool=ToolSvc.TrackInCaloTools,
                              TrackToVertex=trackToVertexTool,
                              TrackSelector=trackSelector)
    ToolSvc += tool
    return tool
Exemple #29
0
                '/castor/cern.ch/grid/atlas/DAQ/2008/87863/physics_BPTX/daq.NoTag.0087863.physics.BPTX.LB0000.SFO-1._0001.data'
            ])
            # Detector description #jamie, use version with field (even though solenoid is off)

            globalflags.DetDescrVersion.set_Value_and_Lock(
                'ATLAS-GEO-04-00-00')
            globalflags.ConditionsTag.set_Value_and_Lock('COMCOND-REPC-001-00')
            # for running over data with field on need this to be setto true
            from AthenaCommon.BFieldFlags import jobproperties
            jobproperties.BField.solenoidOn.set_Value_and_Lock(False)
            jobproperties.BField.barrelToroidOn.set_Value_and_Lock(True)
            jobproperties.BField.endcapToroidOn.set_Value_and_Lock(True)

        globalflags.InputFormat.set_Value_and_Lock('bytestream')

    if rec.readAOD():
        if rec.readTAG():
            raise "Cannot have both readAOD and readTAG true"
        athenaCommonFlags.PoolAODInput.set_Value_and_Lock(
            ["../cosm/myAOD.pool.root"])
        rec.doWriteAOD = False
        rec.doWriteESD = False

    if rec.readESD():  #lxplus225
        ####L1CaloEM
        # this is ignored if tags are read
        athenaCommonFlags.PoolESDInput.set_Value_and_Lock(
            ["../cosm/myESD.pool.root"])
        rec.doWriteESD = False

    if rec.readESD() or rec.readAOD():
Exemple #30
0
from AthenaCommon.GlobalFlags import globalflags

from RecExConfig.RecFlags import rec

if globalflags.InputFormat=='bytestream' or (not  TriggerFlags.doLVL1()):
    CBNT_AthenaAware.Members += ["LVL1::CBNTAA_LVL1CaloESD/CBNT_LVL1calo"]
elif (rec.readESD() or rec.readAOD()):
    CBNT_AthenaAware.Members += ["LVL1::CBNTAA_LVL1CaloESD/CBNT_LVL1calo"]
elif (rec.readRDO() and TriggerFlags.doLVL1()):
    CBNT_AthenaAware.Members += [ "LVL1::CBNTAA_LVL1calo/CBNT_LVL1calo" ]
elif ( jobproperties.CaloCellFlags.doFastCaloSim() and TriggerFlags.doLVL1()):
    CBNT_AthenaAware.Members += [ "LVL1::CBNTAA_LVL1calo/CBNT_LVL1calo" ]
       
CBNT_AthenaAware.Members += [ "CBNTAA_ReadRoIBResult/CBNT_ReadRoIBResult" ]

#CBNTAthenaAware=True
include( "CBNT_Athena/CBNT_AthenaAware_jobOptions.py" )
include( "CBNT_Athena/CBNT_EventInfo_jobOptions.py" )
if rec.Commissioning:
    from AthenaMonitoring.DQMonFlags import DQMonFlags
    if DQMonFlags.doCTPMon():
        include ("TrigT1CTMonitoring/NtupleFragment.py")
    if DQMonFlags.doLVL1CaloMon(): 
        include( "TrigT1CaloCalibTools/CBNT_L1Calo_jobOptions.py" ) 
else:
    doL1CaloCBNT_JEM = False
    doL1CaloCBNT_CPM = False
    doL1CaloCBNT_RODHeader = False
    include( "TrigT1CaloCalibTools/CBNT_L1Calo_jobOptions.py" ) 

    include("TrigNtInDet/jobOfragment_TrigNtInDet.py")
Exemple #31
0
    def configure(self):
        mlog = logging.getLogger('METRefGetter::configure:')
        mlog.info('entering')

        # now configure the algorithm
        try:
            from MissingET.MissingETConf import METRefinedAlgorithm
            theMETRefAlg = METRefinedAlgorithm("METRefAlg")

            from RecExConfig.RecFlags import rec
            if rec.readAOD():
                theMETRefAlg.UseCells = False
            else:
                theMETRefAlg.UseCells = True
        except:
            mlog.error("could not import MissingET.METRefAlg")
            mlog.error(traceback.format_exc())
            return False
#------------------------------------------------------------------------------------------------
# configure the tools: METRefinedEleTool => calibrator Tool for ATLFASTII

        try:
            from MissingET.MissingETConf import METRefinedEleTool
            theMETRefinedEleTool = METRefinedEleTool("METRefEle")
            # refEleTool = theMETRefinedEleTool.getHandle()
            if rec.readAOD():
                theMETRefinedEleTool.EleInputCollectionKey = "modElectronCollection"  #"ElectronAODCollection"
            else:
                theMETRefinedEleTool.EleInputCollectionKey = "ElectronCollection"
            theMETRefinedEleTool.isEM = 0
            theMETRefinedEleTool.ElectronEtCut = 10.0 * GeV
            theMETRefinedEleTool.CalibType = "EmScale"  # H1 or EmScale or KFact or RefCalib
            # if doFastCaloSim set calibrator tool for ATLFAST2
            from CaloRec.CaloCellFlags import jobproperties
            if jobproperties.CaloCellFlags.doFastCaloSim:
                doAtlfastII = True
            else:
                doAtlfastII = False

            cellcalibtool = getStandardCalibTool(doAtlfastII)
            calibtool_name = cellcalibtool.name()
            theMETRefinedEleTool.CalibToolName = 'H1WeightToolCSC12Generic/' + calibtool_name

            theMETRefinedEleTool.BackNavigationTo = "Cell"  # to "Cell"
            theMETRefinedEleTool.MissingETOutKey = "MET_RefEle"
            print("******************* key = " +
                  theMETRefinedEleTool.MissingETOutKey)
            #-----------------
            from MissingET.MissingETConf import METClusterResolverTool
            theMETEleResolver = METClusterResolverTool("EleResolve")
            theMETEleResolver.ReferenceClusterContainer = "CaloCalTopoCluster"
            theMETRefinedEleTool.ClusterResolverTool = theMETEleResolver.getFullName(
            )

            #------------------------------------------------------------------------------------
            theMETRefinedGammaTool = METRefinedEleTool("METRefGamma")
            if rec.readAOD():
                theMETRefinedGammaTool.EleInputCollectionKey = "PhotonAODCollection"
            else:
                theMETRefinedGammaTool.EleInputCollectionKey = "PhotonCollection"
            theMETRefinedGammaTool.isEM = 0
            theMETRefinedGammaTool.ElectronEtCut = 10.0 * GeV
            theMETRefinedGammaTool.CalibType = "EmScale"  # H1 or EmScale or KFact or RefCalib
            from CaloRec.CaloCellFlags import jobproperties
            if jobproperties.CaloCellFlags.doFastCaloSim:
                doAtlfastII = True
            else:
                doAtlfastII = False
            cellcalibtool = getStandardCalibTool(doAtlfastII)
            calibtool_name = cellcalibtool.name()
            theMETRefinedGammaTool.CalibToolName = 'H1WeightToolCSC12Generic/' + calibtool_name

            theMETRefinedGammaTool.BackNavigationTo = "Cell"  # to "Cell"
            theMETRefinedGammaTool.MissingETOutKey = "MET_RefGamma"
            #-----------------
            theMETGammaResolver = METClusterResolverTool("GammaResolve")
            theMETGammaResolver.ReferenceClusterContainer = "CaloCalTopoCluster"
            theMETRefinedGammaTool.ClusterResolverTool = theMETGammaResolver.getFullName(
            )

        except:
            mlog.error("could not get handle to METRefinedEleTool Quit")
            mlog.error(traceback.format_exc())
            return False

# add cellcalibtool
        theMETRefinedEleTool += cellcalibtool
        theMETRefinedEleTool += theMETEleResolver
        theMETRefinedGammaTool += cellcalibtool
        theMETRefinedGammaTool += theMETGammaResolver

        # add the METRefinedEleTool to list of tools
        theMETRefAlg.AlgTools += [theMETRefinedEleTool.getFullName()]
        theMETRefAlg.AlgTools += [theMETRefinedGammaTool.getFullName()]

        # add tools to alg
        theMETRefAlg += theMETRefinedEleTool
        theMETRefAlg += theMETRefinedGammaTool
        #theMETRefAlg.OutputLevel = DEBUG

        ## NEUTRINOFICATION
        #------------------------------------------------------------------------------------------------
        # configure the tools: METRefinedEleNeutrinoTool => calibrator Tool for ATLFASTII

        try:
            from MissingET.MissingETConf import METRefinedEleTool
            theMETRefinedEleNueTool = METRefinedEleTool("METRefEleNue")
            # refEleTool = theMETRefinedEleTool.getHandle()
            if rec.readAOD():
                theMETRefinedEleNueTool.EleInputCollectionKey = "remElectronCollection"  #"ElectronAODCollection"
            else:
                theMETRefinedEleNueTool.EleInputCollectionKey = "ElectronCollection"
            theMETRefinedEleNueTool.isEM = 0
            theMETRefinedEleNueTool.ElectronEtCut = 10.0 * GeV
            theMETRefinedEleNueTool.CalibType = "EmScale"  # H1 or EmScale or KFact or RefCalib
            # if doFastCaloSim set calibrator tool for ATLFAST2
            from CaloRec.CaloCellFlags import jobproperties
            if jobproperties.CaloCellFlags.doFastCaloSim:
                doAtlfastII = True
            else:
                doAtlfastII = False

            cellcalibtool = getStandardCalibTool(doAtlfastII)
            calibtool_name = cellcalibtool.name()
            theMETRefinedEleNueTool.CalibToolName = 'H1WeightToolCSC12Generic/' + calibtool_name

            theMETRefinedEleNueTool.BackNavigationTo = "Cell"  # to "Cell"
            theMETRefinedEleNueTool.MissingETOutKey = "MET_RefEleNue"
            print("******************* key = " +
                  theMETRefinedEleNueTool.MissingETOutKey)
            #-----------------
            from MissingET.MissingETConf import METClusterResolverTool
            theMETEleResolver = METClusterResolverTool("EleResolve")
            theMETEleResolver.ReferenceClusterContainer = "CaloCalTopoCluster"
            theMETRefinedEleNueTool.ClusterResolverTool = theMETEleResolver.getFullName(
            )

#------------------------------------------------------------------------------------
        except:
            mlog.error(
                "NEUTRINOFICATION: could not get handle to METRefinedEleTool Quit"
            )
            mlog.error(traceback.format_exc())
            return False

# add cellcalibtool
        theMETRefinedEleNueTool += cellcalibtool
        theMETRefinedEleNueTool += theMETEleResolver

        # add the METRefinedEleTool to list of tools
        theMETRefAlg.AlgTools += [theMETRefinedEleNueTool.getFullName()]

        # add tools to alg
        theMETRefAlg += theMETRefinedEleNueTool
        #theMETRefAlg.OutputLevel = DEBUG

        #------------------------------------------------------------------------------------------------
        # configure tools: METRefinedTauTool => calibrator Tool for ATLFASTII
        if not rec.readAOD():
            try:
                from MissingET.MissingETConf import METRefinedTauTool
                theMETRefinedTauTool = METRefinedTauTool("METRefTau")

                theMETRefinedTauTool.TauInputCollectionKey = "TauRecContainer"  # or Tau1P3PContainer
                theMETRefinedTauTool.isTau = "Old"  # Tight, Medium, Loose
                theMETRefinedTauTool.CalibType = "H1"  # H1 or LocHad
                # if doFastCaloSim set calibrator tool for ATLFAST2
                from CaloRec.CaloCellFlags import jobproperties
                if jobproperties.CaloCellFlags.doFastCaloSim:
                    doAtlfastII = True
                else:
                    doAtlfastII = False

                cellcalibtool = getStandardCalibTool(doAtlfastII)
                calibtool_name = cellcalibtool.name()
                theMETRefinedTauTool.CalibToolName = 'H1WeightToolCSC12Generic/' + calibtool_name

                theMETRefinedTauTool.BackNavigationTo = "Topo"
                theMETRefinedTauTool.Cell2ClusterMapKey = "CaloCell2TopoCluster"
                theMETRefinedTauTool.MissingETOutKey = "MET_RefTau"

            except:
                mlog.error("could not get handle to METRefinedTauTool Quit")
                mlog.error(traceback.format_exc())
                return False

# add cellcalibtool
            theMETRefinedTauTool += cellcalibtool

            # add  METRefinedTauTool to list of tools
            theMETRefAlg.AlgTools += [theMETRefinedTauTool.getFullName()]

            # add tools to alg
            theMETRefAlg += theMETRefinedTauTool

        #------------------------------------------------------------------------------------------------
        # configure tools: METRefinedJetTool => calibrator Tool for ATLFASTII
        try:
            from MissingET.MissingETConf import METRefinedJetTool
            theMETRefinedJetTool = METRefinedJetTool("METRefJet")
            if rec.readAOD():
                theMETRefinedJetTool.JetInputCollectionKey = "Cone4LCTopoJets"  # or "Cone4CalTowerJets","Cone4H1TopoJets"
                theMETRefinedJetTool.JetPtCut = 5.0 * GeV  # cut on jet pt
                theMETRefinedJetTool.CalibType = "LocHad"  # H1 or LocHad
                theMETRefinedJetTool.MissingETOutKey = "MET_RefJet"
            else:
                theMETRefinedJetTool.JetInputCollectionKey = "Cone4H1TopoJets"  # or "Cone4CalTowerJets","Cone4H1TopoJets"
                theMETRefinedJetTool.JetPtCut = 5.0 * GeV  # cut on jet pt
                theMETRefinedJetTool.CalibType = "H1"  # H1 or LocHad
                theMETRefinedJetTool.BackNavigationTo = "Topo"  # to "Topo" or to "Cell"
                theMETRefinedJetTool.MissingETOutKey = "MET_RefJet"

# if doFastCaloSim set calibrator tool for ATLFAST2
            from CaloRec.CaloCellFlags import jobproperties
            if jobproperties.CaloCellFlags.doFastCaloSim:
                doAtlfastII = True
            else:
                doAtlfastII = False
            cellcalibtool = getStandardCalibTool(doAtlfastII)
            calibtool_name = cellcalibtool.name()
            theMETRefinedJetTool.CalibToolName = 'H1WeightToolCSC12Generic/' + calibtool_name

        except:
            mlog.error("could not get handle to METRefinedJetTool Quit")
            mlog.error(traceback.format_exc())
            return False

        # add cellcalibtool
        theMETRefinedJetTool += cellcalibtool

        # add METRefinedJetTool to list of tools
        theMETRefAlg.AlgTools += [theMETRefinedJetTool.getFullName()]

        # add tools to alg
        theMETRefAlg += theMETRefinedJetTool
        #------------------------------------------------------------------------------------------------
        # configure tools: METRefinedClusterTool => calibrator Tool for ATLFASTII
        try:
            from MissingET.MissingETConf import METRefinedClusterTool
            #
            # set it to True for MiniJet Calibration
            doMiniJets = False

            theMETRefinedClusterTool = METRefinedClusterTool("METRefCluster")
            if rec.readAOD():
                theMETRefinedClusterTool.ClusterInputCollectionKey = "CaloCalTopoCluster"
                theMETRefinedClusterTool.CalibType = "LocHad"
                theMETRefinedClusterTool.MissingETOutKey = "MET_CellOut"
            else:
                theMETRefinedClusterTool.ClusterInputCollectionKey = "CaloTopoCluster"
                theMETRefinedClusterTool.CalibType = "H1"  # H1 or LocHad
                theMETRefinedClusterTool.MissingETOutKey = "MET_CellOut"
                # if doFastCaloSim set calibrator tool for ATLFAST2
                from CaloRec.CaloCellFlags import jobproperties
                if jobproperties.CaloCellFlags.doFastCaloSim:
                    doAtlfastII = True
                else:
                    doAtlfastII = False
                cellcalibtool = getStandardCalibTool(doAtlfastII)
                calibtool_name = cellcalibtool.name()
                theMETRefinedClusterTool.CalibToolName = 'H1WeightToolCSC12Generic/' + calibtool_name
            if doMiniJets:
                theMETRefinedClusterTool.ClusterInputCollectionKey = "CaloTopoCluster"
                theMETRefinedClusterTool.CalibType = "MiniJet"
                theMETRefinedClusterTool.MissingETOutKey = "MET_CellOut"

                miniJetFinder = getMiniJetTool()
                miniJetCalibrator = getPionWeightTool()
                theMETRefinedClusterTool += miniJetFinder
                theMETRefinedClusterTool += miniJetCalibrator

        except:
            mlog.error("could not get handle to METRefinedClusterTool Quit")
            mlog.error(traceback.format_exc())
            return False

        # add cellcalibtool
        theMETRefinedClusterTool += cellcalibtool

        # add METRefinedClusterTool to list of tools
        theMETRefAlg.AlgTools += [theMETRefinedClusterTool.getFullName()]

        # add tools to alg
        theMETRefAlg += theMETRefinedClusterTool

        #------------------------------------------------------------------------------------------------
        # add algorithm to topSequence (this should always come at the end)

        # top alg
        from AthenaCommon.AlgSequence import AlgSequence
        topSequence = AlgSequence()

        mlog.info(" now adding to topSequence")
        topSequence.ZeeSequence += theMETRefAlg

        return True
Exemple #32
0
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
################################################################################
##
#@file DiTauRec_jobOptions.py
#
#@brief Main jobOption to setup DiTau reconstruction chain.
#
#@author Justin Griffiths, David Kirchmeier
################################################################################

#TODO: everything needed here?
from RecExConfig.RecFlags import rec
from AthenaCommon.BeamFlags import jobproperties
from AthenaCommon.GlobalFlags import globalflags
import AthenaCommon.SystemOfUnits as Units
from DiTauRec.DiTauRecFlags import jobproperties as ditaujp

# the DiTauBuilder
from DiTauRec.DiTauBuilder import DiTauBuilder
DiTauBuilder(use_cells= (not rec.readAOD()))