CMS 3D CMS Logo

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

Functions

def setConfiguration
 

Function Documentation

def ConfigureAlignmentProducer.setConfiguration (   process,
  collection,
  mode,
  monitorFile,
  binaryFile,
  primaryWidth = 0.0,
  cosmicsZeroTesla = False 
)

Definition at line 4 of file ConfigureAlignmentProducer.py.

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