CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlMinBias_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 TrackingTools.TrackFitters.KFFittingSmootherWithOutliersRejectionAndRK_cfi
00035 import TrackingTools.TrackFitters.RungeKuttaFitters_cff
00036 #FittingSmootherCustomised = RecoTracker.TrackProducer.CTFFinalFitWithMaterial_cff.FittingSmootherRK.clone(
00037 FittingSmootherCustomised =TrackingTools.TrackFitters.RungeKuttaFitters_cff.KFFittingSmootherWithOutliersRejectionAndRK.clone(
00038     ComponentName = 'FittingSmootherCustomised',
00039     EstimateCut=18.0,
00040     MinNumberOfHits=6
00041     )
00042 
00043 
00044 TrackRefitterCTF1 =RecoTracker.TrackProducer.TrackRefitter_cfi.TrackRefitter.clone(
00045     constraint = "",
00046     src='ALCARECOTkAlMinBias',
00047     TTRHBuilder = 'WithAngleAndTemplate',
00048     TrajectoryInEvent = True,
00049     beamSpot='MyBeamSpot'
00050     )
00051 
00052 # 2b: apply NEW hit filter. Does not work with CosmicTF tracks !
00053 
00054 from RecoTracker.FinalTrackSelectors.TrackerTrackHitFilter_cff import *
00055 AlignmentHitFilterCTF=RecoTracker.FinalTrackSelectors.TrackerTrackHitFilter_cff.TrackerTrackHitFilter.clone(
00056   ## src = 'ALCARECOTkAlCosmicsCTF0T',
00057     src = 'TrackRefitterCTF1',
00058     commands = cms.vstring("keep PXB","keep PXE","keep TIB","keep TID","keep TOB","keep TEC"),
00059     minimumHits = 6,
00060     replaceWithInactiveHits = True,
00061     stripAllInvalidHits = False,
00062     rejectBadStoNHits = True,
00063     StoNcommands = cms.vstring("ALL 18.0"),
00064     useTrajectories= True,
00065     rejectLowAngleHits= True,
00066     TrackAngleCut= 0.17,
00067     usePixelQualityFlag= True,
00068     PxlCorrClusterChargeCut=10000.0
00069     )
00070 
00071 # 3: produce track after NEW track hit filter
00072 
00073 import RecoTracker.TrackProducer.CTFFinalFitWithMaterial_cff
00074 ctfProducerCustomisedCTF = RecoTracker.TrackProducer.CTFFinalFitWithMaterial_cff.ctfWithMaterialTracks.clone(
00075     src = 'AlignmentHitFilterCTF',
00076     beamSpot='MyBeamSpot',
00077   #  Fitter = 'FittingSmootherCustomised',
00078     TTRHBuilder = 'WithAngleAndTemplate',
00079     TrajectoryInEvent = True
00080     )
00081 
00082 
00083 # 4: apply track selections on the refitted tracks
00084 import Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi
00085 ALCARECOTkAlMinBiasSkimmed= Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi.AlignmentTrackSelector.clone(
00086   ## src= 'TrackRefitterCTF1',
00087     src= 'ctfProducerCustomisedCTF',
00088     ptMin=1.5, # already in ALCARECO cfg
00089     ptMax=9999.0,
00090     pMin=3.0,
00091     pMax=9999.0,
00092     etaMin=-2.4,  # already in ALCARECO cfg
00093     etaMax=2.4,   # already in ALCARECO cfg
00094     nHitMin=8,
00095     nHitMin2D=2,
00096     chi2nMax=6.0
00097     ### others which aren't used
00098     #minHitsPerSubDet.inTIB = 0
00099     #minHitsPerSubDet.inBPIX = 1
00100     )
00101 
00102 
00103 TrackRefitterCTF2 =RecoTracker.TrackProducer.TrackRefitter_cfi.TrackRefitter.clone(
00104     constraint = "",
00105     src='ALCARECOTkAlMinBiasSkimmed',
00106     TTRHBuilder = 'WithAngleAndTemplate',
00107     TrajectoryInEvent = True,
00108     beamSpot='MyBeamSpot',
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='ALCARECOTkAlMinBiasSkimmed'#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 seqALCARECOTkAlMinBiasSkimmed = cms.Sequence(MyBeamSpot+TrackRefitterCTF1+AlignmentHitFilterCTF+ctfProducerCustomisedCTF+ALCARECOTkAlMinBiasSkimmed+TrackRefitterCTF2+OverlapAssoMapCTF)
00141 
00142 
00143