Esempio n. 1
0
 def __init__(self, fname, **kwargs):
   kwargs['channel'] = 'etau'
   super(ModuleETau,self).__init__(fname,**kwargs)
   self.out = TreeProducerETau(fname,self)
   
   # TRIGGERS
   jsonfile       = os.path.join(datadir,"trigger/tau_triggers_%d.json"%(self.year))
   self.trigger   = TrigObjMatcher(jsonfile,trigger='SingleElectron',isdata=self.isdata)
   self.eleCutPt  = self.trigger.ptmins[0]
   self.tauCutPt  = 20
   self.eleCutEta = 2.3
   self.tauCutEta = 2.3
   
   # CORRECTIONS
   if self.ismc:
     self.eleSFs  = ElectronSFs(year=self.year) # electron id/iso/trigger SFs
     self.tesTool = TauESTool(tauSFVersion[self.year]) # real tau energy scale corrections
     self.fesTool = TauFESTool(tauSFVersion[self.year]) # e -> tau fake energy scale
     self.tauSFs  = TauIDSFTool(tauSFVersion[self.year],'DeepTau2017v2p1VSjet','Tight')
     self.etfSFs  = TauIDSFTool(tauSFVersion[self.year],'DeepTau2017v2p1VSe',  'VLoose')
     self.mtfSFs  = TauIDSFTool(tauSFVersion[self.year],'DeepTau2017v2p1VSmu', 'Tight')
   
   # CUTFLOW
   self.out.cutflow.addcut('none',         "no cut"                     )
   self.out.cutflow.addcut('trig',         "trigger"                    )
   self.out.cutflow.addcut('electron',     "electron"                   )
   self.out.cutflow.addcut('tau',          "tau"                        )
   self.out.cutflow.addcut('pair',         "pair"                       )
   self.out.cutflow.addcut('weight',       "no cut, weighted", 15       )
   self.out.cutflow.addcut('weight_no0PU', "no cut, weighted, PU>0", 16 ) # use for normalization
Esempio n. 2
0
    def __init__(self, fname, **kwargs):
        kwargs['channel'] = 'mutau'
        super(ModuleTauTau, self).__init__(fname, **kwargs)
        self.out = TreeProducerTauTau(fname, self)

        # TRIGGERS
        jsonfile = os.path.join(datadir,
                                "trigger/tau_triggers_%d.json" % (self.year))
        self.trigger = TrigObjMatcher(jsonfile,
                                      trigger='ditau',
                                      isdata=self.isdata)
        self.tauCutPt = 40
        self.tauCutEta = 2.1

        # CORRECTIONS
        if self.ismc:
            self.trigTool = TauTriggerSFs('tautau', 'Medium', year=self.year)
            self.trigTool_tight = TauTriggerSFs('tautau',
                                                'Tight',
                                                year=self.year)
            self.tesTool = TauESTool(
                tauSFVersion[self.year])  # real tau energy scale
            self.fesTool = TauFESTool(
                tauSFVersion[self.year])  # e -> tau fake energy scale
            self.tauSFs = TauIDSFTool(tauSFVersion[self.year],
                                      'DeepTau2017v2p1VSjet',
                                      'Medium',
                                      dm=True)
            self.tauSFs_tight = TauIDSFTool(tauSFVersion[self.year],
                                            'DeepTau2017v2p1VSjet',
                                            'Tight',
                                            dm=True)
            self.etfSFs = TauIDSFTool(tauSFVersion[self.year],
                                      'DeepTau2017v2p1VSe', 'VVLoose')
            self.mtfSFs = TauIDSFTool(tauSFVersion[self.year],
                                      'DeepTau2017v2p1VSmu', 'Loose')

        # CUTFLOW
        self.out.cutflow.addcut('none', "no cut")
        self.out.cutflow.addcut('trig', "trigger")
        self.out.cutflow.addcut('tau', "tau")
        self.out.cutflow.addcut('pair', "ditau pair")
        self.out.cutflow.addcut('weight', "no cut, weighted", 15)
        self.out.cutflow.addcut('weight_no0PU', "no cut, weighted, PU>0",
                                16)  # use for normalization