Main Page
Namespaces
Classes
Package Documentation
GeneratorInterface
Core
src
PartonShowerCsHepMCFilter.cc
Go to the documentation of this file.
1
#include "
GeneratorInterface/Core/interface/PartonShowerCsHepMCFilter.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
PartonShowerCsHepMCFilter::PartonShowerCsHepMCFilter
(
const
edm::ParameterSet
& iConfig)
13
{
14
15
}
16
17
18
//destructor
19
PartonShowerCsHepMCFilter::~PartonShowerCsHepMCFilter
()
20
{
21
22
}
23
24
//
25
// member functions
26
//
27
28
// ------------ method called to produce the data ------------
29
bool
PartonShowerCsHepMCFilter::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 C-hadron, accept the event
38
HepPDT::ParticleID
pid
((*p)->pdg_id());
39
if
(
pid
.hasCharm() ){
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
std
Definition:
JetResolutionObject.h:80
HepMC::GenEvent
Definition:
hepmc_rootio.cc:9
PartonShowerCsHepMCFilter::~PartonShowerCsHepMCFilter
~PartonShowerCsHepMCFilter() override
Definition:
PartonShowerCsHepMCFilter.cc:19
source_particleGun_cfi.ParticleID
ParticleID
Definition:
source_particleGun_cfi.py:8
PartonShowerCsHepMCFilter::PartonShowerCsHepMCFilter
PartonShowerCsHepMCFilter(const edm::ParameterSet &)
Definition:
PartonShowerCsHepMCFilter.cc:12
HepMCProduct.h
PartonShowerCsHepMCFilter.h
PartonShowerCsHepMCFilter::filter
bool filter(const HepMC::GenEvent *evt) override
Definition:
PartonShowerCsHepMCFilter.cc:29
edm
HLT enums.
Definition:
AlignableModifier.h:17
edm::ParameterSet
Definition:
ParameterSet.h:36
Generated for CMSSW Reference Manual by
1.8.11