42 motherPdgId_(iConfig.getParameter<int>(
"motherPdgId")),
43 daughtersPdgId_(iConfig.getParameter<vector<int> >(
"daughtersPdgId")),
44 decayChain_(iConfig.getParameter<std::
string>(
"decayChain")) {
46 produces<CandidateCollection >(alias =
decayChain_+
"Mother").setBranchAlias(alias);
50 collection <<
decayChain_ <<
"Lepton" << index.str();
51 valias.push_back(collection.str());
52 produces<CandidateCollection >(
valias.at(j)).setBranchAlias(
valias.at(j) );
68 for( CandidateCollection::const_iterator
p = genCandidatesCollection->begin();
p != genCandidatesCollection->end(); ++
p ) {
70 mothercands->push_back(
p->clone());
71 size_t ndau =
p->numberOfDaughters();
72 for(
size_t i = 0;
i < ndau; ++
i){
73 for (
size_t j = 0;
j < daughtersize; ++
j){
75 daughterscands->push_back(
p->daughter(
i)->clone());
85 for (
unsigned int row = 0; row < daughtersize; ++ row ){
87 leptonscands_->push_back((daughterscands->begin()+row)->
clone());
88 iEvent.
put(leptonscands_,
valias.at(row));
virtual void produce(edm::Event &, const edm::EventSetup &) override
ParticleDecayProducer(const edm::ParameterSet &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< reco::CandidateCollection > genCandidatesToken_
std::vector< std::string > valias
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< int > daughtersPdgId_
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)