Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-25 02:13:22

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