Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:44:47

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # ------------------------------------------------------------------------------
0004 # configure a filter to run only on the events selected by TkAlMinBias AlcaReco
0005 import copy
0006 from HLTrigger.HLTfilters.hltHighLevel_cfi import *
0007 ALCARECOTkAlMinBiasFilterForSiPixelAli = copy.deepcopy(hltHighLevel)
0008 ALCARECOTkAlMinBiasFilterForSiPixelAli.HLTPaths = ['pathALCARECOTkAlMinBias']
0009 ALCARECOTkAlMinBiasFilterForSiPixelAli.throw = True ## dont throw on unknown path names
0010 ALCARECOTkAlMinBiasFilterForSiPixelAli.TriggerResultsTag = cms.InputTag("TriggerResults","","RECO")
0011 
0012 from Alignment.CommonAlignmentProducer.LSNumberFilter_cfi import *
0013 
0014 
0015 # Ingredient: offlineBeamSpot
0016 from RecoVertex.BeamSpotProducer.BeamSpot_cfi import offlineBeamSpot
0017 
0018 # Ingredient: AlignmentTrackSelector
0019 # track selector for HighPurity tracks
0020 #-- AlignmentTrackSelector
0021 from Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi import AlignmentTrackSelector
0022 SiPixelAliHighPuritySelector = AlignmentTrackSelector.clone(
0023         applyBasicCuts = True,
0024         #filter = True,
0025         src = 'ALCARECOTkAlMinBias',
0026         trackQualities = ["highPurity"],
0027         pMin = 4.9, #for 0T Collisions
0028         pMax = 5.1, #for 0T Collisions
0029         )
0030 
0031 
0032 
0033 # track selection for alignment
0034 from Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi import AlignmentTrackSelector
0035 SiPixelAliTrackSelector = AlignmentTrackSelector.clone(
0036     src = 'SiPixelAliTrackFitter',
0037     applyBasicCuts = True,
0038     pMin = 4.9,  #for 0T Collisions                                                                            
0039     pMax = 5.1, #for 0T Collisions
0040     ptMin = 0., #for 0T Collisions
0041     etaMin = -999.,
0042     etaMax = 999.,
0043     nHitMin = 8,
0044     nHitMin2D = 2,
0045     chi2nMax = 9999.,
0046     applyMultiplicityFilter = False,
0047     maxMultiplicity = 1,
0048     applyNHighestPt = False,
0049     nHighestPt = 1,
0050     seedOnlyFrom = 0,
0051     applyIsolationCut = False,
0052     minHitIsolation = 0.8,
0053     applyChargeCheck = False,
0054     minHitChargeStrip = 30.,
0055 )
0056 #Special option for PCL
0057 SiPixelAliTrackSelector.minHitsPerSubDet.inPIXEL = 2
0058 
0059 
0060 # Ingredient: SiPixelAliTrackRefitter0
0061 # refitting
0062 from RecoTracker.IterativeTracking.InitialStep_cff import *
0063 from RecoTracker.Configuration.RecoTrackerP5_cff import *
0064 from RecoTracker.TrackProducer.TrackRefitter_cfi import *
0065 # In the following use
0066 # TrackRefitter (normal tracks), TrackRefitterP5 (cosmics) or TrackRefitterBHM (beam halo)
0067 
0068 SiPixelAliTrackRefitter0 = TrackRefitter.clone(
0069         src = 'SiPixelAliHighPuritySelector',   #'ALCARECOTkAlMinBias'#'ALCARECOTkAlCosmicsCTF0T' #'ALCARECOTkAlMuonIsolated'
0070         NavigationSchool = '',            # to avoid filling hit pattern
0071                                               )
0072 
0073 SiPixelAliTrackRefitter1 = SiPixelAliTrackRefitter0.clone(
0074     src = 'SiPixelAliTrackSelector'
0075 )
0076 
0077 #-- Alignment producer
0078 from Alignment.MillePedeAlignmentAlgorithm.MillePedeAlignmentAlgorithm_cfi import *
0079 from Alignment.CommonAlignmentProducer.AlignmentProducerAsAnalyzer_cff import AlignmentProducer
0080 SiPixelAliMilleAlignmentProducer = copy.deepcopy(AlignmentProducer)
0081 SiPixelAliMilleAlignmentProducer.ParameterBuilder.Selector = cms.PSet(
0082     alignParams = cms.vstring(
0083         "PixelHalfBarrels,111111",
0084         "PXECHalfCylinders,111111",
0085         )
0086     )
0087 
0088 SiPixelAliMilleAlignmentProducer.doMisalignmentScenario = False #True
0089 
0090 
0091 SiPixelAliMilleAlignmentProducer.checkDbAlignmentValidity = False
0092 SiPixelAliMilleAlignmentProducer.applyDbAlignment = True
0093 SiPixelAliMilleAlignmentProducer.tjTkAssociationMapTag = 'SiPixelAliTrackRefitter1'
0094 
0095 SiPixelAliMilleAlignmentProducer.algoConfig = MillePedeAlignmentAlgorithm
0096 SiPixelAliMilleAlignmentProducer.algoConfig.mode = 'mille'
0097 SiPixelAliMilleAlignmentProducer.algoConfig.runAtPCL = True
0098 SiPixelAliMilleAlignmentProducer.algoConfig.mergeBinaryFiles = cms.vstring()
0099 SiPixelAliMilleAlignmentProducer.algoConfig.binaryFile = 'milleBinary_0.dat'
0100 SiPixelAliMilleAlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
0101       BrokenLinesBzeroTrajectoryFactory # For 0T collisions
0102       )
0103 SiPixelAliMilleAlignmentProducer.algoConfig.TrajectoryFactory.MomentumEstimate = 5 #for 0T Collisions
0104 
0105 
0106 
0107 # Ingredient: SiPixelAliTrackerTrackHitFilter
0108 import RecoTracker.FinalTrackSelectors.TrackerTrackHitFilter_cff as HitFilter
0109 # Reference config at /afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/aliConfigTemplates/Cosmics38T_BL_default_cfg.py
0110 SiPixelAliTrackerTrackHitFilter = HitFilter.TrackerTrackHitFilter.clone(
0111     src = 'SiPixelAliTrackRefitter0', #'ALCARECOTkAlCosmicsCTF0T',  
0112     # this is needed only if you require some selections; but it will work even if you don't ask for them
0113     useTrajectories= True,
0114     minimumHits = 8,
0115     replaceWithInactiveHits = True,
0116     rejectBadStoNHits = True,
0117     commands = cms.vstring("keep PXB","keep PXE","keep TIB","keep TID","keep TOB","keep TEC"), #,"drop TID stereo","drop TEC stereo")
0118     stripAllInvalidHits = False,
0119     StoNcommands = cms.vstring("ALL 12.0"),
0120     rejectLowAngleHits = True,
0121     TrackAngleCut = 0.17, # in rads, starting from the module surface; .35 for cosmcics ok, .17 for collision tracks
0122     usePixelQualityFlag = True #False
0123     )
0124 
0125 # Ingredient: SiPixelAliSiPixelAliTrackFitter
0126 import RecoTracker.TrackProducer.CTFFinalFitWithMaterial_cff as fitWithMaterial
0127 SiPixelAliTrackFitter = fitWithMaterial.ctfWithMaterialTracks.clone(
0128         src = 'SiPixelAliTrackerTrackHitFilter',
0129         # TTRHBuilder = 'WithAngleAndTemplate', #should already be default
0130         NavigationSchool = ''
0131         )
0132 
0133 ### Ingredient: MillePedeFileConverter
0134 ##from Alignment.CommonAlignmentProducer.MillePedeFileConverter_cfi import millePedeFileConverter
0135 ### We configure the input file name of the millePedeFileConverter
0136 ###         with the output file name of the alignmentProducer (=looper).
0137 ### Like this we are sure that they are well connected.
0138 ##SiPixelAliMillePedeFileConverter = millePedeFileConverter.clone(
0139 ##        fileDir = looper.algoConfig.fileDir,
0140 ##        binaryFile = looper.algoConfig.binaryFile,
0141 ##        )
0142 
0143 SiPixelAliMillePedeFileConverter = cms.EDProducer("MillePedeFileConverter",
0144                                                   #FIXME: convert to untracked?
0145                                                   fileDir = cms.string(SiPixelAliMilleAlignmentProducer.algoConfig.fileDir.value()),
0146                                                   inputBinaryFile = cms.string(SiPixelAliMilleAlignmentProducer.algoConfig.binaryFile.value()),
0147                                                   #FIXME: why was the label removed? Don't we want a label?
0148                                                   fileBlobLabel = cms.string(''),
0149                                                  )
0150 
0151 
0152 
0153 seqALCARECOPromptCalibProdSiPixelAli = cms.Sequence(ALCARECOTkAlMinBiasFilterForSiPixelAli*
0154                                                     lsNumberFilter*
0155                                                     offlineBeamSpot*
0156                                                     SiPixelAliHighPuritySelector*
0157                                                     SiPixelAliTrackRefitter0*
0158                                                     SiPixelAliTrackerTrackHitFilter*
0159                                                     SiPixelAliTrackFitter*
0160                             SiPixelAliTrackSelector*
0161                             SiPixelAliTrackRefitter1*
0162                                                     SiPixelAliMilleAlignmentProducer*
0163                                                     SiPixelAliMillePedeFileConverter)