test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ALCARECOPromptCalibProdSiPixelAli0T_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # ------------------------------------------------------------------------------
4 # configure a filter to run only on the events selected by TkAlMinBias AlcaReco
5 import copy
7 ALCARECOTkAlMinBiasFilterForSiPixelAli = copy.deepcopy(hltHighLevel)
8 ALCARECOTkAlMinBiasFilterForSiPixelAli.HLTPaths = ['pathALCARECOTkAlMinBias']
9 ALCARECOTkAlMinBiasFilterForSiPixelAli.throw = True ## dont throw on unknown path names
10 ALCARECOTkAlMinBiasFilterForSiPixelAli.TriggerResultsTag = cms.InputTag("TriggerResults","","RECO")
11 
13 
14 
15 # Ingredient: offlineBeamSpot
16 from RecoVertex.BeamSpotProducer.BeamSpot_cfi import offlineBeamSpot
17 
18 # Ingredient: AlignmentTrackSelector
19 # track selector for HighPurity tracks
20 #-- AlignmentTrackSelector
21 from Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi import AlignmentTrackSelector
22 SiPixelAliHighPuritySelector = AlignmentTrackSelector.clone(
23  applyBasicCuts = True,
24  #filter = True,
25  src = 'ALCARECOTkAlMinBias',
26  trackQualities = ["highPurity"],
27  pMin = 4.9, #for 0T Collisions
28  pMax = 5.1, #for 0T Collisions
29  )
30 
31 
32 
33 # track selection for alignment
34 from Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi import AlignmentTrackSelector
35 SiPixelAliTrackSelector = AlignmentTrackSelector.clone(
36  src = 'SiPixelAliTrackFitter',
37  applyBasicCuts = True,
38  pMin = 4.9, #for 0T Collisions
39  pMax = 5.1, #for 0T Collisions
40  ptMin = 0., #for 0T Collisions
41  etaMin = -999.,
42  etaMax = 999.,
43  nHitMin = 8,
44  nHitMin2D = 2,
45  chi2nMax = 9999.,
46  applyMultiplicityFilter = False,
47  maxMultiplicity = 1,
48  applyNHighestPt = False,
49  nHighestPt = 1,
50  seedOnlyFrom = 0,
51  applyIsolationCut = False,
52  minHitIsolation = 0.8,
53  applyChargeCheck = False,
54  minHitChargeStrip = 30.,
55 )
56 #Special option for PCL
57 SiPixelAliTrackSelector.minHitsPerSubDet.inPIXEL = 2
58 
59 
60 # Ingredient: SiPixelAliTrackRefitter0
61 # refitting
65 # In the following use
66 # TrackRefitter (normal tracks), TrackRefitterP5 (cosmics) or TrackRefitterBHM (beam halo)
67 
68 SiPixelAliTrackRefitter0 = TrackRefitter.clone(
69  src = 'SiPixelAliHighPuritySelector', #'ALCARECOTkAlMinBias'#'ALCARECOTkAlCosmicsCTF0T' #'ALCARECOTkAlMuonIsolated'
70  NavigationSchool = '', # to avoid filling hit pattern
71  )
72 
73 SiPixelAliTrackRefitter1 = SiPixelAliTrackRefitter0.clone(
74  src = 'SiPixelAliTrackSelector'
75 )
76 
77 #-- Alignment producer
79 from Alignment.CommonAlignmentProducer.TrackerAlignmentProducerForPCL_cff import AlignmentProducer
80 SiPixelAliMilleAlignmentProducer = copy.deepcopy(AlignmentProducer)
81 SiPixelAliMilleAlignmentProducer.ParameterBuilder.Selector = cms.PSet(
82  alignParams = cms.vstring(
83  'TrackerTPBHalfBarrel,111111',
84  'TrackerTPEHalfCylinder,111111',
85 
86  'TrackerTIBHalfBarrel,000000',
87  'TrackerTOBHalfBarrel,000000',
88  'TrackerTIDEndcap,000000',
89  'TrackerTECEndcap,000000'
90  )
91  )
92 
93 SiPixelAliMilleAlignmentProducer.doMisalignmentScenario = False #True
94 
95 
96 SiPixelAliMilleAlignmentProducer.checkDbAlignmentValidity = False
97 SiPixelAliMilleAlignmentProducer.applyDbAlignment = True
98 SiPixelAliMilleAlignmentProducer.tjTkAssociationMapTag = 'SiPixelAliTrackRefitter1'
99 
100 SiPixelAliMilleAlignmentProducer.algoConfig = MillePedeAlignmentAlgorithm
101 SiPixelAliMilleAlignmentProducer.algoConfig.mode = 'mille'
102 SiPixelAliMilleAlignmentProducer.algoConfig.runAtPCL = True
103 SiPixelAliMilleAlignmentProducer.algoConfig.mergeBinaryFiles = cms.vstring()
104 SiPixelAliMilleAlignmentProducer.algoConfig.binaryFile = 'milleBinary_0.dat'
105 SiPixelAliMilleAlignmentProducer.algoConfig.TrajectoryFactory = cms.PSet(
106  BrokenLinesBzeroTrajectoryFactory # For 0T collisions
107  )
108 SiPixelAliMilleAlignmentProducer.algoConfig.TrajectoryFactory.MomentumEstimate = 5 #for 0T Collisions
109 
110 
111 
112 # Ingredient: SiPixelAliTrackerTrackHitFilter
114 # Reference config at /afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/aliConfigTemplates/Cosmics38T_BL_default_cfg.py
115 SiPixelAliTrackerTrackHitFilter = HitFilter.TrackerTrackHitFilter.clone(
116  src = 'SiPixelAliTrackRefitter0', #'ALCARECOTkAlCosmicsCTF0T',
117  # this is needed only if you require some selections; but it will work even if you don't ask for them
118  useTrajectories= True,
119  minimumHits = 8,
120  replaceWithInactiveHits = True,
121  rejectBadStoNHits = True,
122  commands = cms.vstring("keep PXB","keep PXE","keep TIB","keep TID","keep TOB","keep TEC"), #,"drop TID stereo","drop TEC stereo")
123  stripAllInvalidHits = False,
124  StoNcommands = cms.vstring("ALL 12.0"),
125  rejectLowAngleHits = True,
126  TrackAngleCut = 0.17, # in rads, starting from the module surface; .35 for cosmcics ok, .17 for collision tracks
127  usePixelQualityFlag = True #False
128  )
129 
130 # Ingredient: SiPixelAliSiPixelAliTrackFitter
132 SiPixelAliTrackFitter = fitWithMaterial.ctfWithMaterialTracks.clone(
133  src = 'SiPixelAliTrackerTrackHitFilter',
134  # TTRHBuilder = 'WithAngleAndTemplate', #should already be default
135  NavigationSchool = ''
136  )
137 
138 ### Ingredient: MillePedeFileConverter
139 ##from Alignment.CommonAlignmentProducer.MillePedeFileConverter_cfi import millePedeFileConverter
140 ### We configure the input file name of the millePedeFileConverter
141 ### with the output file name of the alignmentProducer (=looper).
142 ### Like this we are sure that they are well connected.
143 ##SiPixelAliMillePedeFileConverter = millePedeFileConverter.clone(
144 ## fileDir = looper.algoConfig.fileDir,
145 ## binaryFile = looper.algoConfig.binaryFile,
146 ## )
147 
148 SiPixelAliMillePedeFileConverter = cms.EDProducer("MillePedeFileConverter",
149  #FIXME: convert to untracked?
150  fileDir = cms.string(SiPixelAliMilleAlignmentProducer.algoConfig.fileDir.value()),
151  inputBinaryFile = cms.string(SiPixelAliMilleAlignmentProducer.algoConfig.binaryFile.value()),
152  #FIXME: why was the label removed? Don't we want a label?
153  fileBlobLabel = cms.string(''),
154  )
155 
156 
157 
158 seqALCARECOPromptCalibProdSiPixelAli = cms.Sequence(ALCARECOTkAlMinBiasFilterForSiPixelAli*
159  lsNumberFilter*
160  offlineBeamSpot*
161  SiPixelAliHighPuritySelector*
162  SiPixelAliTrackRefitter0*
163  SiPixelAliTrackerTrackHitFilter*
164  SiPixelAliTrackFitter*
165  SiPixelAliTrackSelector*
166  SiPixelAliTrackRefitter1*
167  SiPixelAliMilleAlignmentProducer*
168  SiPixelAliMillePedeFileConverter)
dont throw on unknown path names
dont throw on unknown path names