CMS 3D CMS Logo

Public Member Functions | Public Attributes

MultiCandGenEvtSelector Class Reference

#include <MultiCandGenEvtSelector.h>

Inheritance diagram for MultiCandGenEvtSelector:
BaseHiGenEvtSelector

List of all members.

Public Member Functions

bool filter (HepMC::GenEvent *)
 MultiCandGenEvtSelector (const edm::ParameterSet &)
virtual ~MultiCandGenEvtSelector ()

Public Attributes

double etaMax_
int nTrig_
int pdg_
double ptMin_
int st_

Detailed Description

Definition at line 6 of file MultiCandGenEvtSelector.h.


Constructor & Destructor Documentation

MultiCandGenEvtSelector::MultiCandGenEvtSelector ( const edm::ParameterSet iConfig)

Definition at line 4 of file MultiCandGenEvtSelector.cc.

References etaMax_, edm::ParameterSet::getParameter(), nTrig_, pdg_, ptMin_, and st_.

   : BaseHiGenEvtSelector(iConfig)
{
   ptMin_ = iConfig.getParameter<double>("ptMin");
   etaMax_ = iConfig.getParameter<double>("etaMax");
   pdg_ = iConfig.getParameter<int>("pdg");
   st_ = iConfig.getParameter<int>("status");
   nTrig_ = iConfig.getParameter<int>("minimumCandidates");
}
virtual MultiCandGenEvtSelector::~MultiCandGenEvtSelector ( ) [inline, virtual]

Definition at line 9 of file MultiCandGenEvtSelector.h.

{;}

Member Function Documentation

bool MultiCandGenEvtSelector::filter ( HepMC::GenEvent *  evt) [virtual]

Reimplemented from BaseHiGenEvtSelector.

Definition at line 14 of file MultiCandGenEvtSelector.cc.

References begin, gather_cfg::cout, end, etaMax_, newFWLiteAna::found, nTrig_, pdg_, ptMin_, BaseHiGenEvtSelector::selectParticle(), and st_.

                                                       {
   std::cout<<"Di Muon Fired"<<std::endl;
   
   int found = 0;
   HepMC::GenEvent::particle_const_iterator begin = evt->particles_begin();
   HepMC::GenEvent::particle_const_iterator end = evt->particles_end();
   for(HepMC::GenEvent::particle_const_iterator it = begin; it != end; ++it){
      if(selectParticle(*it, st_, pdg_, ptMin_, etaMax_)) found++;
      if(found == nTrig_) return true;      
   }
   
   return false;
}

Member Data Documentation

Definition at line 13 of file MultiCandGenEvtSelector.h.

Referenced by filter(), and MultiCandGenEvtSelector().

Definition at line 16 of file MultiCandGenEvtSelector.h.

Referenced by filter(), and MultiCandGenEvtSelector().

Definition at line 15 of file MultiCandGenEvtSelector.h.

Referenced by filter(), and MultiCandGenEvtSelector().

Definition at line 12 of file MultiCandGenEvtSelector.h.

Referenced by filter(), and MultiCandGenEvtSelector().

Definition at line 14 of file MultiCandGenEvtSelector.h.

Referenced by filter(), and MultiCandGenEvtSelector().