CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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.AlignmentProducerAsAnalyzer_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  # enable proper handling of multi-IOV input
20  process.AlignmentProducer.enableAlignableUpdates = True
21 
22  # Configure the algorithm
23  process.AlignmentProducer.algoConfig = cms.PSet(
24  process.MillePedeAlignmentAlgorithm)
25  process.AlignmentProducer.algoConfig.mode = mode
26  process.AlignmentProducer.algoConfig.mergeBinaryFiles = cms.vstring()
27  process.AlignmentProducer.algoConfig.skipGlobalPositionRcdCheck = True
28 
29  # default pede options:
30  process.AlignmentProducer.algoConfig.pedeSteerer.method = "sparseMINRES-QLP 3 0.8"
31  process.AlignmentProducer.algoConfig.minNumHits = 8
32  process.AlignmentProducer.algoConfig.pedeSteerer.options = [
33  "entries 50 10 2",
34  "outlierdownweighting 3",
35  "dwfractioncut 0.1",
36  "compress",
37  "threads 10 10",
38  "matiter 1",
39  "printcounts 2",
40  "chisqcut 30. 6.",
41  "bandwidth 6 1",
42  "monitorresiduals",
43  ]
44 
45  if mode == "mille":
46  process.AlignmentProducer.algoConfig.binaryFile = binaryFile
47  process.AlignmentProducer.algoConfig.monitorFile = monitorFile
48  elif "pede" in mode:
49  process.AlignmentProducer.algoConfig.binaryFile = ''
50  process.AlignmentProducer.algoConfig.monitorFile = 'millePedeMonitor_merge.root'
51  process.AlignmentProducer.algoConfig.treeFile = 'treeFile_merge.root'
52 
53 
54  ########################
55  ## Tracktype specific ##
56  ########################
57 
58  if collection == "ALCARECOTkAlZMuMu" or collection == "ALCARECOTkAlZMuMuHI" or collection == "ALCARECOTkAlZMuMuPA":
59  process.AlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
60  process.TwoBodyDecayTrajectoryFactory
61  )
62  process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryMass = 91.1061
63  process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryWidth = 1.7678
64  process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = "LocalGBL"
65  # to account for multiple scattering in these layers
66  process.AlignmentProducer.algoConfig.TrajectoryFactory.UseInvalidHits = True
67  elif collection == "ALCARECOTkAlUpsilonMuMu":
68  process.AlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
69  process.TwoBodyDecayTrajectoryFactory
70  )
71  process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryMass = 9.4502
72  process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryWidth = 0.0644
73  process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = "LocalGBL"
74  # to account for multiple scattering in these layers
75  process.AlignmentProducer.algoConfig.TrajectoryFactory.UseInvalidHits = True
76  elif collection == "ALCARECOTkAlCosmicsCTF0T" and cosmicsZeroTesla:
77  process.AlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
78  process.BrokenLinesBzeroTrajectoryFactory
79  )
80  process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = "LocalGBL"
81  process.AlignmentProducer.algoConfig.TrajectoryFactory.MomentumEstimate = 5.0
82  else:
83  process.AlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
84  process.BrokenLinesTrajectoryFactory
85  )
86  process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = "LocalGBL"
87 
88 
89  ##################
90  ## primaryWidth ##
91  ##################
92 
93  if primaryWidth > 0.0:
94  process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryWidth = primaryWidth
95