def METHOD_NAME(self, event):
    self.readCollections( event.input )
    ## if component is embed return (has no trigger obj)
    if self.cfg_comp.isEmbed :
      return True
    event.puWeight = 1
    event.nPU = None
    event.pileUpVertex_z = []
    event.pileUpVertex_ptHat = []
    if self.cfg_comp.isMC:
        event.pileUpInfo = map( PileUpSummaryInfo,
                                self.mchandles['pusi'].product() )
        for puInfo in event.pileUpInfo:
            if puInfo.getBunchCrossing()==0:
                # import pdb; pdb.set_trace()
                if self.cfg_ana.true is False:
                    event.nPU = puInfo.nPU()
                else:
                    event.nPU = puInfo.nTrueInteractions()
                if self.doHists:
                    self.rawmcpileup.hist.Fill( event.nPU )
                ##get z position of on-time pile-up sorted by pt-hat
                ptHat_zPositions = zip(puInfo.getPU_pT_hats(),puInfo.getPU_zpositions())
                ptHat_zPositions.sort(reverse=True)
                for ptHat_zPosition in ptHat_zPositions:
                    event.pileUpVertex_z.append(ptHat_zPosition[1])
                    event.pileUpVertex_ptHat.append(ptHat_zPosition[0])
        if event.nPU is None:
            raise ValueError('nPU cannot be None! means that no pu info has been found for bunch crossing 0.')
    elif self.cfg_comp.isEmbed:
        vertices = self.handles['vertices'].product()
        event.nPU = len(vertices)
    else:
        return True
    if self.enable:
        bin = self.datahist.FindBin(event.nPU)
        if bin<1 or bin>self.datahist.GetNbinsX():
            event.puWeight = 0
        else:
            data = self.datahist.GetBinContent(bin)
            mc = self.mchist.GetBinContent(bin)
            #Protect 0 division!!!!
            if mc !=0.0:
                event.puWeight = data/mc
            else:
                event.puWeight = 1
    event.eventWeight *= event.puWeight
    self.averages['puWeight'].add( event.puWeight )
    return True