CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
17 
18 # FIXME: are the following blocks needed?
19 
20 #this block is there to solve issue related to SiStripQualityRcd
21 #process.load("CalibTracker.SiStripESProducers.SiStripQualityESProducer_cfi")
22 #process.load("CalibTracker.SiStripESProducers.fake.SiStripDetVOffFakeESSource_cfi")
23 #process.es_prefer_fakeSiStripDetVOff = cms.ESPrefer("SiStripDetVOffFakeESSource","siStripDetVOffFakeESSource")
24 
25 
26 #process.SiStripDetInfoFileReader = cms.Service("SiStripDetInfoFileReader")
27 
28 
29 
30 # ------------------------------------------------------------------------------
31 # This is the sequence for track refitting of the track saved by SiStripCalMinBias
32 # to have access to transient objects produced during RECO step and not saved
33 
35 ALCARECOCalibrationTracks = AlignmentTrackSelector.clone(
36  # src = 'generalTracks',
37  src = 'ALCARECOSiStripCalMinBias',
38  filter = True,
39  applyBasicCuts = True,
40  ptMin = 0.8,
41  nHitMin = 6,
42  chi2nMax = 10.,
43  )
44 
45 # FIXME: the beam-spot should be kept in the AlCaReco (if not already there) and dropped from here
47 
51 
52 ALCARECOCalibrationTracksRefit = TrackRefitter.clone(src = cms.InputTag("ALCARECOCalibrationTracks"),
53  NavigationSchool = cms.string("")
54  )
55 
56 # refit and BS can be dropped if done together with RECO.
57 # track filter can be moved in acalreco if no otehr users
58 ALCARECOTrackFilterRefit = cms.Sequence(ALCARECOCalibrationTracks +
59  offlineBeamSpot +
60  ALCARECOCalibrationTracksRefit )
61 
62 # ------------------------------------------------------------------------------
63 # Get the information you need from the tracks, calibTree-style to have no code difference
66 from CalibTracker.SiStripCommon.ShallowGainCalibration_cfi import shallowGainCalibration
67 ALCARECOShallowEventRun = shallowEventRun.clone()
68 ALCARECOShallowTracks = shallowTracks.clone(Tracks=cms.InputTag('ALCARECOCalibrationTracksRefit'))
69 ALCARECOShallowGainCalibration = shallowGainCalibration.clone(Tracks=cms.InputTag('ALCARECOCalibrationTracksRefit'))
70 ALCARECOShallowSequence = cms.Sequence(ALCARECOShallowEventRun*ALCARECOShallowTracks*ALCARECOShallowGainCalibration)
71 
72 # ------------------------------------------------------------------------------
73 # This is the module actually doing the calibration
74 
75 from CalibTracker.SiStripChannelGain.computeGain_cff import SiStripCalib
76 ALCARECOSiStripCalib = SiStripCalib.clone()
77 ALCARECOSiStripCalib.AlgoMode = cms.untracked.string('PCL')
78 ALCARECOSiStripCalib.FirstSetOfConstants = cms.untracked.bool(False)
79 ALCARECOSiStripCalib.harvestingMode = cms.untracked.bool(False)
80 ALCARECOSiStripCalib.doStoreOnDB = cms.bool(False)
81 ALCARECOSiStripCalib.gain.label = cms.untracked.string('ALCARECOShallowGainCalibration')
82 ALCARECOSiStripCalib.evtinfo.label = cms.untracked.string('ALCARECOShallowEventRun')
83 ALCARECOSiStripCalib.tracks.label = cms.untracked.string('ALCARECOShallowTracks')
84 
85 
86 # ------------------------------------------------------------------------------
87 MEtoEDMConvertSiStripGains = cms.EDProducer("MEtoEDMConverter",
88  Name = cms.untracked.string('MEtoEDMConverter'),
89  Verbosity = cms.untracked.int32(0), # 0 provides no output
90  # 1 provides basic output
91  # 2 provide more detailed output
92  Frequency = cms.untracked.int32(50),
93  MEPathToSave = cms.untracked.string('AlCaReco/SiStripGains'),
94  deleteAfterCopy = cms.untracked.bool(False)
95 )
96 
97 
98 
99 
100 
101 
102 # the actual sequence
103 seqALCARECOPromptCalibProdSiStripGains = cms.Sequence(
104  ALCARECOCalMinBiasFilterForSiStripGains *
105  ALCARECOTrackFilterRefit *
106  ALCARECOShallowSequence *
107  ALCARECOSiStripCalib *
108  MEtoEDMConvertSiStripGains
109 )
110 
111 
dont throw on unknown path names