CMS 3D CMS Logo

Public Member Functions | Private Attributes

PhotonConversionTrajectorySeedProducerFromSingleLeg Class Reference

Inheritance diagram for PhotonConversionTrajectorySeedProducerFromSingleLeg:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

List of all members.

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

Detailed Description

Definition at line 15 of file PhotonConversionTrajectorySeedProducerFromSingleLeg.cc.


Constructor & Destructor Documentation

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]

Member Function Documentation

void PhotonConversionTrajectorySeedProducerFromSingleLeg::beginRun ( edm::Run const &  run,
const edm::EventSetup es 
) [override, virtual]
void PhotonConversionTrajectorySeedProducerFromSingleLeg::endRun ( edm::Run const &  run,
const edm::EventSetup es 
) [override, virtual]
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);

}

Member Data Documentation