CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
MilleSetup Namespace Reference

Functions

def setup
 

Function Documentation

def MilleSetup.setup (   process,
  input_files,
  collection,
  json_file = "",
  cosmics_zero_tesla = False,
  cosmics_deco_mode = True 
)
Mille-specific setup.

Arguments:
- `process`: cms.Process object
- `input_files`: input file list -> cms.untracked.vstring()
- `collection`: track collection to be used
- `cosmics_zero_tesla`: triggers the corresponding track selection
- `cosmics_deco_mode`: triggers the corresponding track selection

Definition at line 5 of file MilleSetup.py.

5 
6  json_file = "", cosmics_zero_tesla = False, cosmics_deco_mode = True):
7  """Mille-specific setup.
8 
9  Arguments:
10  - `process`: cms.Process object
11  - `input_files`: input file list -> cms.untracked.vstring()
12  - `collection`: track collection to be used
13  - `cosmics_zero_tesla`: triggers the corresponding track selection
14  - `cosmics_deco_mode`: triggers the corresponding track selection
15  """
16 
17  # no database output in the mille step:
18  # --------------------------------------------------------------------------
19  process.AlignmentProducer.saveToDB = False
20  process.AlignmentProducer.saveApeToDB = False
21  process.AlignmentProducer.saveDeformationsToDB = False
22 
23 
24  # Track selection and refitting
25  # --------------------------------------------------------------------------
26  process.load("RecoVertex.BeamSpotProducer.BeamSpot_cfi")
27 
28  import Alignment.CommonAlignment.tools.trackselectionRefitting as trackRefitter
29  process.TrackRefittingSequence = trackRefitter.getSequence(
30  process,
31  collection,
32  cosmicsDecoMode = cosmics_deco_mode,
33  cosmicsZeroTesla = cosmics_zero_tesla)
34 
35  # Overwrite Track-Selector filter options from unified sequence to 'False'
36  process.AlignmentTrackSelector.filter = False
37  if collection not in ("ALCARECOTkAlCosmicsCTF0T",
38  "ALCARECOTkAlCosmicsInCollisions"):
39  # there is no HighPurity selector for cosmics
40  process.HighPurityTrackSelector.filter = False
41 
42 
43  # Configure the input data
44  # --------------------------------------------------------------------------
45  process.source = cms.Source("PoolSource", fileNames = input_files)
46 
47  # Set Luminosity-Blockrange from json-file if given
48  if (json_file != "") and (json_file != "placeholder_json"):
49  import FWCore.PythonUtilities.LumiList as LumiList
50  lumi_list = LumiList.LumiList(filename = json_file).getVLuminosityBlockRange()
51  process.source.lumisToProcess = lumi_list
52 
53 
54  # The executed path
55  # --------------------------------------------------------------------------
56  process.p = cms.Path(process.offlineBeamSpot*process.TrackRefittingSequence)