Instruction for Generating Private MC for pp Collision at 5.02 TeV

Private MC productions and Driver command

Setup the cmssw CMSSW_7_5_8_patch3 version and check out the following packages from git repository.

cmsrel CMSSW_7_5_8_patch3
cd src
git-cms-addpkg Configuration/Generator
git-cms-addpkg GeneratorInterface
cmsenv
scram b clean // If you compiled before, we recommend to clean up first
scram b -j24

The .cfi file in which generator informations included is copied from Pythia8_X3872ToJpsiRho_nonprompt_Xpt5p0_Pthat5_TuneCUEP8M1_5020GeV.py

This .cff file was modified for X3872 and should be located under the proper directory, "Configuration/Generator/python"

The user decay file added *in this cfi.py:

 user_decay_file = cms.vstring('GeneratorInterface/ExternalDecays/data/PYTHIA6_X3872_Jpsimumu_rho0pipi.dec'),
 list_forced_decays = cms.vstring('myX3872'),

Decay file for X3872 is: PYTHIA6_X3872_Jpsimumu_rho0pipi.dec


#This is the decay file for X3872->J/psi pi+ pi-

Alias      MyJ/psi  J/psi
ChargeConj MyJ/psi  MyJ/psi
#
Decay MyJ/psi
  1.000         mu+       mu-            PHOTOS VLL;
Enddecay
#
#
Alias Myrho0 rho0
ChargeConj Myrho0 Myrho0
#
Decay Myrho0
1.000    pi+ pi-                         VSS;
Enddecay   
# 
#
Alias      myX3872  chi_c1
ChargeConj myX3872  myX3872
Particle myX3872 3.872 0.003 
#
Decay myX3872
  1.000         MyJ/psi      Myrho0          PHSP;
Enddecay
End

After having related changing execute the scram command :

scram b -j24

Step 1 : GEN-SIM step

Proper cmsDriver options:

cmsDriver.py Configuration/Generator/python/Pythia8_X3872ToJpsiRho_nonprompt_Xpt5p0_Pthat5_TuneCUEP8M1_5020GeV_cfi.py --conditions 75X_mcRun2_asymptotic_ppAt5TeV_v3 -s GEN,SIM -n 300 --eventcontent RAWSIM --datatier GEN-SIM --beamspot Nominal5TeVpp2015Collision --customise SLHCUpgradeSimulations /Configuration/postLS1Customs.customisePostLS1 --magField 38T_PostLS1 --no_exec --python_filename Pythia8_X3872ToJpsiRho_nonprompt_Xpt5p0_Pthat5_TuneCUEP8M1_5020GeV_pp_GEN_SIM.py 

it will generate config file.

Pythia8_X3872ToJpsiRho_nonprompt_Xpt5p0_Pthat5_TuneCUEP8M1_5020GeV_pp_GEN_SIM.py

Running CMSSW code locally

Before submitting jobs to the Grid, it is necessary to run the code on interactive mode over a few events to discard problems not related with CRAB. it is also provide us to check the filter efficiency.

when you run the your cfg.py with 15000 events you will see the a part of log file which shows filter efficiency as follows :

cmsRun Pythia8_X3872ToJpsiRho_nonprompt_Xpt5p0_Pthat5_TuneCUEP8M1_5020GeV_pp_GEN_SIM.py

GenXsecAnalyzer: ------------------------------------

Before Filtrer: total cross section = 3.979e+07 +- 1.675e+05 pb

Filter efficiency (taking into account weights) = (18) / (15000) = 1.200e-03 +- 2.827e-04

Filter efficiency (event-level) = (18) / (15000) = 1.200e-03 +- 2.827e-04

After filter: final cross section = 4.775e+04 +- 1.125e+04 pb

So the filter efficiency is only 0.12%. In this case we need to change the ptHatMin from 5 to 15 and MinPt for BX3872Daufilter and BJpsiDaufilter from 5 to 0 in cfg.py

PhaseSpace:pTHatMin = 15., ##changed from 5 to 15

process.BX3872Daufilter = cms.EDFilter("PythiaMomDauFilter",
MomMinPt = cms.untracked.double(0.0), ## changed from 5 to 0
process.BJpsiDaufilter = cms.EDFilter("PythiaMomDauFilter",

MomMinPt = cms.untracked.double(0.0), ## changed from 5 to 0

After changing the values the result shows better efficiency as follows:

GenXsecAnalyzer: ------------------------------------ Before Filtrer: total cross section

Filter efficiency (taking into account weights) = (32) / (10000) = 3.200e-03 +- 5.648e-04

Filter efficiency (event-level) = (32) / (10000) = 3.200e-03 +- 5.648e-04

After filter: final cross section = 5.921e+03 +- 1.045e+03 pb

-hmm..0.32%, improved than 0.12%

-32/10000*1000000=3200 events, Te resulted events should be larger then 10k.

-then submit 1000 jobs with 10000 input events per job.

-then 32k events will be acheived

Generating private MC with 10M events for step1_GENSIM :

We need to provide a CMSSW parameter-set configuration file to generate MC events. The configuration file is the output of GEN-SIM step which is pointed out above Pythia8_X3872ToJpsiRho_nonprompt_Xpt5p0_Pthat5_TuneCUEP8M1_5020GeV_pp_GEN_SIM.py

In order to have the correct environment setup, we should source the environment setting has to be the following at most sites;

source /cvmfs/cms.cern.ch/crab3/crab.sh

Crab configuration file for GENSIM Step:

The sample of crab configuration file is

crabConfig_Pythia8_X3872ToJPsiRho0_nonprompt_Xpt5p0_Pthat5_TuneCUEP8M1_5020GeV_ppMC_generation.py


from CRABClient.UserUtilities import config, getUsernameFromSiteDB
config = config()

config.General.requestName = 'Pythia8PP_XToJpsiPiPi_Xpt5p0_Pthat5_5020GeV_v2_10M_event'
config.General.workArea = 'X3872work_10M_event'
config.General.transferOutputs = True
config.General.transferLogs = True

config.JobType.pluginName = 'PrivateMC'   
config.JobType.psetName = 'Pythia8_X3872ToJpsiRho_nonprompt_Xpt5p0_Pthat5_TuneCUEP8M1_5020GeV_pp_GEN_SIM.py'

config.Data.outputPrimaryDataset = 'Pythia8_XToJpsiPiPi_5020GeV_PP_v2_20KPerJ_event'
config.Data.splitting = 'EventBased'
config.Data.unitsPerJob = 20000
NJOBS = 500  # This is not a configuration parameter, but an auxiliary variable that we use in the next line.
config.Data.totalUnits = config.Data.unitsPerJob * NJOBS
config.Data.outLFNDirBase = '/store/user/cdozen'
config.Data.publication = True
config.Data.outputDatasetTag = 'Pythia8PP_XToJpsiPiPi_Xpt5p0_Pthat5_5020GeV_v2_20KPerJ_event'

config.Site.storageSite = 'T2_CH_CERN'

The following crab command must be executed for the task submission

crab submit -c crabConfig_Pythia8_X3872ToJPsiRho0_nonprompt_Xpt5p0_Pthat5_TuneCUEP8M1_5020GeV_ppMC_generation.py

The status of the GENSIM state is done successfully.

step1: GENSIM
cfi.py Pythia8_X3872ToJpsiRho_nonprompt_Xpt5p0_Pthat5_TuneCUEP8M1_5020GeV.py
Output Dataset Name Output Dataset
Total Number of Event 28043
Status Done
Efficency 32% out of 10M input event
dbs instance prod/phys03

The corresponding output Dataset name in DAS query: Pythia8_XToJpsiPiPi_5020GeV_PP_v2_20KPerJ_event/cdozen-Pythia8PP_XToJpsiPiPi_Xpt5p0_Pthat5_5020GeV_v2_20KPerJ_event-2fa28e4a51c87dafe55619e02ac59598/USER

Step 2 : DIGI step

Proper cmsDriver options:

cmsDriver.py step2_NoPU_Pythia8_X3872ToJpsiRho_nonprompt_Xpt5p0_Pthat5_TuneCUEP8M1_5020GeV_pp --conditions 75X_mcRun2_asymptotic_ppAt5TeV_v3 --eventcontent RAWSIM -s DIGI,L1,DIGI2RAW,HLT:PRef,RAW2DIGI,L1Reco --datatier GEN-SIM-RAW --customise SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1 -n 1 --no_exec
it will create following the cfg.py file for DIGI step:

step2_Pythia8_X3872ToJpsiRho_nonprompt_Xpt5p0_Pthat5_TuneCUEP8M1_5020GeV_pp_DIGI_L1_DIGI2RAW_HLT_RAW2DIGI_L1Reco.py

Running CMSSW code locally

Just for testing run the cfg.py on interactive mode over some events.As input files use the output of GENSIM step.(Click here to see the output of GENSIM)

cmsRun step2_NoPU_Pythia8_X3872ToJpsiRho_nonprompt_Xpt5p0_Pthat5_TuneCUEP8M1_5020GeV_pp_DIGI_L1_DIGI2RAW_HLT_RAW2DIGI_L1Reco.py

Crab configuration file for DIGI Step

The crab configuration file for whole event in input dataset shown below:

crabConfig_step2_no_PU.py

from CRABClient.UserUtilities import config, getUsernameFromSiteDB
config = config()

config.General.requestName = 'Pythia8PP_XToJpsiPiPi_Xpt5p0_Pthat5_5020GeV_DIGI_N0_PU'
config.General.workArea = 'X3872work_noPU_event'
config.General.transferOutputs = True
config.JobType.pluginName = 'Analysis'
config.JobType.psetName = 'step2_NoPU_Pythia8_X3872ToJpsiRho_nonprompt_Xpt5p0_Pthat5_TuneCUEP8M1_5020GeV_pp_DIGI_L1_DIGI2RAW_HLT_RAW2DIGI_L1Reco.py'

config.Data.inputDataset = '/Pythia8_XToJpsiPiPi_5020GeV_PP_v2_20KPerJ_event/cdozen-Pythia8PP_XToJpsiPiPi_Xpt5p0_Pthat5_5020GeV_v2_20KPerJ_event-2fa28e4a51c87dafe55619e02ac59598/USER'
config.Data.splitting = 'FileBased'
config.Data.unitsPerJob = 100
config.Data.totalUnits = -1
config.Data.outLFNDirBase = '/store/user/cdozen'
config.Data.publication = True
config.Data.inputDBS = 'phys03'
config.Data.publishDBS = 'phys03'
config.Data.outputDatasetTag = 'Pythia8PP_XToJpsiPiPi_Xpt5p0_Pthat5_5020GeV_DIGI_NO_PU'

config.Site.storageSite = 'T2_CH_CERN'

crabConfig submit -c crabConfig_step2_no_PU.py

The status of the DIGI state is done successfully.

step2: DIGI
Input Dataset Name Input Data set
Status Done
output Dataset Name Output Dataset
Total Number of Event 28043
dbs instance prod/phys03

Step 3 : RECO step

Proper cmsDriver options:

cmsDriver.py step3_NoPU_Pythia8_X3872ToJpsiRho_nonprompt_Xpt5p0_Pthat5_TuneCUEP8M1_5020GeV_pp --conditions 75X_mcRun2_asymptotic_ppAt5TeV_v3 --eventcontent AODSIM -s RAW2DIGI,L1Reco,RECO --datatier GEN-SIM-RECO --customise=SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1 -n 10 --no_exec

run the cfg.py on interactive mode as shown in step1 and step2.

Crab configuration file for RECO Step

Use the step2 output as an input here.

crabConfig_step3_no_PU.py

from CRABClient.UserUtilities import config, getUsernameFromSiteDB
config = config()

config.General.requestName = 'MC_Pythia8PP_XToJpsiPiPi_Xpt5p0_Pthat5_5020GeV_AOD_N0_PU'
config.General.workArea = 'X3872work_noPU_event'
config.General.transferOutputs = True
 
config.JobType.pluginName = 'Analysis'
config.JobType.psetName = 'step3_NoPU_Pythia8_X3872ToJpsiRho_nonprompt_Xpt5p0_Pthat5_TuneCUEP8M1_5020GeV_pp_RAW2DIGI_L1Reco_RECO.py'

config.Data.inputDataset = '/Pythia8_XToJpsiPiPi_5020GeV_PP_v2_20KPerJ_event/cdozen-Pythia8PP_XToJpsiPiPi_Xpt5p0_Pthat5_5020GeV_DIGI_NO_PU-b30eb5415381e7fe5dc09056be9c6515/USER'
config.Data.splitting = 'FileBased'
config.Data.unitsPerJob = 1
config.Data.totalUnits = -1
config.Data.outLFNDirBase = '/store/user/cdozen'
config.Data.publication = True
config.Data.inputDBS = 'phys03'
config.Data.publishDBS = 'phys03'
config.Data.outputDatasetTag = 'MC_Pythia8PP_XToJpsiPiPi_Xpt5p0_Pthat5_5020GeV_AOD_NO_PU'

config.Site.storageSite = 'T2_CH_CERN'

RECO step is done successfully.

step3: RECO
Input Dataset Name Input Dataset
Status Done
output Dataset Name Output Dataset
dbs instance prod/phys03

-- CandanDozen - 2016-06-09

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 2019-08-05 - CandanDozen
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback