Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
MultiCandGenEvtSelector::MultiCandGenEvtSelector
MultiCandGenEvtSelector(const edm::ParameterSet &)
Definition:
MultiCandGenEvtSelector.cc:4
SplitLinear.begin
list begin
Definition:
SplitLinear.py:25
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
MultiCandGenEvtSelector::etaMax_
double etaMax_
Definition:
MultiCandGenEvtSelector.h:13
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
MultiCandGenEvtSelector::filter
bool filter(HepMC::GenEvent *) override
Definition:
MultiCandGenEvtSelector.cc:12
dataset.end
string end
Definition:
dataset.py:937
edm::ParameterSet
Definition:
ParameterSet.h:47
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:144
newFWLiteAna.found
found
Definition:
newFWLiteAna.py:118
iConfig
iConfig
Definition:
TSGFromPropagation.cc:56
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.5