From 8f9aac341790ad7a7ffd3b8078710d4bd1d87987 Mon Sep 17 00:00:00 2001 From: Sunanda Date: Fri, 16 Oct 2015 14:37:06 +0200 Subject: [PATCH 1/2] Update CaloScan with new work from Salavat --- .../test/CaloScan/template.py_since760pre6 | 129 ++++++++++++++++++ .../template.py_since760pre6_forGEN_760pre6 | 126 +++++++++++++++++ 2 files changed, 255 insertions(+) create mode 100644 Validation/CaloTowers/test/CaloScan/template.py_since760pre6 create mode 100644 Validation/CaloTowers/test/CaloScan/template.py_since760pre6_forGEN_760pre6 diff --git a/Validation/CaloTowers/test/CaloScan/template.py_since760pre6 b/Validation/CaloTowers/test/CaloScan/template.py_since760pre6 new file mode 100644 index 0000000000000..b03bb84369a6a --- /dev/null +++ b/Validation/CaloTowers/test/CaloScan/template.py_since760pre6 @@ -0,0 +1,129 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("TEST") + +### RANDOM setting (change last digit(s) to make runs different !) +process.load("Configuration.StandardSequences.SimulationRandomNumberGeneratorSeeds_cff") + +process.load("Configuration.StandardSequences.Simulation_cff") +process.load("Configuration.StandardSequences.Reconstruction_cff") +process.load("SimGeneral.MixingModule.mixNoPU_cfi") +process.load('Configuration/StandardSequences/DigiToRaw_cff') +process.load('Configuration/StandardSequences/RawToDigi_cff') + +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +from Configuration.AlCa.autoCond import autoCond +process.GlobalTag.globaltag = autoCond['run2_mc'] + +process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi") +process.load("Configuration.StandardSequences.GeometryDB_cff") +process.load("Configuration.StandardSequences.MagneticField_cff") +process.g4SimHits.UseMagneticField = False + +process.load("DQMServices.Core.DQMStore_cfi") +process.load("DQMServices.Components.MEtoEDMConverter_cfi") + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(2000) +) +# Input source +process.source = cms.Source("PoolSource", + firstEvent = cms.untracked.uint32(XXXXX), + fileNames = cms.untracked.vstring('file:mc.root') +) + +process.FEVT = cms.OutputModule("PoolOutputModule", + outputCommands = cms.untracked.vstring('drop *', 'keep *_MEtoEDMConverter_*_*'), + splitLevel = cms.untracked.int32(0), + fileName = cms.untracked.string("output.root") +) + +process.VtxSmeared.SigmaX = 0.00001 +process.VtxSmeared.SigmaY = 0.00001 +process.VtxSmeared.SigmaZ = 0.00001 + +process.HcalSimHitsAnalyser = cms.EDAnalyzer("HcalSimHitsValidation", + outputFile = cms.untracked.string('HcalSimHitsValidation.root') +) + +process.hcalDigiAnalyzer = cms.EDAnalyzer("HcalDigisValidation", + outputFile = cms.untracked.string('HcalDigisValidationRelVal.root'), + digiLabel = cms.InputTag("hcalDigis"), + zside = cms.untracked.string('*'), + mode = cms.untracked.string('multi'), + + hcalselector = cms.untracked.string('all'), + mc = cms.untracked.string('yes') # 'yes' for MC +) + +process.hcalRecoAnalyzer = cms.EDAnalyzer("HcalRecHitsValidation", + outputFile = cms.untracked.string('HcalRecHitValidationRelVal.root'), + HBHERecHitCollectionLabel = cms.untracked.InputTag("hbhereco"), + HFRecHitCollectionLabel = cms.untracked.InputTag("hfreco"), + HORecHitCollectionLabel = cms.untracked.InputTag("horeco"), + eventype = cms.untracked.string('single'), + ecalselector = cms.untracked.string('yes'), + hcalselector = cms.untracked.string('all'), + mc = cms.untracked.string('yes') # default ! +) + +process.hcalTowerAnalyzer = cms.EDAnalyzer("CaloTowersValidation", + outputFile = cms.untracked.string('CaloTowersValidationRelVal.root'), + CaloTowerCollectionLabel = cms.untracked.InputTag('towerMaker'), + hcalselector = cms.untracked.string('all'), + mc = cms.untracked.string('yes') # default! +) + +#--- replace hbhereco with hbheprereco +delattr(process,"hbhereco") +process.hbhereco = process.hbheprereco.clone() +process.hcalLocalRecoSequence = cms.Sequence(process.hbhereco+process.hfreco+process.horeco) + + +#--- post-LS1 customization +process.mix.digitizers.hcal.minFCToDelay=cms.double(5.) # new TS model +process.mix.digitizers.hcal.ho.photoelectronsToAnalog = cms.vdouble([4.0]*16) +process.mix.digitizers.hcal.ho.siPMCode = cms.int32(1) +process.mix.digitizers.hcal.ho.pixels = cms.int32(2500) +process.mix.digitizers.hcal.ho.doSiPMSmearing = cms.bool(False) +process.mix.digitizers.hcal.hf1.samplingFactor = cms.double(0.67) +process.mix.digitizers.hcal.hf2.samplingFactor = cms.double(0.67) +process.g4SimHits.HFShowerLibrary.FileName = 'SimG4CMS/Calo/data/HFShowerLibrary_npmt_noatt_eta4_16en_v3.root' + + + +#---------- PATH +# -- NB: for vertex smearing the Label should be: "unsmeared" +# for GEN produced since 760pre6, for older GEN - just "": +process.VtxSmeared.src = cms.InputTag("generator", "") +process.generatorSmeared = cms.EDProducer("GeneratorSmearedProducer") +process.g4SimHits.Generator.HepMCProductLabel = 'VtxSmeared' + +process.p = cms.Path( + process.VtxSmeared * + process.generatorSmeared * + process.g4SimHits * + process.mix * + process.ecalDigiSequence * + process.hcalDigiSequence * + process.addPileupInfo * + process.bunchSpacingProducer * + process.ecalPacker * + process.esDigiToRaw * + process.hcalRawData * + process.rawDataCollector * + process.ecalDigis * + process.ecalPreshowerDigis * + process.hcalDigis * + process.calolocalreco * + process.caloTowersRec * + process.hcalnoise * + process.HcalSimHitsAnalyser * + process.hcalDigiAnalyzer * + process.hcalTowerAnalyzer * + process.hcalRecoAnalyzer * + process.MEtoEDMConverter +) + +process.outpath = cms.EndPath(process.FEVT) + diff --git a/Validation/CaloTowers/test/CaloScan/template.py_since760pre6_forGEN_760pre6 b/Validation/CaloTowers/test/CaloScan/template.py_since760pre6_forGEN_760pre6 new file mode 100644 index 0000000000000..bc7b81dfbff2e --- /dev/null +++ b/Validation/CaloTowers/test/CaloScan/template.py_since760pre6_forGEN_760pre6 @@ -0,0 +1,126 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("TEST") + +### RANDOM setting (change last digit(s) to make runs different !) +process.load("Configuration.StandardSequences.SimulationRandomNumberGeneratorSeeds_cff") + +process.load("Configuration.StandardSequences.Simulation_cff") +process.load("Configuration.StandardSequences.Reconstruction_cff") +process.load("SimGeneral.MixingModule.mixNoPU_cfi") +process.load('Configuration/StandardSequences/DigiToRaw_cff') +process.load('Configuration/StandardSequences/RawToDigi_cff') + +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +from Configuration.AlCa.autoCond import autoCond +process.GlobalTag.globaltag = autoCond['run2_mc'] + +process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi") +process.load("Configuration.StandardSequences.GeometryDB_cff") +process.load("Configuration.StandardSequences.MagneticField_cff") +process.g4SimHits.UseMagneticField = False + +process.load("DQMServices.Core.DQMStore_cfi") +process.load("DQMServices.Components.MEtoEDMConverter_cfi") + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(2000) +) +# Input source +process.source = cms.Source("PoolSource", + firstEvent = cms.untracked.uint32(XXXXX), + fileNames = cms.untracked.vstring('file:mc.root') +) + +process.FEVT = cms.OutputModule("PoolOutputModule", + outputCommands = cms.untracked.vstring('drop *', 'keep *_MEtoEDMConverter_*_*'), + splitLevel = cms.untracked.int32(0), + fileName = cms.untracked.string("output.root") +) + +process.VtxSmeared.SigmaX = 0.00001 +process.VtxSmeared.SigmaY = 0.00001 +process.VtxSmeared.SigmaZ = 0.00001 + +process.HcalSimHitsAnalyser = cms.EDAnalyzer("HcalSimHitsValidation", + outputFile = cms.untracked.string('HcalSimHitsValidation.root') +) + +process.hcalDigiAnalyzer = cms.EDAnalyzer("HcalDigisValidation", + outputFile = cms.untracked.string('HcalDigisValidationRelVal.root'), + digiLabel = cms.InputTag("hcalDigis"), + zside = cms.untracked.string('*'), + mode = cms.untracked.string('multi'), + + hcalselector = cms.untracked.string('all'), + mc = cms.untracked.string('yes') # 'yes' for MC +) + +process.hcalRecoAnalyzer = cms.EDAnalyzer("HcalRecHitsValidation", + outputFile = cms.untracked.string('HcalRecHitValidationRelVal.root'), + HBHERecHitCollectionLabel = cms.untracked.InputTag("hbhereco"), + HFRecHitCollectionLabel = cms.untracked.InputTag("hfreco"), + HORecHitCollectionLabel = cms.untracked.InputTag("horeco"), + eventype = cms.untracked.string('single'), + ecalselector = cms.untracked.string('yes'), + hcalselector = cms.untracked.string('all'), + mc = cms.untracked.string('yes') # default ! +) + +process.hcalTowerAnalyzer = cms.EDAnalyzer("CaloTowersValidation", + outputFile = cms.untracked.string('CaloTowersValidationRelVal.root'), + CaloTowerCollectionLabel = cms.untracked.InputTag('towerMaker'), + hcalselector = cms.untracked.string('all'), + mc = cms.untracked.string('yes') # default! +) + +#--- replace hbhereco with hbheprereco +delattr(process,"hbhereco") +process.hbhereco = process.hbheprereco.clone() +process.hcalLocalRecoSequence = cms.Sequence(process.hbhereco+process.hfreco+process.horeco) + + +#--- post-LS1 customization +process.mix.digitizers.hcal.minFCToDelay=cms.double(5.) # new TS model +process.mix.digitizers.hcal.ho.photoelectronsToAnalog = cms.vdouble([4.0]*16) +process.mix.digitizers.hcal.ho.siPMCode = cms.int32(1) +process.mix.digitizers.hcal.ho.pixels = cms.int32(2500) +process.mix.digitizers.hcal.ho.doSiPMSmearing = cms.bool(False) +process.mix.digitizers.hcal.hf1.samplingFactor = cms.double(0.67) +process.mix.digitizers.hcal.hf2.samplingFactor = cms.double(0.67) +process.g4SimHits.HFShowerLibrary.FileName = 'SimG4CMS/Calo/data/HFShowerLibrary_npmt_noatt_eta4_16en_v3.root' + + + +#---------- PATH +process.g4SimHits.Generator.HepMCProductLabel = 'VtxSmeared' +process.generatorSmeared = cms.EDProducer("GeneratorSmearedProducer") + +process.p = cms.Path( + process.VtxSmeared * + process.generatorSmeared * + process.g4SimHits * + process.mix * + process.ecalDigiSequence * + process.hcalDigiSequence * + process.addPileupInfo * + process.bunchSpacingProducer * + process.ecalPacker * + process.esDigiToRaw * + process.hcalRawData * + process.rawDataCollector * + process.ecalDigis * + process.ecalPreshowerDigis * + process.hcalDigis * + process.calolocalreco * + process.caloTowersRec * + process.hcalnoise * + process.HcalSimHitsAnalyser * + process.hcalDigiAnalyzer * + process.hcalTowerAnalyzer * + process.hcalRecoAnalyzer * + process.MEtoEDMConverter +) + +process.outpath = cms.EndPath(process.FEVT) + From 567a0d6ffa17ccda2c06286ec7dc632f1c9c2c5c Mon Sep 17 00:00:00 2001 From: Sunanda Date: Fri, 16 Oct 2015 14:37:26 +0200 Subject: [PATCH 2/2] Update CaloScan with new work from Salavat --- Validation/CaloTowers/test/CaloScan/README | 59 +++++++++++++--------- 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/Validation/CaloTowers/test/CaloScan/README b/Validation/CaloTowers/test/CaloScan/README index a8cebbf287666..8a8d1cd061dfd 100644 --- a/Validation/CaloTowers/test/CaloScan/README +++ b/Validation/CaloTowers/test/CaloScan/README @@ -1,5 +1,3 @@ -Please follow the steps as below: - (1) cmsrel CMSSW_7_6_0_pre4 (for instance) (2) cd CMSSW_7_6_0_pre4/src @@ -8,59 +6,72 @@ Please follow the steps as below: (4) git cms-addpkg Validation/CaloTowers -(5) scram b - -(6) mkdir scan +(5) scram b -(7) cd Validation/CaloTowers/CaloScan +(6) cd Validation/CaloTowers/test/CaloScan -(8) ./make_configs.csh +(7) ./make_configs.csh -(9) ./submit_batch.csh +(8) ./submit_batch.csh NB: it uses batch submission (batch.csh) to lxbatch at CERN with input file /afs/cern.ch/cms/data/CMSSW/Validation/HcalHits/data/620/mc_pi50_eta05.root Each of 25 job uses 2K out of total 50K input. -In 1-1.5 hour (in the submission directory, /Validation/CaloTowers/CaloScan -in this case) the results of 25 batch jobs will be arriving. +In 1-1.5 hour (in the submission directory, /scan in this case) +the results of 25 batch jobs will be arriving. Once all 25 jobs finished and 25 *.root files appeared locally, -(10) cmsRun merging_cfg.py +(9) cmsRun merging_cfg.py (to produce final DQMxxx.root file) -(11) clean up the directory +(10) clean up the directory rm -r pi50_*.py *.log LSFJOB_* pi50_*.root -(12) move this DQMxxx.root to Validation/CaloTowers/test/macros + +(11) move this DQMxxx.root to Validation/CaloTowers/test/macros renaming it into something like here: -pi50scan760pre4_postLS1_fullGeom_ECALHCAL_CaloTowers.root +/afs/cern.ch/user/a/abdullin/public/pi50_scan/ NB: there is naming convention pi50scan<...>_ECALHCAL_CaloTowers.root where <...> can be any meaningful string (to appear in the legend of histos) -(13) to compare two sets of histos, for instance if you have in + +(12) to compare two sets of histos, for instance if you have in Validation/CaloTowers/test/macros -pi50scan760pre4_postLS1_ECALHCAL_CaloTowers.root and -pi50scan760pre3_postLS1_ECALHCAL_CaloTowers.root +pi50scan760pre3_postLS1_ECALHCAL_CaloTowers.root and +pi50scan760pre2_postLS1_ECALHCAL_CaloTowers.root -(here "760pre4_postLS1" and "760pre3_postLS1" are mentioned <...> strings) - +(here "760pre3_postLS1" and "760pre2_postLS1" are mentioned <...> strings) - -./RunPions.csh 760pre4_postLS1 760pre3_postLS1 +./RunPions.csh 760pre3_postLS1 760pre2_postLS1 -(14) the result appear as the local directory -760pre4_postLS1_vs_760pre3_postLS1_SinglePi +(13) the result appear as the local directory +760pre3_postLS1_vs_760pre2_postLS1_SinglePi which can be (i) viewed with web browser locally, e.g. -firefox 760pre4_postLS1_vs_760pre3_postLS1_SinglePi/index.html +firefox 760pre3_postLS1_vs_760pre2_postLS1_SinglePi/index.html (ii) uploaded to some web server and viewed from anywhere: -https://cms-cpt-software.web.cern.ch/cms-cpt-software/General/Validation/SVSuite/HCAL/calo_scan_single_pi/760pre4_postLS1_vs_760pre3_postLS1_SinglePi/ +https://cms-cpt-software.web.cern.ch/cms-cpt-software/General/Validation/SVSuite/HCAL/calo_scan_single_pi/760pre3_postLS1_vs_760pre2_postLS1_SinglePi/ (in this case, the results from the two releases are just identical) -NB: hitso labels correspond to aforementioned <...> strings, here 760pre4_postLS1/760pre3_postLS1 +NB: hitso labels correspond to aforementioned <...> strings, here 760pre3_postLS1/760pre2_postLS1 + +-------------------------------------------------- +NB: recent changes in the template since 760pre6 +to cope with a massive generator/smearing rearrangement in +https://github.com/cms-sw/cmssw/pull/10858 + +(A) to continue using default GEN source: + /afs/cern.ch/cms/data/CMSSW/Validation/HcalHits/data/620/mc_pi50_eta05.root +to be used template.py_since760pre6 (renaming it back to template.py) + +(B) for newly generated GEN: + /afs/cern.ch/cms/data/CMSSW/Validation/HcalHits/data/76X/mc_pi50_eta05.root +to be used template.py_since760pre6_forGEN_760pre6 (renaming it back to template.py)