Skip to content

Commit

Permalink
Merge pull request #3 from shane-breeze/master
Browse files Browse the repository at this point in the history
Add T1qqqq fastsim/fullsim setups
  • Loading branch information
benkrikler authored Jun 27, 2017
2 parents 5ca311c + f7437e4 commit 37878bf
Show file tree
Hide file tree
Showing 23 changed files with 26,568 additions and 96 deletions.
94 changes: 2 additions & 92 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ source /cvmfs/cms.cern.ch/crab3/crab.sh
voms-proxy-init --voms cms --valid 168:00
```

Run the above commands before the "Only once" section. Run the following after
the "Only once" section:
```bash
cd CMSSW_8_0_21/src
cmsenv
cd -
```

### Only once
Create a directory to keep all your LLP files and directories and move into it.
Checkout the master branch of this repository:
Expand All @@ -28,91 +20,9 @@ git clone [email protected]:benkrikler/LLP_generation.git
cd LLP_generation
```

Checkout CMSSW version `8_0_21`:
```bash
export SCRAM_ARCH=slc6_amd64_gcc530
cmsrel CMSSW_8_0_21
cd CMSSW_8_0_21/src
cmsenv
mkdir -p Configuration/GenProduction/python/
cp ../../fragments/T1qqqqLL_fragment.py Configuration/GenProduction/python/
scram b -j 9
cd -
```

## Commands to produce the CMSSW config files
This repository already contains the files produced by the following commands.
But for reference, here are the commands for each step.

### GEN-SIM
Runs Madgraph and Pythia
```bash
cmsDriver.py Configuration/GenProduction/python/T1qqqqLL_fragment.py \
--mc \
--eventcontent RAWSIM \
--customise_commands "process.source.numberEventsInLuminosityBlock = cms.untracked.uint32(50) \n process.source.firstRun = cms.untracked.uint32(3) \n process.generator.initialSeed = cms.untracked.uint32(3)" \
--datatier GEN-SIM \
--conditions 80X_mcRun2_asymptotic_2016_TrancheIV_v6 \
--beamspot Realistic50ns13TeVCollision \
--step GEN,SIM \
--magField 38T_PostLS1 \
--fileout file:T1qqqqLL_GEN-SIM.root \
--python_filename step1_T1qqqqLL_GEN-SIM_cfg.py \
--no_exec \
-n 50
```

### PU Mixing
Run the PU mixing step over all events produced by the GEN-SIM step
```bash
cmsDriver.py --mc \
--eventcontent PREMIXRAW \
--datatier GEN-SIM-RAW \
--conditions 80X_mcRun2_asymptotic_2016_TrancheIV_v6 \
--step DIGIPREMIX_S2,DATAMIX,L1,DIGI2RAW,HLT:@frozen2016 \
--nThreads 4 \
--datamix PreMix \
--era Run2_2016 \
--filein file:T1qqqqLL_GEN-SIM.root \
--fileout file:T1qqqqLL_PUMix.root \
--python_filename step2_T1qqqqLL_PUMix_cfg.py \
--pileup_input "/store/mc/RunIISpring15PrePremix/Neutrino_E-10_gun/GEN-SIM-DIGI-RAW/PUMoriond17_80X_mcRun2_asymptotic_2016_TrancheIV_v2-v2/90023/FED016AB-6A85-E611-96E7-002590A80DF0.root" \
--no_exec \
-n -1
```

### AODSIM
```bash
cmsDriver.py --mc \
--eventcontent AODSIM,DQM \
--runUnscheduled \
--datatier AODSIM,DQMIO \
--conditions 80X_mcRun2_asymptotic_2016_TrancheIV_v6 \
--step RAW2DIGI,RECO,EI,DQM:DQMOfflinePOGMC \
--nThreads 4 \
--era Run2_2016 \
--filein file:T1qqqqLL_PUMix.root \
--fileout file:T1qqqqLL_AODSIM.root \
--python_filename step3_T1qqqqLL_AODSIM_cfg.py \
--no_exec \
-n -1
```

### MINIAODSIM
```bash
cmsDriver.py --mc \
--eventcontent MINIAODSIM \
--runUnscheduled \
--datatier MINIAODSIM \
--conditions 80X_mcRun2_asymptotic_2016_TrancheIV_v6 \
--step PAT \
--era Run2_2016 \
--filein file:T1qqqqLL_AODSIM.root \
--fileout file:T1qqqqLL_MINIAODSIM.root \
--python_filename step4_T1qqqqLL_MINIAODSIM_cfg.py \
--no_exec \
-n -1
```
The `cmsDriver.py` commands used to produce the CMSSW config files can be found
in the READMEs of the respective subdirectories of this repository.

## How to submit
To submit locally, just run pass the CMSSW config file to cmsRun:
Expand Down
85 changes: 85 additions & 0 deletions T1qqqqLL_fullsim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# T1qqqqLL full sim production

## Setup CMSSW

Checkout CMSSW version `8_0_21`:
```bash
export SCRAM_ARCH=slc6_amd64_gcc530
cmsrel CMSSW_8_0_21
cd CMSSW_8_0_21/src
cmsenv
mkdir -p Configuration/GenProduction/python/
cp ../../fragments/T1qqqqLL_fragment.py Configuration/GenProduction/python/
scram b -j 9
cd -
```

### GEN-SIM
Runs Madgraph and Pythia
```bash
cmsDriver.py Configuration/GenProduction/python/T1qqqqLL_fragment.py \
--mc \
--eventcontent RAWSIM \
--customise_commands "process.source.numberEventsInLuminosityBlock = cms.untracked.uint32(50) \n process.source.firstRun = cms.untracked.uint32(3) \n process.generator.initialSeed = cms.untracked.uint32(3)" \
--datatier GEN-SIM \
--conditions 80X_mcRun2_asymptotic_2016_TrancheIV_v6 \
--beamspot Realistic50ns13TeVCollision \
--step GEN,SIM \
--magField 38T_PostLS1 \
--fileout file:T1qqqqLL_GEN-SIM.root \
--python_filename step1_T1qqqqLL_GEN-SIM_cfg.py \
--no_exec \
-n 50
```

### PU Mixing
Run the PU mixing step over all events produced by the GEN-SIM step
```bash
cmsDriver.py --mc \
--eventcontent PREMIXRAW \
--datatier GEN-SIM-RAW \
--conditions 80X_mcRun2_asymptotic_2016_TrancheIV_v6 \
--step DIGIPREMIX_S2,DATAMIX,L1,DIGI2RAW,HLT:@frozen2016 \
--nThreads 4 \
--datamix PreMix \
--era Run2_2016 \
--filein file:T1qqqqLL_GEN-SIM.root \
--fileout file:T1qqqqLL_PUMix.root \
--python_filename step2_T1qqqqLL_PUMix_cfg.py \
--pileup_input "/store/mc/RunIISpring15PrePremix/Neutrino_E-10_gun/GEN-SIM-DIGI-RAW/PUMoriond17_80X_mcRun2_asymptotic_2016_TrancheIV_v2-v2/90023/FED016AB-6A85-E611-96E7-002590A80DF0.root" \
--no_exec \
-n -1
```

### AODSIM
```bash
cmsDriver.py --mc \
--eventcontent AODSIM,DQM \
--runUnscheduled \
--datatier AODSIM,DQMIO \
--conditions 80X_mcRun2_asymptotic_2016_TrancheIV_v6 \
--step RAW2DIGI,RECO,EI,DQM:DQMOfflinePOGMC \
--nThreads 4 \
--era Run2_2016 \
--filein file:T1qqqqLL_PUMix.root \
--fileout file:T1qqqqLL_AODSIM.root \
--python_filename step3_T1qqqqLL_AODSIM_cfg.py \
--no_exec \
-n -1
```

### MINIAODSIM
```bash
cmsDriver.py --mc \
--eventcontent MINIAODSIM \
--runUnscheduled \
--datatier MINIAODSIM \
--conditions 80X_mcRun2_asymptotic_2016_TrancheIV_v6 \
--step PAT \
--era Run2_2016 \
--filein file:T1qqqqLL_AODSIM.root \
--fileout file:T1qqqqLL_MINIAODSIM.root \
--python_filename step4_T1qqqqLL_MINIAODSIM_cfg.py \
--no_exec \
-n -1
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
74 changes: 74 additions & 0 deletions T1qqqq_fastsim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Setup commands

## Gridpack to AODSIM
```bash
source /cvmfs/cms.cern.ch/cmsset_default.sh
export SCRAM_ARCH=slc6_amd64_gcc530
if [ -r CMSSW_8_0_5_patch1/src ]
then
echo release CMSSW_8_0_5_patch1 already exists
else
scram p CMSSW CMSSW_8_0_5_patch1
fi
cd CMSSW_8_0_5_patch1/src
eval `scram runtime -sh`

export X509_USER_PROXY=$HOME/private/personal/voms_proxy.cert
mkdir -p Configuration/GenProduction/python/
cp ../../fragments/T1qqqq_fragment.py Configuration/GenProduction/python/

scram b
cd ../../
cmsDriver.py Configuration/GenProduction/python/T1qqqq_fragment.py \
--fileout file:SUS-RunIISpring16FSPremix-00008.root \
--pileup_input "dbs:/Neutrino_E-10_gun/RunIISpring16FSPremix-PUSpring16_80X_mcRun2_asymptotic_2016_v3-v1/GEN-SIM-DIGI-RAW" \
--mc \
--eventcontent AODSIM \
--fast \
--customise SimGeneral/DataMixingModule/customiseForPremixingInput.customiseForPreMixingInput,Configuration/DataProcessing/Utils.addMonitoring \
--datatier AODSIM \
--conditions 80X_mcRun2_asymptotic_v12 \
--beamspot Realistic50ns13TeVCollision \
--customise_commands "process.source.numberEventsInLuminosityBlock = cms.untracked.uint32(200)" \
--step GEN,SIM,RECOBEFMIX,DIGIPREMIX_S2,DATAMIX,L1,DIGI2RAW,L1Reco,RECO,HLT:@fake1 \
--datamix PreMix \
--era Run2_25ns \
--python_filename step1_T1qqqq_AODSIM_cfg.py \
--no_exec \
-n 2880 || exit $?
```

## AODSIM to MINIAODSIM

```bash
source /cvmfs/cms.cern.ch/cmsset_default.sh
export SCRAM_ARCH=slc6_amd64_gcc530
if [ -r CMSSW_8_0_5_patch1/src ]
then
echo release CMSSW_8_0_5_patch1 already exists
else
scram p CMSSW CMSSW_8_0_5_patch1
fi
cd CMSSW_8_0_5_patch1/src
eval `scram runtime -sh`

export X509_USER_PROXY=$HOME/private/personal/voms_proxy.cert

scram b
cd ../../
cmsDriver.py step1 \
--filein "dbs:/SMS-T1qqqq_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISpring16FSPremix-80X_mcRun2_asymptotic_v12-v2/AODSIM" \
--fileout file:SUS-RunIISpring16MiniAODv2-00193.root \
--mc \
--eventcontent MINIAODSIM \
--runUnscheduled \
--fast \
--datatier MINIAODSIM \
--conditions 80X_mcRun2_asymptotic_2016_miniAODv2_v0 \
--step PAT \
--era Run2_25ns \
--python_filename step2_T1qqqq_MINIAODSIM_cfg.py \
--no_exec
--customise Configuration/DataProcessing/Utils.addMonitoring \
-n 2880 || exit $?
```
22 changes: 22 additions & 0 deletions T1qqqq_fastsim/crab_submission_GEN-SIM.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from CRABClient.UserUtilities import config, getUsernameFromSiteDB
config = config()

config.General.requestName = 'T1qqqq'
config.General.workArea = 'T1qqqq_GEN-SIM'
config.General.transferOutputs = True
config.General.transferLogs = True

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

config.Data.outputPrimaryDataset = 'T1qqqq_fastsim_Madgraph_Pythia'
config.Data.inputDBS = 'global'
config.Data.splitting = 'EventBased'
config.Data.unitsPerJob = 500
config.Data.totalUnits = 100000
config.Data.outLFNDirBase = '/store/user/%s/' % (getUsernameFromSiteDB())
config.Data.publication = True
config.Data.outputDatasetTag = 'T1qqqq_fastsim_Madgraph_Pythia_test_GEN-SIM'

config.Site.storageSite = 'T2_UK_London_IC'
#config.Site.storageSite = 'T2_UK_SGrid_Bristol'
23 changes: 23 additions & 0 deletions T1qqqq_fastsim/crab_submission_MINIAODSIM.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from CRABClient.UserUtilities import config, getUsernameFromSiteDB
config = config()

config.General.requestName = 'T1qqqq'
config.General.workArea = 'T1qqqq_MINIAODSIM'
config.General.transferOutputs = True
config.General.transferLogs = True

config.JobType.pluginName = 'ANALYSIS'
config.JobType.psetName = 'step2_T1qqqq_MINIAODSIM_cfg.py'
config.JobType.outputFiles = ['SUS-RunIISpring16MiniAODv2-00193.root']

config.Data.inputDataset = '/T1qqqq_fastsim_Madgraph_Pythia/sbreeze-T1qqqq_fastsim_Madgraph_Pythia_test_GEN-SIM-8b75c65b5e25064b691cce6206972a0a/USER'
config.Data.inputDBS = 'phys03'
config.Data.splitting = 'EventAwareLumiBased'
config.Data.unitsPerJob = 500
config.Data.totalUnits = -1
config.Data.outLFNDirBase = '/store/user/%s/' % (getUsernameFromSiteDB())
config.Data.publication = True
config.Data.outputDatasetTag = 'T1qqqq_fastssim_Madgraph_Pythia_MINIAODSIM'

config.Site.storageSite = 'T2_UK_London_IC'
#config.Site.storageSite = 'T2_UK_SGrid_Bristol'
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ def matchParams(mass):


scanBlocks = []
scanBlocks.append(gridBlock(600, 1200, 100, 100))
scanBlocks.append(gridBlock(1200, 2301, 50, 100))
scanBlocks.append(gridBlock(600, 650, 100, 100))
#scanBlocks.append(gridBlock(1200, 2301, 50, 100))
minDM = 25
ymin, ymed, ymax = 0, 500, 1600
ymin, ymed, ymax = 0, 50, 100


# Number of events for mass point, in thousands
Expand Down Expand Up @@ -220,4 +220,4 @@ def events(mass):
SLHATableForPythia8 = cms.string('%s' % slhatable),
PythiaParameters = basePythiaParameters,
),
)
)
Loading

0 comments on commit 37878bf

Please sign in to comment.