Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
import FWCore.ParameterSet.Config as cms
from DQMServices.Core.DQMEDHarvester import DQMEDHarvester

effPlotterLoose = DQMEDHarvester("EfficiencyPlotter",
                                  folder = cms.string("Muons/EfficiencyAnalyzer"),
                                  phiMin = cms.double(-3.2),
                                  etaMin = cms.double(-2.5),
                                  ptMin  = cms.double(10),
                                  etaBin = cms.int32(8),
                                  ptBin = cms.int32(10),
                                  phiBin = cms.int32(8),
                                  etaMax = cms.double(2.5),
                                  phiMax = cms.double(3.2),
                                  ptMax  = cms.double(100),
                                  vtxBin = cms.int32(30),
                                  vtxMin = cms.double(0.5),
                                  vtxMax = cms.double(149.5),
                                  MuonID = cms.string("Loose")
                                  )


effPlotterMedium = DQMEDHarvester("EfficiencyPlotter",
                                   folder = cms.string("Muons/EfficiencyAnalyzer"),
                                   phiMin = cms.double(-3.2),
                                   etaMin = cms.double(-2.5),
                                   ptMin  = cms.double(10),
                                   etaBin = cms.int32(8),
                                   ptBin = cms.int32(10),
                                   phiBin = cms.int32(8),
                                   etaMax = cms.double(2.5),
                                   phiMax = cms.double(3.2),
                                   ptMax  = cms.double(100),
                                   vtxBin = cms.int32(30),
                                   vtxMin = cms.double(0.5),
                                   vtxMax = cms.double(149.5),
                                   MuonID = cms.string("Medium")
                                   )


effPlotterTight = DQMEDHarvester("EfficiencyPlotter",
                                  folder = cms.string("Muons/EfficiencyAnalyzer"),
                                  phiMin = cms.double(-3.2),
                                  etaMin = cms.double(-2.5),
                                  ptMin  = cms.double(10),
                                  etaBin = cms.int32(8),
                                  ptBin = cms.int32(10),
                                  phiBin = cms.int32(8),
                                  etaMax = cms.double(2.5),
                                  phiMax = cms.double(3.2),
                                  ptMax  = cms.double(100),
                                  vtxBin = cms.int32(30),
                                  vtxMin = cms.double(0.5),
                                  vtxMax = cms.double(149.5),
                                  MuonID = cms.string("Tight")
                                  )
effPlotterLooseMiniAOD = DQMEDHarvester("EfficiencyPlotter",
                                          folder = cms.string("Muons_miniAOD/EfficiencyAnalyzer"),
                                          phiMin = cms.double(-3.2),
                                          etaMin = cms.double(-2.5),
                                          ptMin  = cms.double(10),
                                          etaBin = cms.int32(8),
                                          ptBin = cms.int32(10),
                                          phiBin = cms.int32(8),
                                          etaMax = cms.double(2.5),
                                          phiMax = cms.double(3.2),
                                          ptMax  = cms.double(100),
                                          vtxBin = cms.int32(30),
                                          vtxMin = cms.double(0.5),
                                          vtxMax = cms.double(149.5),
                                          MuonID = cms.string("Loose")
                                          )


effPlotterMediumMiniAOD = DQMEDHarvester("EfficiencyPlotter",
                                           folder = cms.string("Muons_miniAOD/EfficiencyAnalyzer"),
                                           phiMin = cms.double(-3.2),
                                           etaMin = cms.double(-2.5),
                                           ptMin  = cms.double(10),
                                           etaBin = cms.int32(8),
                                           ptBin = cms.int32(10),
                                           phiBin = cms.int32(8),
                                           etaMax = cms.double(2.5),
                                           phiMax = cms.double(3.2),
                                           ptMax  = cms.double(100),
                                           vtxBin = cms.int32(30),
                                           vtxMin = cms.double(0.5),
                                           vtxMax = cms.double(149.5),
                                           MuonID = cms.string("Medium")
                                           )


effPlotterTightMiniAOD = DQMEDHarvester("EfficiencyPlotter",
                                          folder = cms.string("Muons_miniAOD/EfficiencyAnalyzer"),
                                          phiMin = cms.double(-3.2),
                                          etaMin = cms.double(-2.5),
                                          ptMin  = cms.double(10),
                                          etaBin = cms.int32(8),
                                          ptBin = cms.int32(10),
                                          phiBin = cms.int32(8),
                                          etaMax = cms.double(2.5),
                                          phiMax = cms.double(3.2),
                                          ptMax  = cms.double(100),
                                          vtxBin = cms.int32(30),
                                          vtxMin = cms.double(0.5),
                                          vtxMax = cms.double(149.5),
                                          MuonID = cms.string("Tight")
                                          )


effPlotter=cms.Sequence(effPlotterLoose*effPlotterMedium*effPlotterTight)
effPlotter_miniAOD=cms.Sequence(effPlotterLooseMiniAOD*effPlotterMediumMiniAOD*effPlotterTightMiniAOD)   

effPlotterLoose_Phase2=effPlotterLoose.clone(
    vtxBin=20,
    vtxMin=149.5,
    vtxMax=249.5
    )
effPlotterMedium_Phase2=effPlotterMedium.clone(
    vtxBin=20,
    vtxMin=149.5,
    vtxMax=249.5                                                                                           
)
effPlotterTight_Phase2=effPlotterTight.clone(
    vtxBin=20,
    vtxMin=149.5,
    vtxMax=249.5                                                                                              
)
effPlotterLooseMiniAOD_Phase2=effPlotterLooseMiniAOD.clone(                                                                                
    vtxBin=20,
    vtxMin=149.5,
    vtxMax=249.5
)
effPlotterMediumMiniAOD_Phase2=effPlotterMediumMiniAOD.clone(
    vtxBin=20,
    vtxMin=149.5,
    vtxMax=249.5
)                                                                              
effPlotterTightMiniAOD_Phase2=effPlotterTightMiniAOD.clone(
    vtxBin=20,
    vtxMin=149.5,
    vtxMax=249.5                                                                                
)

effPlotter_Phase2=cms.Sequence(effPlotterLoose_Phase2*effPlotterMedium_Phase2*effPlotterTight_Phase2)
effPlotter_miniAOD_Phase2=cms.Sequence(effPlotterLooseMiniAOD_Phase2*effPlotterMediumMiniAOD_Phase2*effPlotterTightMiniAOD_Phase2)                                    
from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon                                                                         
phase2_muon.toReplaceWith(effPlotter,effPlotter_Phase2)     
phase2_muon.toReplaceWith(effPlotter_miniAOD,effPlotter_miniAOD_Phase2)