Improved RPC Trigger using the Hadron Outer Scintillators
Documentation
Code
Simulation
- Objective: generate muons pointing to specific areas of the detector (particle gun).
- Start with a fresh CMSSW release area (for this first excercise I have use 5_3_5):
< cmslpc25 > cmsrel CMSSW_5_3_5
< cmslpc25 > cd CMSSW_5_3_5/src
< cmslpc25 > cmsenv
- Now, use the cmsDriver script:
< cmslpc25 > cmsDriver.py Configuration/Generator/python/SingleMuPt100_cfi.py -s GEN,SIM,DIGI,L1,DIGI2RAW,RAW2DIGI,RECO --conditions START53_V18PR::All -n 100 \
--no_exec --eventcontent FEVT
GEN,SIM,DIGI,L1,DIGI2RAW,RAW2DIGI,RECO,ENDJOB
We have determined that this is simulation (if not, rerun cmsDriver.py with --data)
GEN
Loading generator fragment from Configuration.Generator.SingleMuPt100_cfi
SIM
DIGI
L1
DIGI2RAW
RAW2DIGI
RECO
- cmsDriver generates automatically a cfg.py file with nane SingleMuPt100_cfi_py_GEN_SIM_DIGI_L1_DIGI2RAW_RAW2DIGI_RECO.py.
- SingleMuPt100_cfi.py is a preset configuration. There are a few of them, all located at Configuration/Generator/python:
- SingleMuFlatLogPt_100MeVto2TeV_cfi.py
- SingleMuPt1000_cfi.py
- SingleMuPt100_cfi.py
- SingleMuPt10_cfi.py
- SingleMuPt1_cfi.py
- The configuration file includes the full chain from generation to reconstruction. If you look at the configuration, it contains the specifications in order to run a flat ParticleGun:
process.generator = cms.EDProducer("FlatRandomPtGunProducer",
PGunParameters = cms.PSet(
MaxPt = cms.double(100.01),
MinPt = cms.double(99.99),
PartID = cms.vint32(-13),
MaxEta = cms.double(2.5),
MaxPhi = cms.double(3.14159265359),
MinEta = cms.double(-2.5),
MinPhi = cms.double(-3.14159265359)
),
Verbosity = cms.untracked.int32(0),
psethack = cms.string('single mu pt 100'),
AddAntiParticle = cms.bool(True),
firstRun = cms.untracked.uint32(1)
)
- You can tunning int the kinematics output of your particle gun and define the min/max range for Pt, eta and phi -and some more inrteresting parameters.
- It is then useful to define in the configuration file, variables defining each of the parameters of interest.
Adding the upgraded HO in the simulation
- The following lines need to be included in the simulation configuration file:
## HO Specific
process.simHcalUnsuppressedDigis.useOldHO = cms.bool(False)
process.simHcalUnsuppressedDigis.ho.siPMCode = cms.int32(1)
process.simHcalUnsuppressedDigis.ho.pixels = cms.int32(2500)
process.simHcalUnsuppressedDigis.ho.photoelectronsToAnalog = cms.vdouble([3.0]*16)
# turn off zero suppression
process.simHcalDigis.HBlevel = -1000
process.simHcalDigis.HElevel = -1000
process.simHcalDigis.HOlevel = -1000
#use hardcoded gains
process.es_hardcode.toGet.extend(['Gains', 'Pedestals', 'PedestalWidths'])
process.es_prefer_hcalHardcode = cms.ESPrefer("HcalHardcodeCalibrations", "es_hardcode")
addpkg CalibCalorimetry/HcalAlgos
cd CalibCalorimetry/HcalAlgos/src
- and edit the file HcalDbHardcode.cc. The suggested modifications are provided by Jake Anderson. The following file includes his modified version:
- HcalDbHardcode-JakeA.cc: HcalDbHardcode file modified by Jake Anderson. Bare in mind by using this file, you also need to check its header file.
- Compile the new package. That should be all the preparatives to start simulating events with the HO upgrade in there.
Simulation ( in 4_2_X )
At the moment of writing this Twiki (please remove or note when there is a update), the simulation is broken in CMSSW_5_3_X. Therefore I had to fallback to CMSSW_4_2_X. In particular, the latest revision that seems usefull for us in CMSSW_4_2_8_SLHC
- CMSSW version to use: CMSSW_4_2_8
- Global tag: DESIGN42_V17::All
Then use the same procedure described in the previous section. Note:
- HcalDbHardcode.cc needs some extra modification since the following CondFormats is not present in this version:
#include "CondFormats/HcalObjects/interface/HcalTimingParam.h"
- Just comment out the method makeTimingParam (HcalGenericDetId fId) in file HcalDbHardcode.cc
Running
- Just simply execute the configuration file that we have created with cmsDriver with cmsRun (for simplicity, I renamed it to particleGunMuonGeneratorHO_cfg.py):
cmsRun particleGunMuonGeneratorHO_cfg.py
- Visualization of the results:
cmsShow -i particle_gun_test.root
,
Running in Condor
Keeping the RPCTrigger digis
We can modify our configuration file to keep the RPCTriggger digis (these are the input to the GMT). For this, we need to add the following line to our cfg file:
process.FEVToutput.outputCommands += cms.untracked.vstring('keep *_*_RPCb_*')
process.FEVToutput_step = cms.EndPath(process.FEVToutput)
This line allows us to modify the output and keep the RPCb (in barrel only) trigger digis. After running cmsRun on the cfg file, you can check using
edmDumpEventContent the added collection to our file EDM file:
< cmslpc36 > edmDumpEventContent particle_gun_test.root | grep "RPC"
edm::RangeMap< RPCDetId,edm::OwnVector< RPCRecHit,edm::ClonePolicy< RPCRecHit > >,edm::ClonePolicy< RPCRecHit > > "rpcRecHits" "" "RECO"
vector< L1MuRegionalCand > "gtDigis" "RPCb" "RECO"
vector< L1MuRegionalCand > "simRpcTriggerDigis" "RPCb" "RECO"
vector< RPCDigiL1Link > "simRpcTriggerDigis" "RPCb" "RECO"
Preliminary Studies
cvs co -d HcalAnalyzerAO UserCode/aosorio/HORPCEmulator/HcalAnalyzerAO