test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ztail::d, reco::Candidate::daughter(), 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 }
int i
Definition: DBlmapReader.cc:9
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
tuple d
Definition: ztail.py:151
virtual size_type numberOfDaughters() const =0
number of daughters
virtual int pdgId() const =0
PDG identifier.
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