CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
TtDecayChannelSelector Class Reference

#include <TtDecayChannelSelector.h>

Public Types

enum  { Elec =0, Muon =1, Tau =2 }
 leafs of leptonic decay channel vector decay_ More...
 
typedef std::vector< int > Decay
 typedef to simplify the decay vectors More...
 

Public Member Functions

bool operator() (const reco::GenParticleCollection &parts, std::string inputType) const
 operator for decay channel selection More...
 
 TtDecayChannelSelector (const edm::ParameterSet &)
 std contructor More...
 
 ~TtDecayChannelSelector ()
 default destructor More...
 

Private Member Functions

unsigned int checkSum (const Decay &vec) const
 
unsigned int countProngs (const reco::Candidate &part) const
 count the number of charged particles for tau decays More...
 
unsigned int decayChannel () const
 return decay channel to select for from configuration More...
 
bool search (reco::GenParticleCollection::const_iterator &part, int pdgId, std::string &inputType) const
 search for particle with pdgId in given listing (for top) More...
 
bool search (reco::GenParticle::const_iterator &part, int pdgId, std::string &inputType) const
 search for particle with pdgId in given listing (for top daughters) More...
 
bool tauDecay (const reco::Candidate &) const
 check tau decay to be leptonic, 1-prong or 3-prong More...
 

Private Attributes

bool allow1Prong_
 allow 1-prong tau decays More...
 
bool allow3Prong_
 allow 2-prong tau decays More...
 
Decay allowedDecays_
 
bool allowElectron_
 allow tau decays into electron More...
 
bool allowMuon_
 allow tau decays into muon More...
 
Decay decayBranchA_
 top decay branch 1 More...
 
Decay decayBranchB_
 top decay branch 2 More...
 
bool invert_
 invert selection More...
 
bool restrictTauDecays_
 restrict tau decays More...
 

Detailed Description

Definition at line 8 of file TtDecayChannelSelector.h.

Member Typedef Documentation

typedef std::vector<int> TtDecayChannelSelector::Decay

typedef to simplify the decay vectors

Definition at line 15 of file TtDecayChannelSelector.h.

Member Enumeration Documentation

anonymous enum

leafs of leptonic decay channel vector decay_

Enumerator
Elec 
Muon 
Tau 

Definition at line 13 of file TtDecayChannelSelector.h.

Constructor & Destructor Documentation

TtDecayChannelSelector::TtDecayChannelSelector ( const edm::ParameterSet cfg)

std contructor

Definition at line 15 of file TtDecayChannelSelector.cc.

TtDecayChannelSelector::~TtDecayChannelSelector ( )

default destructor

Definition at line 57 of file TtDecayChannelSelector.cc.

Member Function Documentation

unsigned int TtDecayChannelSelector::checkSum ( const Decay vec) const
inlineprivate

Definition at line 76 of file TtDecayChannelSelector.h.

References ztail::d.

77 {
78  unsigned int sum=0;
79  for(unsigned int d=0; d<vec.size(); ++d){
80  sum+=vec[d];
81  }
82  return sum;
83 }
tuple d
Definition: ztail.py:151
unsigned int TtDecayChannelSelector::countProngs ( const reco::Candidate part) const
private

count the number of charged particles for tau decays

Definition at line 191 of file TtDecayChannelSelector.cc.

unsigned int TtDecayChannelSelector::decayChannel ( ) const
inlineprivate

return decay channel to select for from configuration

Definition at line 63 of file TtDecayChannelSelector.h.

References KineDebug3::count(), decayBranchA_, and decayBranchB_.

64 {
65  unsigned int channel=0;
66  if( std::count(decayBranchA_.begin(), decayBranchA_.end(), 1) > 0 ){
67  ++channel;
68  }
69  if( std::count(decayBranchB_.begin(), decayBranchB_.end(), 1) > 0 ){
70  ++channel;
71  }
72  return channel;
73 }
Decay decayBranchA_
top decay branch 1
Decay decayBranchB_
top decay branch 2
bool TtDecayChannelSelector::operator() ( const reco::GenParticleCollection parts,
std::string  inputType 
) const

operator for decay channel selection

Definition at line 62 of file TtDecayChannelSelector.cc.

bool TtDecayChannelSelector::search ( reco::GenParticleCollection::const_iterator &  part,
int  pdgId,
std::string &  inputType 
) const
private

search for particle with pdgId in given listing (for top)

Definition at line 169 of file TtDecayChannelSelector.cc.

bool TtDecayChannelSelector::search ( reco::GenParticle::const_iterator part,
int  pdgId,
std::string &  inputType 
) const
private

search for particle with pdgId in given listing (for top daughters)

Definition at line 180 of file TtDecayChannelSelector.cc.

bool TtDecayChannelSelector::tauDecay ( const reco::Candidate tau) const
private

check tau decay to be leptonic, 1-prong or 3-prong

Definition at line 206 of file TtDecayChannelSelector.cc.

Member Data Documentation

bool TtDecayChannelSelector::allow1Prong_
private

allow 1-prong tau decays

Definition at line 50 of file TtDecayChannelSelector.h.

bool TtDecayChannelSelector::allow3Prong_
private

allow 2-prong tau decays

Definition at line 52 of file TtDecayChannelSelector.h.

Decay TtDecayChannelSelector::allowedDecays_
private

vector of allowed lepton decay channels; values may be 0,1,2 for the entries 'Elec','Muon','Tau'

Definition at line 59 of file TtDecayChannelSelector.h.

bool TtDecayChannelSelector::allowElectron_
private

allow tau decays into electron

Definition at line 46 of file TtDecayChannelSelector.h.

bool TtDecayChannelSelector::allowMuon_
private

allow tau decays into muon

Definition at line 48 of file TtDecayChannelSelector.h.

Decay TtDecayChannelSelector::decayBranchA_
private

top decay branch 1

Definition at line 54 of file TtDecayChannelSelector.h.

Referenced by decayChannel().

Decay TtDecayChannelSelector::decayBranchB_
private

top decay branch 2

Definition at line 56 of file TtDecayChannelSelector.h.

Referenced by decayChannel().

bool TtDecayChannelSelector::invert_
private

invert selection

Definition at line 42 of file TtDecayChannelSelector.h.

bool TtDecayChannelSelector::restrictTauDecays_
private

restrict tau decays

Definition at line 44 of file TtDecayChannelSelector.h.