|
|
Go to the documentation of this file. 1 ZMuMuValidationTemplate=
"""
2 import FWCore.ParameterSet.Config as cms
4 process = cms.Process("ONLYHISTOS")
8 process.load("FWCore.MessageService.MessageLogger_cfi")
9 process.MessageLogger.destinations = ['cout', 'cerr']
10 process.MessageLogger.cerr.FwkReport.reportEvery = 5000
13 ########### DATA FILES ####################################
14 .oO[datasetDefinition]Oo.
15 # process.load("Alignment.OfflineValidation..oO[dataset]Oo._cff")
17 process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi")
18 process.load("Geometry.CommonDetUnit.globalTrackingGeometry_cfi")
19 process.load("RecoMuon.DetLayers.muonDetLayerGeometry_cfi")
20 process.load("Geometry.MuonNumbering.muonNumberingInitialization_cfi")
21 process.load("RecoMuon.TrackingTools.MuonServiceProxy_cff")
23 ########### standard includes ##############################
24 process.load("Configuration.StandardSequences..oO[magneticField]Oo._cff")
25 process.load("Configuration.StandardSequences.Reconstruction_cff")
26 process.load("Configuration.Geometry.GeometryDB_cff")
29 ########### DATABASE conditions ############################
30 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
31 process.GlobalTag.globaltag = ".oO[GlobalTag]Oo."
35 ########### TRACK REFITTER #################################
36 process.load("RecoTracker.TrackProducer.TrackRefitters_cff")
37 process.TrackRefitter.src = 'ALCARECOTkAlZMuMu'
38 process.TrackRefitter.TrajectoryInEvent = True
39 process.TrackRefitter.TTRHBuilder = "WithAngleAndTemplate"
40 process.TrackRefitter.NavigationSchool = ""
42 ###### MuSclFit SETTINGS ##############################################
45 ### MuScleFit specific configuration
47 process.looper = cms.Looper(
49 # Only used when reading events from a root tree
50 MaxEventsFromRootTree = cms.int32(-1),
52 # Specify a file if you want to read events from a root tree in a local file.
53 # In this case the input source should be an empty source with 0 events.
55 InputRootTreeFileName = cms.string(""),
57 # Specify the file name where you want to save a root tree with the muon pairs.
58 # Leave empty if no file should be written.
60 OutputRootTreeFileName = cms.string(""),
63 # Choose the kind of muons you want to run on
64 # -------------------------------------------
65 MuonLabel = cms.InputTag("TrackRefitter"),
68 #MuonType = cms.int32(11),
69 MuonType = cms.int32(5),
71 # This line allows to switch to PAT muons. Default is false.
72 # Note that the onia selection works only with onia patTuples.
73 PATmuons = cms.untracked.bool(False),
78 # The resonances are to be specified in this order:
79 # Z0, Y(3S), Y(2S), Y(1S), Psi(2S), J/Psi
80 # -------------------------------------------------
81 resfind = cms.vint32(1, 0, 0, 0, 0, 0),
85 maxLoopNumber = cms.untracked.int32(1),
86 # Select which fits to do in which loop (0 = do not, 1 = do)
87 doResolFit = cms.vint32(0),
88 doScaleFit = cms.vint32(0),
89 doBackgroundFit = cms.vint32(0),
90 doCrossSectionFit = cms.vint32(0),
92 # Use the probability file or not. If not it will perform a simpler selection taking the muon pair with
93 # invariant mass closer to the pdf value and will crash if some fit is attempted.
94 UseProbsFile = cms.untracked.bool(False),
96 # False = use also MC information
97 speedup = cms.bool(True),
98 # Set this to false if you do not want to use simTracks.
99 # (Note that this is skipped anyway if speedup == True).
100 compareToSimTracks = cms.bool(False),
104 OutputFileName = cms.untracked.string("zmumuHisto.root"),
106 # BiasType=0 means no bias to muon momenta
107 # ----------------------------------------
108 BiasType = cms.int32(0),
109 parBias = cms.vdouble(),
111 # SmearType=0 means no smearing applied to muon momenta
112 # -----------------------------------------------------
113 SmearType = cms.int32(0),
114 parSmear = cms.vdouble(),
116 ### taken from J/Psi #########################
117 ResolFitType = cms.int32(14),
118 parResol = cms.vdouble(0.007,0.015, -0.00077, 0.0063, 0.0018, 0.0164),
119 parResolFix = cms.vint32(0, 0, 0,0, 0,0),
120 parResolOrder = cms.vint32(0, 0, 0, 0, 0, 0),
123 # -------------------- #
124 # Scale fit parameters #
125 # -------------------- #
127 # -----------------------------------------------------------------------------------
128 ScaleFitType = cms.int32(18),
129 parScaleOrder = cms.vint32(0, 0, 0, 0),
130 parScaleFix = cms.vint32(0, 0, 0, 0),
131 parScale = cms.vdouble(1, 1, 1, 1),
135 # ---------------------------- #
136 # Cross section fit parameters #
137 # ---------------------------- #
138 # Note that the cross section fit works differently than the others, it
139 # fits ratios of parameters. Fix and Order should not be used as is, they
140 # are there mainly for compatibility.
141 parCrossSectionOrder = cms.vint32(0, 0, 0, 0, 0, 0),
142 parCrossSectionFix = cms.vint32(0, 0, 0, 0, 0, 0),
143 parCrossSection = cms.vdouble(1.233, 2.07, 6.33, 13.9, 2.169, 127.2),
145 # ------------------------- #
146 # Background fit parameters #
147 # ------------------------- #
149 # Window factors for: Z, Upsilons and (J/Psi,Psi2S) regions
150 LeftWindowBorder = cms.vdouble(70., 8., 1.391495),
151 RightWindowBorder = cms.vdouble(110., 12., 5.391495),
153 # The two parameters of BgrFitType=2 are respectively:
154 # bgr fraction, (negative of) bgr exp. slope, bgr constant
155 # --------------------------------------------------------
156 # The function types for resonances in a region must be the same
157 BgrFitType = cms.vint32(2, 2, 2), # regions
158 # These empty parameters should be used when there is no background
159 parBgr = cms.vdouble(0., 0., 0., 0., 0., 0.,
160 0., 0., 0., 0., 0., 0., 0.,0., 0.,0., 0.,0.),
161 parBgrFix = cms.vint32(0, 0, 0, 0, 0, 0,
162 # The rest of the parameters is used for the resonance regions. They are automatically fixed in the code
163 # because they are never used to fit the background, but only after the rescaling.
164 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
165 parBgrOrder = cms.vint32(0, 0, 0, 0, 0, 0,
166 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
169 # ----------------------- #
171 # Set Minuit fit strategy
172 FitStrategy = cms.int32(1),
175 # Fit accuracy and debug parameters
176 StartWithSimplex = cms.bool(True),
177 ComputeMinosErrors = cms.bool(False),
178 MinimumShapePlots = cms.bool(True),
180 ########## TO BE ENABLED ################################
181 # Set the cuts on muons to be used in the fit
182 MinMuonPt = cms.untracked.double(0.),
183 MaxMuonPt = cms.untracked.double(1000.),
184 MinMuonEtaFirstRange = cms.untracked.double(.oO[etaminneg]Oo.),
185 MaxMuonEtaFirstRange = cms.untracked.double(.oO[etamaxneg]Oo.),
186 MinMuonEtaSecondRange = cms.untracked.double(.oO[etaminpos]Oo.),
187 MaxMuonEtaSecondRange = cms.untracked.double(.oO[etamaxpos]Oo.),
188 PileUpSummaryInfo = cms.untracked.InputTag("addPileupInfo"),
189 PrimaryVertexCollection = cms.untracked.InputTag("offlinePrimaryVertices"),
191 # The following parameters can be used to filter events
192 TriggerResultsLabel = cms.untracked.string("TriggerResults"),
193 TriggerResultsProcess = cms.untracked.string("HLT"),
194 TriggerPath = cms.untracked.vstring(""),
195 # Negate the result of the trigger
196 NegateTrigger = cms.untracked.bool(False),
197 debug = cms.untracked.int32(0),
200 ###### FINAL SEQUENCE ##############################################
202 process.p = cms.Path(
203 process.offlineBeamSpot*process.TrackRefitter
211 zMuMuScriptTemplate=
"""
213 source /afs/cern.ch/cms/caf/setup.sh
215 echo -----------------------
216 echo Job started at `date`
217 echo -----------------------
220 cd .oO[CMSSW_BASE]Oo./src
221 # export SCRAM_ARCH=slc5_amd64_gcc462
222 export SCRAM_ARCH=.oO[SCRAM_ARCH]Oo.
223 eval `scram runtime -sh`
226 rfmkdir -p .oO[datadir]Oo.
228 rfmkdir -p .oO[logdir]Oo.
229 rm -f .oO[logdir]Oo./*.stdout
230 rm -f .oO[logdir]Oo./*.stderr
232 if [[ $HOSTNAME = lxplus[0-9]*\.cern\.ch ]] # check for interactive mode
234 rfmkdir -p .oO[workdir]Oo.
235 rm -f .oO[workdir]Oo./*
238 mkdir -p $cwd/TkAllInOneTool
239 cd $cwd/TkAllInOneTool
247 source /afs/cern.ch/sw/lcg/external/gcc/4.8.1/x86_64-slc6/setup.sh
248 source /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.10/x86_64-slc6-gcc48-opt/root/bin/thisroot.sh
250 # cd .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit
251 # ln -fs .oO[workdir]Oo./0_zmumuHisto.root .
252 cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/CompareBiasZValidation.cc .
253 cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/Legend.h .
254 cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitMassSlices.cc .
255 cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitSlices.cc .
256 cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitXslices.cc .
257 cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitWithRooFit.cc .
258 cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitMass1D.cc .
260 root -q -b "CompareBiasZValidation.cc+(\\\"\\\")"
263 # mv BiasCheck.root .oO[workdir]Oo.
266 cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/tdrstyle.C .
267 cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlap_.oO[resonance]Oo..C .
268 # ln -fs /afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/TMP_EM/ZMuMu/data/MC/BiasCheck_DYToMuMu_Summer11_TkAlZMuMu_IDEAL.root ./BiasCheck_Reference.root
269 if [[ .oO[zmumureference]Oo. == *store* ]]; then cmsStage -f .oO[zmumureference]Oo. BiasCheck_Reference.root; else ln -fs .oO[zmumureference]Oo. ./BiasCheck_Reference.root; fi
270 root -q -b MultiHistoOverlap_.oO[resonance]Oo..C
272 cmsMkdir /store/caf/user/$USER/.oO[eosdir]Oo.
273 for RootOutputFile in $(ls *root )
275 cmsStage -f ${RootOutputFile} /store/caf/user/$USER/.oO[eosdir]Oo./
278 for PngOutputFile in $(ls *png ); do
279 rfcp ${PngOutputFile} .oO[datadir]Oo.
283 echo -----------------------
284 echo Job ended at `date`
285 echo -----------------------