Exemple #1
0
def makeOnePath(path, isFastSim):
    """ given a path object, returns the python text to be written
    to a _cff.py file"""

    # name of the HLT path
    pathName = path.label_()

    # we currently exclude a few 'problematic' paths (for which we
    # don't have a full recipe how to produce a monitoring path
    # for them).
    #
    # we exclude paths which contain EDFilters which we don't know
    # how to handle in the DQM modules
    moduleCXXtypes = EgammaHLTValidationUtils.getCXXTypesOfPath(
        refProcess, path)
    # print >> sys.stderr,"module types:", moduleCXXtypes

    hasProblematicType = False

    for problematicType in [
            # this list was collected empirically
            'HLTEgammaTriggerFilterObjectWrapper',
            'EgammaHLTPhotonTrackIsolationProducersRegional',
    ]:

        if problematicType in moduleCXXtypes:
            print(msgPrefix + "SKIPPING PATH",
                  pathName,
                  "BECAUSE DON'T KNOW HOW TO HANDLE A MODULE WITH C++ TYPE",
                  problematicType,
                  file=sys.stderr)
            return None

    # print >> sys.stderr,msgPrefix, "adding E/gamma HLT dqm module for path",pathName

    dqmModuleName = pathName
    if isFastSim:
        dqmModuleName = dqmModuleName + "FastSim"

    dqmModuleName = dqmModuleName + "_DQM"

    # global dqmModule

    dqmModule = EgammaHLTValidationUtils.EgammaDQMModuleMaker(
        refProcess,
        pathName,
        thisCategoryData['genPid'],  # type of generated particle
        thisCategoryData['numGenerated']  # number of generated particles
    ).getResult()

    return dqmModuleName + " = " + repr(dqmModule)
Exemple #2
0
                        hasProblematicType = True
                        break

                if hasProblematicType:
                    continue

                ## print >> sys.stderr,msgPrefix, "adding E/gamma HLT dqm module for path",pathName

                dqmModuleName = pathName
                if isFastSim:
                    dqmModuleName = dqmModuleName + "FastSim"

                dqmModuleName = dqmModuleName + "_DQM"

                dqmModule = EgammaHLTValidationUtils.EgammaDQMModuleMaker(refProcess, pathName,
                                                                          thisCategoryData['genPid'],        # type of generated particle
                                                                          thisCategoryData['numGenerated']   # number of generated particles
                                                                          ).getResult()

                # add the module to the process object
                globals()[dqmModuleName] = dqmModule

                # and to the sequence
                validators.append(dqmModule)

            # end of loop over paths

            # if we don't do the following deletes, loading this configuration
            # will pick these variables up and add it to the process object...
            del path
            del dqmModule
Exemple #3
0
process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(-1))

#----------------------------------------
# add the modules we want to test
# (producing the DQM histograms)
#----------------------------------------

import HLTriggerOffline.Egamma.EgammaHLTValidationUtils as EgammaHLTValidationUtils

# a 'reference' process to take (and analyze) the HLT menu from
refProcess = cms.Process("REF")

refProcess.load("HLTrigger.Configuration.HLT_GRun_cff")
process.dqmModule = EgammaHLTValidationUtils.EgammaDQMModuleMaker(
    refProcess,
    pathToTest,
    11,  # type of generated particle
    1  # number of generated particles
).getResult()

del refProcess

process.dqmPath = cms.Path(

    # creates the sequence for requiring the number and type of generated particles
    EgammaHLTValidationUtils.makeGeneratedParticleAndFiducialVolumeFilter(
        process, 11, 1) * process.dqmModule)

#----------------------------------------
# E/gamma HLT specific DQM configuration
#----------------------------------------