CMS 3D CMS Logo

ALCARECOPromptCalibProdSiStripGains_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 ALCARECOCalMinBiasFilterForSiStripGains = copy.deepcopy(hltHighLevel)
8 ALCARECOCalMinBiasFilterForSiStripGains.HLTPaths = ['pathALCARECOSiStripCalMinBias']
9 ALCARECOCalMinBiasFilterForSiStripGains.throw = True ## dont throw on unknown path names
10 ALCARECOCalMinBiasFilterForSiStripGains.TriggerResultsTag = cms.InputTag("TriggerResults","","RECO")
11 #process.TkAlMinBiasFilterForBS.eventSetupPathsKey = 'pathALCARECOTkAlMinBias:RECO'
12 #ALCARECODtCalibHLTFilter.andOr = True ## choose logical OR between Triggerbits
13 
14 
15 # ****************************************************************************
16 # ** Uncomment the following lines to set the LVL1 bit filter for the HTTxx **
17 # ****************************************************************************
18 
19 #from L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskTechTrigConfig_cff import *
20 #from HLTrigger.HLTfilters.hltLevel1GTSeed_cfi import hltLevel1GTSeed
21 #HTTFilter = hltLevel1GTSeed.clone(
22 # #L1SeedsLogicalExpression = cms.string("L1_HTT125 OR L1_HTT150 OR L1_HTT175" ),
23 # L1SeedsLogicalExpression = cms.string("L1_HTT125 OR L1_HTT150"),
24 # L1GtObjectMapTag = cms.InputTag( "hltL1GtObjectMap" ),
25 # )
26 # ----------------------------------------------------------------------------
27 
28 
29 
30 # FIXME: are the following blocks needed?
31 
32 #this block is there to solve issue related to SiStripQualityRcd
33 #process.load("CalibTracker.SiStripESProducers.SiStripQualityESProducer_cfi")
34 #process.load("CalibTracker.SiStripESProducers.fake.SiStripDetVOffFakeESSource_cfi")
35 #process.es_prefer_fakeSiStripDetVOff = cms.ESPrefer("SiStripDetVOffFakeESSource","siStripDetVOffFakeESSource")
36 
37 
38 #process.SiStripDetInfoFileReader = cms.Service("SiStripDetInfoFileReader")
39 
40 
41 
42 # ------------------------------------------------------------------------------
43 # This is the sequence for track refitting of the track saved by SiStripCalMinBias
44 # to have access to transient objects produced during RECO step and not saved
45 
47 ALCARECOCalibrationTracks = AlignmentTrackSelector.clone(
48  # src = 'generalTracks',
49  src = 'ALCARECOSiStripCalMinBias',
50  filter = True,
51  applyBasicCuts = True,
52  ptMin = 0.8,
53  nHitMin = 6,
54  chi2nMax = 10.,
55  )
56 
57 # FIXME: the beam-spot should be kept in the AlCaReco (if not already there) and dropped from here
59 
63 
64 ALCARECOCalibrationTracksRefit = TrackRefitter.clone(src = cms.InputTag("ALCARECOCalibrationTracks"),
65  NavigationSchool = cms.string("")
66  )
67 
68 # refit and BS can be dropped if done together with RECO.
69 # track filter can be moved in acalreco if no otehr users
70 ALCARECOTrackFilterRefit = cms.Sequence(ALCARECOCalibrationTracks +
71  offlineBeamSpot +
72  ALCARECOCalibrationTracksRefit )
73 
74 # ------------------------------------------------------------------------------
75 # Get the information you need from the tracks, calibTree-style to have no code difference
78 from CalibTracker.SiStripCommon.ShallowGainCalibration_cfi import shallowGainCalibration
79 ALCARECOShallowEventRun = shallowEventRun.clone()
80 ALCARECOShallowTracks = shallowTracks.clone(Tracks=cms.InputTag('ALCARECOCalibrationTracksRefit'))
81 ALCARECOShallowGainCalibration = shallowGainCalibration.clone(Tracks=cms.InputTag('ALCARECOCalibrationTracksRefit'))
82 ALCARECOShallowSequence = cms.Sequence(ALCARECOShallowEventRun*ALCARECOShallowTracks*ALCARECOShallowGainCalibration)
83 
84 # ------------------------------------------------------------------------------
85 # This is the module actually doing the calibration
86 from CalibTracker.SiStripChannelGain.SiStripGainsPCLWorker_cfi import SiStripGainsPCLWorker
87 ALCARECOSiStripCalib = SiStripGainsPCLWorker.clone()
88 ALCARECOSiStripCalib.FirstSetOfConstants = cms.untracked.bool(False)
89 ALCARECOSiStripCalib.DQMdir = cms.untracked.string('AlCaReco/SiStripGains')
90 ALCARECOSiStripCalib.calibrationMode = cms.untracked.string('StdBunch')
91 ALCARECOSiStripCalib.gain.label = cms.untracked.string('ALCARECOShallowGainCalibration')
92 ALCARECOSiStripCalib.evtinfo.label = cms.untracked.string('ALCARECOShallowEventRun')
93 ALCARECOSiStripCalib.tracks.label = cms.untracked.string('ALCARECOShallowTracks')
94 # ----------------------------------------------------------------------------
95 
96 # ****************************************************************************
97 # ** Conversion for the SiStripGain DQM dir not used for split statistics **
98 # ****************************************************************************
99 MEtoEDMConvertSiStripGains = cms.EDProducer("MEtoEDMConverter",
100  Name = cms.untracked.string('MEtoEDMConverter'),
101  Verbosity = cms.untracked.int32(0), # 0 provides no output
102  # 1 provides basic output
103  # 2 provide more detailed output
104  Frequency = cms.untracked.int32(50),
105  MEPathToSave = cms.untracked.string('AlCaReco/SiStripGains'),
106  deleteAfterCopy = cms.untracked.bool(True)
107  )
108 
109 # The actual sequence
110 seqALCARECOPromptCalibProdSiStripGains = cms.Sequence(
111  ALCARECOCalMinBiasFilterForSiStripGains *
112  ALCARECOTrackFilterRefit *
113  ALCARECOShallowSequence *
114  ALCARECOSiStripCalib *
115  MEtoEDMConvertSiStripGains
116  )
dont throw on unknown path names