CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
MuScleFitMuonSelector Class Reference

#include <MuScleFitMuonSelector.h>

Public Member Functions

const reco::CandidategetStatus1Muon (const reco::Candidate *status3Muon)
 
const reco::CandidategetStatus3Muon (const reco::Candidate *status3Muon)
 
 MuScleFitMuonSelector (const edm::InputTag &muonLabel, const int muonType, const bool PATmuons, const std::vector< int > &resfind, const bool speedup, const std::string &genParticlesName, const bool compareToSimTracks, const edm::InputTag &simTracksCollectionName, const bool sherpa, const bool debug)
 
void selectMuons (const edm::Event &event, std::vector< MuScleFitMuon > &muons, std::vector< GenMuonPair > &genPair, std::vector< std::pair< lorentzVector, lorentzVector > > &simPair, MuScleFitPlotter *plotter)
 Main method used to select muons of type specified by muonType_ from the collection specified by muonLabel_ and PATmuons_. More...
 
 ~MuScleFitMuonSelector ()
 

Protected Member Functions

template<typename T >
std::vector< MuScleFitMuonfillMuonCollection (const std::vector< T > &tracks)
 Template function used to convert the muon collection to a vector of reco::LeafCandidate. More...
 
GenMuonPair findGenMuFromRes (const reco::GenParticleCollection *genParticles)
 
GenMuonPair findGenMuFromRes (const edm::HepMCProduct *evtMC)
 
std::pair< lorentzVector,
lorentzVector
findSimMuFromRes (const edm::Handle< edm::HepMCProduct > &evtMC, const edm::Handle< edm::SimTrackContainer > &simTracks)
 
void selectGeneratedMuons (const edm::Handle< pat::CompositeCandidateCollection > &collAll, const std::vector< const pat::Muon * > &collMuSel, std::vector< GenMuonPair > &genPair, MuScleFitPlotter *plotter)
 For PATmuons the generator information is read directly from the PAT object. More...
 
void selectGenSimMuons (const edm::Event &event, std::vector< GenMuonPair > &genPair, std::vector< std::pair< lorentzVector, lorentzVector > > &simPair, MuScleFitPlotter *plotter)
 
void selectSimulatedMuons (const edm::Event &event, const bool ifHepMC, edm::Handle< edm::HepMCProduct > evtMC, std::vector< std::pair< lorentzVector, lorentzVector > > &simPair, MuScleFitPlotter *plotter)
 
bool selGlobalMuon (const pat::Muon *aMuon)
 Apply the Onia cuts to select globalMuons. More...
 
bool selTrackerMuon (const pat::Muon *aMuon)
 Apply the Onia cuts to select trackerMuons. More...
 
template<typename T >
void takeSelectedMuonType (const T &muon, std::vector< reco::Track > &tracks)
 Template function used to extract the selected muon type from the muon collection. More...
 

Protected Attributes

const bool compareToSimTracks_
 
const bool debug_
 
const std::string genParticlesName_
 
const edm::InputTag muonLabel_
 
const int muonType_
 
const bool PATmuons_
 
const std::vector< int > resfind_
 
const bool sherpa_
 
const edm::InputTag simTracksCollectionName_
 
const bool speedup_
 

Static Protected Attributes

static const double mMu2 = 0.011163612
 
static const unsigned int motherPdgIdArray [6] = {23, 100553, 100553, 553, 100443, 443}
 

Detailed Description

Definition at line 29 of file MuScleFitMuonSelector.h.

Constructor & Destructor Documentation

MuScleFitMuonSelector::MuScleFitMuonSelector ( const edm::InputTag muonLabel,
const int  muonType,
const bool  PATmuons,
const std::vector< int > &  resfind,
const bool  speedup,
const std::string &  genParticlesName,
const bool  compareToSimTracks,
const edm::InputTag simTracksCollectionName,
const bool  sherpa,
const bool  debug 
)
inline

Definition at line 32 of file MuScleFitMuonSelector.h.

MuScleFitMuonSelector::~MuScleFitMuonSelector ( )
inline

Definition at line 48 of file MuScleFitMuonSelector.h.

Member Function Documentation

template<typename T >
std::vector<MuScleFitMuon> MuScleFitMuonSelector::fillMuonCollection ( const std::vector< T > &  tracks)
inlineprotected

Template function used to convert the muon collection to a vector of reco::LeafCandidate.

Definition at line 90 of file MuScleFitMuonSelector.h.

GenMuonPair MuScleFitMuonSelector::findGenMuFromRes ( const reco::GenParticleCollection genParticles)
protected

Definition at line 418 of file MuScleFitMuonSelector.cc.

GenMuonPair MuScleFitMuonSelector::findGenMuFromRes ( const edm::HepMCProduct evtMC)
protected

Definition at line 375 of file MuScleFitMuonSelector.cc.

std::pair< lorentzVector, lorentzVector > MuScleFitMuonSelector::findSimMuFromRes ( const edm::Handle< edm::HepMCProduct > &  evtMC,
const edm::Handle< edm::SimTrackContainer > &  simTracks 
)
protected

Definition at line 468 of file MuScleFitMuonSelector.cc.

const reco::Candidate * MuScleFitMuonSelector::getStatus1Muon ( const reco::Candidate status3Muon)

Definition at line 10 of file MuScleFitMuonSelector.cc.

const reco::Candidate * MuScleFitMuonSelector::getStatus3Muon ( const reco::Candidate status3Muon)

Definition at line 30 of file MuScleFitMuonSelector.cc.

void MuScleFitMuonSelector::selectGeneratedMuons ( const edm::Handle< pat::CompositeCandidateCollection > &  collAll,
const std::vector< const pat::Muon * > &  collMuSel,
std::vector< GenMuonPair > &  genPair,
MuScleFitPlotter plotter 
)
protected

For PATmuons the generator information is read directly from the PAT object.

Definition at line 252 of file MuScleFitMuonSelector.cc.

void MuScleFitMuonSelector::selectGenSimMuons ( const edm::Event event,
std::vector< GenMuonPair > &  genPair,
std::vector< std::pair< lorentzVector, lorentzVector > > &  simPair,
MuScleFitPlotter plotter 
)
protected

Definition at line 312 of file MuScleFitMuonSelector.cc.

void MuScleFitMuonSelector::selectMuons ( const edm::Event event,
std::vector< MuScleFitMuon > &  muons,
std::vector< GenMuonPair > &  genPair,
std::vector< std::pair< lorentzVector, lorentzVector > > &  simPair,
MuScleFitPlotter plotter 
)

Main method used to select muons of type specified by muonType_ from the collection specified by muonLabel_ and PATmuons_.

Definition at line 90 of file MuScleFitMuonSelector.cc.

void MuScleFitMuonSelector::selectSimulatedMuons ( const edm::Event event,
const bool  ifHepMC,
edm::Handle< edm::HepMCProduct evtMC,
std::vector< std::pair< lorentzVector, lorentzVector > > &  simPair,
MuScleFitPlotter plotter 
)
protected

Definition at line 351 of file MuScleFitMuonSelector.cc.

bool MuScleFitMuonSelector::selGlobalMuon ( const pat::Muon aMuon)
protected

Apply the Onia cuts to select globalMuons.

Definition at line 50 of file MuScleFitMuonSelector.cc.

bool MuScleFitMuonSelector::selTrackerMuon ( const pat::Muon aMuon)
protected

Apply the Onia cuts to select trackerMuons.

Definition at line 71 of file MuScleFitMuonSelector.cc.

template<typename T >
void MuScleFitMuonSelector::takeSelectedMuonType ( const T muon,
std::vector< reco::Track > &  tracks 
)
inlineprotected

Template function used to extract the selected muon type from the muon collection.

Definition at line 130 of file MuScleFitMuonSelector.h.

Member Data Documentation

const bool MuScleFitMuonSelector::compareToSimTracks_
protected

Definition at line 156 of file MuScleFitMuonSelector.h.

const bool MuScleFitMuonSelector::debug_
protected

Definition at line 159 of file MuScleFitMuonSelector.h.

const std::string MuScleFitMuonSelector::genParticlesName_
protected

Definition at line 155 of file MuScleFitMuonSelector.h.

const double MuScleFitMuonSelector::mMu2 = 0.011163612
staticprotected

Definition at line 160 of file MuScleFitMuonSelector.h.

const unsigned int MuScleFitMuonSelector::motherPdgIdArray = {23, 100553, 100553, 553, 100443, 443}
staticprotected

Definition at line 161 of file MuScleFitMuonSelector.h.

const edm::InputTag MuScleFitMuonSelector::muonLabel_
protected

Definition at line 150 of file MuScleFitMuonSelector.h.

const int MuScleFitMuonSelector::muonType_
protected

Definition at line 151 of file MuScleFitMuonSelector.h.

const bool MuScleFitMuonSelector::PATmuons_
protected

Definition at line 152 of file MuScleFitMuonSelector.h.

const std::vector<int> MuScleFitMuonSelector::resfind_
protected

Definition at line 153 of file MuScleFitMuonSelector.h.

const bool MuScleFitMuonSelector::sherpa_
protected

Definition at line 158 of file MuScleFitMuonSelector.h.

const edm::InputTag MuScleFitMuonSelector::simTracksCollectionName_
protected

Definition at line 157 of file MuScleFitMuonSelector.h.

const bool MuScleFitMuonSelector::speedup_
protected

Definition at line 154 of file MuScleFitMuonSelector.h.