CMS 3D CMS Logo

Classes | Functions
MCAcceptanceAnalyzer.cc File Reference
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/Event.h"
#include "DataFormats/Common/interface/Handle.h"
#include "DataFormats/Candidate/interface/Candidate.h"
#include "DataFormats/HepMCCandidate/interface/GenParticle.h"
#include <iostream>
#include "FWCore/Framework/interface/MakerMacros.h"

Go to the source code of this file.

Classes

class  MCAcceptanceAnalyzer
 
struct  ZSelector
 

Functions

const CandidatemcMuDaughter (const Candidate *c)
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< MCAcceptanceAnalyzer > > s_filler__LINE__ ("MCAcceptanceAnalyzer")
 
static const edm::MakerPluginFactory::PMaker< edm::WorkerMaker< MCAcceptanceAnalyzer > > s_maker__LINE__ ("MCAcceptanceAnalyzer")
 

Function Documentation

const Candidate* mcMuDaughter ( const Candidate c)

Definition at line 14 of file MCAcceptanceAnalyzer.cc.

References edmIntegrityCheck::d, reco::Candidate::daughter(), mps_fire::i, gen::n, reco::Candidate::numberOfDaughters(), and reco::Candidate::pdgId().

Referenced by MCAcceptanceAnalyzer::analyze(), and ZSelector::operator()().

14  {
15  unsigned int n = c->numberOfDaughters();
16  for(unsigned int i = 0; i < n; ++i) {
17  const Candidate * d = c->daughter(i);
18  if(fabs(d->pdgId())==13) return d;
19  }
20  return 0;
21 }
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
virtual int pdgId() const =0
PDG identifier.
virtual size_type numberOfDaughters() const =0
number of daughters
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< MCAcceptanceAnalyzer > > s_filler__LINE__ ( "MCAcceptanceAnalyzer"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< MCAcceptanceAnalyzer > > s_maker__LINE__ ( "MCAcceptanceAnalyzer"  )
static