File indexing completed on 2021-07-07 22:33:43
0001
0002
0003
0004
0005 import FWCore.ParameterSet.Config as cms
0006 import FWCore.Utilities.FileUtils as FileUtils
0007 import os
0008 process = cms.Process("L1TrackNtuple")
0009
0010
0011
0012
0013
0014 GEOMETRY = "D49"
0015
0016
0017
0018 L1TRKALGO = 'HYBRID'
0019
0020 WRITE_DATA = False
0021
0022
0023
0024
0025
0026 process.load('Configuration.StandardSequences.Services_cff')
0027 process.load('Configuration.EventContent.EventContent_cff')
0028 process.load('Configuration.StandardSequences.MagneticField_cff')
0029
0030 process.load('FWCore.MessageService.MessageLogger_cfi')
0031 process.MessageLogger.L1track = dict(limit = -1)
0032 process.MessageLogger.Tracklet = dict(limit = -1)
0033
0034 if GEOMETRY == "D49":
0035 print "using geometry " + GEOMETRY + " (tilted)"
0036 process.load('Configuration.Geometry.GeometryExtended2026D49Reco_cff')
0037 process.load('Configuration.Geometry.GeometryExtended2026D49_cff')
0038 elif GEOMETRY == "D76":
0039 print "using geometry " + GEOMETRY + " (tilted)"
0040 process.load('Configuration.Geometry.GeometryExtended2026D76Reco_cff')
0041 process.load('Configuration.Geometry.GeometryExtended2026D76_cff')
0042 else:
0043 print "this is not a valid geometry!!!"
0044
0045 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0046 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0047
0048 from Configuration.AlCa.GlobalTag import GlobalTag
0049 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic', '')
0050
0051
0052
0053
0054
0055
0056 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(10))
0057
0058
0059
0060
0061
0062
0063
0064 if GEOMETRY == "D49":
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078 inputMC = ["/store/relval/CMSSW_11_3_0_pre3/RelValTTbar_14TeV/GEN-SIM-DIGI-RAW/PU_113X_mcRun4_realistic_v3_2026D49PU200_rsb-v1/00000/00260a30-734a-4a3a-a4b0-f836ce5502c6.root"]
0079
0080 elif GEOMETRY == "D76":
0081 inputMC = ["/store/relval/CMSSW_11_3_0_pre6/RelValTTbar_14TeV/GEN-SIM-DIGI-RAW/PU_113X_mcRun4_realistic_v6_2026D76PU200-v1/00000/00026541-6200-4eed-b6f8-d3a1fd720e9c.root"]
0082 else:
0083 print "this is not a valid geometry!!!"
0084
0085 process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring(*inputMC))
0086
0087 process.TFileService = cms.Service("TFileService", fileName = cms.string('TTbar_PU200_'+GEOMETRY+'.root'), closeFileFast = cms.untracked.bool(True))
0088 process.Timing = cms.Service("Timing", summaryOnly = cms.untracked.bool(True))
0089
0090
0091
0092
0093
0094
0095 process.load('L1Trigger.TrackTrigger.TrackTrigger_cff')
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109 process.load('L1Trigger.TrackerDTC.ProducerES_cff')
0110 process.load('L1Trigger.TrackerDTC.ProducerED_cff')
0111
0112
0113
0114
0115
0116
0117
0118
0119 process.dtc = cms.Path(process.TrackerDTCProducer)
0120
0121
0122
0123
0124
0125
0126 process.load("L1Trigger.TrackFindingTracklet.L1HybridEmulationTracks_cff")
0127
0128
0129 if (L1TRKALGO == 'HYBRID'):
0130 process.TTTracksEmulation = cms.Path(process.L1HybridTracks)
0131 process.TTTracksEmulationWithTruth = cms.Path(process.L1HybridTracksWithAssociators)
0132 NHELIXPAR = 4
0133 L1TRK_NAME = "TTTracksFromTrackletEmulation"
0134 L1TRK_LABEL = "Level1TTTracks"
0135 L1TRUTH_NAME = "TTTrackAssociatorFromPixelDigis"
0136
0137
0138 elif (L1TRKALGO == 'HYBRID_DISPLACED'):
0139 process.TTTracksEmulation = cms.Path(process.L1ExtendedHybridTracks)
0140 process.TTTracksEmulationWithTruth = cms.Path(process.L1ExtendedHybridTracksWithAssociators)
0141 NHELIXPAR = 5
0142 L1TRK_NAME = "TTTracksFromExtendedTrackletEmulation"
0143 L1TRK_LABEL = "Level1TTTracks"
0144 L1TRUTH_NAME = "TTTrackAssociatorFromPixelDigisExtended"
0145
0146
0147 elif (L1TRKALGO == 'TRACKLET'):
0148 print "\n WARNING: This is not the baseline algorithm! Prefer HYBRID or HYBRID_DISPLACED!"
0149 print "\n To run the Tracklet-only algorithm, ensure you have commented out 'CXXFLAGS=-DUSEHYBRID' in BuildFile.xml & recompiled! \n"
0150 process.TTTracksEmulation = cms.Path(process.L1HybridTracks)
0151 process.TTTracksEmulationWithTruth = cms.Path(process.L1HybridTracksWithAssociators)
0152 NHELIXPAR = 4
0153 L1TRK_NAME = "TTTracksFromTrackletEmulation"
0154 L1TRK_LABEL = "Level1TTTracks"
0155 L1TRUTH_NAME = "TTTrackAssociatorFromPixelDigis"
0156
0157
0158 elif (L1TRKALGO == 'TMTT'):
0159 print "\n WARNING: This is not the baseline algorithm! Prefer HYBRID or HYBRID_DISPLACED! \n"
0160 process.load("L1Trigger.TrackFindingTMTT.TMTrackProducer_Ultimate_cff")
0161 L1TRK_PROC = process.TMTrackProducer
0162 L1TRK_NAME = "TMTrackProducer"
0163 L1TRK_LABEL = "TML1TracksKF4ParamsComb"
0164 L1TRUTH_NAME = "TTTrackAssociatorFromPixelDigis"
0165 NHELIXPAR = 4
0166 L1TRK_PROC.EnableMCtruth = cms.bool(False)
0167 L1TRK_PROC.EnableHistos = cms.bool(False)
0168 process.load("RecoVertex.BeamSpotProducer.BeamSpot_cfi")
0169 process.load("SimTracker.TrackTriggerAssociation.TrackTriggerAssociator_cff")
0170 process.TTTrackAssociatorFromPixelDigis.TTTracks = cms.VInputTag( cms.InputTag(L1TRK_NAME, L1TRK_LABEL) )
0171 process.TTTracksEmulation = cms.Path(process.offlineBeamSpot*L1TRK_PROC)
0172 process.TTTracksEmulationWithTruth = cms.Path(process.offlineBeamSpot*L1TRK_PROC*process.TrackTriggerAssociatorTracks)
0173
0174 else:
0175 print "ERROR: Unknown L1TRKALGO option"
0176 exit(1)
0177
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189 process.L1TrackNtuple = cms.EDAnalyzer('L1TrackNtupleMaker',
0190 MyProcess = cms.int32(1),
0191 DebugMode = cms.bool(False),
0192 SaveAllTracks = cms.bool(True),
0193 SaveStubs = cms.bool(False),
0194 L1Tk_nPar = cms.int32(NHELIXPAR),
0195 L1Tk_minNStub = cms.int32(4),
0196 TP_minNStub = cms.int32(4),
0197 TP_minNStubLayer = cms.int32(4),
0198 TP_minPt = cms.double(2.0),
0199 TP_maxEta = cms.double(2.5),
0200 TP_maxZ0 = cms.double(30.0),
0201 L1TrackInputTag = cms.InputTag(L1TRK_NAME, L1TRK_LABEL),
0202 MCTruthTrackInputTag = cms.InputTag(L1TRUTH_NAME, L1TRK_LABEL),
0203
0204 L1StubInputTag = cms.InputTag("TTStubsFromPhase2TrackerDigis","StubAccepted"),
0205 MCTruthClusterInputTag = cms.InputTag("TTClusterAssociatorFromPixelDigis", "ClusterAccepted"),
0206 MCTruthStubInputTag = cms.InputTag("TTStubAssociatorFromPixelDigis", "StubAccepted"),
0207 TrackingParticleInputTag = cms.InputTag("mix", "MergedTrackTruth"),
0208 TrackingVertexInputTag = cms.InputTag("mix", "MergedTrackTruth"),
0209
0210 TrackingInJets = cms.bool(False),
0211 GenJetInputTag = cms.InputTag("ak4GenJets", "")
0212 )
0213
0214 process.ana = cms.Path(process.L1TrackNtuple)
0215
0216
0217
0218
0219
0220
0221
0222
0223
0224
0225
0226
0227
0228 process.schedule = cms.Schedule(process.dtc,process.TTTracksEmulationWithTruth,process.ana)
0229
0230
0231
0232
0233
0234
0235 if (WRITE_DATA):
0236 process.writeDataset = cms.OutputModule("PoolOutputModule",
0237 splitLevel = cms.untracked.int32(0),
0238 eventAutoFlushCompressedSize = cms.untracked.int32(5242880),
0239 outputCommands = process.RAWSIMEventContent.outputCommands,
0240 fileName = cms.untracked.string('output_dataset.root'),
0241 dataset = cms.untracked.PSet(
0242 filterName = cms.untracked.string(''),
0243 dataTier = cms.untracked.string('GEN-SIM')
0244 )
0245 )
0246 process.writeDataset.outputCommands.append('keep *TTTrack*_*_*_*')
0247 process.writeDataset.outputCommands.append('keep *TTStub*_*_*_*')
0248
0249 process.pd = cms.EndPath(process.writeDataset)
0250 process.schedule.append(process.pd)
0251