Rerunning HLT

Complete: 1

Goal of the page

Demonstrate how to rerun the High Level Trigger on samples containing the RAW data tier

Contacts

Zoltan.Gecse@cernNOSPAMPLEASE.ch

Introduction

For High Level Trigger development, validation and studies it is frequently necessary to rerun the HLT process to obtain the intermediate trigger objects with a possibly new algorithm. The HLT process requires the presence of the RAW event content (e.g. GEN-SIM-RAW)

Job configuration

The standard way to obtain the job configuration is to use the cmsDriver.py script. It needs a conditions tag that can be obtained by looking at the RelVal samples of the corresponding CMSSW release. This is an example for CMSSW_3_3_1 release:
cmsrel CMSSW_3_3_1
cd CMSSW_3_3_1/src/
cmsenv
cmsDriver.py hlt -s HLT --processName=HLT2 --conditions=FrontierConditions_CMS.GlobalTag,STARTUP31X_V8::All --no_exec --python_filename rerunHLT.py --filein=dummy
Next, the obtained rerunHLT.py script needs to be edited to include an analyzer and probably to remove the OutputModule that would produce huge output files. Here is an example:
import FWCore.ParameterSet.Config as cms

process = cms.Process('HLT2')

# import of standard configurations
process.load('Configuration/StandardSequences/Services_cff')
process.load('FWCore/CMS.MessageService/MessageLogger_cfi')
process.load('Configuration/StandardSequences/MixingNoPileUp_cff')
process.load('Configuration/StandardSequences/GeometryExtended_cff')
process.load('Configuration/StandardSequences/CMS.MagneticField_38T_cff')
process.load('HLTrigger/Configuration/HLT_8E29_cff')
process.load('Configuration/StandardSequences/EndOfProcess_cff')
process.load('Configuration/StandardSequences/FrontierConditions_CMS.GlobalTag_cff')
process.load('Configuration/EventContent/EventContent_cff')

process.configurationMetadata = cms.untracked.PSet(
    version = cms.untracked.string('$Revision: 1.149 $'),
    annotation = cms.untracked.string('hlt nevts:1'),
    name = cms.untracked.string('PyReleaseValidation')
)
process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32(1)
)
process.options = cms.untracked.PSet(
    Rethrow = cms.untracked.vstring('ProductNotFound')
)
# Input source
process.source = cms.Source("PoolSource",
    fileNames = cms.untracked.vstring('dummy')
)

# Other statements
process.GlobalTag.globaltag = 'STARTUP31X_V8::All'

# Path and EndPath definitions
process.endjob_step = cms.Path(process.endOfProcess)
process.out_step = cms.EndPath(process.output)

process.load("HLTriggerOffline.HeavyFlavor.heavyFlavorValidationSequence_cff")
process.myPath = cms.Path(
  process.heavyFlavorValidationSequence
)

# Schedule definition
process.schedule = cms.Schedule()
process.schedule.extend(process.HLTSchedule)
process.schedule.extend([process.myPath,process.endjob_step,process.out_step])

CRAB configuration

Here is an example crab config for a two-file solution
[CRAB]
jobtype = cmssw
scheduler = glite
server_name = bari

[CMSSW]
datasetpath = /BtoJPsiMuMuTight/Summer09-MC_31X_V3_7TeV_preproduction-v1/GEN-SIM-RECO
use_parent = 1
pset = rerunHLT.py
total_number_of_events = 100000
number_of_jobs = 50
output_file = output.root

[USER]
return_data = 1
copy_data = 0

Reversed workflow, RECO then HLT

The first step, reconstruct with ideal conditions:

cmsDriver.py SingleMuPt100.cfi -s GEN,SIM,DIGI,L1,DIGI2RAW,RAW2DIGI,L1Reco,RECO -n 10 --conditions MC_31X_V9::All --datatier GEN-SIM-RAW-RECO --eventcontent FEVTSIM --no_exec --python_filename RelValSingleMuPt100_MC_31X_V9.py
The second step, run the 1E31 HLT menu:
cmsDriver.py SingleMuPt100.cfi -s HLT -n -1 --conditions MC_31X_V9::All --no_exec --python_filename RelValSingleMuPt100_MC_31X_V9_HLT.py --filein=file:SingleMuPt100_cfi_GEN_SIM_DIGI_L1_DIGI2RAW_RAW2DIGI_L1Reco_RECO.root 
The second step, run the 8E29 HLT menu:
cmsDriver.py SingleMuPt100.cfi -s HLT -n -1 --conditions STARTUP31X_V8::All --no_exec --python_filename RelValSingleMuPt100_MC_31X_V9_HLT.py --filein=file:SingleMuPt100_cfi_GEN_SIM_DIGI_L1_DIGI2RAW_RAW2DIGI_L1Reco_RECO.root 

Jpsi Gun Sample

I have generated and reconstructed (step 1) 100K events with a single Jpsi gun flat in 0<pT<20 and |eta|<2.5 decaying to two muons without any cuts. /JpsiGun/zgecse-JpsiGun-e737f5250cdc5473d548e1b71c5440b0/USER Here is a config to run HLT on these file located on castor:

import FWCore.ParameterSet.Config as cms

process = cms.Process('HLT')

# import of standard configurations
process.load('Configuration/StandardSequences/Services_cff')
process.load('FWCore/CMS.MessageService/MessageLogger_cfi')
process.load('Configuration/StandardSequences/MixingNoPileUp_cff')
process.load('Configuration/StandardSequences/GeometryExtended_cff')
process.load('Configuration/StandardSequences/CMS.MagneticField_38T_cff')
process.load('HLTrigger/Configuration/HLT_8E29_cff')
process.load('Configuration/StandardSequences/EndOfProcess_cff')
process.load('Configuration/StandardSequences/FrontierConditions_CMS.GlobalTag_cff')
process.load('Configuration/EventContent/EventContent_cff')

process.configurationMetadata = cms.untracked.PSet(
    version = cms.untracked.string('$Revision: 1.151 $'),
    annotation = cms.untracked.string('JpsiGun_cff_py nevts:-1'),
    name = cms.untracked.string('PyReleaseValidation')
)
process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32(-1)
)
process.options = cms.untracked.PSet(
    Rethrow = cms.untracked.vstring('ProductNotFound')
)
# Input source
process.source = cms.Source("PoolSource",
    fileNames = cms.untracked.vstring(
'/store/caf/user/zgecse/JpsiGun/JpsiGun/e737f5250cdc5473d548e1b71c5440b0/JpsiGun_cff_py_GEN_SIM_DIGI_L1_DIGI2RAW_RAW2DIGI_
RECO_1.root',
'/store/caf/user/zgecse/JpsiGun/JpsiGun/e737f5250cdc5473d548e1b71c5440b0/JpsiGun_cff_py_GEN_SIM_DIGI_L1_DIGI2RAW_RAW2DIGI_
RECO_2.root',
'/store/caf/user/zgecse/JpsiGun/JpsiGun/e737f5250cdc5473d548e1b71c5440b0/JpsiGun_cff_py_GEN_SIM_DIGI_L1_DIGI2RAW_RAW2DIGI_
RECO_3.root',
'/store/caf/user/zgecse/JpsiGun/JpsiGun/e737f5250cdc5473d548e1b71c5440b0/JpsiGun_cff_py_GEN_SIM_DIGI_L1_DIGI2RAW_RAW2DIGI_
RECO_4.root',
'/store/caf/user/zgecse/JpsiGun/JpsiGun/e737f5250cdc5473d548e1b71c5440b0/JpsiGun_cff_py_GEN_SIM_DIGI_L1_DIGI2RAW_RAW2DIGI_
RECO_5.root',
'/store/caf/user/zgecse/JpsiGun/JpsiGun/e737f5250cdc5473d548e1b71c5440b0/JpsiGun_cff_py_GEN_SIM_DIGI_L1_DIGI2RAW_RAW2DIGI_
RECO_6.root',
'/store/caf/user/zgecse/JpsiGun/JpsiGun/e737f5250cdc5473d548e1b71c5440b0/JpsiGun_cff_py_GEN_SIM_DIGI_L1_DIGI2RAW_RAW2DIGI_
RECO_7.root',
'/store/caf/user/zgecse/JpsiGun/JpsiGun/e737f5250cdc5473d548e1b71c5440b0/JpsiGun_cff_py_GEN_SIM_DIGI_L1_DIGI2RAW_RAW2DIGI_
RECO_8.root',
'/store/caf/user/zgecse/JpsiGun/JpsiGun/e737f5250cdc5473d548e1b71c5440b0/JpsiGun_cff_py_GEN_SIM_DIGI_L1_DIGI2RAW_RAW2DIGI_
RECO_9.root',
'/store/caf/user/zgecse/JpsiGun/JpsiGun/e737f5250cdc5473d548e1b71c5440b0/JpsiGun_cff_py_GEN_SIM_DIGI_L1_DIGI2RAW_RAW2DIGI_
RECO_10.root'
    )
)

# Output definition
process.output = cms.OutputModule("PoolOutputModule",
    splitLevel = cms.untracked.int32(0),
    outputCommands = process.FEVTEventContent.outputCommands,
    fileName = cms.untracked.string('JpsiGun_cff_py_HLT.root'),
    dataset = cms.untracked.PSet(
        dataTier = cms.untracked.string('GEN-SIM-RAW-RECO'),
        filterName = cms.untracked.string('')
    )
)

# Additional output definition

# Other statements
process.GlobalTag.globaltag = 'STARTUP31X_V8::All'

# Path and EndPath definitions
process.endjob_step = cms.Path(process.endOfProcess)
process.out_step = cms.EndPath(process.output)

# Schedule definition
process.schedule = cms.Schedule()
process.schedule.extend(process.HLTSchedule)
process.schedule.extend([process.endjob_step,process.out_step])

Review status

Reviewer/Editor and Date (copy from screen) Comments
KatiLassilaPerini - 06 Feb 2007 created template page

Responsible:ZoltanGecse
Last reviewed by: Most recent reviewer

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r8 - 2010-02-09 - ZoltanGecse
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback