test
CMS 3D CMS Logo

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