CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlCosmics0T_Skimmed_cff.py

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 #from RecoVertex.BeamSpotProducer.BeamSpot_cff import *
00004 import RecoVertex.BeamSpotProducer.BeamSpot_cfi
00005 MyBeamSpot= RecoVertex.BeamSpotProducer.BeamSpot_cfi.offlineBeamSpot.clone()
00006 
00007 
00008 
00009 # Reject outliers <---- WARNING !!!! Applied only inside a TrackRefitter/TrackProducer, not by AlignmentTrackSelector
00010 ## import TrackingTools.TrackFitters.KFFittingSmootherWithOutliersRejectionAndRK_cfi 
00011 ##FittingSmootherCustomised = TrackingTools.TrackFitters.KFFittingSmootherWithOutliersRejectionAndRK_cfi.KFFittingSmootherWithOutliersRejectionAndRK.clone(
00012 
00013 
00014 #####################################################################################################
00015 ### CTF tracks specialities 
00016 #####################################################################################################
00017 
00018 #0: filter on L1 trigger bit - if you really want to, remember to add to the path the entry "l1Filter"
00019 
00020 import L1Trigger.Configuration.L1Config_cff
00021 import L1TriggerConfig.L1GtConfigProducers.Luminosity.lumi1x1032.L1Menu_CRUZET200805_gr7_muon_cff ###WHAT IS THE RIGTH ONE ????
00022 import L1Trigger.Skimmer.l1Filter_cfi
00023 ALCAl1Filter =  L1Trigger.Skimmer.l1Filter_cfi.l1Filter.clone(
00024     #algorithms=('L1_DoubleMuTopBottom')
00025     )
00026 
00027 
00028 
00029 
00030 
00031 #1: first refit to the tracks, needed for getting the Traj
00032 
00033 from RecoTracker.TrackProducer.TrackRefitters_cff import *
00034 import RecoTracker.TrackProducer.CTFFinalFitWithMaterialP5_cff
00035 FittingSmootherCustomised = RecoTracker.TrackProducer.CTFFinalFitWithMaterialP5_cff.FittingSmootherRKP5.clone(
00036     ComponentName = 'FittingSmootherCustomised',
00037     EstimateCut=15.0,
00038     MinNumberOfHits=6
00039     )
00040 
00041 
00042 TrackRefitterCTF1 =RecoTracker.TrackProducer.TrackRefitterP5_cfi.TrackRefitterP5.clone(
00043     constraint = "",
00044     src='ALCARECOTkAlCosmicsCTF0T',
00045     TTRHBuilder = 'WithAngleAndTemplate',
00046     TrajectoryInEvent = True,
00047     beamSpot='MyBeamSpot',
00048     NavigationSchool=''
00049     )
00050 
00051 # 2b: apply NEW hit filter. Does not work with CosmicTF tracks !
00052 
00053 from RecoTracker.FinalTrackSelectors.TrackerTrackHitFilter_cff import *
00054 AlignmentHitFilterCTF=RecoTracker.FinalTrackSelectors.TrackerTrackHitFilter_cff.TrackerTrackHitFilter.clone(
00055   ## src = 'ALCARECOTkAlCosmicsCTF0T',
00056     src = 'TrackRefitterCTF1',
00057     commands = cms.vstring("keep PXB","keep PXE","keep TIB","keep TID","keep TOB","keep TEC"),
00058     minimumHits = 6,
00059     replaceWithInactiveHits = True,
00060     stripAllInvalidHits = False,
00061     rejectBadStoNHits = True,
00062     StoNcommands = cms.vstring("ALL 18.0"),
00063     useTrajectories= True,
00064     rejectLowAngleHits= True,
00065     TrackAngleCut= 0.35,
00066     usePixelQualityFlag= True,
00067     PxlCorrClusterChargeCut=10000.0
00068     )
00069 
00070 # 3: produce track after NEW track hit filter
00071 
00072 import RecoTracker.TrackProducer.CTFFinalFitWithMaterialP5_cff
00073 ctfProducerCustomisedCTF = RecoTracker.TrackProducer.CTFFinalFitWithMaterialP5_cff.ctfWithMaterialTracksCosmics.clone(
00074     src = 'AlignmentHitFilterCTF',
00075     beamSpot='MyBeamSpot',
00076   #  Fitter = 'FittingSmootherCustomised',
00077     TTRHBuilder = 'WithAngleAndTemplate',
00078     TrajectoryInEvent = True
00079     )
00080 
00081 
00082 # 4: apply track selections on the refitted tracks
00083 import Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi
00084 ALCARECOTkAlCosmicsCTF4TSkimmed= Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi.AlignmentTrackSelector.clone(
00085   ## src= 'TrackRefitterCTF1',
00086     src= 'ctfProducerCustomisedCTF',
00087     ptMin=0.0,
00088     ptMax=9999.0,
00089     pMin=4.0,
00090     pMax=9999.0,
00091     etaMin=-99.0,
00092     etaMax=99.0,
00093     nHitMin=8,
00094     nHitMin2D=2,
00095     chi2nMax=6.0
00096     ### others which aren't used
00097     #minHitsPerSubDet.inTIB = 0
00098     #minHitsPerSubDet.inBPIX = 1
00099     )
00100 
00101 
00102 TrackRefitterCTF2 =RecoTracker.TrackProducer.TrackRefitterP5_cfi.TrackRefitterP5.clone(
00103     constraint = "",
00104     src='ALCARECOTkAlCosmicsCTF4TSkimmed',
00105     TTRHBuilder = 'WithAngleAndTemplate',
00106     TrajectoryInEvent = True,
00107     beamSpot='MyBeamSpot',
00108     NavigationSchool=''
00109 #    EstimateCut=15.0,
00110 #    MinNumberOfHits=6
00111 #    Fitter='FittingSmootherCustomised'
00112     ) 
00113 
00114 
00115 # 5: Overlap tagger
00116 import Alignment.TrackerAlignment.TkAlCaOverlapTagger_cff
00117 OverlapAssoMapCTF=Alignment.TrackerAlignment.TkAlCaOverlapTagger_cff.OverlapTagger.clone(
00118   #  src='ALCARECOTkAlCosmicsCTFSkimmed'
00119     src='TrackRefitterCTF2',
00120     #Clustersrc='ALCARECOTkAlCosmicsCTF0T'
00121     Clustersrc='ALCARECOTkAlCosmicsCTF4TSkimmed'#the track selector produces a new collection of Clusters!
00122     )
00123 
00124 
00125 import Alignment.CommonAlignmentMonitor.AlignmentStats_cff
00126 NewStatsCTF=Alignment.CommonAlignmentMonitor.AlignmentStats_cff.AlignmentStats.clone(
00127   #  src='OverlapAssoMap',
00128     src='TrackRefitterCTF2',
00129     OverlapAssoMap='OverlapAssoMapCTF',
00130     keepTrackStats = False,
00131     keepHitStats = True,
00132     TrkStatsFileName='TracksStatisticsCTF.root',
00133     HitStatsFileName='HitMapsCTF.root',
00134     TrkStatsPrescale= 1                            
00135     )
00136 
00137 
00138 
00139 ##________________________________Sequences____________________________________
00140 
00141 ##seqALCARECOTkAlCosmicsCTFSkimmed = cms.Sequence(MyBeamSpot+TrackHitFilterCTF+TrackRefitterCTF1+ALCARECOTkAlCosmicsCTF0TSkimmed+TrackRefitterCTF2+OverlapAssoMapCTF+NewStatsCTF)
00142 #seqALCARECOTkAlCosmicsCTFSkimmed = cms.Sequence(MyBeamSpot+TrackRefitterCTF1+AlignmentHitFilterCTF+ctfProducerCustomisedCTF+ALCARECOTkAlCosmicsCTF4TSkimmed+TrackRefitterCTF2+OverlapAssoMapCTF+NewStatsCTF)
00143 seqALCARECOTkAlCosmicsCTFSkimmed = cms.Sequence(MyBeamSpot+TrackRefitterCTF1+AlignmentHitFilterCTF+ctfProducerCustomisedCTF+ALCARECOTkAlCosmicsCTF4TSkimmed+TrackRefitterCTF2+OverlapAssoMapCTF)
00144