opendata.cern.ch icon indicating copy to clipboard operation
opendata.cern.ch copied to clipboard

CMS - automate event content dump

Open katilp opened this issue 4 years ago • 2 comments

Set up an automated check for the event content from a file in a dataset with (e.g.)

docker run -it --rm cmsopendata/cmssw_5_3_32 edmDumpEventContent root://eospublic.cern.ch//eos/opendata/cms/Commissioning10/ZeroBias/RECO/May19ReReco-v1/0000/0003E71C-7F83-E011-8BFA-E0CB4E553666.root

Output:

Setting up CMSSW_5_3_32
CMSSW should now be available.
Type                                  Module                      Label             Process
----------------------------------------------------------------------------------------------
L1GlobalTriggerObjectMapRecord        "hltL1GtObjectMap"          ""                "HLT"
edm::TriggerResults                   "TriggerResults"            ""                "HLT"
trigger::TriggerEvent                 "hltTriggerSummaryAOD"      ""                "HLT"
EBDigiCollection                      "selectDigi"                "selectedEcalEBDigiCollection"   "RECO"
EEDigiCollection                      "selectDigi"                "selectedEcalEEDigiCollection"   "RECO"
EcalTrigPrimCompactColl               "ecalCompactTrigPrim"       ""                "RECO"
HcalNoiseSummary                      "hcalnoise"                 ""                "RECO"
[...]

@tiborsimko Would there be a way to embed this as functionality to CODP records?

katilp avatar Apr 15 '21 08:04 katilp

Similarly, we could have for the provenance information, e.g for http://opendata.cern.ch/record/733

docker run -it --rm cmsopendata/cmssw_5_3_32 edmProvDump -f "generator SIM" root://eospublic.cern.ch//eos/opendata/cms/MonteCarlo2010/Summer12/QCD_HT-1
000ToInf_TuneZ2Star_7TeV-madgraph-pythia6/AODSIM/LowPU2010_DR42_BS2011_PU_S0_START42_V17B-v1/00000/0014D4CE-E5B9-E311-ABD1-1CC1DE04FF50.root

Output:

Setting up CMSSW_5_3_32
CMSSW should now be available.
210415 13:47:54 001 secgsi_InitProxy: cannot access private key file: /home/cmsusr/.globus/userkey.pem
Event filtering information for 4 processing steps is available.
The ParameterSets will be printed out, with the oldest printed first.
ParameterSetID: 38559c871fba28d992ead51549367f83
{
 }
     -------------------------
ParameterSetID: 1258c9d7981c36123064b138d9233d2d
{
  SelectEvents: vstring tracked  = {'generation_step'}
 }
     -------------------------
ParameterSetID: 38559c871fba28d992ead51549367f83
{
 }
     -------------------------
ParameterSetID: 38559c871fba28d992ead51549367f83
{
 }
     -------------------------
Processing History:
  SIM '' '"CMSSW_4_2_8_lowpupatch1"' [1]  (1ac44873bb41a112af01d29dba9c7813)
  LHE '' '"CMSSW_4_1_8_patch14"' [2]  (8b44defeaa0d6bafb3ca690cdd153371)
    SIM '' '"CMSSW_4_2_10"' [1]  (f1a013ffc85e49d71b5d0f4131e0c58a)
      DIGI2RAW '' '"CMSSW_4_2_8_lowpupatch1"' [1]  (49b613f30d9c9b6f2e0c8b01b1a86710)
        RECO '' '"CMSSW_4_2_8_lowpupatch1"' [1]  (3cbb91e3af4dc03636bbb144b954df7b)
---------Producers with data in file---------
Module: generator SIM
 PSet id:15f5f087060376bf0b7332008f275c18
 products: {
  GenEventInfoProduct_generator__SIM.
  GenRunInfoProduct_generator__SIM.
  edmHepMCProduct_generator__SIM.
 }
 parameters: {
  @module_edm_type: string tracked  = 'EDFilter'
  @module_label: string tracked  = 'generator'
  @module_type: string tracked  = 'Pythia6HadronizerFilter'
  comEnergy: double tracked  = 7000
  ExternalDecays: PSet tracked = ({
   parameterSets: vstring tracked  = {'Tauola'}
  })
  PythiaParameters: PSet tracked = ({
   parameterSets: vstring tracked  = {'pythiaUESettings','processParameters'}
   processParameters: vstring tracked  = {'MSEL=0         ! User defined processes','PMAS(5,1)=4.8   ! b quark mass','PMAS(6,1)=172.5 ! t quark mass','MSTJ(1)=1       ! Fragmentation/hadronization on or off','MSTP(61)=1      ! Parton showering on or off'}
   pythiaUESettings: vstring tracked  = {'MSTU(21)=1     ! Check on possible errors during program execution','MSTJ(22)=2     ! Decay those unstable particles','PARJ(71)=10 .  ! for which ctau  10 mm','MSTP(33)=0     ! no K factors in hard cross sections','MSTP(2)=1      ! which order running alphaS','MSTP(51)=10042 ! structure function chosen (external PDF CTEQ6L1)','MSTP(52)=2     ! work with LHAPDF','PARP(82)=1.921 ! pt cutoff for multiparton interactions','PARP(89)=1800. ! sqrts for which PARP82 is set','PARP(90)=0.227 ! Multiple interactions: rescaling power','MSTP(95)=6     ! CR (color reconnection parameters)','PARP(77)=1.016 ! CR','PARP(78)=0.538 ! CR','PARP(80)=0.1   ! Prob. colored parton from BBR','PARP(83)=0.356 ! Multiple interactions: matter distribution parameter','PARP(84)=0.651 ! Multiple interactions: matter distribution parameter','PARP(62)=1.025 ! ISR cutoff','MSTP(91)=1     ! Gaussian primordial kT','PARP(93)=10.0  ! primordial kT-max','MSTP(81)=21    ! multiple parton interactions 1 is Pythia default','MSTP(82)=4     ! Defines the multi-parton model'}
  })
 }

Module: generator SIM
 PSet id:15f5f087060376bf0b7332008f275c18
 products: {
  GenEventInfoProduct_generator__SIM.
  GenRunInfoProduct_generator__SIM.
  edmHepMCProduct_generator__SIM.
 }
 parameters: {
  @module_edm_type: string tracked  = 'EDFilter'
  @module_label: string tracked  = 'generator'
  @module_type: string tracked  = 'Pythia6HadronizerFilter'
  comEnergy: double tracked  = 7000
  ExternalDecays: PSet tracked = ({
   parameterSets: vstring tracked  = {'Tauola'}
  })
  PythiaParameters: PSet tracked = ({
   parameterSets: vstring tracked  = {'pythiaUESettings','processParameters'}
   processParameters: vstring tracked  = {'MSEL=0         ! User defined processes','PMAS(5,1)=4.8   ! b quark mass','PMAS(6,1)=172.5 ! t quark mass','MSTJ(1)=1       ! Fragmentation/hadronization on or off','MSTP(61)=1      ! Parton showering on or off'}
   pythiaUESettings: vstring tracked  = {'MSTU(21)=1     ! Check on possible errors during program execution','MSTJ(22)=2     ! Decay those unstable particles','PARJ(71)=10 .  ! for which ctau  10 mm','MSTP(33)=0     ! no K factors in hard cross sections','MSTP(2)=1      ! which order running alphaS','MSTP(51)=10042 ! structure function chosen (external PDF CTEQ6L1)','MSTP(52)=2     ! work with LHAPDF','PARP(82)=1.921 ! pt cutoff for multiparton interactions','PARP(89)=1800. ! sqrts for which PARP82 is set','PARP(90)=0.227 ! Multiple interactions: rescaling power','MSTP(95)=6     ! CR (color reconnection parameters)','PARP(77)=1.016 ! CR','PARP(78)=0.538 ! CR','PARP(80)=0.1   ! Prob. colored parton from BBR','PARP(83)=0.356 ! Multiple interactions: matter distribution parameter','PARP(84)=0.651 ! Multiple interactions: matter distribution parameter','PARP(62)=1.025 ! ISR cutoff','MSTP(91)=1     ! Gaussian primordial kT','PARP(93)=10.0  ! primordial kT-max','MSTP(81)=21    ! multiple parton interactions 1 is Pythia default','MSTP(82)=4     ! Defines the multi-parton model'}
  })
 }
 PSet id:4de639b1ee42602048cdf34204abecf0
 products: {
  GenEventInfoProduct_generator__SIM.
  GenRunInfoProduct_generator__SIM.
  edmHepMCProduct_generator__SIM.
 }
 parameters: {
  @module_edm_type: string tracked  = 'EDFilter'
  @module_label: string tracked  = 'generator'
  @module_type: string tracked  = 'Pythia8GeneratorFilter'
  comEnergy: double tracked  = 7000
  PythiaParameters: PSet tracked = ({
   parameterSets: vstring tracked  = {'processParameters'}
   processParameters: vstring tracked  = {'Main:timesAllowErrors    = 10000','ParticleDecays:limitTau0 = on','ParticleDecays:tauMax = 10','SoftQCD:minBias = on','SoftQCD:singleDiffractive = on','SoftQCD:doubleDiffractive = on','Tune:pp 5','Tune:ee 3'}
  })
 }

---------EventSetup---------

katilp avatar Apr 15 '21 11:04 katilp

For LHE this would get the gridpack address:

edmProvDump -f "externalLHEProducer LHE" root://eospublic.cern.ch//eos/opendata/cms/mc/RunIIFall15MiniAODv2/ttbb_4FS_ckm_amcatnlo_madspin_pythia8/MINIAODSIM/PU25nsData2015v1_76X_mcRun2_asymptotic_v12-v1/00000/040CCE13-7FBB-E511-BBA1-001F296564FE.root

gives:

[...]
---------Producers with data in file---------
Module: externalLHEProducer LHE
 PSet id:17909eb732333aa2308291816b93c7ac
 products: {
  LHEEventProduct_externalLHEProducer__LHE.
  LHERunInfoProduct_externalLHEProducer__LHE.
 }
 parameters: {
  @module_edm_type: string tracked  = 'EDProducer'
  @module_label: string tracked  = 'externalLHEProducer'
  @module_type: string tracked  = 'ExternalLHEProducer'
  args: vstring tracked  = {'/cvmfs/cms.cern.ch/phys_generator/gridpacks/slc6_amd64_gcc481/13TeV/madgraph/V5_2.2.2/ttbb_4f_ckm_NLO_FXFX/v1/ttbb_4f_ckm_NLO_FXFX_tarball.tar.xz'}
  numberOfParameters: uint32 tracked  = 1
  outputFile: string tracked  = 'cmsgrid_final.lhe'
  scriptName: FileInPath tracked  = V001 GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh 2 /src/GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh
 }

katilp avatar Sep 23 '21 14:09 katilp