CMS 3D CMS Logo

TtGenEvent Class Reference

#include <AnalysisDataFormats/TopObjects/interface/TtGenEvent.h>

Inheritance diagram for TtGenEvent:

TopGenEvent

List of all members.

Public Member Functions

std::pair< WDecay::LeptonType,
WDecay::LeptonType
fullLeptonicChannel () const
const reco::GenParticlehadronicDecayB (bool excludeTauLeptons=false) const
 get b of hadronic decay branch
const reco::GenParticlehadronicDecayQuark (bool invert=false) const
 get light quark of hadronic decay branch
const reco::GenParticlehadronicDecayQuarkBar () const
 get light anti-quark of hadronic decay branch
const reco::GenParticlehadronicDecayTop (bool excludeTauLeptons=false) const
 get top of hadronic decay branch
std::vector< const
reco::GenParticle * > 
hadronicDecayTopRadiation (bool excludeTauLeptons=false) const
 gluons as radiated from the hadronicly decaying top quark
const reco::GenParticlehadronicDecayW (bool excludeTauLeptons=false) const
 get W of hadronic decay branch
bool isFullHadronic (bool excludeTauLeptons=false) const
 check if the event can be classified as full hadronic
bool isFullLeptonic (WDecay::LeptonType typeA, WDecay::LeptonType typeB) const
 check if the event is full leptonic with the lepton being of typeA or typeB irrelevant of order; all leptons including taus are allowed
bool isFullLeptonic (bool excludeTauLeptons=false) const
 check if the event can be classified as full leptonic
bool isSemiLeptonic (WDecay::LeptonType typeA, WDecay::LeptonType typeB) const
 check if the event is semi-leptonic with the lepton being of typeA or typeB; all leptons including taus are allowed
bool isSemiLeptonic (WDecay::LeptonType typeA) const
 check if the event is semi-leptonic with the lepton being of typeA; all leptons including taus are allowed
bool isSemiLeptonic (bool excludeTauLeptons=false) const
 check if the event can be classified as semi-laptonic
bool isTtBar () const
 check if the event can be classified as ttbar
const reco::GenParticlelepton (bool excludeTauLeptons=false) const
 get lepton for semi-leptonic or full leptonic decays
const reco::GenParticleleptonBar (bool excludeTauLeptons=false) const
 get anti-lepton for semi-leptonic or full leptonic decays
const reco::GenParticleleptonicDecayB (bool excludeTauLeptons=false) const
 get b of leptonic decay branch
const reco::GenParticleleptonicDecayTop (bool excludeTauLeptons=false) const
 get top of leptonic decay branch
std::vector< const
reco::GenParticle * > 
leptonicDecayTopRadiation (bool excludeTauLeptons=false) const
 gluons as radiated from the leptonicly decaying top quark
const reco::GenParticleleptonicDecayW (bool excludeTauLeptons=false) const
 get W of leptonic decay branch
const reco::GenParticlelightQBarFromTop () const
 get light anti-quark from top for full hadronic decays
const reco::GenParticlelightQBarFromTopBar () const
 get light anti-quark from anti-top for full hadronic decays
const reco::GenParticlelightQFromTop () const
 get light quark from top for full hadronic decays
const reco::GenParticlelightQFromTopBar () const
 get light quark from anti-top for full hadronic decays
const reco::GenParticleneutrino (bool excludeTauLeptons=false) const
 get neutrino for semi-leptonic or full leptonic decays
const reco::GenParticleneutrinoBar (bool excludeTauLeptons=false) const
 get anti-neutrino for semi-leptonic or full leptonic decays
WDecay::LeptonType semiLeptonicChannel () const
 return decay channel; all leptons including taus are allowed
const reco::GenParticlesingleLepton (bool excludeTauLeptons=false) const
 return single lepton if available; 0 else
const reco::GenParticlesingleNeutrino (bool excludeTauLeptons=false) const
 return single neutrino if available; 0 else
 TtGenEvent (reco::GenParticleRefProd &, reco::GenParticleRefProd &)
 default constructor
 TtGenEvent ()
 empty constructor
virtual ~TtGenEvent ()
 default destructor

Private Member Functions

bool isNumberOfLeptons (bool excludeTauLeptons, int nlep) const
 check whether the number of leptons among the daughters of the W boson is nlep or not; there is an option to exclude taus from the list of leptons to consider


Detailed Description

Definition at line 41 of file TtGenEvent.h.


Constructor & Destructor Documentation

TtGenEvent::TtGenEvent (  )  [inline]

empty constructor

Definition at line 46 of file TtGenEvent.h.

00046 {};

TtGenEvent::TtGenEvent ( reco::GenParticleRefProd parts,
reco::GenParticleRefProd inits 
)

default constructor

Definition at line 9 of file TtGenEvent.cc.

References TopGenEvent::initPartons_, and TopGenEvent::parts_.

00010 {
00011   parts_ = parts;
00012   initPartons_= inits;
00013 }

virtual TtGenEvent::~TtGenEvent (  )  [inline, virtual]

default destructor

Definition at line 50 of file TtGenEvent.h.

00050 {};


Member Function Documentation

std::pair< WDecay::LeptonType, WDecay::LeptonType > TtGenEvent::fullLeptonicChannel (  )  const

Definition at line 28 of file TtGenEvent.cc.

References funct::abs(), TopDecayID::elecID, isFullLeptonic(), WDecay::kElec, WDecay::kMuon, WDecay::kNone, WDecay::kTau, lepton(), leptonBar(), TopDecayID::muonID, and TopDecayID::tauID.

Referenced by isFullLeptonic().

00029 {
00030   WDecay::LeptonType typeA=WDecay::kNone, typeB=WDecay::kNone;  
00031   if( isFullLeptonic() ){
00032     if( lepton() ){
00033       if( abs(lepton()->pdgId())==TopDecayID::elecID ) typeA=WDecay::kElec;
00034       if( abs(lepton()->pdgId())==TopDecayID::muonID ) typeA=WDecay::kMuon;
00035       if( abs(lepton()->pdgId())==TopDecayID::tauID  ) typeA=WDecay::kTau;      
00036     }
00037     if( leptonBar() ){
00038       if( abs(leptonBar()->pdgId())==TopDecayID::elecID ) typeB=WDecay::kElec;
00039       if( abs(leptonBar()->pdgId())==TopDecayID::muonID ) typeB=WDecay::kMuon;
00040       if( abs(leptonBar()->pdgId())==TopDecayID::tauID  ) typeB=WDecay::kTau;      
00041     }
00042   }
00043   return ( std::pair<WDecay::LeptonType,WDecay::LeptonType>(typeA, typeB) );
00044 }

const reco::GenParticle * TtGenEvent::hadronicDecayB ( bool  excludeTauLeptons = false  )  const

get b of hadronic decay branch

Definition at line 186 of file TtGenEvent.cc.

References funct::abs(), TopDecayID::bID, reco::flavour(), i, TopGenEvent::parts_, and singleLepton().

Referenced by TtSemiLepEventPartons::vec().

00187 {
00188   const reco::GenParticle* cand=0;
00189   if( singleLepton(excludeTauLeptons) ){
00190     const reco::GenParticleCollection& partsColl = *parts_;
00191     const reco::GenParticle& singleLep = *singleLepton(excludeTauLeptons);
00192     for (unsigned int i = 0; i < partsColl.size(); ++i) {
00193       if (abs(partsColl[i].pdgId())==TopDecayID::bID && 
00194           reco::flavour(singleLep)==reco::flavour(partsColl[i])) {
00195         cand = &partsColl[i];
00196       }
00197     }
00198   }
00199   return cand;
00200 }

const reco::GenParticle * TtGenEvent::hadronicDecayQuark ( bool  invert = false  )  const

get light quark of hadronic decay branch

Definition at line 143 of file TtGenEvent.cc.

References funct::abs(), reco::flavour(), edm::errors::InvalidReference, TopGenEvent::parts_, singleLepton(), TopDecayID::tID, w, and TopDecayID::WID.

Referenced by hadronicDecayQuarkBar(), and TtSemiLepEventPartons::vec().

00144 {
00145   const reco::GenParticle* cand=0;
00146   // catch W boson and check its daughters for a quarks; 
00147   // make sure the decay is semi-leptonic first; this 
00148   // only makes sense if taus are not excluded from the 
00149   // decision
00150   if( singleLepton(false) ){
00151     for(reco::GenParticleCollection::const_iterator w=parts_->begin(); w!=parts_->end(); ++w){
00152       if( abs( w->pdgId() )==TopDecayID::WID ){
00153         // make sure that the particle is a W daughter
00154         for(reco::GenParticle::const_iterator wd=w->begin(); wd!=w->end(); ++wd){ 
00155           // make sure that the parton is a quark
00156           if( abs(wd->pdgId())<TopDecayID::tID ){
00157             if( invert ){ 
00158               //treat ~q case
00159               if( reco::flavour(*wd)<0 ){
00160                 cand = dynamic_cast<const reco::GenParticle* > (&(*wd));
00161                 if(cand == 0){
00162                   throw edm::Exception( edm::errors::InvalidReference, "Not a GenParticle" );
00163                 }
00164                 break;
00165               }
00166             }
00167             else{         
00168               //treat q case
00169               if( reco::flavour(*wd)>0 ){
00170                 cand = dynamic_cast<const reco::GenParticle* > (&(*wd));
00171                 if(cand == 0){
00172                   throw edm::Exception( edm::errors::InvalidReference, "Not a GenParticle" );
00173                 }
00174                 break;
00175               }
00176             }
00177           }
00178         }
00179       }
00180     }
00181   }
00182   return cand;
00183 }

const reco::GenParticle* TtGenEvent::hadronicDecayQuarkBar (  )  const [inline]

get light anti-quark of hadronic decay branch

Definition at line 91 of file TtGenEvent.h.

References hadronicDecayQuark().

Referenced by TtSemiLepEventPartons::vec().

00091 {return hadronicDecayQuark(true); };

const reco::GenParticle * TtGenEvent::hadronicDecayTop ( bool  excludeTauLeptons = false  )  const

get top of hadronic decay branch

Definition at line 221 of file TtGenEvent.cc.

References funct::abs(), reco::flavour(), i, TopGenEvent::parts_, singleLepton(), and TopDecayID::tID.

Referenced by hadronicDecayTopRadiation().

00222 {
00223   const reco::GenParticle* cand=0;
00224   if( singleLepton(excludeTauLeptons) ){
00225     const reco::GenParticleCollection& partsColl = *parts_;
00226     const reco::GenParticle& singleLep = *singleLepton(excludeTauLeptons);
00227     for (unsigned int i = 0; i < partsColl.size(); ++i) {
00228       if (abs(partsColl[i].pdgId())==TopDecayID::tID &&
00229           reco::flavour(singleLep)==reco::flavour(partsColl[i])) {
00230         cand = &partsColl[i];
00231       }
00232     }
00233   }
00234   return cand;
00235 }

std::vector< const reco::GenParticle * > TtGenEvent::hadronicDecayTopRadiation ( bool  excludeTauLeptons = false  )  const

gluons as radiated from the hadronicly decaying top quark

Definition at line 353 of file TtGenEvent.cc.

References hadronicDecayTop(), TopGenEvent::radiatedGluons(), and TopDecayID::tID.

00353                                                                                                    {
00354   if( hadronicDecayTop(excludeTauLeptons) ){
00355     return (hadronicDecayTop(excludeTauLeptons)->pdgId()>0 ? radiatedGluons(TopDecayID::tID) : radiatedGluons(-TopDecayID::tID));
00356   }
00357   std::vector<const reco::GenParticle*> rad;
00358   return (rad);
00359 }

const reco::GenParticle * TtGenEvent::hadronicDecayW ( bool  excludeTauLeptons = false  )  const

get W of hadronic decay branch

Definition at line 203 of file TtGenEvent.cc.

References funct::abs(), reco::flavour(), i, TopGenEvent::parts_, singleLepton(), and TopDecayID::WID.

00204 {
00205   const reco::GenParticle* cand=0;
00206   if( singleLepton(excludeTauLeptons) ){
00207     const reco::GenParticleCollection& partsColl = *parts_;
00208     const reco::GenParticle& singleLep = *singleLepton(excludeTauLeptons);
00209     for (unsigned int i = 0; i < partsColl.size(); ++i) {
00210       if (abs(partsColl[i].pdgId())==TopDecayID::WID && 
00211           reco::flavour(singleLep) != -reco::flavour(partsColl[i])) { 
00212         // PDG Id:13=mu- 24=W+ (+24)->(-13) (-24)->(+13) opposite sign
00213         cand = &partsColl[i];
00214       }
00215     }
00216   }
00217   return cand;
00218 }

bool TtGenEvent::isFullHadronic ( bool  excludeTauLeptons = false  )  const [inline]

check if the event can be classified as full hadronic

Definition at line 55 of file TtGenEvent.h.

References isNumberOfLeptons(), and isTtBar().

Referenced by TtFullHadEventPartons::vec().

00055 { return isTtBar() ? isNumberOfLeptons(excludeTauLeptons, 0) : false;}

bool TtGenEvent::isFullLeptonic ( WDecay::LeptonType  typeA,
WDecay::LeptonType  typeB 
) const [inline]

check if the event is full leptonic with the lepton being of typeA or typeB irrelevant of order; all leptons including taus are allowed

Definition at line 121 of file TtGenEvent.h.

References first, fullLeptonicChannel(), and edm::second().

00122 {
00123   return ( (fullLeptonicChannel().first==typeA && fullLeptonicChannel().second==typeB)||
00124            (fullLeptonicChannel().first==typeB && fullLeptonicChannel().second==typeA));
00125 }

bool TtGenEvent::isFullLeptonic ( bool  excludeTauLeptons = false  )  const [inline]

check if the event can be classified as full leptonic

Definition at line 59 of file TtGenEvent.h.

References isNumberOfLeptons(), and isTtBar().

Referenced by fullLeptonicChannel(), and TtFullLepEventPartons::vec().

00059 { return isTtBar() ? isNumberOfLeptons(excludeTauLeptons, 2) : false;}

bool TtGenEvent::isNumberOfLeptons ( bool  excludeTauLeptons,
int  nlep 
) const [inline, private]

check whether the number of leptons among the daughters of the W boson is nlep or not; there is an option to exclude taus from the list of leptons to consider

Definition at line 117 of file TtGenEvent.h.

References WDecay::kTau, and TopGenEvent::numberOfLeptons().

Referenced by isFullHadronic(), isFullLeptonic(), and isSemiLeptonic().

00117 {return excludeTauLeptons ? (numberOfLeptons()-numberOfLeptons(WDecay::kTau))==nlep : numberOfLeptons()==nlep;}

bool TtGenEvent::isSemiLeptonic ( WDecay::LeptonType  typeA,
WDecay::LeptonType  typeB 
) const [inline]

check if the event is semi-leptonic with the lepton being of typeA or typeB; all leptons including taus are allowed

Definition at line 66 of file TtGenEvent.h.

References semiLeptonicChannel().

00066 { return (semiLeptonicChannel()==typeA || semiLeptonicChannel()==typeB)? true : false; };

bool TtGenEvent::isSemiLeptonic ( WDecay::LeptonType  typeA  )  const [inline]

check if the event is semi-leptonic with the lepton being of typeA; all leptons including taus are allowed

Definition at line 64 of file TtGenEvent.h.

References semiLeptonicChannel().

00064 { return semiLeptonicChannel()==typeA ? true : false; };

bool TtGenEvent::isSemiLeptonic ( bool  excludeTauLeptons = false  )  const [inline]

check if the event can be classified as semi-laptonic

Definition at line 57 of file TtGenEvent.h.

References isNumberOfLeptons(), and isTtBar().

Referenced by semiLeptonicChannel(), singleLepton(), singleNeutrino(), and TtSemiLepEventPartons::vec().

00057 { return isTtBar() ? isNumberOfLeptons(excludeTauLeptons, 1) : false;}

bool TtGenEvent::isTtBar (  )  const [inline]

check if the event can be classified as ttbar

Definition at line 53 of file TtGenEvent.h.

References TopGenEvent::top(), and TopGenEvent::topBar().

Referenced by isFullHadronic(), isFullLeptonic(), and isSemiLeptonic().

00053 {return (top() && topBar());}

const reco::GenParticle * TtGenEvent::lepton ( bool  excludeTauLeptons = false  )  const

get lepton for semi-leptonic or full leptonic decays

Definition at line 47 of file TtGenEvent.cc.

References funct::abs(), reco::flavour(), i, reco::isLepton(), TopGenEvent::parts_, and TopDecayID::WID.

Referenced by fullLeptonicChannel().

00048 {
00049   const reco::GenParticle* cand = 0;
00050   const reco::GenParticleCollection& partsColl = *parts_;
00051   for (unsigned int i = 0; i < partsColl.size(); ++i) {
00052     if (reco::isLepton(partsColl[i]) && partsColl[i].mother() &&
00053         abs(partsColl[i].mother()->pdgId())==TopDecayID::WID) {
00054       if(reco::flavour(partsColl[i])>0){
00055         cand = &partsColl[i];
00056       }
00057     }
00058   }
00059   return cand;
00060 }

const reco::GenParticle * TtGenEvent::leptonBar ( bool  excludeTauLeptons = false  )  const

get anti-lepton for semi-leptonic or full leptonic decays

Definition at line 63 of file TtGenEvent.cc.

References funct::abs(), reco::flavour(), i, reco::isLepton(), TopGenEvent::parts_, and TopDecayID::WID.

Referenced by fullLeptonicChannel().

00064 {
00065   const reco::GenParticle* cand = 0;
00066   const reco::GenParticleCollection& partsColl = *parts_;
00067   for (unsigned int i = 0; i < partsColl.size(); ++i) {
00068     if (reco::isLepton(partsColl[i]) && partsColl[i].mother() &&
00069         abs(partsColl[i].mother()->pdgId())==TopDecayID::WID) {
00070       if(reco::flavour(partsColl[i])<0){
00071         cand = &partsColl[i];
00072       }
00073     }
00074   }
00075   return cand;
00076 }

const reco::GenParticle * TtGenEvent::leptonicDecayB ( bool  excludeTauLeptons = false  )  const

get b of leptonic decay branch

Definition at line 238 of file TtGenEvent.cc.

References funct::abs(), TopDecayID::bID, reco::flavour(), i, TopGenEvent::parts_, and singleLepton().

Referenced by TtSemiLepEventPartons::vec().

00239 {
00240   const reco::GenParticle* cand=0;
00241   if( singleLepton(excludeTauLeptons) ){
00242     const reco::GenParticleCollection& partsColl = *parts_;
00243     const reco::GenParticle& singleLep = *singleLepton(excludeTauLeptons);
00244     for (unsigned int i = 0; i < partsColl.size(); ++i) {
00245       if (abs(partsColl[i].pdgId())==TopDecayID::bID &&
00246           reco::flavour(singleLep)!=reco::flavour(partsColl[i])) {
00247         cand = &partsColl[i];
00248       }
00249     }
00250   }
00251   return cand;
00252 }

const reco::GenParticle * TtGenEvent::leptonicDecayTop ( bool  excludeTauLeptons = false  )  const

get top of leptonic decay branch

Definition at line 273 of file TtGenEvent.cc.

References funct::abs(), reco::flavour(), i, TopGenEvent::parts_, singleLepton(), and TopDecayID::tID.

Referenced by leptonicDecayTopRadiation().

00274 {
00275   const reco::GenParticle* cand=0;
00276   if( singleLepton(excludeTauLeptons) ){
00277     const reco::GenParticleCollection& partsColl = *parts_;
00278     const reco::GenParticle& singleLep = *singleLepton(excludeTauLeptons);
00279     for( unsigned int i = 0; i < partsColl.size(); ++i ){
00280       if( abs(partsColl[i].pdgId())==TopDecayID::tID &&
00281           reco::flavour(singleLep)!=reco::flavour(partsColl[i]) ){
00282         cand = &partsColl[i];
00283       }
00284     }
00285   }
00286   return cand;
00287 }

std::vector< const reco::GenParticle * > TtGenEvent::leptonicDecayTopRadiation ( bool  excludeTauLeptons = false  )  const

gluons as radiated from the leptonicly decaying top quark

Definition at line 345 of file TtGenEvent.cc.

References leptonicDecayTop(), TopGenEvent::radiatedGluons(), and TopDecayID::tID.

00345                                                                                                    {
00346   if( leptonicDecayTop(excludeTauLeptons) ){
00347     return (leptonicDecayTop(excludeTauLeptons)->pdgId()>0 ? radiatedGluons(TopDecayID::tID) : radiatedGluons(-TopDecayID::tID));
00348   }
00349   std::vector<const reco::GenParticle*> rad;
00350   return (rad);
00351 }

const reco::GenParticle * TtGenEvent::leptonicDecayW ( bool  excludeTauLeptons = false  )  const

get W of leptonic decay branch

Definition at line 255 of file TtGenEvent.cc.

References funct::abs(), reco::flavour(), i, TopGenEvent::parts_, singleLepton(), and TopDecayID::WID.

00256 {
00257   const reco::GenParticle* cand=0;
00258   if( singleLepton(excludeTauLeptons) ){
00259     const reco::GenParticleCollection& partsColl = *parts_;
00260     const reco::GenParticle& singleLep = *singleLepton(excludeTauLeptons);
00261     for (unsigned int i = 0; i < partsColl.size(); ++i) {
00262       if (abs(partsColl[i].pdgId())==TopDecayID::WID &&
00263           reco::flavour(singleLep) == - reco::flavour(partsColl[i])) { 
00264         // PDG Id:13=mu- 24=W+ (+24)->(-13) (-24)->(+13) opposite sign
00265         cand = &partsColl[i];
00266       }
00267     }
00268   }
00269   return cand;
00270 }

const reco::GenParticle * TtGenEvent::lightQBarFromTop (  )  const

get light anti-quark from top for full hadronic decays

Definition at line 332 of file TtGenEvent.cc.

References funct::abs(), TopDecayID::bID, reco::flavour(), i, TopGenEvent::parts_, and TopDecayID::WID.

Referenced by TtFullHadEventPartons::vec().

00333 {
00334   const reco::GenParticle* cand=0;
00335   const reco::GenParticleCollection& partsColl = *parts_;
00336   for (unsigned int i = 0; i < partsColl.size(); ++i) {
00337     if(partsColl[i].mother() && partsColl[i].mother()->pdgId()==TopDecayID::WID &&
00338        abs(partsColl[i].pdgId())<TopDecayID::bID && reco::flavour(partsColl[i])<0){
00339       cand = &partsColl[i];
00340     }  
00341   }
00342   return cand;
00343 }

const reco::GenParticle * TtGenEvent::lightQBarFromTopBar (  )  const

get light anti-quark from anti-top for full hadronic decays

Definition at line 304 of file TtGenEvent.cc.

References funct::abs(), TopDecayID::bID, reco::flavour(), i, TopGenEvent::parts_, and TopDecayID::WID.

Referenced by TtFullHadEventPartons::vec().

00305 {
00306   const reco::GenParticle* cand=0;
00307   const reco::GenParticleCollection& partsColl = *parts_;
00308   for (unsigned int i = 0; i < partsColl.size(); ++i) {
00309     if(partsColl[i].mother() && partsColl[i].mother()->pdgId()==-TopDecayID::WID &&
00310        abs(partsColl[i].pdgId())<TopDecayID::bID && reco::flavour(partsColl[i])<0){
00311       cand = &partsColl[i];
00312     }
00313   }
00314   return cand;
00315 }

const reco::GenParticle * TtGenEvent::lightQFromTop (  )  const

get light quark from top for full hadronic decays

Definition at line 318 of file TtGenEvent.cc.

References funct::abs(), TopDecayID::bID, reco::flavour(), i, TopGenEvent::parts_, and TopDecayID::WID.

Referenced by TtFullHadEventPartons::vec().

00319 {
00320   const reco::GenParticle* cand=0;
00321   const reco::GenParticleCollection& partsColl = *parts_;
00322   for (unsigned int i = 0; i < partsColl.size(); ++i) {
00323     if(partsColl[i].mother() && partsColl[i].mother()->pdgId()==TopDecayID::WID &&
00324        abs(partsColl[i].pdgId())<TopDecayID::bID && reco::flavour(partsColl[i])>0){
00325       cand = &partsColl[i];
00326     }  
00327   }
00328   return cand;
00329 }

const reco::GenParticle * TtGenEvent::lightQFromTopBar (  )  const

get light quark from anti-top for full hadronic decays

Definition at line 290 of file TtGenEvent.cc.

References funct::abs(), TopDecayID::bID, reco::flavour(), i, TopGenEvent::parts_, and TopDecayID::WID.

Referenced by TtFullHadEventPartons::vec().

00291 {
00292   const reco::GenParticle* cand=0;
00293   const reco::GenParticleCollection& partsColl = *parts_;
00294   for (unsigned int i = 0; i < partsColl.size(); ++i) {
00295     if(partsColl[i].mother() && partsColl[i].mother()->pdgId()==-TopDecayID::WID &&
00296        abs(partsColl[i].pdgId())<TopDecayID::bID && reco::flavour(partsColl[i])>0){
00297       cand = &partsColl[i];
00298     }
00299   }
00300   return cand;
00301 }

const reco::GenParticle * TtGenEvent::neutrino ( bool  excludeTauLeptons = false  )  const

get neutrino for semi-leptonic or full leptonic decays

Definition at line 95 of file TtGenEvent.cc.

References funct::abs(), reco::flavour(), i, reco::isNeutrino(), TopGenEvent::parts_, and TopDecayID::WID.

00096 {
00097   const reco::GenParticle* cand=0;
00098   const reco::GenParticleCollection & partsColl = *parts_;
00099   for (unsigned int i = 0; i < partsColl.size(); ++i) {
00100     if (reco::isNeutrino(partsColl[i]) && partsColl[i].mother() &&
00101         abs(partsColl[i].mother()->pdgId())==TopDecayID::WID) {
00102       if(reco::flavour(partsColl[i])>0){
00103         cand = &partsColl[i];
00104       }
00105     }
00106   }
00107   return cand;
00108 }

const reco::GenParticle * TtGenEvent::neutrinoBar ( bool  excludeTauLeptons = false  )  const

get anti-neutrino for semi-leptonic or full leptonic decays

Definition at line 111 of file TtGenEvent.cc.

References funct::abs(), reco::flavour(), i, reco::isNeutrino(), TopGenEvent::parts_, and TopDecayID::WID.

00112 {
00113   const reco::GenParticle* cand=0;
00114   const reco::GenParticleCollection & partsColl = *parts_;
00115   for (unsigned int i = 0; i < partsColl.size(); ++i) {
00116     if (reco::isNeutrino(partsColl[i]) && partsColl[i].mother() &&
00117         abs(partsColl[i].mother()->pdgId())==TopDecayID::WID) {
00118       if(reco::flavour(partsColl[i])<0){
00119         cand = &partsColl[i];
00120       }
00121     }
00122   }
00123   return cand;
00124 }

WDecay::LeptonType TtGenEvent::semiLeptonicChannel (  )  const

return decay channel; all leptons including taus are allowed

Definition at line 16 of file TtGenEvent.cc.

References funct::abs(), TopDecayID::elecID, isSemiLeptonic(), WDecay::kElec, WDecay::kMuon, WDecay::kNone, WDecay::kTau, TopDecayID::muonID, singleLepton(), and TopDecayID::tauID.

Referenced by isSemiLeptonic().

00017 {
00018   WDecay::LeptonType type=WDecay::kNone;
00019   if( isSemiLeptonic() && singleLepton() ){
00020     if( abs(singleLepton()->pdgId())==TopDecayID::elecID ) type=WDecay::kElec;
00021     if( abs(singleLepton()->pdgId())==TopDecayID::muonID ) type=WDecay::kMuon;
00022     if( abs(singleLepton()->pdgId())==TopDecayID::tauID  ) type=WDecay::kTau;
00023   }
00024   return type;
00025 }

const reco::GenParticle * TtGenEvent::singleLepton ( bool  excludeTauLeptons = false  )  const

return single lepton if available; 0 else

Definition at line 79 of file TtGenEvent.cc.

References funct::abs(), i, reco::isLepton(), isSemiLeptonic(), TopGenEvent::parts_, and TopDecayID::WID.

Referenced by hadronicDecayB(), hadronicDecayQuark(), hadronicDecayTop(), hadronicDecayW(), leptonicDecayB(), leptonicDecayTop(), leptonicDecayW(), and semiLeptonicChannel().

00080 {
00081   const reco::GenParticle* cand = 0;
00082   if( isSemiLeptonic(excludeTauLeptons) ){
00083     const reco::GenParticleCollection& partsColl = *parts_;
00084     for (unsigned int i = 0; i < partsColl.size(); ++i) {
00085       if (reco::isLepton(partsColl[i]) && partsColl[i].mother() &&
00086           abs(partsColl[i].mother()->pdgId())==TopDecayID::WID) {
00087         cand = &partsColl[i];
00088       }
00089     }
00090   }
00091   return cand;
00092 }

const reco::GenParticle * TtGenEvent::singleNeutrino ( bool  excludeTauLeptons = false  )  const

return single neutrino if available; 0 else

Definition at line 127 of file TtGenEvent.cc.

References funct::abs(), i, reco::isNeutrino(), isSemiLeptonic(), TopGenEvent::parts_, and TopDecayID::WID.

00128 {
00129   const reco::GenParticle* cand=0;
00130   if( isSemiLeptonic(excludeTauLeptons) ) {
00131     const reco::GenParticleCollection & partsColl = *parts_;
00132     for (unsigned int i = 0; i < partsColl.size(); ++i) {
00133       if (reco::isNeutrino(partsColl[i]) && partsColl[i].mother() &&
00134           abs(partsColl[i].mother()->pdgId())==TopDecayID::WID) {
00135         cand = &partsColl[i];
00136       }
00137     }
00138   }
00139   return cand;
00140 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:34:44 2009 for CMSSW by  doxygen 1.5.4