Main Page
Namespaces
Classes
Package Documentation
GeneratorInterface
Core
src
PartonShowerBsHepMCFilter.cc
Go to the documentation of this file.
1
#include "
GeneratorInterface/Core/interface/PartonShowerBsHepMCFilter.h
"
2
#include "
SimDataFormats/GeneratorProducts/interface/HepMCProduct.h
"
3
#include <iostream>
4
#include "HepPDT/ParticleID.hh"
5
6
7
using namespace
edm
;
8
using namespace
std
;
9
10
11
//constructor
12
PartonShowerBsHepMCFilter::PartonShowerBsHepMCFilter
(
const
edm::ParameterSet
& iConfig)
13
{
14
15
}
16
17
18
//destructor
19
PartonShowerBsHepMCFilter::~PartonShowerBsHepMCFilter
()
20
{
21
22
}
23
24
//
25
// member functions
26
//
27
28
// ------------ method called to produce the data ------------
29
bool
PartonShowerBsHepMCFilter::filter
(
const
HepMC::GenEvent
* evt)
30
{
31
32
// loop over gen particles
33
for
( HepMC::GenEvent::particle_const_iterator
p
= evt->particles_begin();
p
!= evt->particles_end(); ++
p
){
34
35
// check only status 2 particles
36
if
( (*p)->status()==2 ){
37
// if one of the status 2 particles is a B-hadron, accept the event
38
HepPDT::ParticleID
pid
((*p)->pdg_id());
39
if
(
pid
.hasBottom() ){
40
return
true
;
// accept event
41
}
42
}
43
44
}
45
46
return
false
;
// skip event
47
48
}
sysUtil.pid
pid
Definition:
sysUtil.py:23
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
PartonShowerBsHepMCFilter::PartonShowerBsHepMCFilter
PartonShowerBsHepMCFilter(const edm::ParameterSet &)
Definition:
PartonShowerBsHepMCFilter.cc:12
std
Definition:
JetResolutionObject.h:80
HepMC::GenEvent
Definition:
hepmc_rootio.cc:9
source_particleGun_cfi.ParticleID
ParticleID
Definition:
source_particleGun_cfi.py:8
PartonShowerBsHepMCFilter::filter
bool filter(const HepMC::GenEvent *evt) override
Definition:
PartonShowerBsHepMCFilter.cc:29
HepMCProduct.h
PartonShowerBsHepMCFilter.h
edm
HLT enums.
Definition:
AlignableModifier.h:17
edm::ParameterSet
Definition:
ParameterSet.h:36
PartonShowerBsHepMCFilter::~PartonShowerBsHepMCFilter
~PartonShowerBsHepMCFilter() override
Definition:
PartonShowerBsHepMCFilter.cc:19
Generated for CMSSW Reference Manual by
1.8.11