CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/Configuration/Skimming/python/PDWG_EXOHSCP_cff.py

Go to the documentation of this file.
00001 TRACK_PT = 20.0  
00002 import FWCore.ParameterSet.Config as cms
00003 import Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi
00004 
00005 nEventsBefSkim  = cms.EDProducer("EventCountProducer")
00006 beginSeq = cms.Sequence(nEventsBefSkim)
00007 
00008 from HLTrigger.HLTfilters.hltHighLevel_cfi import *
00009 HSCPTrigger = hltHighLevel.clone()
00010 HSCPTrigger.andOr = cms.bool( True ) #OR
00011 HSCPTrigger.throw = cms.bool( False )
00012 HSCPTrigger.HLTPaths = [
00013             "HLT_*_dEdx*",
00014             "HLT_Mu40_eta2p1*",
00015             "HLT_Mu50_eta2p1*",
00016             "HLT_HT650_*",
00017             "HLT_MET80_*",
00018             "HLT_PFMET*",
00019             "HLT_*L2Mu*_NoBPTX*",
00020             "HLT_L2Mu*_eta2p1_PFMET*",
00021             "HLT_Mu17_Mu8_v*",
00022                 ]
00023 hltSeq = cms.Sequence(HSCPTrigger)  
00024 
00025 HSCPdEdxTrigger = HSCPTrigger.clone()
00026 HSCPdEdxTrigger.HLTPaths = [
00027             "HLT_*_dEdx*"]
00028 hltdEdxSeq = cms.Sequence(HSCPdEdxTrigger) 
00029 
00030 #REFIT THE TRACK COLLECTION --> THIS IS NEEDED TO COMPUTE DEDX
00031 from RecoVertex.BeamSpotProducer.BeamSpot_cff import *
00032 from RecoTracker.TrackProducer.TrackRefitters_cff import *
00033 TrackRefitterSkim = TrackRefitter.clone()
00034 TrackRefitterSkim.src = "generalTracks"
00035 
00036 #COMPUTE DEDX ON THE TRACK COLLECTION (NO PIXEL NO CLUSTER CLEANING HERE)
00037 dedxSkimNPHarm2 = cms.EDProducer("DeDxEstimatorProducer",
00038     tracks                     = cms.InputTag("TrackRefitterSkim"),
00039     trajectoryTrackAssociation = cms.InputTag("TrackRefitterSkim"),
00040 
00041     estimator      = cms.string('generic'),
00042     exponent       = cms.double(-2.0),
00043 
00044     UseStrip       = cms.bool(True),
00045     UsePixel       = cms.bool(False),
00046     MeVperADCStrip = cms.double(3.61e-06*265),
00047     MeVperADCPixel = cms.double(3.61e-06),
00048 
00049     MisCalib_Mean      = cms.untracked.double(1.0),
00050     MisCalib_Sigma     = cms.untracked.double(0.00),
00051 
00052     UseCalibration  = cms.bool(False),
00053     calibrationPath = cms.string(""),
00054     ShapeTest       = cms.bool(False),
00055 )
00056 
00057 #CHECK IF THE EVENT SHOULD BE KEPT OR NOT FOR HSCP
00058 #THREE CASES
00059 #1) Events with HighPT+HighDEdx Tracks are kept
00060 #2) Events with HighPT SA Muon are kept
00061 #3) Events with DoubleMu are kept
00062 HSCPEventFilter = cms.EDFilter("HSCPEventFilter",
00063      inputMuonCollection = cms.InputTag("muons"),
00064      inputTrackCollection = cms.InputTag("TrackRefitterSkim"),
00065      inputDedxCollection =  cms.InputTag("dedxSkimNPHarm2"),
00066 
00067      #USED ONLY FOR HIGH SA MUON SELECTION
00068      SAMuPtMin = cms.double(70),
00069 
00070      #USED ONLY FOR DIMUON SELECTION
00071      Mu1PtMin = cms.double(TRACK_PT),
00072      Mu2PtMin = cms.double(20),
00073 
00074      #USED ONLY FOR HIGH PT AND HIGH DEDX TRACK SELECTION
00075      trkPtMin = cms.double(TRACK_PT),
00076      dedxMin =cms.double(3.0),
00077      dedxMaxLeft =cms.double(2.8),
00078      ndedxHits = cms.int32(4),
00079      etaMin= cms.double(-2.4),
00080      etaMax= cms.double(2.4),
00081      chi2nMax = cms.double(99999),
00082      dxyMax = cms.double(99999),
00083      dzMax = cms.double(99999),
00084      filter = cms.bool(True)
00085 )
00086 
00087 eventSelSeq = cms.Sequence(TrackRefitterSkim + dedxSkimNPHarm2 + HSCPEventFilter)
00088 
00089 # AFTER THIS POINT... WE DONT SELECT EVENT ANYMORE... WE ONLY CLEAN OBJECT COLLECTION TO KEEP ONLY THE OBJECTS WE ARE GOING TO USE OFFLINE (REDUCE EVENT SIZE)
00090 
00091 
00092 
00093 #NOW APPLY TIGHT TRACK CLEANING
00094 #FOR INNER TRACKS NOT MATCHING A MUON INNER TRACK: APPLY PT CUT(40GeV) AND DEDX CUT
00095 #FOR INNER TRACKS     MATCHING A MUON INNER TRACK: DON'T APPLY ANY MORE CUTS (than what was already applied by loose selection)
00096 #THE FILTER IS ENABLED WHICH MEANS THAT IF NO TRACKS ARE PASSING THIS LOOSE CLEANING, THE EVENT IS SKIPPED
00097 #OUTPUT OF THIS COLLECTION IS HIGHLY COMPACT AND MUST BE STORE TO THE .ROOT FILE
00098 generalTracksSkim = cms.EDFilter("HSCPTrackSelectorModule",
00099                  src = cms.InputTag("TrackRefitterSkim"),
00100                  filter = cms.bool(False),
00101 
00102                  #Keep all muon tracks what ever it's pT
00103                  muonSource = cms.InputTag("muons"),    
00104 
00105                  #Keep all inner tracks with pt>TRACK_PT whatever it's dEdx
00106                  trackerTrackPtMin = cms.double(TRACK_PT),
00107                  usededx = cms.bool(False),
00108                  InputDedx = cms.InputTag("dedxSkimNPHarm2"),
00109                  InnerTrackdEdxRightMin = cms.double(-99999.0),
00110                  InnerTrackdEdxLeftMax = cms.double(99999.0),
00111                  InnerMuondEdxRightMin = cms.double(-99999.0),
00112                  InnerMuondEdxLeftMax = cms.double(99999.0),
00113                  dEdxMeasurementsMinForMuonTrack = cms.uint32(0),
00114                  dEdxMeasurementsMinForInnerTrack = cms.uint32(4),                                                       
00115         )
00116 
00117 trackerSeq = cms.Sequence(generalTracksSkim)
00118 
00119 
00120 from TrackingTools.TrackAssociator.DetIdAssociatorESProducer_cff import *
00121 from TrackingTools.TrackAssociator.default_cfi import *
00122 
00123 muonEcalDetIdsHSCP = cms.EDProducer("InterestingEcalDetIdProducer",
00124                 inputCollection = cms.InputTag("muons")
00125         )
00126 highPtTrackEcalDetIds = cms.EDProducer("HighPtTrackEcalDetIdProducer",
00127            #TrackAssociatorParameterBlock
00128            TrackAssociatorParameters=TrackAssociatorParameterBlock.TrackAssociatorParameters,
00129            inputCollection = cms.InputTag("generalTracksSkim"),
00130            TrackPt=cms.double(TRACK_PT)
00131       )
00132 
00133 detIdProduceSeq = cms.Sequence(muonEcalDetIdsHSCP+highPtTrackEcalDetIds)
00134 
00135 reducedHSCPEcalRecHitsEB = cms.EDProducer("ReducedRecHitCollectionProducer",
00136      recHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
00137          interestingDetIdCollections = cms.VInputTag(
00138          #high p_t tracker track ids
00139          cms.InputTag("highPtTrackEcalDetIds"),
00140          #muons
00141          cms.InputTag("muonEcalDetIdsHSCP")
00142      ),
00143      reducedHitsCollection = cms.string('')
00144 )
00145 reducedHSCPEcalRecHitsEE = cms.EDProducer("ReducedRecHitCollectionProducer",
00146      recHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
00147      interestingDetIdCollections = cms.VInputTag(
00148                  #high p_t tracker track ids
00149                  cms.InputTag("highPtTrackEcalDetIds"),
00150              #muons
00151              cms.InputTag("muonEcalDetIdsHSCP")
00152              ),
00153      reducedHitsCollection = cms.string('')
00154 )
00155 
00156 
00157 ecalSeq = cms.Sequence(detIdProduceSeq+reducedHSCPEcalRecHitsEB+reducedHSCPEcalRecHitsEE)
00158 
00159 
00160 reducedHSCPhbhereco = cms.EDProducer("ReduceHcalRecHitCollectionProducer",
00161                  recHitsLabel = cms.InputTag("hbhereco",""),
00162                  TrackAssociatorParameters=TrackAssociatorParameterBlock.TrackAssociatorParameters,
00163                  inputCollection = cms.InputTag("generalTracksSkim"),
00164                  TrackPt=cms.double(TRACK_PT),                                     
00165                  reducedHitsCollection = cms.string('')
00166 )
00167 
00168 hcalSeq = cms.Sequence(reducedHSCPhbhereco)
00169 
00170 muonsSkim = cms.EDProducer("UpdatedMuonInnerTrackRef",
00171     MuonTag        = cms.untracked.InputTag("muons"),
00172     OldTrackTag    = cms.untracked.InputTag("generalTracks"),
00173     NewTrackTag    = cms.untracked.InputTag("generalTracksSkim"),
00174     maxInvPtDiff   = cms.untracked.double(0.005),
00175     minDR          = cms.untracked.double(0.01),
00176 )
00177 muonSeq = cms.Sequence(muonsSkim)
00178 
00179 
00180 
00181 TrackAssociatorParametersForHSCPIsol = TrackAssociatorParameterBlock.TrackAssociatorParameters.clone()
00182 TrackAssociatorParametersForHSCPIsol.useHO = cms.bool(False)
00183 TrackAssociatorParametersForHSCPIsol.CSCSegmentCollectionLabel     = cms.InputTag("cscSegments")
00184 TrackAssociatorParametersForHSCPIsol.DTRecSegment4DCollectionLabel = cms.InputTag("dt4DSegments")
00185 TrackAssociatorParametersForHSCPIsol.EERecHitCollectionLabel       = cms.InputTag("ecalRecHit","EcalRecHitsEE")
00186 TrackAssociatorParametersForHSCPIsol.EBRecHitCollectionLabel       = cms.InputTag("ecalRecHit","EcalRecHitsEB")
00187 TrackAssociatorParametersForHSCPIsol.HBHERecHitCollectionLabel     = cms.InputTag("hbhereco")
00188 
00189 
00190 HSCPIsolation01 = cms.EDProducer("ProduceIsolationMap",
00191       inputCollection  = cms.InputTag("generalTracksSkim"),
00192       IsolationConeDR  = cms.double(0.1),
00193       TkIsolationPtCut = cms.double(10),
00194       TKLabel          = cms.InputTag("generalTracks"),
00195       TrackAssociatorParameters=TrackAssociatorParametersForHSCPIsol,
00196 )
00197 
00198 HSCPIsolation03 = HSCPIsolation01.clone()
00199 HSCPIsolation03.IsolationConeDR  = cms.double(0.3)
00200 
00201 HSCPIsolation05 = HSCPIsolation01.clone()
00202 HSCPIsolation05.IsolationConeDR  = cms.double(0.5)
00203 
00204 #final sequence
00205 exoticaHSCPSeq = cms.Sequence(beginSeq+hltSeq+eventSelSeq+trackerSeq+ecalSeq+hcalSeq+muonSeq+HSCPIsolation01+HSCPIsolation03+HSCPIsolation05)
00206 exoticaHSCPdEdxSeq = cms.Sequence(beginSeq+hltdEdxSeq+trackerSeq+ecalSeq+hcalSeq+muonSeq+HSCPIsolation01+HSCPIsolation03+HSCPIsolation05)
00207 
00208 EXOHSCPSkim_EventContent=cms.PSet(
00209     outputCommands = cms.untracked.vstring(
00210       "drop *",
00211       "keep EventAux_*_*_*",
00212       'keep LumiSummary_*_*_*',
00213       'keep edmMergeableCounter_*_*_*',
00214       "keep GenEventInfoProduct_generator_*_*",
00215       "keep L1GlobalTriggerReadoutRecord_*_*_*",
00216       "keep recoVertexs_offlinePrimaryVertices_*_*",
00217       "keep recoMuons_muonsSkim_*_*",
00218       "keep SiStripClusteredmNewDetSetVector_generalTracksSkim_*_*",
00219       "keep SiPixelClusteredmNewDetSetVector_generalTracksSkim_*_*",
00220       "keep recoTracks_generalTracksSkim_*_*",
00221       "keep recoTrackExtras_generalTracksSkim_*_*",
00222       "keep TrackingRecHitsOwned_generalTracksSkim_*_*",
00223       'keep *_dt1DRecHits_*_*',
00224       'keep *_dt4DSegments_*_*',
00225       'keep *_csc2DRecHits_*_*',
00226       'keep *_cscSegments_*_*',
00227       'keep *_rpcRecHits_*_*',
00228       'keep recoTracks_standAloneMuons_*_*',
00229       'keep recoTrackExtras_standAloneMuons_*_*',
00230       'keep TrackingRecHitsOwned_standAloneMuons_*_*',
00231       'keep recoTracks_globalMuons_*_*',
00232       'keep recoTrackExtras_globalMuons_*_*',
00233       'keep TrackingRecHitsOwned_globalMuons_*_*',
00234       'keep EcalRecHitsSorted_reducedHSCPEcalRecHitsEB_*_*',
00235       'keep EcalRecHitsSorted_reducedHSCPEcalRecHitsEE_*_*',
00236       'keep HBHERecHitsSorted_reducedHSCPhbhereco__*',
00237       'keep edmTriggerResults_TriggerResults__*',
00238       'keep *_hltTriggerSummaryAOD_*_*',
00239       'keep *_HSCPIsolation01__*',
00240       'keep *_HSCPIsolation03__*',
00241       'keep *_HSCPIsolation05__*',
00242       'keep *_ak5PFJets_*_*', 
00243       'keep recoPFMETs_pfMet__*',
00244        #'keep recoCaloJets_ak5CaloJets__*', #not needed for data
00245        #'keep recoCaloMETs_met__*',         #not needed for data
00246       'keep recoBeamSpot_offlineBeamSpot__*',
00247       )
00248     )