Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:56:15

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 RecoTracker.TrackProducer.CTFFinalFitWithMaterialP5_cff
0035 FittingSmootherCustomised = RecoTracker.TrackProducer.CTFFinalFitWithMaterialP5_cff.FittingSmootherRKP5.clone(
0036     ComponentName = 'FittingSmootherCustomised',
0037     EstimateCut=15.0,
0038     MinNumberOfHits=6
0039     )
0040 
0041 
0042 TrackRefitterCTF1 =RecoTracker.TrackProducer.TrackRefitterP5_cfi.TrackRefitterP5.clone(
0043     constraint = "",
0044     src='ALCARECOTkAlCosmicsCTF0T',
0045     TTRHBuilder = 'WithAngleAndTemplate',
0046     TrajectoryInEvent = True,
0047     beamSpot='MyBeamSpot',
0048     NavigationSchool=''
0049     )
0050 
0051 # 2b: apply NEW hit filter. Does not work with CosmicTF tracks !
0052 
0053 from RecoTracker.FinalTrackSelectors.TrackerTrackHitFilter_cff import *
0054 AlignmentHitFilterCTF=RecoTracker.FinalTrackSelectors.TrackerTrackHitFilter_cff.TrackerTrackHitFilter.clone(
0055   ## src = 'ALCARECOTkAlCosmicsCTF0T',
0056     src = 'TrackRefitterCTF1',
0057     commands = cms.vstring("keep PXB","keep PXE","keep TIB","keep TID","keep TOB","keep TEC"),
0058     minimumHits = 6,
0059     replaceWithInactiveHits = True,
0060     stripAllInvalidHits = False,
0061     rejectBadStoNHits = True,
0062     StoNcommands = cms.vstring("ALL 18.0"),
0063     useTrajectories= True,
0064     rejectLowAngleHits= True,
0065     TrackAngleCut= 0.35,
0066     usePixelQualityFlag= True,
0067     PxlCorrClusterChargeCut=10000.0
0068     )
0069 
0070 # 3: produce track after NEW track hit filter
0071 
0072 import RecoTracker.TrackProducer.CTFFinalFitWithMaterialP5_cff
0073 ctfProducerCustomisedCTF = RecoTracker.TrackProducer.CTFFinalFitWithMaterialP5_cff.ctfWithMaterialTracksCosmics.clone(
0074     src = 'AlignmentHitFilterCTF',
0075     beamSpot='MyBeamSpot',
0076   #  Fitter = 'FittingSmootherCustomised',
0077     TTRHBuilder = 'WithAngleAndTemplate',
0078     TrajectoryInEvent = True
0079     )
0080 
0081 
0082 # 4: apply track selections on the refitted tracks
0083 import Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi
0084 ALCARECOTkAlCosmicsCTF4TSkimmed= Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi.AlignmentTrackSelector.clone(
0085   ## src= 'TrackRefitterCTF1',
0086     src= 'ctfProducerCustomisedCTF',
0087     ptMin=0.0,
0088     ptMax=9999.0,
0089     pMin=4.0,
0090     pMax=9999.0,
0091     etaMin=-99.0,
0092     etaMax=99.0,
0093     nHitMin=8,
0094     nHitMin2D=2,
0095     chi2nMax=6.0
0096     ### others which aren't used
0097     #minHitsPerSubDet.inTIB = 0
0098     #minHitsPerSubDet.inBPIX = 1
0099     )
0100 
0101 
0102 TrackRefitterCTF2 =RecoTracker.TrackProducer.TrackRefitterP5_cfi.TrackRefitterP5.clone(
0103     constraint = "",
0104     src='ALCARECOTkAlCosmicsCTF4TSkimmed',
0105     TTRHBuilder = 'WithAngleAndTemplate',
0106     TrajectoryInEvent = True,
0107     beamSpot='MyBeamSpot',
0108     NavigationSchool=''
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='ALCARECOTkAlCosmicsCTF4TSkimmed'#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 
0141 ##seqALCARECOTkAlCosmicsCTFSkimmed = cms.Sequence(MyBeamSpot+TrackHitFilterCTF+TrackRefitterCTF1+ALCARECOTkAlCosmicsCTF0TSkimmed+TrackRefitterCTF2+OverlapAssoMapCTF+NewStatsCTF)
0142 #seqALCARECOTkAlCosmicsCTFSkimmed = cms.Sequence(MyBeamSpot+TrackRefitterCTF1+AlignmentHitFilterCTF+ctfProducerCustomisedCTF+ALCARECOTkAlCosmicsCTF4TSkimmed+TrackRefitterCTF2+OverlapAssoMapCTF+NewStatsCTF)
0143 seqALCARECOTkAlCosmicsCTFSkimmed = cms.Sequence(MyBeamSpot+TrackRefitterCTF1+AlignmentHitFilterCTF+ctfProducerCustomisedCTF+ALCARECOTkAlCosmicsCTF4TSkimmed+TrackRefitterCTF2+OverlapAssoMapCTF)
0144