CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/GeneratorInterface/HiGenCommon/src/HiGenEvtSelectorFactory.cc

Go to the documentation of this file.
00001 
00002 #include "GeneratorInterface/HiGenCommon/interface/HiGenEvtSelectorFactory.h"
00003 #include "GeneratorInterface/HiGenCommon/interface/EcalGenEvtSelector.h"
00004 #include "GeneratorInterface/HiGenCommon/interface/EcalGenEvtSelectorFrag.h"
00005 #include "GeneratorInterface/HiGenCommon/interface/MultiCandGenEvtSelector.h"
00006 #include "GeneratorInterface/HiGenCommon/interface/PartonHadronDecayGenEvtSelector.h"
00007 #include "GeneratorInterface/HiGenCommon/interface/HadronDecayGenEvtSelector.h"
00008 
00009 BaseHiGenEvtSelector* HiGenEvtSelectorFactory::get(std::string filterType, const edm::ParameterSet& pset){
00010    if(filterType == "None"){
00011      return new BaseHiGenEvtSelector(pset);
00012    }else if(filterType == "EcalGenEvtSelector"){
00013      return new EcalGenEvtSelector(pset);
00014    }else if(filterType == "EcalGenEvtSelectorFrag"){
00015      return new EcalGenEvtSelectorFrag(pset);
00016    }else if(filterType == "MultiCandGenEvtSelector"){
00017      return new MultiCandGenEvtSelector(pset);
00018    }else if(filterType == "PartonHadronDecayGenEvtSelector"){
00019      return new PartonHadronDecayGenEvtSelector(pset);
00020    }else if(filterType == "HadronDecayGenEvtSelector"){
00021      return new HadronDecayGenEvtSelector(pset);
00022    }
00023 
00024    std::cout<<"Skimmer not recognized. Fail!"<<std::endl;
00025    return NULL;
00026 }
00027 
00028