CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ConfigureAlignmentProducer.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 def setConfiguration(process, collection, mode, monitorFile, binaryFile, primaryWidth = 0.0):
4 
5  #############
6  ## general ##
7  #############
8 
9  # Start geometry from db
10  process.AlignmentProducer.applyDbAlignment = True
11  process.AlignmentProducer.checkDbAlignmentValidity = False
12 
13  # What tracks are used to construct the reference trajectories?
14  process.AlignmentProducer.tjTkAssociationMapTag = "FinalTrackRefitter"
15 
16  # Configure the algorithm
17  process.AlignmentProducer.algoConfig = cms.PSet(
18  process.MillePedeAlignmentAlgorithm)
19  process.AlignmentProducer.algoConfig.mode = mode
20  process.AlignmentProducer.algoConfig.mergeBinaryFiles = cms.vstring()
21 
22  if mode == "mille":
23  process.AlignmentProducer.algoConfig.binaryFile = binaryFile
24  process.AlignmentProducer.algoConfig.monitorFile = monitorFile
25  elif "pede" in mode:
26  process.AlignmentProducer.algoConfig.binaryFile = ''
27  process.AlignmentProducer.algoConfig.monitorFile = 'millePedeMonitor_merge.root'
28  process.AlignmentProducer.algoConfig.treeFile = 'treeFile_merge.root'
29  process.AlignmentProducer.algoConfig.pedeSteerer.pedeCommand = "pede"
30 
31 
32  ########################
33  ## Tracktype specific ##
34  ########################
35 
36  if collection is "ALCARECOTkAlZMuMu":
37  process.AlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
38  process.TwoBodyDecayTrajectoryFactory
39  )
40  process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryMass = 90.8745
41  process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryWidth = 1.8770
42  process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = "LocalGBL"
43  # to account for multiple scattering in these layers
44  process.AlignmentProducer.algoConfig.TrajectoryFactory.UseInvalidHits = True
45  else:
46  process.AlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
47  process.BrokenLinesTrajectoryFactory
48  )
49  process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = "LocalGBL"
50 
51 
52  ##################
53  ## primaryWidth ##
54  ##################
55 
56  if primaryWidth > 0.0:
57  process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryWidth = primaryWidth
58