Skip to content

Recipe for GEMOfflineMonitor

seungjin-yang edited this page May 13, 2020 · 3 revisions

Setup

cmsrel CMSSW_11_1_0_pre6
cd CMSSW_11_1_0_pre6/src
cmsenv
git-cms-merge-topic seungjin-yang:GEMOfflineMonitor-from-CMSSW_11_1_0_pre6
git-cms-merge-topic seungjin-yang:GEMOfflineMonitor-extra-from-CMSSW_11_1_0_pre6
scram b

GEMOfflineMonitor-from-CMSSW_11_1_0_pre6 is a main branch to update.

GEMOfflineMonitor-extra-from-CMSSW_11_1_0_pre6 is a patch to store muonGEMDigis when era is Run3. (muonGEMDigis is stored when data tier is FEVT(full event).

If you wanna know CMS data tier, please check a twiki page

Test with MC samples

We use runTheMatrix.py to generate MC samples. This twiki page gives a short description about runTheMatrix.py

Actually, runTheMatrix.py produces several python config files using cmsDriver.py.

Here is a twiki page about cmsDriver.py. It will be very helpful.

Run3

Now, let's start to generate ten muons with Run3 condition using the following command.

runTheMatrix.py -w upgrade -l 11611.0

This command produces python configs needed and generate 10 events. (for test before generating a lot of events.)

It takes time to execute whole simulation steps.

After the job is done, you can see five python configs (+ output ROOT files and logs) under a very long name directory. (If not, something is wrong and please check runall-report-step123-.log.)

11611.0_TenMuExtendedE_0_200+TenMuExtendedE_0_200_pythia8_2021_GenSimFull+DigiFull_2021+RecoFull_2021+HARVESTFull_2021+ALCAFull_2021
|--- TenMuExtendedE_0_200_pythia8_cfi_GEN_SIM.py
|--- step2_DIGI_L1_DIGI2RAW_HLT.py
|--- step3_RAW2DIGI_L1Reco_RECO_RECOSIM_EI_PAT_VALIDATION_DQM.py
|--- step4_HARVESTING.py
|--- step5_ALCA.py

To increase statistic, we need to slightly change configs.

If you wanna understand config in detail, there are twiki pages describing it.

Firstly, we need to increase the number of events to be generated. 1000 events are enough.

# TenMuExtendedE_0_200_pythia8_cfi_GEN_SIM.py
process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32(1000), # NOTE default is 10.
    output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
)

By default, the eta direction of generated muons follows the uniform distribution ranging from -4.0 to 4.0.

To increase the number of muon toward GEM, I usually fix eta range to GEM eta coverage. For example, I set eta range to (1.5, 2.23) when the era is run3. (slightly larger than actual GE11 coverage.)

With the updated eta range, Pythia8-gun shoots 5 anti-muons to (1.5, 2.23) and 5 muons to (-2.23, -1.5).

I think it doesn't have a problem with this asymmetry to check if GEMOfflineMonitor works well.

If you hate the asymmetry, you can set ParticleId to cms.vint32(-13, -13, -13, 13, 13, 13).

And then our samples are twelve muons. (Don't forget a argument AddAntiParticle = cms.bool(True))

# TenMuExtendedE_0_200_pythia8_cfi_GEN_SIM.py
process.generator = cms.EDFilter("Pythia8EGun",
    PGunParameters = cms.PSet(
        AddAntiParticle = cms.bool(True),
        MaxE = cms.double(200.0),
        MaxEta = cms.double(2.23), # NOTE default is 4.0
        MaxPhi = cms.double(3.14159265359),
        MinE = cms.double(0.0),
        MinEta = cms.double(1.5), # NOTE # default is 4.0
        MinPhi = cms.double(-3.14159265359),
        ParticleID = cms.vint32(-13, -13, -13, -13, -13)
    ),
    PythiaParameters = cms.PSet(
        parameterSets = cms.vstring()
    ),
    Verbosity = cms.untracked.int32(0),
    firstRun = cms.untracked.uint32(1),
    psethack = cms.string('Ten mu e 0 to 200')
)

Another modification is to set the maxEvents to -1, which means no limit, for step2 ~ step4. (We don't need step5)

# step2_DIGI_L1_DIGI2RAW_HLT.py
process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32(-1), # NOTE default is 10.
    output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
)
# step3_RAW2DIGI_L1Reco_RECO_RECOSIM_EI_PAT_VALIDATION_DQM.py
process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32(-1),
    output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
)
# step4_HARVESTING.py
process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32(-1),
    output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
)

And then, let's re-run scripts step-by-step.

cmsRun TenMuExtendedE_0_200_pythia8_cfi_GEN_SIM.py

If you modify GEMOfflineMonitor, please recompile cmssw and run step3 and step4 again.

Phase2

runTheMatrix.py -w upgrade -l 24811.0

Test with Slice Test Data

TODO

Clone this wiki locally