1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include "GeneratorInterface/GenFilters/plugins/PythiaFilterGammaGamma.h"
#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
#include "TLorentzVector.h"
#include <iostream>
using namespace edm;
using namespace std;
using namespace HepMC;
PythiaFilterGammaGamma::PythiaFilterGammaGamma(const edm::ParameterSet& iConfig)
: token_(consumes<edm::HepMCProduct>(
edm::InputTag(iConfig.getUntrackedParameter("moduleLabel", std::string("generator")), "unsmeared"))),
hepMCFilter_(new PythiaHepMCFilterGammaGamma(iConfig)) {}
PythiaFilterGammaGamma::~PythiaFilterGammaGamma() {}
bool PythiaFilterGammaGamma::filter(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const {
Handle<HepMCProduct> evt;
iEvent.getByToken(token_, evt);
const HepMC::GenEvent* myGenEvent = evt->GetEvent();
return hepMCFilter_->filter(myGenEvent);
}
|