def process(self, iEvent, event):
        self.readCollections( iEvent )
        if not self.cfg_comp.isMC:
            return True
        
        event.genParticles = self.buildGenParticles( self.mchandles['genpart'].product(), event )

        for gen in event.genParticles :
            if ( abs(gen.pdgId())==1000006 ):
                print gen.mass()
            if ( abs(gen.pdgId())==1000022 ):
                print gen.mass()
            
            if ( (gen.numberOfMothers() > 0) and abs(gen.mother().pdgId()) == 24 and abs(gen.mother().mother().pdgId()) == 6):
                #print "I'm a W daughter, my pdgId is ", gen.pdgId(), " mom pdgId ", gen.mother().pdgId() 
                self.h_WdaugthersPdgId.Fill(abs(gen.pdgId()))
            if (gen.numberOfMothers() > 0) and abs(gen.mother().pdgId()) == 24 and abs(gen.pdgId()) > 4 :
                print gen.pdgId(), abs(gen.mother().mother().pdgId())
            
        if self.cfg_ana.verbose:
            print self.name
            print printOut(event.genParticles)
            
        
        return True
 def process(self, iEvent, event):
     self.readCollections( iEvent )
     if not self.cfg_comp.isMC:
         return True
     
     event.genParticles = self.buildGenParticles( self.mchandles['genpart'].product(), event )
     
     if self.cfg_ana.verbose:
         print self.name
         print printOut(event.genParticles)
     
     return True
    def process(self, iEvent, event):
        self.readCollections( iEvent )
        if not self.cfg_comp.isMC:
            return True
        
        event.genParticles = self.buildGenParticles( self.mchandles['genpart'].product(), event )

        self.fsrWeightAlgo.clear()
        for gen in self.mchandles['genpart'].product():
          #  if gen.status()!=1:
          #      print gen.pdgId(), gen.status(), gen.pt()
            self.fsrWeightAlgo.addGenParticle(gen)
        event.fsrWeight = self.fsrWeightAlgo.weight()
        
        if self.cfg_ana.verbose:
            print self.name
            print printOut(event.genParticles)
        
        return True
Beispiel #4
0
    def process(self, iEvent, event):
        self.readCollections(iEvent)
        if not self.cfg_comp.isMC:
            return True

        event.genParticles = self.buildGenParticles(
            self.mchandles['genpart'].product(), event)

        self.fsrWeightAlgo.clear()
        for gen in self.mchandles['genpart'].product():
            #  if gen.status()!=1:
            #      print gen.pdgId(), gen.status(), gen.pt()
            self.fsrWeightAlgo.addGenParticle(gen)
        event.fsrWeight = self.fsrWeightAlgo.weight()

        if self.cfg_ana.verbose:
            print self.name
            print printOut(event.genParticles)

        return True