1 from __future__
import absolute_import
2 import FWCore.ParameterSet.Config
as cms
5 def setup(process, input_files, collection,
7 cosmics_zero_tesla = False,
8 cosmics_deco_mode = True,
10 """Mille-specific setup. 13 - `process`: cms.Process object 14 - `input_files`: input file list -> cms.untracked.vstring() 15 - `collection`: track collection to be used 16 - `cosmics_zero_tesla`: triggers the corresponding track selection 17 - `cosmics_deco_mode`: triggers the corresponding track selection 18 - `TTRHBuilder`: TransientTrackingRecHitBuilder used in the track selection 19 and refitting sequence; 20 defaults to the default of the above-mentioned sequence 25 process.AlignmentProducer.saveToDB =
False 26 process.AlignmentProducer.saveApeToDB =
False 27 process.AlignmentProducer.saveDeformationsToDB =
False 32 for calib
in process.AlignmentProducer.calibrations:
33 calib.saveToDB = process.AlignmentProducer.saveToDB
34 calib.treeFile = process.AlignmentProducer.algoConfig.treeFile
35 calib.mergeTreeFiles = process.AlignmentProducer.algoConfig.mergeTreeFiles
40 import Alignment.CommonAlignment.tools.trackselectionRefitting
as trackRefitter
41 kwargs = {
"cosmicsDecoMode": cosmics_deco_mode,
42 "cosmicsZeroTesla": cosmics_zero_tesla}
43 if TTRHBuilder
is not None: kwargs[
"TTRHBuilder"] = TTRHBuilder
44 process.TrackRefittingSequence \
45 = trackRefitter.getSequence(process, collection, **kwargs)
50 if collection
in (
"ALCARECOTkAlCosmicsCTF0T",
51 "ALCARECOTkAlCosmicsInCollisions"):
52 process.load(
"Alignment.CommonAlignment.apvModeFilter_cfi")
53 process.apvModeFilter.apvMode =
"deco" if cosmics_deco_mode
else "peak" 60 process.source = cms.Source(
"PoolSource", fileNames = input_files)
63 if (json_file !=
"")
and (json_file !=
"placeholder_json"):
64 import FWCore.PythonUtilities.LumiList
as LumiList
66 process.source.lumisToProcess = lumi_list
71 process.p = cms.Path(process.TrackRefittingSequence*
72 process.AlignmentProducer)
73 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)