Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:55

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # EMTF emulator configuration
0004 
0005 # Check that proper switches are implemented in L1Trigger/Configuration/python/customiseReEmul.py - AWB 02.06.17
0006 
0007 ###############################################################################################
0008 ###  IMPORTANT!!! Any changes to this file should be reflected in the 2016, 2017, and 2018  ###
0009 ###               configurations in configure_by_fw_version in src/SectorProcessor.cc       ###
0010 ###############################################################################################
0011 
0012 simEmtfDigisMC = cms.EDProducer("L1TMuonEndCapTrackProducer",
0013     # Verbosity level
0014     verbosity = cms.untracked.int32(0),
0015 
0016     # Configure by firmware version, which may be different than the default parameters in this file
0017     FWConfig = cms.bool(True),
0018 
0019     # Era (options: 'Run2_2016', 'Run2_2017', 'Run2_2018')
0020     Era = cms.string('Run2_2018'),
0021 
0022     # New Run 3 CSC TPs using CCLUT algorithm
0023     UseRun3CCLUT_OTMB = cms.bool(False),
0024     UseRun3CCLUT_TMB  = cms.bool(False),
0025 
0026     # Input collections
0027     # Three options for CSCInput
0028     #   * 'simCscTriggerPrimitiveDigis','MPCSORTED' : simulated trigger primitives (LCTs) from re-emulating CSC digis
0029     #   * 'csctfDigis' : real trigger primitives as received by CSCTF (legacy trigger), available only in 2016 data
0030     #   * 'emtfStage2Digis' : real trigger primitives as received by EMTF, unpacked in EventFilter/L1TRawToDigi/
0031     DTPhiInput = cms.InputTag('simTwinMuxDigis'),
0032     DTThetaInput = cms.InputTag('simDtTriggerPrimitiveDigis'),
0033     CSCInput = cms.InputTag('simCscTriggerPrimitiveDigis','MPCSORTED'),
0034     CSCComparatorInput = cms.InputTag('simMuonCSCDigis','MuonCSCComparatorDigi'),
0035     RPCInput = cms.InputTag('simMuonRPCDigis'),
0036     CPPFInput = cms.InputTag('simCPPFDigis'),  ## Cannot use in MC workflow, does not exist yet.  CPPFEnable set to False - AWB 01.06.18
0037     GEMInput = cms.InputTag('simMuonGEMPadDigiClusters'),
0038     ME0Input = cms.InputTag('me0TriggerConvertedPseudoDigis'),
0039 
0040     # Run with CSC, RPC, GEM
0041     DTEnable = cms.bool(False),
0042     CSCEnable = cms.bool(True),   # Use CSC LCTs from the MPCs in track-building
0043     RPCEnable = cms.bool(True),   # Use clustered RPC hits from CPPF in track-building
0044     IRPCEnable = cms.bool(False),
0045     CPPFEnable = cms.bool(False), # Use CPPF-emulated clustered RPC hits from CPPF as the RPC hits
0046     GEMEnable = cms.bool(False),  # Use hits from GEMs in track-building
0047     ME0Enable = cms.bool(False),
0048 
0049     # BX
0050     MinBX    = cms.int32(-3), # Minimum BX considered
0051     MaxBX    = cms.int32(+3), # Maximum BX considered
0052     BXWindow = cms.int32(2),  # Number of BX whose primitives can be included in the same track
0053 
0054     # CSC LCT BX offset correction
0055     CSCInputBXShift = cms.int32(-8), # Shift applied to input CSC LCT primitives, to center at BX = 0
0056     RPCInputBXShift = cms.int32(0),
0057     GEMInputBXShift = cms.int32(0),
0058     ME0InputBXShift = cms.int32(-8),
0059 
0060     # Sector processor primitive-conversion parameters
0061     spPCParams16 = cms.PSet(
0062         ZoneBoundaries  = cms.vint32(0,41,49,87,127), # Vertical boundaries of track-building zones, in integer theta (5 for 4 zones)
0063         # ZoneBoundaries  = cms.vint32(0,36,54,96,127), # New proposed zone boundaries
0064         ZoneOverlap     = cms.int32(2),    # Overlap between zones
0065         IncludeNeighbor = cms.bool(True),  # Include primitives from neighbor chambers in track-building
0066         DuplicateTheta  = cms.bool(True),  # Use up to 4 theta/phi positions for two LCTs in the same chamber
0067         FixZonePhi      = cms.bool(True),  # Pattern phi slightly offset from true LCT phi; also ME3/4 pattern width off
0068         UseNewZones     = cms.bool(False), # Improve high-quality pattern finding near ring 1-2 gap in ME3/4
0069         FixME11Edges    = cms.bool(True),  # Improved small fraction of buggy LCT coordinate transformations
0070     ),
0071 
0072     # Sector processor pattern-recognition parameters
0073     spPRParams16 = cms.PSet(
0074         PatternDefinitions = cms.vstring(
0075             # straightness, hits in ME1, hits in ME2, hits in ME3, hits in ME4
0076             # ME1 vaues centered at 15, range from 0 - 30
0077             # ME2,3,4 values centered at 7, range from 0 - 14
0078             "4,15:15,7:7,7:7,7:7",
0079             "3,16:16,7:7,7:6,7:6",
0080             "3,14:14,7:7,8:7,8:7",
0081             "2,18:17,7:7,7:5,7:5",    # should be 7:4 in ME3,4 (FW bug)
0082             "2,13:12,7:7,10:7,10:7",
0083             "1,22:19,7:7,7:0,7:0",
0084             "1,11:8,7:7,14:7,14:7",
0085             "0,30:23,7:7,7:0,7:0",
0086             "0,7:0,7:7,14:7,14:7",
0087         ),
0088         SymPatternDefinitions = cms.vstring(
0089             # straightness, hits in ME1, hits in ME2, hits in ME3, hits in ME4
0090             "4,15:15:15:15,7:7:7:7,7:7:7:7,7:7:7:7",
0091             "3,16:16:14:14,7:7:7:7,8:7:7:6,8:7:7:6",
0092             "2,18:17:13:12,7:7:7:7,10:7:7:4,10:7:7:4",
0093             "1,22:19:11:8,7:7:7:7,14:7:7:0,14:7:7:0",
0094             "0,30:23:7:0,7:7:7:7,14:7:7:0,14:7:7:0",
0095         ),
0096         UseSymmetricalPatterns = cms.bool(True), # 5 symmetric patterns instead of 9 asymmetric for track building
0097     ),
0098 
0099     # Sector processor track-building parameters
0100     spTBParams16 = cms.PSet(
0101         ThetaWindow      = cms.int32(8),    # Maximum dTheta between primitives in the same track
0102         ThetaWindowZone0 = cms.int32(4),    # Maximum dTheta between primitives in the same track in Zone 0 (ring 1)
0103         UseSingleHits    = cms.bool(False), # Build "tracks" from single LCTs in ME1/1
0104         BugSt2PhDiff     = cms.bool(False), # Reduced LCT matching window in station 2, resulting in demoted tracks and inefficiency
0105         BugME11Dupes     = cms.bool(False), # LCTs matched to track may take theta value from other LCT in the same chamber
0106         BugAmbigThetaWin = cms.bool(False), # Can allow dThetas outside window when there are 2 LCTs in the same chamber
0107         TwoStationSameBX = cms.bool(True),  # Requires the hits in two-station tracks to have the same BX
0108     ),
0109 
0110     # Sector processor ghost-cancellation parameters
0111     spGCParams16 = cms.PSet(
0112         MaxRoadsPerZone   = cms.int32(3),    # Number of patterns that can be built per theta zone
0113         MaxTracks         = cms.int32(3),    # Number of tracks that can be sent from each sector
0114         UseSecondEarliest = cms.bool(True),  # Second-earliest LCT used to assign BX, tracks cancel over 3 BX, improved LCT recovery
0115         BugSameSectorPt0  = cms.bool(False), # Only highest-quality track in a sector assigned pT; others assigned pT = 0
0116     ),
0117 
0118     # Sector processor pt-assignment parameters
0119     spPAParams16 = cms.PSet(
0120         ReadPtLUTFile   = cms.bool(False),
0121         FixMode15HighPt = cms.bool(True),  # High-pT fix puts outlier LCTs in mode 15 tracks back in a straight line
0122         Bug9BitDPhi     = cms.bool(False), # dPhi wrap-around in modes 3, 5, 6, 9, 10, 12
0123         BugMode7CLCT    = cms.bool(False), # pT LUT written with incorrect values for mode 7 CLCT, mode 10 random offset
0124         BugNegPt        = cms.bool(False), # In all modes negative (1/pT) set to 3 instead of 511
0125         BugGMTPhi       = cms.bool(False), # Some drift in uGMT phi conversion, off by up to a few degrees
0126         PromoteMode7    = cms.bool(False), # Assign station 2-3-4 tracks with |eta| > 1.6 SingleMu quality
0127         ModeQualVer     = cms.int32(2),    # Version 2 contains modified mode-quality mapping for 2018
0128 
0129         ProtobufFileName = cms.string('model_graph.displ.16.pb'), # Protobuf file name to be used by NN based pT assignment NNv16 is online since 26.06.2023
0130     ),
0131 
0132 )
0133 
0134 simEmtfDigisData = simEmtfDigisMC.clone(
0135     DTPhiInput = cms.InputTag('bmtfDigis'),
0136     DTThetaInput = cms.InputTag('bmtfDigis'),
0137     CSCInput = cms.InputTag('emtfStage2Digis'),
0138     CSCComparatorInput = cms.InputTag('muonCSCDigis','MuonCSCComparatorDigi'),
0139     RPCInput = cms.InputTag('muonRPCDigis'),
0140     CPPFInput = cms.InputTag('emtfStage2Digis'),
0141 
0142     CPPFEnable = cms.bool(True), # Use CPPF-emulated clustered RPC hits from CPPF as the RPC hits
0143 
0144 )
0145 
0146 simEmtfDigis = simEmtfDigisMC.clone()
0147 
0148 
0149 ## Load "Era" modules to adjust RPCEnable and Era (which controls the choice of PtAssignmentEngine)
0150 ## If neither 'Run2_2016' nor 'Run2_2017' are invoked, default 2018 settings are used
0151 ## Era configuration files are located in Configuration/Eras/python
0152 
0153 ## Era: Run2_2016
0154 from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger
0155 stage2L1Trigger.toModify(simEmtfDigis, RPCEnable = False, Era = 'Run2_2016')
0156 
0157 ## Era: Run2_2017
0158 from Configuration.Eras.Modifier_stage2L1Trigger_2017_cff import stage2L1Trigger_2017
0159 stage2L1Trigger_2017.toModify(simEmtfDigis, RPCEnable = True, Era = 'Run2_2017')
0160 
0161 ## Era: Run2_2018
0162 from Configuration.Eras.Modifier_stage2L1Trigger_2018_cff import stage2L1Trigger_2018
0163 stage2L1Trigger_2018.toModify(simEmtfDigis, RPCEnable = True, Era = 'Run2_2018')
0164 
0165 ## Era: Run3_2021
0166 from Configuration.Eras.Modifier_stage2L1Trigger_2021_cff import stage2L1Trigger_2021
0167 stage2L1Trigger_2021.toModify(simEmtfDigis, RPCEnable = True, UseRun3CCLUT_OTMB = True, Era = 'Run3_2021')