Ian Laflotte's Twiki Notes


Z+Jets MC MadGraph5_aMC@NLO (12.17.15)

Gridpack Generation

2jet max, 5-flavor, NLO grid pack takes awhile, use the grid+week long queue for the master job + subjobs. In a non CMSSW based area

git clone git@github.com:cms-sw/genproductions.git genproductions
cd genproductions/bin/MadGraph5_aMCatNLO/
./submit_gridpack_generation.sh 30000 30000 2nw dyellell012j_5f_NLO_FXFX cards/examples/dyellell012j_5f_NLO_FXFX 1nw
The output of the job when it's done is a tar.xz file. The CMSSW version + SCRAM_ARCH that the gridpack generation uses is important to note; these are CMSSW_7_1_20_patch3 and slc6_amd64_gcc481 as seen at the bottom of gridpack_generation.sh. I've been able not only to do the above grid pack generations, but also a version where it's done in three separate jet bins (0, 1, and 2 respectively).

LHE Event Generation (step 0)

LHE Events are MadGraph generated events without hadronization. They come in the .lhe format, which is basically just text/xml. To make these events, do

cmsrel CMSSW_7_1_20_patch3
export SCRAM_ARCH=slc6_amd64_gcc481
cd CMSSW_7_1_20_patch3/src
cmsenv
tar -xavf (path of gridpack creation)/dyellell012j_5f_NLO_FXFX_tarball.tar.xz
bash
./runcmsgrid.sh (NEvents) (RandomSeed) (NumberOfCPUs)
To start, I do 100 events, random seed 123, and use 2 CPUs.

Hadronizing With Pythia 8 (step 1)

Starting with a NEW CMSSW area

cmsrel CMSSW_7_1_20_patch3
export SCRAM_ARCH=slc6_amd64_gcc481
cd CMSSW_7_1_20_patch3/src
curl https://raw.githubusercontent.com/cms-sw/genproductions/master/python/ThirteenTeV/Hadronizer_TuneCUETP8M1_13TeV_aMCatNLO_FXFX_5f_max2j_LHE_pythia8_cff.py --create-dirs -o Configuration/GenProduction/python/ThirteenTeV/Hadronizer_TuneCUETP8M1_13TeV_aMCatNLO_FXFX_5f_max2j_LHE_pythia8_cff.py
scram b -j4
cmsDriver.py Configuration/GenProduction/python/ThirteenTeV/Hadronizer_TuneCUETP8M1_13TeV_aMCatNLO_FXFX_5f_max2j_LHE_pythia8_cff.py -s GEN --conditions auto:mc --filein file:/afs/cern.ch/user/i/ilaflott/ZJetsAnalysis/MadGraph5_aMCatNLO_Gen/CMSSW_7_1_20_patch3/src/cmsgrid_final.lhe --datatier 'GEN-SIM-RAW' --eventcontent RAWSIM -n 1000 --no_exec --fileout file:TuneCUETP8M1_13TeV_aMCatNLO_FXFX_5f_max2j_LHE.root
I've been able to produce 38 GEN events like this. Next steps are to generate the .lhe file in CMSSW as a step 0 with a config file, make sure of the version of CMSSW we want to use for hadronization is 7_1_20_patch3.

HI Muon HLT 2015 Notes (last reviewed Sep '15)

Setting up a general HLT work area

For an area ready to run both the --cff and --full hltGetConfiguration options, do

cmsrel $CMSSW_VERSION
cd $CMSSW_BASE/src
cmsenv
git cms-addpkg HLTrigger/Configuration                              
git cms-addpkg L1TriggerConfig/L1GtConfigProducers       
git cms-merge-topic --unsafe CmsHI:HIL1_for_HLTStudies_7_5_0                                                #FOR 75X RELEASES ONLY
git clone git@github.com:richard-cms/L1UpgradeAnalyzer.git Analyzers/L1UpgradeAnalyzer   
cp /afs/cern.ch/user/k/kimy/public/muonTriggerTempFiles/HeavyIonsAnalysis_TrackAna_EventAna.tgz . 
tar -zxvf HeavyIonsAnalysis_TrackAna_EventAna.tgz         
scram b -j4
rehash
cd L1TriggerConfig/L1GtConfigProducers/data/Luminosity/startup/    #do an ls and make sure the L1 menu you want ii here
wget http://www.hephy.at/user/tmatsushita/menu/YOUR_L1_MENU_VERSION.xml   #if the one you want isn't here, download it
scram b   # one more time out of paranoia

hltGetConfiguration --full method

hltGetConfiguration /users/ilaflott/DileptonGroup/HIPaths_DoubleMu_WZJpsiUpsilon --full --offline --mc --unprescale --process TEST --globaltag auto:run2_mc_HIon --l1-emulator 'stage1,gt' --l1Xml L1Menu_CollisionsHeavyIons2015.v3_KKHecked.xml --output none --max-events -1 --input /store/user/mnguyen/Hydjet_Quenched_MinBias_5020GeV/HydjetMB_740pre8_MCHI2_74_V3_53XBS_DIGI-RAW/6da45e4e90741bc03dbd9aec5f36c050/step2_DIGI_L1_DIGI2RAW_HLT_RAW2DIGI_L1Reco_103_1_2xc.root > hlt_full_MC_L1v3_HiMuHLT2015.py

The L1 menu changes a lot; ask around if you're not sure which one to use. The current default for CMSSW_7_5_0 is used in the above command. Do not mess with the global tag input, ask Matt Nguyen if concerned with the global tag. Now you should test your script by doing

cmsRun hlt_full_MC_stage1_HiMuHLT2015.py >& triggerCheck.log

Re-emulating L1 and running HLT while Including hltBitAnalyzer + GenParticleAnalyzer

At the end of your cmsRun script, add in

#Use HI L1 firmware
from L1Trigger.L1TCommon.customsPostLS1 import customiseSimL1EmulatorForPostLS1_HI
customiseSimL1EmulatorForPostLS1_HI(process) 

#beamspot correction
#Include if and only if using 740pre8 HYDJET sample in 750
from CondCore.DBCommon.CondDBSetup_cfi import *
process.beamspot = cms.ESSource("PoolDBESSource",CondDBSetup,
                                toGet = cms.VPSet(cms.PSet( record = cms.string('BeamSpotObjectsRcd'),
                                                            tag= cms.string('RealisticHICollisions2011_STARTHI50_mc')
                                                            )),
                                connect =cms.string('frontier://FrontierProd/CMS_COND_31X_BEAMSPOT')
                                )
process.es_prefer_beamspot = cms.ESPrefer("PoolDBESSource","beamspot")

# replace 'TEST' with the process name of your hlt config
process.load("HLTrigger.HLTanalyzers.HLTBitAnalyser_cfi")
process.hltbitanalysis.HLTProcessName = cms.string('TEST')
process.hltbitanalysis.hltresults = cms.InputTag( 'TriggerResults','','TEST' )
process.hltbitanalysis.l1GtReadoutRecord = cms.InputTag('simGtDigis','','TEST')
process.hltbitanalysis.UseTFileService = cms.untracked.bool(True)

#GenParticleAnalyzer
process.HiGenParticleAna = cms.EDAnalyzer('HiGenAnalyzer',
                                          doVertex = cms.untracked.bool(False),
                                          etaMax = cms.untracked.double(3),
                                          ptMin = cms.untracked.double(1),
                                          chargedOnly = cms.untracked.bool(False),
                                          stableOnly = cms.untracked.bool(False), # jpsi is not stable
                                          src = cms.untracked.InputTag("generator"),
                                          useHepMCProduct = cms.untracked.bool(False),
                                          genpSrc = cms.untracked.InputTag("hiGenParticles"), #for PbPb only, for pp, use "genParticles"
                                          genHIsrc = cms.untracked.InputTag("heavyIon"),
                                          doParticles = cms.untracked.bool(True),
                                          doHI    = cms.untracked.bool(False)
                                          )

process.TFileService = cms.Service("TFileService",
                                   fileName=cms.string("openHLT.root"))

process.hltBitAnalysis = cms.EndPath(process.hltbitanalysis*process.HiGenParticleAna)
#process.hltBitAnalysis = cms.EndPath(process.hltbitanalysis)#use this line if not interested in GenParticleAnalyzer

Note, including the switch to the HI L1 firmware forces the choice of the default L1 menu for a given CMSSW version. Sometimes this can cause the L1 menu and the HLT paths to be mismatched, meaning the HLT/L1 emulation is looking for bits that aren't available, causing a fatal error. If this is the case, one can force the choice of another L1 menu by doing

edmConfigDump hlt_full_MC_stage1_HiMuHLT2015.py > & hlt_full_MC_stage1_HiMuHLT2015_dumped.py

Then, in the new script, look for the line DefXmlFile = cms.string('DEFAULT_MENU_HERE.xml'), and replace the default choice with the L1 menu you actually want to use. Test the script again.

TWiki Formatting Notes

For code + text in the same sentence do cmsenv

This works well for blocks of code

config.Data.splitting = 'FileBased’
config.Data.unitsPerJob = 1

This also works well for blocks of code

openssl pkcs12 -in mycert.p12 -clcerts -nokeys -out usercert.pem
openssl pkcs12 -in mycert.p12 -nocerts -out userkey.pem
chmod 400 usercert.pem
chmod 400 userkey.pem
UserForm
First Name Ian
Last Name Laflotte
Titles

Email ilaflott@#SPAMNOT#gmail#SPAMNOT#.com
Telephone

Mobile

Skype ID ilaflott
Department Physics & Astronomy
Organization Rutgers Relativistic Heavy Ions
URL https://github.com/ilaflott
Location Piscataway, NJ
Region

Country United States
Status Update

Edit personal data
Edit | Attach | Watch | Print version | History: r16 < r15 < r14 < r13 < r12 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r16 - 2017-08-30 - IanLaflotte
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

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