src
GeneratorInterface
HiGenCommon
src
MultiCandGenEvtSelector.cc
Go to the documentation of this file.
1
#include <iostream>
2
#include "
GeneratorInterface/HiGenCommon/interface/MultiCandGenEvtSelector.h
"
3
4
MultiCandGenEvtSelector::MultiCandGenEvtSelector
(
const
edm::ParameterSet
& iConfig) :
BaseHiGenEvtSelector
(iConfig) {
5
ptMin_
= iConfig.
getParameter
<
double
>(
"ptMin"
);
6
etaMax_
= iConfig.
getParameter
<
double
>(
"etaMax"
);
7
pdg_
= iConfig.
getParameter
<
int
>(
"pdg"
);
8
st_
= iConfig.
getParameter
<
int
>(
"status"
);
9
nTrig_
= iConfig.
getParameter
<
int
>(
"minimumCandidates"
);
10
}
11
12
bool
MultiCandGenEvtSelector::filter
(
HepMC::GenEvent
* evt) {
13
std::cout
<<
"Di Muon Fired"
<< std::endl;
14
15
int
found
= 0;
16
HepMC::GenEvent::particle_const_iterator begin = evt->particles_begin();
17
HepMC::GenEvent::particle_const_iterator
end
= evt->particles_end();
18
for
(HepMC::GenEvent::particle_const_iterator
it
= begin;
it
!=
end
; ++
it
) {
19
if
(
selectParticle
(*
it
,
st_
,
pdg_
,
ptMin_
,
etaMax_
))
20
found
++;
21
if
(
found
==
nTrig_
)
22
return
true
;
23
}
24
25
return
false
;
26
}
MultiCandGenEvtSelector.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:307
MultiCandGenEvtSelector::MultiCandGenEvtSelector
MultiCandGenEvtSelector(const edm::ParameterSet &)
Definition:
MultiCandGenEvtSelector.cc:4
MultiCandGenEvtSelector::pdg_
int pdg_
Definition:
MultiCandGenEvtSelector.h:15
MultiCandGenEvtSelector::st_
int st_
Definition:
MultiCandGenEvtSelector.h:14
BaseHiGenEvtSelector::selectParticle
bool selectParticle(HepMC::GenParticle *par, int status, int pdg, double ptMin, double etaMax)
Definition:
BaseHiGenEvtSelector.h:13
HepMC::GenEvent
Definition:
hepmc_rootio.cc:9
mps_fire.end
end
Definition:
mps_fire.py:242
MultiCandGenEvtSelector::etaMax_
double etaMax_
Definition:
MultiCandGenEvtSelector.h:13
ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it
auto & it
Definition:
splitVertices.h:45
MultiCandGenEvtSelector::filter
bool filter(HepMC::GenEvent *) override
Definition:
MultiCandGenEvtSelector.cc:12
edm::ParameterSet
Definition:
ParameterSet.h:48
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
newFWLiteAna.found
found
Definition:
newFWLiteAna.py:117
BaseHiGenEvtSelector
Definition:
BaseHiGenEvtSelector.h:8
MultiCandGenEvtSelector::ptMin_
double ptMin_
Definition:
MultiCandGenEvtSelector.h:12
MultiCandGenEvtSelector::nTrig_
int nTrig_
Definition:
MultiCandGenEvtSelector.h:16
Generated for CMSSW Reference Manual by
1.8.14