17 {
18
19 const McEventCollection* mcCollptr;
20 StatusCode stat = this->
getDH(mcCollptr);
21 if(!stat){
22 return StatusCode::FAILURE;
23 }
24
25
26 McEventCollection::const_iterator itr;
27 for (itr = mcCollptr->begin(); itr!=mcCollptr->end(); ++itr) {
28
29 const HepMC::GenEvent* genEvt = (*itr);
30 if(genEvt == 0) return StatusCode::FAILURE;
31
32 HepMC::GenEvent::particle_const_iterator it= genEvt->particles_begin();
33 HepMC::GenEvent::particle_const_iterator en= genEvt->particles_end();
34 for(; it!=en; ++it){
35 if((*selector)(*it)){mcParticles.push_back(*it);}
36 }
37 }
38
39 return StatusCode::SUCCESS;
40
41}
StatusCode getDH(const McEventCollection *&) const