Skip to content

Commit

Permalink
Merge pull request #11879 from bsunanda/Run2-hcx43
Browse files Browse the repository at this point in the history
bsunanda:Run2 hcx43 Modify the scripts (Salavat) for pion scans
  • Loading branch information
davidlange6 committed Nov 10, 2015
2 parents bfc7173 + 567a0d6 commit 4a87c94
Show file tree
Hide file tree
Showing 3 changed files with 290 additions and 24 deletions.
59 changes: 35 additions & 24 deletions Validation/CaloTowers/test/CaloScan/README
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
129 changes: 129 additions & 0 deletions Validation/CaloTowers/test/CaloScan/template.py_since760pre6
Original file line number Diff line number Diff line change
@@ -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)

Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 4a87c94

Please sign in to comment.