Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-04 01:25:37

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from Calibration.TkAlCaRecoProducers.ALCARECOSiStripCalCosmics_cff import ALCARECOSiStripCalCosmics
0004 from CalibTracker.SiStripCommon.prescaleEvent_cfi import prescaleEvent
0005 from HLTrigger.HLTfilters.triggerResultsFilter_cfi import triggerResultsFilter
0006 
0007 ALCARECOSiStripCalCosmicsNanoPrescale = prescaleEvent.clone(prescale=1)
0008 
0009 ALCARECOSiStripCalCosmicsNanoHLT = triggerResultsFilter.clone(
0010         triggerConditions=cms.vstring("HLT_L1SingleMuCosmics_v*"),
0011         hltResults=cms.InputTag("TriggerResults", "", "HLT"),
0012         l1tResults=cms.InputTag(""),
0013         throw=cms.bool(False)
0014         )
0015 
0016 # Select only events where tracker had HV on (according to DCS bit information)
0017 # AND respective partition is in the run (according to FED information)
0018 import CalibTracker.SiStripCommon.SiStripDCSFilter_cfi
0019 DCSStatusForSiStripCalCosmicsNano = CalibTracker.SiStripCommon.SiStripDCSFilter_cfi.siStripDCSFilter.clone(
0020     DetectorType = cms.vstring('TIBTID','TOB','TECp','TECm'),
0021     ApplyFilter  = cms.bool(True),
0022     AndOr        = cms.bool(True),
0023     DebugOn      = cms.untracked.bool(False)
0024     )
0025 
0026 from CalibTracker.Configuration.Filter_Refit_cff import CalibrationTracks, CalibrationTracksRefit, MeasurementTrackerEvent, offlineBeamSpot
0027 
0028 ALCARECOSiStripCalCosmicsNanoCalibTracks = CalibrationTracks.clone(src=cms.InputTag("ALCARECOSiStripCalCosmics"))
0029 ALCARECOSiStripCalCosmicsNanoCalibTracksRefit = CalibrationTracksRefit.clone(
0030         src=cms.InputTag("ALCARECOSiStripCalCosmicsNanoCalibTracks")
0031         )
0032 
0033 ALCARECOSiStripCalCosmicsNanoTkCalSeq = cms.Sequence(
0034         ALCARECOSiStripCalCosmicsNanoPrescale*
0035         ALCARECOSiStripCalCosmicsNanoHLT*
0036         DCSStatusForSiStripCalCosmicsNano*
0037         ALCARECOSiStripCalCosmicsNanoCalibTracks,
0038         cms.Task(MeasurementTrackerEvent),
0039         cms.Task(offlineBeamSpot),
0040         cms.Task(ALCARECOSiStripCalCosmicsNanoCalibTracksRefit)
0041         )
0042 
0043 from PhysicsTools.NanoAOD.common_cff import *
0044 from PhysicsTools.NanoAOD.nano_cff import nanoMetadata
0045 from CalibTracker.SiStripCommon.siStripPositionCorrectionsTable_cfi import siStripPositionCorrectionsTable
0046 from CalibTracker.SiStripCommon.siStripLorentzAngleRunInfoTable_cfi import siStripLorentzAngleRunInfoTable
0047 
0048 ALCARECOSiStripCalCosmicsNanoTracksTable = cms.EDProducer("SimpleTrackFlatTableProducer",
0049         src=cms.InputTag("ALCARECOSiStripCalCosmicsNanoCalibTracksRefit"),
0050         cut=cms.string(""),
0051         name=cms.string("track"),
0052         doc=cms.string("SiStripCalCosmics ALCARECO tracks"),
0053         singleton=cms.bool(False),
0054         extension=cms.bool(False),
0055         variables=cms.PSet(
0056             chi2ndof=Var("chi2()/ndof", float),
0057             pt=Var("pt()", float),
0058             hitsvalid=Var("numberOfValidHits()", int), ## unsigned?
0059             phi=Var("phi()", float),
0060             eta=Var("eta()", float),
0061             )
0062         )
0063 
0064 ALCARECOSiStripCalCosmicsNanoMeasTable = siStripPositionCorrectionsTable.clone(
0065         Tracks=cms.InputTag("ALCARECOSiStripCalCosmicsNanoCalibTracksRefit"))
0066 
0067 ALCARECOSiStripCalCosmicsNanoTables = cms.Task(
0068         nanoMetadata,
0069         ALCARECOSiStripCalCosmicsNanoTracksTable,
0070         ALCARECOSiStripCalCosmicsNanoMeasTable,
0071         siStripLorentzAngleRunInfoTable
0072         )
0073 
0074 seqALCARECOSiStripCalCosmicsNano = cms.Sequence(ALCARECOSiStripCalCosmicsNanoTkCalSeq, ALCARECOSiStripCalCosmicsNanoTables)