CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ALCARECOTkAlMinBias_Skimmed_cff.py
Go to the documentation of this file.
2 
3 #from RecoVertex.BeamSpotProducer.BeamSpot_cff import *
5 MyBeamSpot= RecoVertex.BeamSpotProducer.BeamSpot_cfi.offlineBeamSpot.clone()
6 
7 
8 
9 # Reject outliers <---- WARNING !!!! Applied only inside a TrackRefitter/TrackProducer, not by AlignmentTrackSelector
10 ## import TrackingTools.TrackFitters.KFFittingSmootherWithOutliersRejectionAndRK_cfi
11 ##FittingSmootherCustomised = TrackingTools.TrackFitters.KFFittingSmootherWithOutliersRejectionAndRK_cfi.KFFittingSmootherWithOutliersRejectionAndRK.clone(
12 
13 
14 #####################################################################################################
15 ### CTF tracks specialities
16 #####################################################################################################
17 
18 #0: filter on L1 trigger bit - if you really want to, remember to add to the path the entry "l1Filter"
19 
21 #import L1TriggerConfig.L1GtConfigProducers.Luminosity.lumi1x1032.L1Menu_CRUZET200805_gr7_muon_cff ###WHAT IS THE RIGTH ONE ????
22 import L1Trigger.Skimmer.l1Filter_cfi
23 ALCAl1Filter = L1Trigger.Skimmer.l1Filter_cfi.l1Filter.clone(
24  #algorithms=('L1_DoubleMuTopBottom')
25  )
26 
27 
28 
29 
30 
31 #1: first refit to the tracks, needed for getting the Traj
32 
34 #import TrackingTools.TrackFitters.KFFittingSmootherWithOutliersRejectionAndRK_cfi
36 #FittingSmootherCustomised = RecoTracker.TrackProducer.CTFFinalFitWithMaterial_cff.FittingSmootherRK.clone(
37 FittingSmootherCustomised =TrackingTools.TrackFitters.RungeKuttaFitters_cff.KFFittingSmootherWithOutliersRejectionAndRK.clone(
38  ComponentName = 'FittingSmootherCustomised',
39  EstimateCut=18.0,
40  MinNumberOfHits=6
41  )
42 
43 
44 TrackRefitterCTF1 =RecoTracker.TrackProducer.TrackRefitter_cfi.TrackRefitter.clone(
45  constraint = "",
46  src='ALCARECOTkAlMinBias',
47  TTRHBuilder = 'WithAngleAndTemplate',
48  TrajectoryInEvent = True,
49  beamSpot='MyBeamSpot'
50  )
51 
52 # 2b: apply NEW hit filter. Does not work with CosmicTF tracks !
53 
55 AlignmentHitFilterCTF=RecoTracker.FinalTrackSelectors.TrackerTrackHitFilter_cff.TrackerTrackHitFilter.clone(
56  ## src = 'ALCARECOTkAlCosmicsCTF0T',
57  src = 'TrackRefitterCTF1',
58  commands = cms.vstring("keep PXB","keep PXE","keep TIB","keep TID","keep TOB","keep TEC"),
59  minimumHits = 6,
60  replaceWithInactiveHits = True,
61  stripAllInvalidHits = False,
62  rejectBadStoNHits = True,
63  StoNcommands = cms.vstring("ALL 18.0"),
64  useTrajectories= True,
65  rejectLowAngleHits= True,
66  TrackAngleCut= 0.17,
67  usePixelQualityFlag= True,
68  PxlCorrClusterChargeCut=10000.0
69  )
70 
71 # 3: produce track after NEW track hit filter
72 
74 ctfProducerCustomisedCTF = RecoTracker.TrackProducer.CTFFinalFitWithMaterial_cff.ctfWithMaterialTracks.clone(
75  src = 'AlignmentHitFilterCTF',
76  beamSpot='MyBeamSpot',
77  # Fitter = 'FittingSmootherCustomised',
78  TTRHBuilder = 'WithAngleAndTemplate',
79  TrajectoryInEvent = True
80  )
81 
82 
83 # 4: apply track selections on the refitted tracks
84 import Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi
85 ALCARECOTkAlMinBiasSkimmed= Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi.AlignmentTrackSelector.clone(
86  ## src= 'TrackRefitterCTF1',
87  src= 'ctfProducerCustomisedCTF',
88  ptMin=1.5, # already in ALCARECO cfg
89  ptMax=9999.0,
90  pMin=3.0,
91  pMax=9999.0,
92  etaMin=-2.4, # already in ALCARECO cfg
93  etaMax=2.4, # already in ALCARECO cfg
94  nHitMin=8,
95  nHitMin2D=2,
96  chi2nMax=6.0
97  ### others which aren't used
98  #minHitsPerSubDet.inTIB = 0
99  #minHitsPerSubDet.inBPIX = 1
100  )
101 
102 
103 TrackRefitterCTF2 =RecoTracker.TrackProducer.TrackRefitter_cfi.TrackRefitter.clone(
104  constraint = "",
105  src='ALCARECOTkAlMinBiasSkimmed',
106  TTRHBuilder = 'WithAngleAndTemplate',
107  TrajectoryInEvent = True,
108  beamSpot='MyBeamSpot',
109 # EstimateCut=15.0,
110 # MinNumberOfHits=6
111 # Fitter='FittingSmootherCustomised'
112  )
113 
114 
115 # 5: Overlap tagger
116 import Alignment.TrackerAlignment.TkAlCaOverlapTagger_cff
117 OverlapAssoMapCTF=Alignment.TrackerAlignment.TkAlCaOverlapTagger_cff.OverlapTagger.clone(
118  # src='ALCARECOTkAlCosmicsCTFSkimmed'
119  src='TrackRefitterCTF2',
120  #Clustersrc='ALCARECOTkAlCosmicsCTF0T'
121  Clustersrc='ALCARECOTkAlMinBiasSkimmed'#the track selector produces a new collection of Clusters!
122  )
123 
124 
125 import Alignment.CommonAlignmentMonitor.AlignmentStats_cff
126 NewStatsCTF=Alignment.CommonAlignmentMonitor.AlignmentStats_cff.AlignmentStats.clone(
127  # src='OverlapAssoMap',
128  src='TrackRefitterCTF2',
129  OverlapAssoMap='OverlapAssoMapCTF',
130  keepTrackStats = False,
131  keepHitStats = True,
132  TrkStatsFileName='TracksStatisticsCTF.root',
133  HitStatsFileName='HitMapsCTF.root',
134  TrkStatsPrescale= 1
135  )
136 
137 
138 
139 ##________________________________Sequences____________________________________
140 seqALCARECOTkAlMinBiasSkimmed = cms.Sequence(MyBeamSpot+TrackRefitterCTF1+AlignmentHitFilterCTF+ctfProducerCustomisedCTF+ALCARECOTkAlMinBiasSkimmed+TrackRefitterCTF2+OverlapAssoMapCTF)
141 
142 
143