from Core.Sequence import Sequence

from Zprime.Skimmer.AnalysisSkimmer import AnalysisSkimmer
from Zprime.Producer.VariableProducer import VariableProducer
from DarkZ.Weighter.DataMCWeighter import DataMCWeighter
from DarkZ.Weighter.NLOWeighter import NLOWeighter

from NanoAOD.Weighter.XSWeighter import XSWeighter  # Stealing module from NanoAOD framework

SRSkimmer = AnalysisSkimmer("SRSkimmer")
m4lcrSkimmer = AnalysisSkimmer("m4lcrSkimmer", "m4lCR")

dataMCWeighter = DataMCWeighter("DataMCWeighter")
nloWeighter = NLOWeighter("NLOWeighter")
xsWeighter = XSWeighter("XSWeighter")
varProducer = VariableProducer("VariableProducer")

signal_sequence = Sequence()
signal_sequence.add(SRSkimmer)
signal_sequence.add(xsWeighter)
signal_sequence.add(dataMCWeighter)
signal_sequence.add(nloWeighter)
signal_sequence.add(varProducer)

m4lcr_sequence = Sequence()
m4lcr_sequence.add(m4lcrSkimmer)
m4lcr_sequence.add(xsWeighter)
m4lcr_sequence.add(dataMCWeighter)
m4lcr_sequence.add(nloWeighter)
m4lcr_sequence.add(varProducer)
#from DarkZ.Skimmer.AnalysisSkimmer import AnalysisSkimmer
#from DarkZ.Skimmer.BlindSkimmer import BlindSkimmer
from DarkZ.Weighter.DataMCWeighter import DataMCWeighter
from DarkZ.Weighter.NLOWeighter import NLOWeighter

from Wto3l.Skimmer.FinalstateSkimmer import FinalstateSkimmer
from Wto3l.Skimmer.EventSkimmer import EventSkimmer
from Wto3l.Weighter.FakerateWeighter import FakerateWeighter
from Wto3l.Producer.DeltaR_Producer import DeltaR_Producer

from NanoAOD.Weighter.XSWeighter import XSWeighter  # Stealing module from NanoAOD framework

dataMCWeighter = DataMCWeighter("DataMCWeighter")
nloWeighter = NLOWeighter("NLOWeighter")
xsWeighter = XSWeighter("XSWeighter")
finalstateSkimmer = FinalstateSkimmer("FinalstateSkimmer")
eventSkimmer = EventSkimmer("EventSkimmer")
fakerateWeighter = FakerateWeighter("FakerateWeighter")
deltar_producer = DeltaR_Producer("DeltaR_Producer")
#bliSkimmer              = BlindSkimmer("BlindSkimmer")

Wto3l_sequence = Sequence()
Wto3l_sequence.add(xsWeighter)
Wto3l_sequence.add(dataMCWeighter)
#Wto3l_sequence.add(nloWeighter)
Wto3l_sequence.add(deltar_producer)
Wto3l_sequence.add(finalstateSkimmer)
Wto3l_sequence.add(eventSkimmer)
Wto3l_sequence.add(fakerateWeighter)
#Wto3l_sequence.add(bliSkimmer)
示例#3
0
xsWeighter = XSWeighter("XSWeighter")
mediumMuonProducer = PhysObjProducer("MediumMuonProducer", "Muon",
                                     "MediumMuons", "Moriond17MediumMuon")
mediumElectronProducer = PhysObjProducer("MediumElectronProducer", "Electron",
                                         "MediumElectrons",
                                         "Moriond17MediumElectron")
jetProducer = JetProducer("JetProducer", "Jet",
                          ["MediumMuons", "MediumElectrons"], "LooseJets",
                          "Moriond17LooseJet", 0.4)
if ratio_switch:
    plotter = Plotter("Plotter", ratio_plots)
else:
    plotter = Plotter("Plotter", mc_plots)
anaProducer = AnalysisProducer("AnaProducer")

sequence = Sequence()
sequence.add(mediumMuonProducer)
sequence.add(mediumElectronProducer)
sequence.add(jetProducer)
sequence.add(xsWeighter)
sequence.add(anaProducer)
sequence.add(plotter)

endSequence = EndSequence(skipHadd=False)
if not ratio_switch:
    endModuleOutputDir = "/home/kshi/public_html/mcPlot/"
    endSequence.add(PlotEndModule(endModuleOutputDir, mc_plots, ratio_switch))
else:
    endModuleOutputDir = "/home/kshi/public_html/ratioPlot/"
    endSequence.add(
        PlotEndModule(endModuleOutputDir, ratio_plots, ratio_switch))
from LJMet.Weighter.XSWeighter import XSWeighter
from LJMet.Skimmer.AnalysisSkimmer import AnalysisSkimmer
from LJMet.Weighter.DataMCWeighter import DataMCWeighter
from LJMet.Producer.CategoryProducer import CategoryProducer

from Core.Sequence import Sequence

xsWeighter = XSWeighter("XSWeighter")
dataMCWeighter = DataMCWeighter("DataMCWeighter")
srSkimmer = AnalysisSkimmer("AnalysisSkimmer", cutflow="SR")
crSkimmer = AnalysisSkimmer("AnalysisSkimmer", cutflow="CR")
preSkimmer = AnalysisSkimmer("AnalysisSkimmer", cutflow="Preselection")
catProducer = CategoryProducer("CategoryProducer")

sr_sequence = Sequence()
sr_sequence.add(srSkimmer)
sr_sequence.add(xsWeighter)
sr_sequence.add(dataMCWeighter)
sr_sequence.add(catProducer)

cr_sequence = Sequence()
cr_sequence.add(crSkimmer)
cr_sequence.add(xsWeighter)
cr_sequence.add(dataMCWeighter)
cr_sequence.add(catProducer)

pre_sequence = Sequence()
pre_sequence.add(preSkimmer)
pre_sequence.add(xsWeighter)
pre_sequence.add(dataMCWeighter)
pre_sequence.add(catProducer)
示例#5
0
    #LambdaFunc("x: (abs(x.eta) < 1.4 and x.mvaID_WP90 > -0.02) or (abs(x.eta) > 1.4 and abs(x.eta) < 2.5 and x.mvaID_WP90 > -0.26)"),
    LambdaFunc("x: x.mvaID_WP90"),
    #LambdaFunc("x: x.pfRelIso03_all < 0.35"),
    LambdaFunc("x: True"),
    LambdaFunc("x: x.pt > 0. and abs(x.eta) < 2.5"),
    LambdaFunc(
        "ev,x: all([x.electronIdx != e.getIndex() for e in ev.selElectrons])"),
    #LambdaFunc("x: x.cutBasedBitmap == 1"),
    #LambdaFunc("x: x.pfRelIso03_all < 0.35"),
)
variableProducer = VariableProducer("VariableProducer", )
reolvedSRSkimmer = ResolvedSRSkimmer("SRSkimmer", )
mergedSRSkimmer = MergedSRSkimmer("SRSkimmer", )

# ____________________________________________________________________________________________________________________________________________ ||
sr_resolved_sequence = Sequence()
sr_resolved_sequence.add(muProducer)
sr_resolved_sequence.add(elProducer)
sr_resolved_sequence.add(phoProducer)
sr_resolved_sequence.add(reolvedSRSkimmer)
sr_resolved_sequence.add(xsWeighter)

sr_merged_sequence = Sequence()
sr_merged_sequence.add(muProducer)
sr_merged_sequence.add(elProducer)
sr_merged_sequence.add(phoProducer)
sr_merged_sequence.add(mergedSRSkimmer)
sr_merged_sequence.add(xsWeighter)

# ____________________________________________________________________________________________________________________________________________ ||
                ),
        ],
        )
resonaceZ1Skimmer           = NarrowResonanceSkimmer(
        "NarrowResonanceSkimmer",
        [
            BaseObject(
                "NarrowResonanceSelection",
                selFunc=LambdaFunc("x: (abs(x.idL3[0]) == 11 and abs(x.idL4[0]) == 11 and x.massZ1[0] > 8.50 and x.massZ1[0] < 11.0) or (abs(x.idL3[0]) == 13 and abs(x.idL4[0]) == 13 and x.massZ1[0] > 8.50 and x.massZ1[0] < 11.0)"),
                ),
        ],
        )

#____________________________________________________________________________________________________
# Make Sequences
darkphoton_signal_sequence = Sequence()
darkphoton_signal_sequence.add(blindSkimmer)
darkphoton_signal_sequence.add(xsWeighter)
darkphoton_signal_sequence.add(nloWeighter)
darkphoton_signal_sequence.add(dataMCWeighter)
darkphoton_signal_sequence.add(variableProducer)
darkphoton_signal_sequence.add(fakeRateWeighter)
darkphoton_signal_sequence.add(darkPhotonSRSkimmer) ## Signal-Region Skimmer
darkphoton_signal_sequence.add(resonaceZ1Skimmer)
darkphoton_signal_sequence.add(resonaceZ2Skimmer)

darkphoton_signal_unblind_sequence = Sequence()
darkphoton_signal_unblind_sequence.add(xsWeighter)
darkphoton_signal_unblind_sequence.add(nloWeighter)
darkphoton_signal_unblind_sequence.add(dataMCWeighter)
darkphoton_signal_unblind_sequence.add(variableProducer)
示例#7
0
            ),
        ),
    ],
)

dataMCWeighter = DataMCWeighter("DataMCWeighter")
nloWeighter = NLOWeighter("NLOWeighter")
xsWeighter = XSWeighter("XSWeighter")
bliSkimmer = BlindSkimmer("BlindSkimmer")
fakeRateWeighter = FakeRateWeighter("FakeRateWeighter")
fakeRateWeighter_map = FakeRateWeighter("FakeRateWeighter", "make_map")
fakeRateWeighter_syst = FakeRateWeighter("FakeRateWeighter", "syst")

variableProducer = VariableProducer("VariableProducer")

darkphoton_signal_sequence = Sequence()
darkphoton_signal_sequence.add(darkPhotonSRSkimmer)
darkphoton_signal_sequence.add(variableProducer)
darkphoton_signal_sequence.add(resonaceSkimmer)

darkphoton_fullm4l_sequence = Sequence()
darkphoton_fullm4l_sequence.add(darkPhotonFullm4lSkimmer)
darkphoton_fullm4l_sequence.add(variableProducer)
darkphoton_fullm4l_sequence.add(resonaceSkimmer)

zx_map_sequence = Sequence()
zx_map_sequence.add(darkPhotonSRSkimmer)
zx_map_sequence.add(variableProducer)

darkphoton_cr_sequence = Sequence()
darkphoton_cr_sequence.add(darkPhotonCRSkimmer)
示例#8
0
from Core.Sequence import Sequence

from CSC.Producer.StandAloneMuonProducer import StandAloneMuonProducer
from CSC.Producer.SegmentProducer import SegmentProducer
from CSC.Weighter.EventWeighter import EventWeighter

eventWeighter = EventWeighter("EventWeighter")
standAloneMuonProducer = StandAloneMuonProducer("StandAloneMuonProducer")
segmentProducer = SegmentProducer("SegmentProducer")

MuonSequence = Sequence()
MuonSequence.add(eventWeighter)
MuonSequence.add(standAloneMuonProducer)
#MuonSequence.add(segmentProducer)