Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:44:48

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 #from RecoVertex.BeamSpotProducer.BeamSpot_cff import *
0004 import RecoVertex.BeamSpotProducer.BeamSpot_cfi
0005 MyBeamSpot= RecoVertex.BeamSpotProducer.BeamSpot_cfi.offlineBeamSpot.clone()
0006 
0007 
0008 
0009 # Reject outliers <---- WARNING !!!! Applied only inside a TrackRefitter/TrackProducer, not by AlignmentTrackSelector
0010 ## import TrackingTools.TrackFitters.KFFittingSmootherWithOutliersRejectionAndRK_cfi 
0011 ##FittingSmootherCustomised = TrackingTools.TrackFitters.KFFittingSmootherWithOutliersRejectionAndRK_cfi.KFFittingSmootherWithOutliersRejectionAndRK.clone(
0012 
0013 
0014 #####################################################################################################
0015 ### CTF tracks specialities 
0016 #####################################################################################################
0017 
0018 #0: filter on L1 trigger bit - if you really want to, remember to add to the path the entry "l1Filter"
0019 
0020 import L1Trigger.Configuration.L1Config_cff
0021 #import L1TriggerConfig.L1GtConfigProducers.Luminosity.lumi1x1032.L1Menu_CRUZET200805_gr7_muon_cff ###WHAT IS THE RIGTH ONE ????
0022 import L1Trigger.Skimmer.l1Filter_cfi
0023 ALCAl1Filter =  L1Trigger.Skimmer.l1Filter_cfi.l1Filter.clone(
0024     #algorithms=('L1_DoubleMuTopBottom')
0025     )
0026 
0027 
0028 
0029 
0030 
0031 #1: first refit to the tracks, needed for getting the Traj
0032 
0033 from RecoTracker.TrackProducer.TrackRefitters_cff import *
0034 #import TrackingTools.TrackFitters.KFFittingSmootherWithOutliersRejectionAndRK_cfi
0035 import TrackingTools.TrackFitters.RungeKuttaFitters_cff
0036 #FittingSmootherCustomised = RecoTracker.TrackProducer.CTFFinalFitWithMaterial_cff.FittingSmootherRK.clone(
0037 FittingSmootherCustomised =TrackingTools.TrackFitters.RungeKuttaFitters_cff.KFFittingSmootherWithOutliersRejectionAndRK.clone(
0038     ComponentName = 'FittingSmootherCustomised',
0039     EstimateCut=18.0,
0040     MinNumberOfHits=6
0041     )
0042 
0043 
0044 TrackRefitterCTF1 =RecoTracker.TrackProducer.TrackRefitter_cfi.TrackRefitter.clone(
0045     constraint = "",
0046     src='ALCARECOTkAlMinBias',
0047     TTRHBuilder = 'WithAngleAndTemplate',
0048     TrajectoryInEvent = True,
0049     beamSpot='MyBeamSpot'
0050     )
0051 
0052 # 2b: apply NEW hit filter. Does not work with CosmicTF tracks !
0053 
0054 from RecoTracker.FinalTrackSelectors.TrackerTrackHitFilter_cff import *
0055 AlignmentHitFilterCTF=RecoTracker.FinalTrackSelectors.TrackerTrackHitFilter_cff.TrackerTrackHitFilter.clone(
0056   ## src = 'ALCARECOTkAlCosmicsCTF0T',
0057     src = 'TrackRefitterCTF1',
0058     commands = cms.vstring("keep PXB","keep PXE","keep TIB","keep TID","keep TOB","keep TEC"),
0059     minimumHits = 6,
0060     replaceWithInactiveHits = True,
0061     stripAllInvalidHits = False,
0062     rejectBadStoNHits = True,
0063     StoNcommands = cms.vstring("ALL 18.0"),
0064     useTrajectories= True,
0065     rejectLowAngleHits= True,
0066     TrackAngleCut= 0.17,
0067     usePixelQualityFlag= True,
0068     PxlCorrClusterChargeCut=10000.0
0069     )
0070 
0071 # 3: produce track after NEW track hit filter
0072 
0073 import RecoTracker.TrackProducer.CTFFinalFitWithMaterial_cff
0074 ctfProducerCustomisedCTF = RecoTracker.TrackProducer.CTFFinalFitWithMaterial_cff.ctfWithMaterialTracks.clone(
0075     src = 'AlignmentHitFilterCTF',
0076     beamSpot='MyBeamSpot',
0077   #  Fitter = 'FittingSmootherCustomised',
0078     TTRHBuilder = 'WithAngleAndTemplate',
0079     TrajectoryInEvent = True
0080     )
0081 
0082 
0083 # 4: apply track selections on the refitted tracks
0084 import Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi
0085 ALCARECOTkAlMinBiasSkimmed= Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi.AlignmentTrackSelector.clone(
0086   ## src= 'TrackRefitterCTF1',
0087     src= 'ctfProducerCustomisedCTF',
0088     ptMin=1.5, # already in ALCARECO cfg
0089     ptMax=9999.0,
0090     pMin=3.0,
0091     pMax=9999.0,
0092     etaMin=-2.4,  # already in ALCARECO cfg
0093     etaMax=2.4,   # already in ALCARECO cfg
0094     nHitMin=8,
0095     nHitMin2D=2,
0096     chi2nMax=6.0
0097     ### others which aren't used
0098     #minHitsPerSubDet.inTIB = 0
0099     #minHitsPerSubDet.inBPIX = 1
0100     )
0101 
0102 
0103 TrackRefitterCTF2 =RecoTracker.TrackProducer.TrackRefitter_cfi.TrackRefitter.clone(
0104     constraint = "",
0105     src='ALCARECOTkAlMinBiasSkimmed',
0106     TTRHBuilder = 'WithAngleAndTemplate',
0107     TrajectoryInEvent = True,
0108     beamSpot='MyBeamSpot',
0109 #    EstimateCut=15.0,
0110 #    MinNumberOfHits=6
0111 #    Fitter='FittingSmootherCustomised'
0112     ) 
0113 
0114 
0115 # 5: Overlap tagger
0116 import Alignment.TrackerAlignment.TkAlCaOverlapTagger_cff
0117 OverlapAssoMapCTF=Alignment.TrackerAlignment.TkAlCaOverlapTagger_cff.OverlapTagger.clone(
0118   #  src='ALCARECOTkAlCosmicsCTFSkimmed'
0119     src='TrackRefitterCTF2',
0120     #Clustersrc='ALCARECOTkAlCosmicsCTF0T'
0121     Clustersrc='ALCARECOTkAlMinBiasSkimmed'#the track selector produces a new collection of Clusters!
0122     )
0123 
0124 
0125 import Alignment.CommonAlignmentMonitor.AlignmentStats_cff
0126 NewStatsCTF=Alignment.CommonAlignmentMonitor.AlignmentStats_cff.AlignmentStats.clone(
0127   #  src='OverlapAssoMap',
0128     src='TrackRefitterCTF2',
0129     OverlapAssoMap='OverlapAssoMapCTF',
0130     keepTrackStats = False,
0131     keepHitStats = True,
0132     TrkStatsFileName='TracksStatisticsCTF.root',
0133     HitStatsFileName='HitMapsCTF.root',
0134     TrkStatsPrescale= 1                            
0135     )
0136 
0137 
0138 
0139 ##________________________________Sequences____________________________________
0140 seqALCARECOTkAlMinBiasSkimmed = cms.Sequence(MyBeamSpot+TrackRefitterCTF1+AlignmentHitFilterCTF+ctfProducerCustomisedCTF+ALCARECOTkAlMinBiasSkimmed+TrackRefitterCTF2+OverlapAssoMapCTF)
0141 
0142 
0143