CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ALCARECOTkAlCosmics0T_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 
35 FittingSmootherCustomised = RecoTracker.TrackProducer.CTFFinalFitWithMaterialP5_cff.FittingSmootherRKP5.clone(
36  ComponentName = 'FittingSmootherCustomised',
37  EstimateCut=15.0,
38  MinNumberOfHits=6
39  )
40 
41 
42 TrackRefitterCTF1 =RecoTracker.TrackProducer.TrackRefitterP5_cfi.TrackRefitterP5.clone(
43  constraint = "",
44  src='ALCARECOTkAlCosmicsCTF0T',
45  TTRHBuilder = 'WithAngleAndTemplate',
46  TrajectoryInEvent = True,
47  beamSpot='MyBeamSpot',
48  NavigationSchool=''
49  )
50 
51 # 2b: apply NEW hit filter. Does not work with CosmicTF tracks !
52 
54 AlignmentHitFilterCTF=RecoTracker.FinalTrackSelectors.TrackerTrackHitFilter_cff.TrackerTrackHitFilter.clone(
55  ## src = 'ALCARECOTkAlCosmicsCTF0T',
56  src = 'TrackRefitterCTF1',
57  commands = cms.vstring("keep PXB","keep PXE","keep TIB","keep TID","keep TOB","keep TEC"),
58  minimumHits = 6,
59  replaceWithInactiveHits = True,
60  stripAllInvalidHits = False,
61  rejectBadStoNHits = True,
62  StoNcommands = cms.vstring("ALL 18.0"),
63  useTrajectories= True,
64  rejectLowAngleHits= True,
65  TrackAngleCut= 0.35,
66  usePixelQualityFlag= True,
67  PxlCorrClusterChargeCut=10000.0
68  )
69 
70 # 3: produce track after NEW track hit filter
71 
73 ctfProducerCustomisedCTF = RecoTracker.TrackProducer.CTFFinalFitWithMaterialP5_cff.ctfWithMaterialTracksCosmics.clone(
74  src = 'AlignmentHitFilterCTF',
75  beamSpot='MyBeamSpot',
76  # Fitter = 'FittingSmootherCustomised',
77  TTRHBuilder = 'WithAngleAndTemplate',
78  TrajectoryInEvent = True
79  )
80 
81 
82 # 4: apply track selections on the refitted tracks
83 import Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi
84 ALCARECOTkAlCosmicsCTF4TSkimmed= Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi.AlignmentTrackSelector.clone(
85  ## src= 'TrackRefitterCTF1',
86  src= 'ctfProducerCustomisedCTF',
87  ptMin=0.0,
88  ptMax=9999.0,
89  pMin=4.0,
90  pMax=9999.0,
91  etaMin=-99.0,
92  etaMax=99.0,
93  nHitMin=8,
94  nHitMin2D=2,
95  chi2nMax=6.0
96  ### others which aren't used
97  #minHitsPerSubDet.inTIB = 0
98  #minHitsPerSubDet.inBPIX = 1
99  )
100 
101 
102 TrackRefitterCTF2 =RecoTracker.TrackProducer.TrackRefitterP5_cfi.TrackRefitterP5.clone(
103  constraint = "",
104  src='ALCARECOTkAlCosmicsCTF4TSkimmed',
105  TTRHBuilder = 'WithAngleAndTemplate',
106  TrajectoryInEvent = True,
107  beamSpot='MyBeamSpot',
108  NavigationSchool=''
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='ALCARECOTkAlCosmicsCTF4TSkimmed'#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 
141 ##seqALCARECOTkAlCosmicsCTFSkimmed = cms.Sequence(MyBeamSpot+TrackHitFilterCTF+TrackRefitterCTF1+ALCARECOTkAlCosmicsCTF0TSkimmed+TrackRefitterCTF2+OverlapAssoMapCTF+NewStatsCTF)
142 #seqALCARECOTkAlCosmicsCTFSkimmed = cms.Sequence(MyBeamSpot+TrackRefitterCTF1+AlignmentHitFilterCTF+ctfProducerCustomisedCTF+ALCARECOTkAlCosmicsCTF4TSkimmed+TrackRefitterCTF2+OverlapAssoMapCTF+NewStatsCTF)
143 seqALCARECOTkAlCosmicsCTFSkimmed = cms.Sequence(MyBeamSpot+TrackRefitterCTF1+AlignmentHitFilterCTF+ctfProducerCustomisedCTF+ALCARECOTkAlCosmicsCTF4TSkimmed+TrackRefitterCTF2+OverlapAssoMapCTF)
144