Public Member Functions | |
void | beginRun (edm::Run const &run, const edm::EventSetup &es) override |
void | endRun (edm::Run const &run, const edm::EventSetup &es) override |
PhotonConversionTrajectorySeedProducerFromSingleLeg (const edm::ParameterSet &) | |
void | produce (edm::Event &, const edm::EventSetup &) override |
~PhotonConversionTrajectorySeedProducerFromSingleLeg () | |
Private Attributes | |
edm::ParameterSet | _conf |
bool | _DoxcheckSeedCandidates |
std::string | _newSeedCandidates |
PhotonConversionTrajectorySeedProducerFromSingleLegAlgo * | _theFinder |
std::string | _xcheckSeedCandidates |
Definition at line 15 of file PhotonConversionTrajectorySeedProducerFromSingleLeg.cc.
PhotonConversionTrajectorySeedProducerFromSingleLeg::PhotonConversionTrajectorySeedProducerFromSingleLeg | ( | const edm::ParameterSet & | conf | ) |
Definition at line 32 of file PhotonConversionTrajectorySeedProducerFromSingleLeg.cc.
References _DoxcheckSeedCandidates, _newSeedCandidates, _theFinder, and _xcheckSeedCandidates.
: _conf(conf), _newSeedCandidates(conf.getParameter<std::string>( "newSeedCandidates")), _xcheckSeedCandidates(conf.getParameter<std::string>( "xcheckSeedCandidates") ), _DoxcheckSeedCandidates( conf.getParameter<bool>( "DoxcheckSeedCandidates") ) { _theFinder = new PhotonConversionTrajectorySeedProducerFromSingleLegAlgo(conf); produces<TrajectorySeedCollection>(_newSeedCandidates); if(_DoxcheckSeedCandidates) produces<TrajectorySeedCollection>(_xcheckSeedCandidates); }
PhotonConversionTrajectorySeedProducerFromSingleLeg::~PhotonConversionTrajectorySeedProducerFromSingleLeg | ( | ) | [inline] |
Definition at line 18 of file PhotonConversionTrajectorySeedProducerFromSingleLeg.cc.
{}
void PhotonConversionTrajectorySeedProducerFromSingleLeg::beginRun | ( | edm::Run const & | run, |
const edm::EventSetup & | es | ||
) | [override, virtual] |
Reimplemented from edm::EDProducer.
Definition at line 51 of file PhotonConversionTrajectorySeedProducerFromSingleLeg.cc.
References _theFinder, and PhotonConversionTrajectorySeedProducerFromSingleLegAlgo::init().
{ _theFinder->init(); }
void PhotonConversionTrajectorySeedProducerFromSingleLeg::endRun | ( | edm::Run const & | run, |
const edm::EventSetup & | es | ||
) | [override, virtual] |
Reimplemented from edm::EDProducer.
Definition at line 46 of file PhotonConversionTrajectorySeedProducerFromSingleLeg.cc.
References _theFinder, and PhotonConversionTrajectorySeedProducerFromSingleLegAlgo::clear().
{ _theFinder->clear(); }
void PhotonConversionTrajectorySeedProducerFromSingleLeg::produce | ( | edm::Event & | ev, |
const edm::EventSetup & | es | ||
) | [override, virtual] |
Implements edm::EDProducer.
Definition at line 57 of file PhotonConversionTrajectorySeedProducerFromSingleLeg.cc.
References _DoxcheckSeedCandidates, _newSeedCandidates, _theFinder, _xcheckSeedCandidates, PhotonConversionTrajectorySeedProducerFromSingleLegAlgo::analyze(), PhotonConversionTrajectorySeedProducerFromSingleLegAlgo::getTrajectorySeedCollection(), PhotonConversionTrajectorySeedProducerFromSingleLegAlgo::getTrajectorySeedCollectionOfSourceTracks(), edm::Event::put(), and query::result.
{ //TimeMe myTest("PhotonConversionTrajectorySeedProducerFromSingleLeg::produce"); //FIXME //remove this //edm::CPUTimer cpu_timer; //cpu_timer.start(); //-------------------------------------- std::auto_ptr<TrajectorySeedCollection> result( new TrajectorySeedCollection() ); //try{ _theFinder->analyze(ev,es); if(_theFinder->getTrajectorySeedCollection()->size()) result->insert(result->end(), _theFinder->getTrajectorySeedCollection()->begin(), _theFinder->getTrajectorySeedCollection()->end()); //}catch(cms::Exception& er){ // edm::LogError("SeedingConversion") << " Problem in the Single Leg Conversion Seed Producer " <<er.what()<<std::endl; //}catch(std::exception& er){ // edm::LogError("SeedingConversion") << " Problem in the Single Leg Conversion Seed Producer " << er.what()<<std::endl; //} //edm::LogInfo("debugTrajSeedFromSingleLeg") << " TrajectorySeedCollection size " << result->size(); ev.put(result, _newSeedCandidates); //FIXME //remove this //cpu_timer.stop(); //std::cout << "cpu timer " << cpu_timer.realTime() << " " << cpu_timer.cpuTime() << std::endl; //-------------------------------------- //FIXME //This is a check part that can be removed if(!_DoxcheckSeedCandidates) return; std::auto_ptr<TrajectorySeedCollection> resultCheck( new TrajectorySeedCollection() ); if(_theFinder->getTrajectorySeedCollectionOfSourceTracks()->size()) resultCheck->insert(resultCheck->end(), _theFinder->getTrajectorySeedCollectionOfSourceTracks()->begin(), _theFinder->getTrajectorySeedCollectionOfSourceTracks()->end()); ev.put(resultCheck , _xcheckSeedCandidates); }
Definition at line 24 of file PhotonConversionTrajectorySeedProducerFromSingleLeg.cc.
Definition at line 26 of file PhotonConversionTrajectorySeedProducerFromSingleLeg.cc.
Referenced by PhotonConversionTrajectorySeedProducerFromSingleLeg(), and produce().
std::string PhotonConversionTrajectorySeedProducerFromSingleLeg::_newSeedCandidates [private] |
Definition at line 25 of file PhotonConversionTrajectorySeedProducerFromSingleLeg.cc.
Referenced by PhotonConversionTrajectorySeedProducerFromSingleLeg(), and produce().
PhotonConversionTrajectorySeedProducerFromSingleLegAlgo* PhotonConversionTrajectorySeedProducerFromSingleLeg::_theFinder [private] |
Definition at line 27 of file PhotonConversionTrajectorySeedProducerFromSingleLeg.cc.
Referenced by beginRun(), endRun(), PhotonConversionTrajectorySeedProducerFromSingleLeg(), and produce().
std::string PhotonConversionTrajectorySeedProducerFromSingleLeg::_xcheckSeedCandidates [private] |
Definition at line 25 of file PhotonConversionTrajectorySeedProducerFromSingleLeg.cc.
Referenced by PhotonConversionTrajectorySeedProducerFromSingleLeg(), and produce().