1 import FWCore.ParameterSet.Config
as cms
4 def setup(process, input_files, collection,
6 cosmics_zero_tesla =
False,
7 cosmics_deco_mode =
True,
9 """Mille-specific setup. 12 - `process`: cms.Process object 13 - `input_files`: input file list -> cms.untracked.vstring() 14 - `collection`: track collection to be used 15 - `cosmics_zero_tesla`: triggers the corresponding track selection 16 - `cosmics_deco_mode`: triggers the corresponding track selection 17 - `TTRHBuilder`: TransientTrackingRecHitBuilder used in the track selection 18 and refitting sequence; 19 defaults to the default of the above-mentioned sequence 24 process.AlignmentProducer.saveToDB =
False 25 process.AlignmentProducer.saveApeToDB =
False 26 process.AlignmentProducer.saveDeformationsToDB =
False 31 import Alignment.CommonAlignment.tools.trackselectionRefitting
as trackRefitter
32 kwargs = {
"cosmicsDecoMode": cosmics_deco_mode,
33 "cosmicsZeroTesla": cosmics_zero_tesla}
34 if TTRHBuilder
is not None: kwargs[
"TTRHBuilder"] = TTRHBuilder
35 process.TrackRefittingSequence \
36 = trackRefitter.getSequence(process, collection, **kwargs)
41 if collection
in (
"ALCARECOTkAlCosmicsCTF0T",
42 "ALCARECOTkAlCosmicsInCollisions"):
43 process.load(
"Alignment.CommonAlignment.apvModeFilter_cfi")
44 process.apvModeFilter.apvMode =
"deco" if cosmics_deco_mode
else "peak" 51 process.source = cms.Source(
"PoolSource", fileNames = input_files)
54 if (json_file !=
"")
and (json_file !=
"placeholder_json"):
55 import FWCore.PythonUtilities.LumiList
as LumiList
57 process.source.lumisToProcess = lumi_list
62 process.p = cms.Path(process.TrackRefittingSequence*
63 process.AlignmentProducer)
64 if hasattr(process,
"mps_filters"): process.p.insert(0, process.mps_filters)
def add_filter(process, ed_filter)
def setup(process, input_files, collection, json_file="", cosmics_zero_tesla=False, cosmics_deco_mode=True, TTRHBuilder=None)