Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:56:34

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 def setConfiguration(process, collection, mode, monitorFile, binaryFile,
0004                      primaryWidth = 0.0, cosmicsZeroTesla = False):
0005 
0006     #############
0007     ## general ##
0008     #############
0009     process.load("Alignment.CommonAlignmentProducer.AlignmentProducerAsAnalyzer_cff")
0010 
0011     # Start geometry from db
0012     process.AlignmentProducer.applyDbAlignment         = True
0013     process.AlignmentProducer.checkDbAlignmentValidity = False
0014 
0015     # What tracks are used to construct the reference trajectories?
0016     process.AlignmentProducer.tjTkAssociationMapTag = "FinalTrackRefitter"
0017 
0018     # enable proper handling of multi-IOV input
0019     process.AlignmentProducer.enableAlignableUpdates = True
0020 
0021     # Configure the algorithm
0022     process.AlignmentProducer.algoConfig = cms.PSet(
0023         process.MillePedeAlignmentAlgorithm)
0024     process.AlignmentProducer.algoConfig.mode              = mode
0025     process.AlignmentProducer.algoConfig.mergeBinaryFiles  = cms.vstring()
0026     process.AlignmentProducer.algoConfig.skipGlobalPositionRcdCheck = True
0027 
0028     # default pede options:
0029     process.AlignmentProducer.algoConfig.pedeSteerer.method = "sparseMINRES-QLP 3  0.8"
0030     process.AlignmentProducer.algoConfig.minNumHits = 8
0031     process.AlignmentProducer.algoConfig.pedeSteerer.options = [
0032         "entries 50 10 2",
0033         "outlierdownweighting 3",
0034         "dwfractioncut 0.1",
0035         "compress",
0036         "threads 10 10",
0037         "matiter 1",
0038         "printcounts 2",
0039         "chisqcut  30.  6.",
0040         "bandwidth 6 1",
0041         "monitorresiduals",
0042     ]
0043 
0044     if mode == "mille":
0045         process.AlignmentProducer.algoConfig.binaryFile   = binaryFile
0046         process.AlignmentProducer.algoConfig.monitorFile  = monitorFile
0047     elif "pede" in mode:
0048         process.AlignmentProducer.algoConfig.binaryFile   = ''
0049         process.AlignmentProducer.algoConfig.monitorFile  = 'millePedeMonitor_merge.root'
0050         process.AlignmentProducer.algoConfig.treeFile     = 'treeFile_merge.root'
0051 
0052 
0053     ########################
0054     ## Tracktype specific ##
0055     ########################
0056 
0057     if collection == "ALCARECOTkAlZMuMu" or collection == "ALCARECOTkAlZMuMuHI" or collection == "ALCARECOTkAlZMuMuPA" or collection == "ALCARECOTkAlDiMuon":
0058         process.AlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
0059              process.TwoBodyDecayTrajectoryFactory
0060         )
0061         process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryMass = 91.1061
0062         process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryWidth = 1.7678
0063         process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = "LocalGBL"
0064         # to account for multiple scattering in these layers
0065         process.AlignmentProducer.algoConfig.TrajectoryFactory.UseInvalidHits = True
0066     elif collection == "ALCARECOTkAlUpsilonMuMu":
0067         process.AlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
0068              process.TwoBodyDecayTrajectoryFactory
0069         )
0070         process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryMass = 9.4502
0071         process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryWidth = 0.0644
0072         process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = "LocalGBL"
0073         # to account for multiple scattering in these layers
0074         process.AlignmentProducer.algoConfig.TrajectoryFactory.UseInvalidHits = True
0075     elif collection == "ALCARECOTkAlJpsiMuMu":
0076         process.AlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
0077              process.TwoBodyDecayTrajectoryFactory
0078         )
0079         process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryMass = 3.0969
0080         process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryWidth = 0.03
0081         process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = "LocalGBL"
0082         # to account for multiple scattering in these layers
0083         process.AlignmentProducer.algoConfig.TrajectoryFactory.UseInvalidHits = True
0084     elif collection == "ALCARECOTkAlCosmicsCTF0T" and cosmicsZeroTesla:
0085         process.AlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
0086             process.BrokenLinesBzeroTrajectoryFactory
0087         )
0088         process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = "LocalGBL"
0089         process.AlignmentProducer.algoConfig.TrajectoryFactory.MomentumEstimate = 5.0
0090     else:
0091         process.AlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
0092             process.BrokenLinesTrajectoryFactory
0093         )
0094         process.AlignmentProducer.algoConfig.TrajectoryFactory.MaterialEffects = "LocalGBL"
0095 
0096 
0097     ##################
0098     ## primaryWidth ##
0099     ##################
0100 
0101     if primaryWidth > 0.0:
0102         process.AlignmentProducer.algoConfig.TrajectoryFactory.ParticleProperties.PrimaryWidth = primaryWidth
0103