Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:28:49

0001 # simple test for the BunchCrossingFilter
0002 
0003 # colliding bunches in run 317435, fill 6759, scheme 25ns_2556b_2544_2215_2332_144bpi_20injV2:
0004 #     81-128,   136-183
0005 #    215-262,   270-317,   325-372,
0006 #    404-451,   459-506,   514-561,
0007 #    593-640,   648-695,   703-750,
0008 #    786-833,   841-888,
0009 #    920-967,   975-1022, 1030-1077,
0010 #   1109-1156, 1164-1211, 1219-1266,
0011 #   1298-1345, 1353-1400, 1408-1455,
0012 #   1487-1534, 1542-1589, 1597-1644,
0013 #   1680-1727, 1735-1782,
0014 #   1814-1861, 1869-1916, 1924-1971,
0015 #   2003-2050, 2058-2105, 2113-2160,
0016 #   2192-2239, 2247-2294, 2302-2349,
0017 #   2381-2428, 2436-2483, 2491-2538,
0018 #   2574-2621, 2629-2676,
0019 #   2708-2755, 2763-2810, 2818-2865,
0020 #   2897-2944, 2952-2999, 3007-3054,
0021 #   3086-3133, 3141-3188, 3196-3243,
0022 #   3275-3322, 3330-3377, 3385-3432
0023 # (see https://lpc.web.cern.ch/fillingSchemes/2018/25ns_2556b_2544_2215_2332_144bpi_20injV2.csv)
0024 
0025 from builtins import range
0026 import FWCore.ParameterSet.Config as cms
0027 from FWCore.ParameterSet.pfnInPath import *
0028 
0029 process = cms.Process('TEST')
0030 
0031 process.maxEvents = cms.untracked.PSet(
0032     input = cms.untracked.int32(-1)
0033 )
0034 
0035 process.options = cms.untracked.PSet(
0036     wantSummary = cms.untracked.bool(True)
0037 )
0038 
0039 process.load('FWCore.MessageService.MessageLogger_cfi')
0040 
0041 # input data
0042 process.source = cms.Source('PoolSource',
0043     fileNames = cms.untracked.pfnInPaths('FWCore/Modules/data/rawData_empty_CMSSW_10_2_0.root')
0044 )
0045 
0046 from FWCore.Modules.bunchCrossingFilter_cfi import bunchCrossingFilter as _bunchCrossingFilter
0047 
0048 # empty input, do not select any bunch crossings
0049 process.selectNone = _bunchCrossingFilter.clone(
0050    bunches = cms.vuint32(),
0051 )
0052 
0053 # full range of possible bunch crossings [1,3564]
0054 process.selectAll = _bunchCrossingFilter.clone(
0055    bunches = cms.vuint32(list(range(1,3565)))
0056 )
0057 
0058 # select bx 536
0059 process.selectSingle = _bunchCrossingFilter.clone(
0060    bunches = cms.vuint32(536)
0061 )
0062 
0063 # select the whole train 514-561
0064 process.selectTrain = _bunchCrossingFilter.clone(
0065    bunches = cms.vuint32(list(range(514,562)))
0066 )
0067 
0068 # inverted to veto (non-colliding) bx 1
0069 process.selectEmpty = _bunchCrossingFilter.clone(
0070    bunches = cms.vuint32(1)
0071 )
0072 
0073 process.SelectNone        = cms.Path( process.selectNone )
0074 process.SelectAll         = cms.Path( process.selectAll )
0075 process.SelectSingle      = cms.Path( process.selectSingle )
0076 process.SelectTrain       = cms.Path( process.selectTrain )
0077 process.VetoEmpty         = cms.Path( ~ process.selectEmpty )
0078 process.VetoSingle        = cms.Path( ~ process.selectSingle )
0079 process.VetoTrain         = cms.Path( ~ process.selectTrain )
0080 process.SelectTrainButOne = cms.Path( process.selectTrain * ~ process.selectSingle )