Skip to content

Commit

Permalink
Direct simu tests added.
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-kaspar committed Jun 30, 2020
1 parent 4f31f95 commit 83c4850
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Validation/CTPPS/test/simu/run_multiple
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

#----------------------------------------------------------------------------------------------------

function RunOne()
{
local config="$1"
local era="$2"

local cfg="simu_${config}_cfg.py"
local log="simu_${config}.log"
local out_tracks="simu_${config}_tracks.root"
local out_protons="simu_${config}_protons.root"

cat "template_cfg.py" | sed "\
s|\$ERA|$era|;\
s|\$CONFIG|$config|;\
s|\$OUT_TRACKS|$out_tracks|;\
s|\$OUT_PROTONS|$out_protons|;\
" > "$cfg"

cmsRun "$cfg" &> "$log" &
}

#----------------------------------------------------------------------------------------------------

RunOne "2016_preTS2" "Run2_2016"
RunOne "2016_postTS2" "Run2_2016"

RunOne "2017_preTS2" "Run2_2017"
RunOne "2017_postTS2" "Run2_2017"

RunOne "2018_preTS1" "Run2_2018"
RunOne "2018_TS1_TS2" "Run2_2018"
RunOne "2018_postTS2" "Run2_2018"
65 changes: 65 additions & 0 deletions Validation/CTPPS/test/simu/template_cfg.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import FWCore.ParameterSet.Config as cms

from Configuration.Eras.Era_$ERA_cff import *
process = cms.Process('CTPPSTest', $ERA)

# load config
import Validation.CTPPS.simu_config.year_$CONFIG_cff as config
process.load("Validation.CTPPS.simu_config.year_$CONFIG_cff")
config.SetDefaults(process)

# minimal logger settings
process.MessageLogger = cms.Service("MessageLogger",
statistics = cms.untracked.vstring(),
destinations = cms.untracked.vstring('cout'),
cout = cms.untracked.PSet(
threshold = cms.untracked.string('WARNING')
)
)

# number of events
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(1000)
)

# track distribution plotter
process.ctppsTrackDistributionPlotter = cms.EDAnalyzer("CTPPSTrackDistributionPlotter",
tagTracks = cms.InputTag("ctppsLocalTrackLiteProducer"),

rpId_45_F = process.rpIds.rp_45_F,
rpId_45_N = process.rpIds.rp_45_N,
rpId_56_N = process.rpIds.rp_56_N,
rpId_56_F = process.rpIds.rp_56_F,

outputFile = cms.string("$OUT_TRACKS")
)

# reconstruction plotter
process.ctppsProtonReconstructionPlotter = cms.EDAnalyzer("CTPPSProtonReconstructionPlotter",
tagTracks = cms.InputTag("ctppsLocalTrackLiteProducer"),
tagRecoProtonsSingleRP = cms.InputTag("ctppsProtons", "singleRP"),
tagRecoProtonsMultiRP = cms.InputTag("ctppsProtons", "multiRP"),

rpId_45_F = process.rpIds.rp_45_F,
rpId_45_N = process.rpIds.rp_45_N,
rpId_56_N = process.rpIds.rp_56_N,
rpId_56_F = process.rpIds.rp_56_F,

association_cuts_45 = process.ctppsProtons.association_cuts_45,
association_cuts_56 = process.ctppsProtons.association_cuts_56,

outputFile = cms.string("$OUT_PROTONS")
)

# processing path
process.p = cms.Path(
process.generator
* process.beamDivergenceVtxGenerator
* process.ctppsDirectProtonSimulation

* process.reco_local
* process.ctppsProtons

* process.ctppsTrackDistributionPlotter
* process.ctppsProtonReconstructionPlotter
)

0 comments on commit 83c4850

Please sign in to comment.