Esempio n. 1
0
class JVF(JetSystematic):
    """
    https://twiki.cern.ch/twiki/bin/view/AtlasProtected/JVFUncertaintyTool

    Notes
    =====
    Assume that all jets are real, hard-scatter jets when applying the JVF
    systematic shift.

    It have been observed that the JVF is well modelled for hard-scatter jets
    in MC while for pile-up jets this is not the case. Much of the JVF mismodelling
    is attributed to the overestimation of the pile-up jet multiplicity. Given this
    and the fact that the strategy of the JetEtmiss group is to provide support for
    real qcd jets, it was decided to assume that all jets are real, hard-scatter
    jets when applying the JVF systematic shift.  Therefore the function
    isPileUpJet() won't be used.
    """
    def __init__(self, is_up, JVFcutNominal=0.5, **kwargs):
        self.JVFcutNominal = JVFcutNominal
        # Tag assumed: JVFUncertaintyTool-00-00-03
        self.jvf_tool = JVFUncertaintyTool("AntiKt4LCTopo")
        super(JVF, self).__init__(is_up, **kwargs)

    @JetSystematic.set
    def run(self, jet, event):
        # JVF is only used in a certain range, so only correct for those
        if jet.pt < 50e3 and abs(jet.constscale_eta) < 2.4:
            # Assume that all jets are real, hard-scatter jets when applying
            # the JVF systematic shift (2nd arg = False)
            jvf_cut_sys = self.jvf_tool.getJVFcut(
                self.JVFcutNominal, False,
                jet.pt, jet.constscale_eta, self.is_up)
            jvf_cut_diff = jvf_cut_sys - self.JVFcutNominal
            jet.jvtxf -= jvf_cut_diff
Esempio n. 2
0
class JVF(JetSystematic):
    """
    https://twiki.cern.ch/twiki/bin/view/AtlasProtected/JVFUncertaintyTool

    Notes
    =====
    Assume that all jets are real, hard-scatter jets when applying the JVF
    systematic shift.

    It have been observed that the JVF is well modelled for hard-scatter jets
    in MC while for pile-up jets this is not the case. Much of the JVF mismodelling
    is attributed to the overestimation of the pile-up jet multiplicity. Given this
    and the fact that the strategy of the JetEtmiss group is to provide support for
    real qcd jets, it was decided to assume that all jets are real, hard-scatter
    jets when applying the JVF systematic shift.  Therefore the function
    isPileUpJet() won't be used.
    """
    def __init__(self, is_up, JVFcutNominal=0.5, **kwargs):
        self.JVFcutNominal = JVFcutNominal
        # Tag assumed: JVFUncertaintyTool-00-00-03
        self.jvf_tool = JVFUncertaintyTool("AntiKt4LCTopo")
        super(JVF, self).__init__(is_up, **kwargs)

    @JetSystematic.set
    def run(self, jet, event):
        # JVF is only used in a certain range, so only correct for those
        if jet.pt < 50e3 and abs(jet.constscale_eta) < 2.4:
            # Assume that all jets are real, hard-scatter jets when applying
            # the JVF systematic shift (2nd arg = False)
            jvf_cut_sys = self.jvf_tool.getJVFcut(self.JVFcutNominal, False,
                                                  jet.pt, jet.constscale_eta,
                                                  self.is_up)
            jvf_cut_diff = jvf_cut_sys - self.JVFcutNominal
            jet.jvtxf -= jvf_cut_diff
Esempio n. 3
0
class JetIsPileup(EventFilter):
    """
    must be applied before any jet selection
    """
    def __init__(self, **kwargs):
        super(JetIsPileup, self).__init__(**kwargs)
        if not self.passthrough:
            # from externaltools import JVFUncertaintyTool as JVFUncertaintyTool2012
            from ROOT import JVFUncertaintyTool
            self.tool = JVFUncertaintyTool("AntiKt4LCTopo")

    def passes(self, event):
        # collect truth jets
        truejets = VectorTLorentzVector()
        for truejet in event.truejets:
            if truejet.pt() > 10e3:
                truejets.push_back(truejet.p4())
        # test each jet
        for jet in event.jets:
            ispileup = self.tool.isPileUpJet(jet.p4(), truejets)
            jet.ispileup = ispileup
        return True
Esempio n. 4
0
 def __init__(self, **kwargs):
     super(JetIsPileup, self).__init__(**kwargs)
     if not self.passthrough:
         # from externaltools import JVFUncertaintyTool as JVFUncertaintyTool2012
         from ROOT import JVFUncertaintyTool
         self.tool = JVFUncertaintyTool("AntiKt4LCTopo")
Esempio n. 5
0
 def __init__(self, is_up, JVFcutNominal=0.5, **kwargs):
     self.JVFcutNominal = JVFcutNominal
     # Tag assumed: JVFUncertaintyTool-00-00-03
     self.jvf_tool = JVFUncertaintyTool("AntiKt4LCTopo")
     super(JVF, self).__init__(is_up, **kwargs)
Esempio n. 6
0
 def __init__(self, is_up, JVFcutNominal=0.5, **kwargs):
     self.JVFcutNominal = JVFcutNominal
     # Tag assumed: JVFUncertaintyTool-00-00-03
     self.jvf_tool = JVFUncertaintyTool("AntiKt4LCTopo")
     super(JVF, self).__init__(is_up, **kwargs)