Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
}
PartonShowerBsHepMCFilter::PartonShowerBsHepMCFilter
PartonShowerBsHepMCFilter(const edm::ParameterSet &)
Definition:
PartonShowerBsHepMCFilter.cc:12
PartonShowerBsHepMCFilter::~PartonShowerBsHepMCFilter
~PartonShowerBsHepMCFilter()
Definition:
PartonShowerBsHepMCFilter.cc:19
HepMCProduct.h
PartonShowerBsHepMCFilter.h
sysUtil.pid
tuple pid
Definition:
sysUtil.py:22
AlCaHLTBitMon_ParallelJobs.p
tuple p
Definition:
AlCaHLTBitMon_ParallelJobs.py:152
edm::ParameterSet
Definition:
ParameterSet.h:36
PartonShowerBsHepMCFilter::filter
virtual bool filter(const HepMC::GenEvent *evt)
Definition:
PartonShowerBsHepMCFilter.cc:29
Generated for CMSSW Reference Manual by
1.8.5