12 src_(iConfig.getParameter<
InputTag>(
"src" ) ),
13 leptonID_(iConfig.getParameter<
int>(
"leptonID" ) ),
14 verbose_(iConfig.getUntrackedParameter<
bool>(
"verbose",
"False" ) )
44 const int nup_ = hepeup_.
NUP;
45 const std::vector<int> idup_ = hepeup_.
IDUP;
46 const std::vector< std::pair<int,int> > mothup_ = hepeup_.
MOTHUP;
47 const std::vector<lhef::HEPEUP::FiveVector> pup_ = hepeup_.
PUP;
49 unsigned int cLep = 0;
52 for (
unsigned int icount = 0 ; icount < (
unsigned int)nup_; icount++ ) {
55 if ( mothup_[icount].
first != 0 ) {
56 if ( idup_[mothup_[icount].
first-1] == 23 ) { cLep++; netCharge += idup_[icount]; }
61 if ( cLep == 2 && netCharge == 0 ) {
64 for (
unsigned int icount = 0 ; icount < (
unsigned int)nup_; icount++ ) {
65 std::cout <<
"# " << icount <<
" " << idup_[icount] <<
" " << (pup_[icount])[0] <<
" " << (pup_[icount])[1] <<
" " << (pup_[icount])[2] <<
" " << (pup_[icount])[3] <<
" " << (pup_[icount])[4] << std::endl;
71 return true; }
else {
return false;}
bool filter(edm::Event &, const edm::EventSetup &) override
const lhef::HEPEUP & hepeup() const
LHEDYdecayFilter(const edm::ParameterSet &)
std::vector< std::pair< int, int > > MOTHUP
~LHEDYdecayFilter() override
std::vector< FiveVector > PUP
Abs< T >::type abs(const T &t)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
bool accepted(std::vector< std::string_view > const &, std::string_view)