test
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,
4  primaryWidth = 0.0, cosmicsZeroTesla = False):
5 
6  #############
7  ## general ##
8  #############
9  process.load("Alignment.CommonAlignmentProducer.AlignmentProducer_cff")
10 
11  # Start geometry from db
12  process.AlignmentProducer.applyDbAlignment = True
13  process.AlignmentProducer.checkDbAlignmentValidity = False
14 
15  # What tracks are used to construct the reference trajectories?
16  process.AlignmentProducer.tjTkAssociationMapTag = "FinalTrackRefitter"
17 
18  # Configure the algorithm
19  process.AlignmentProducer.algoConfig = cms.PSet(
20  process.MillePedeAlignmentAlgorithm)
21  process.AlignmentProducer.algoConfig.mode = mode
22  process.AlignmentProducer.algoConfig.mergeBinaryFiles = cms.vstring()
23 
24  if mode == "mille":
25  process.AlignmentProducer.algoConfig.binaryFile = binaryFile
26  process.AlignmentProducer.algoConfig.monitorFile = monitorFile
27  elif "pede" in mode:
28  process.AlignmentProducer.algoConfig.binaryFile = ''
29  process.AlignmentProducer.algoConfig.monitorFile = 'millePedeMonitor_merge.root'
30  process.AlignmentProducer.algoConfig.treeFile = 'treeFile_merge.root'
31 
32 
33  ########################
34  ## Tracktype specific ##
35  ########################
36 
37  if collection == "ALCARECOTkAlZMuMu" or collection == "ALCARECOTkAlZMuMuHI" or collection == "ALCARECOTkAlZMuMuPA":
38  process.AlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
39  process.TwoBodyDecayTrajectoryFactory
40  )
41  process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryMass = 91.1061
42  process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryWidth = 1.7678
43  process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = "LocalGBL"
44  # to account for multiple scattering in these layers
45  process.AlignmentProducer.algoConfig.TrajectoryFactory.UseInvalidHits = True
46  elif collection == "ALCARECOTkAlCosmicsCTF0T" and cosmicsZeroTesla:
47  process.AlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
48  process.BrokenLinesBzeroTrajectoryFactory
49  )
50  process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = "LocalGBL"
51  process.AlignmentProducer.algoConfig.TrajectoryFactory.MomentumEstimate = 5.0
52  else:
53  process.AlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
54  process.BrokenLinesTrajectoryFactory
55  )
56  process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = "LocalGBL"
57 
58 
59  ##################
60  ## primaryWidth ##
61  ##################
62 
63  if primaryWidth > 0.0:
64  process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryWidth = primaryWidth
65