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 for calib
in process.AlignmentProducer.calibrations:
32 calib.saveToDB = process.AlignmentProducer.saveToDB
33 calib.treeFile = process.AlignmentProducer.algoConfig.treeFile
34 calib.mergeTreeFiles = process.AlignmentProducer.algoConfig.mergeTreeFiles
39 import Alignment.CommonAlignment.tools.trackselectionRefitting
as trackRefitter
40 kwargs = {
"cosmicsDecoMode": cosmics_deco_mode,
41 "cosmicsZeroTesla": cosmics_zero_tesla}
42 if TTRHBuilder
is not None: kwargs[
"TTRHBuilder"] = TTRHBuilder
43 process.TrackRefittingSequence \
44 = trackRefitter.getSequence(process, collection, **kwargs)
49 if collection
in (
"ALCARECOTkAlCosmicsCTF0T",
50 "ALCARECOTkAlCosmicsInCollisions"):
51 process.load(
"Alignment.CommonAlignment.apvModeFilter_cfi")
52 process.apvModeFilter.apvMode =
"deco" if cosmics_deco_mode
else "peak" 59 process.source = cms.Source(
"PoolSource", fileNames = input_files)
62 if (json_file !=
"")
and (json_file !=
"placeholder_json"):
63 import FWCore.PythonUtilities.LumiList
as LumiList
65 process.source.lumisToProcess = lumi_list
70 process.p = cms.Path(process.TrackRefittingSequence*
71 process.AlignmentProducer)
72 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)