Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:43

0001 # -*- coding: utf-8 -*-
0002 import FWCore.ParameterSet.Config as cms
0003 
0004 process = cms.Process("TEST2")
0005 
0006 process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi")
0007 process.load("Geometry.CommonTopologies.globalTrackingGeometry_cfi")
0008 process.load("RecoMuon.DetLayers.muonDetLayerGeometry_cfi")
0009 process.load("Geometry.MuonNumbering.muonNumberingInitialization_cfi")
0010 process.load("RecoMuon.TrackingTools.MuonServiceProxy_cff")
0011 process.load("Alignment.CommonAlignmentProducer.GlobalPosition_Fake_cff")
0012 process.load("MagneticField.Engine.uniformMagneticField_cfi")
0013 
0014 process.source = cms.Source(
0015     "PoolSource",
0016     inputCommands = cms.untracked.vstring(
0017     "keep *"
0018     ),
0019     fileNames = cms.untracked.vstring(
0020     "INPUTFILENAME"
0021     )
0022 )
0023 
0024 process.maxEvents = cms.untracked.PSet(
0025     input = cms.untracked.int32(-1)
0026 )
0027 
0028 # process.source = cms.Source("EmptySource")
0029 
0030 # process.maxEvents = cms.untracked.PSet(
0031 #     input = cms.untracked.int32(0)
0032 # )
0033 
0034 process.looper = cms.Looper(
0035     "MuScleFit",
0036     process.MuonServiceProxy,
0037 
0038     # Choose the kind of muons you want to run on
0039     # -------------------------------------------
0040 
0041     # // all muons //
0042     MuonLabel = cms.InputTag("patMuons"),
0043     # Defines what type of muons to use:
0044     # -1 = onia guys selection
0045     # -2 = onia guys selection - only GG
0046     # -3 = onia guys selection - only GT
0047     # -4 = onia guys selection - only TT
0048     # Note that the above samples are independent and represent the composition of the inclusive sample
0049     # 0 = muon (use the values in the muon collection)
0050     # 1 = global muon
0051     # 2 = standalone muon
0052     # 3 = tracker muon
0053     # 4 = calo muon
0054     # 10 = innerTrack of muon
0055     # 11 = innerTrack of global muon
0056     # 13 = innerTrack of tracker muon
0057     MuonType = cms.int32(-1),
0058 
0059     # Output settings
0060     # ---------------
0061     OutputFileName = cms.untracked.string('MuScleFit.root'),
0062     debug = cms.untracked.int32(0),
0063 
0064     # Likelihood settings
0065     # -------------------
0066     maxLoopNumber = cms.untracked.int32(1),
0067     # Select which fits to do in which loop (0 = do not, 1 = do)
0068     doResolFit =        cms.vint32(0),
0069     doScaleFit =        cms.vint32(0),
0070     doBackgroundFit =   cms.vint32(0),
0071     doCrossSectionFit = cms.vint32(0),
0072 
0073     # Fit parameters and fix flags (1 = use par)
0074     # ==========================================
0075 
0076     # BiasType=0 means no bias to muon momenta
0077     # ----------------------------------------
0078     BiasType = cms.int32(0),
0079     parBias = cms.vdouble(),
0080 
0081     # BiasType = 1 means linear bias on the muons Pt
0082     # the two parameters are the constant and the Pt
0083     # coefficient in this order.
0084     # ----------------------------------------------
0085     # BiasType = cms.int32(1),
0086     # parBias = cms.vdouble(1.001, 0.),
0087 
0088     # Sinusoidal in phi
0089     # -----------------
0090     # BiasType = 3 means sinusoidal bias on the muons Pt
0091     # the two parameters are defined by:
0092     # pt = (parScale[0] + parScale[1]*sin(phi))*pt; 
0093     # BiasType = cms.int32(3),
0094     # parBias = cms.vdouble(1.015, 0.025),
0095 
0096     # SmearType=0 means no smearing applied to muon momenta
0097     # -----------------------------------------------------
0098     SmearType = cms.int32(0),
0099     parSmear = cms.vdouble(),
0100 
0101     # ------------------------- #
0102     # Resolution fit parameters #
0103     # ------------------------- #
0104 
0105     ResolFitType = cms.int32(12),
0106     parResol = cms.vdouble(1.33, -0.990, 0.00762, -0.00341,
0107                            0.00480, 0.00223, 0.00560, 0.0118,
0108                            1.61, 0.000322, 0.000004,
0109                            -0.00252, 0.00863, 0.00745, -0.00337),
0110     parResolFix = cms.vint32(0, 0, 0, 0,
0111                              0, 0, 0, 0,
0112                              0, 0, 0,
0113                              0, 0, 0, 0),
0114     parResolOrder = cms.vint32(0, 0, 0, 0,
0115                                0, 0, 0, 0,
0116                                0, 0, 0,
0117                                0, 0, 0, 0),
0118 
0119     # -------------------- #
0120     # Scale fit parameters #
0121     # -------------------- #
0122     # Scale fit type=8: linear in pt and parabolic in eta with four parameters
0123     # ------------------------------------------------------------------------
0124     # ScaleFitType = cms.int32(8),
0125     # parScaleOrder = cms.vint32(0,0,0,0),
0126     # parScaleFix =   cms.vint32(0,0,0,0),
0127     # parScale = cms.vdouble(1.001, 0., 0., 0.),
0128 
0129     ScaleFitType = cms.int32(14),
0130     parScaleOrder = cms.vint32(0,0,0,0,
0131                                0,0,0,0,0,0),
0132     parScaleFix =   cms.vint32(0,1,1,1,
0133                                0,0,0,1,1,1),
0134     parScale = cms.vdouble(1., 0., 0., 0.,
0135                            0., 0., 0., 0., 0., 0.),
0136 
0137     # ---------------------------- #
0138     # Cross section fit parameters #
0139     # ---------------------------- #
0140     parCrossSectionOrder = cms.vint32(0, 0, 0, 0, 0, 0),
0141     parCrossSectionFix =   cms.vint32(0, 0, 0, 0, 0, 0),
0142     parCrossSection = cms.vdouble(1.233, 2.07, 6.33, 13.9, 2.169, 127.2),
0143 
0144     # ------------------------- #
0145     # Background fit parameters #
0146     # ------------------------- #
0147     # Window factors for: Z, Upsilons and (J/Psi,Psi2S) regions
0148     LeftWindowBorder = cms.vdouble(60., 8., 1.391495),
0149     RightWindowBorder = cms.vdouble(120., 12., 5.391495),
0150 
0151     # The two parameters of BgrFitType=2 are respectively:
0152     # bgr fraction, (negative of) bgr exp. slope, bgr constant
0153     # --------------------------------------------------------
0154     # The function types for resonances in a region must be the same
0155 
0156     # ------------------------------------------- #
0157     # ATTENTION: careful with the parameters, the background probability is always computed, putting
0158     # parameters for which the function will return nan will do so that the background probability will
0159     # return 0, however it is not a good thing to do.
0160     # ------------------------------------------- #
0161 
0162     BgrFitType = cms.vint32(2, 2, 2), # resonances
0163     parBgr = cms.vdouble(0., 0.,   0., 0.,   0., 0.,
0164                          0., 0.,   0., 0.,   0., 0.,     0.,0.,   0.,0.,   0.,0.),
0165     parBgrFix = cms.vint32(0, 0,   0, 0,   0, 0,
0166                            # The rest of the parameters is used for the resonance regions. They are automatically fixed in the code
0167                            # because they are never used to fit the background, but only after the rescaling.
0168                            1, 1,   1, 1,   1, 1,   1, 1,   1, 1,   1, 1),
0169     parBgrOrder = cms.vint32(0, 0,   0, 0,   0, 0,
0170                              0, 0,   0, 0,   0, 0,   0, 0,   0, 0,   0, 0),
0171 
0172     # ---------------- #
0173     # Select resonance #
0174     # ---------------- #
0175 
0176     # The resonances are to be specified in this order:
0177     # Z0, Y(3S), Y(2S), Y(1S), Psi(2S), J/Psi
0178     # -------------------------------------------------
0179     resfind = cms.vint32(1, 1, 1, 1, 1, 1),
0180     FitStrategy = cms.int32(2),
0181 
0182     speedup = cms.bool(False),
0183     # Set this to false if you do not want to use simTracks.
0184     # (Note that this is skipped anyway if speedup == True).
0185     compareToSimTracks = cms.bool(False),
0186     Sherpa = cms.untracked.bool(False),
0187     DebugMassResol = cms.untracked.bool(False),
0188 
0189     PATmuons = cms.untracked.bool(True),
0190     genParticles = cms.bool(True),
0191     GenParticlesName = cms.untracked.string('genParticles'),
0192     HepMCProduct = cms.bool(False),
0193 
0194     UseProbsFile = cms.untracked.bool(False),
0195     ProbabilitiesFileInPath = cms.untracked.string(""),
0196 
0197     # Only used when reading events from a root tree
0198     MaxEventsFromRootTree = cms.int32(-1),
0199 
0200     InputRootTreeFileName = cms.string(""),
0201     OutputRootTreeFileName = cms.string("OUTPUTTREENAME"),
0202 
0203     # Fit accuracy and debug parameters
0204     StartWithSimplex = cms.bool(True),
0205     ComputeMinosErrors = cms.bool(False),
0206     MinimumShapePlots = cms.bool(False),
0207 
0208     # The following parameters can be used to filter events
0209     TriggerResultsLabel = cms.untracked.string(""),
0210     TriggerResultsProcess = cms.untracked.string(""),
0211     # TriggerPath: "" = No trigger requirements, "All" = No specific path
0212     #TriggerPath = cms.untracked.string("HLT_L1MuOpen"),
0213     TriggerPath = cms.untracked.string(""),
0214     # Negate the result of the trigger
0215     NegateTrigger = cms.untracked.bool(False),
0216 )
0217 
0218 # Timing information
0219 # process.load("FWCore.MessageLogger.MessageLogger_cfi")
0220 # TimingLogFile = cms.untracked.string('timing.log')
0221 # process.Timing = cms.Service("Timing")
0222 
0223