CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

TSGFromOrderedHits Class Reference

#include <TSGFromOrderedHits.h>

Inheritance diagram for TSGFromOrderedHits:
TrackerSeedGenerator

List of all members.

Public Member Functions

 TSGFromOrderedHits (const edm::ParameterSet &pset)
virtual ~TSGFromOrderedHits ()

Private Member Functions

void init ()
virtual void run (TrajectorySeedCollection &seeds, const edm::Event &ev, const edm::EventSetup &es, const TrackingRegion &region)

Private Attributes

edm::ParameterSet theConfig
SeedGeneratorFromRegionHitstheGenerator
edm::RunNumber_t theLastRun

Detailed Description

Definition at line 12 of file TSGFromOrderedHits.h.


Constructor & Destructor Documentation

TSGFromOrderedHits::TSGFromOrderedHits ( const edm::ParameterSet pset)

Definition at line 13 of file TSGFromOrderedHits.cc.

References init().

  : theLastRun(0), theConfig(pset), theGenerator(0)
{
        init();
}
TSGFromOrderedHits::~TSGFromOrderedHits ( ) [virtual]

Definition at line 35 of file TSGFromOrderedHits.cc.

References theGenerator.

{
  delete theGenerator; 
}

Member Function Documentation

void TSGFromOrderedHits::init ( void  ) [private]

Definition at line 18 of file TSGFromOrderedHits.cc.

References edm::ParameterSet::addParameter(), SurfaceDeformationFactory::create(), reco::get(), edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, theConfig, and theGenerator.

Referenced by run(), and TSGFromOrderedHits().

{
  edm::ParameterSet hitsfactoryPSet =
      theConfig.getParameter<edm::ParameterSet>("OrderedHitsFactoryPSet");
  std::string hitsfactoryName = hitsfactoryPSet.getParameter<std::string>("ComponentName");
  OrderedHitsGenerator*  hitsGenerator =
        OrderedHitsGeneratorFactory::get()->create( hitsfactoryName, hitsfactoryPSet);

  if (theGenerator) delete theGenerator;
  edm::ParameterSet creatorPSet;
  creatorPSet.addParameter<std::string>("propagator","PropagatorWithMaterial");
  theGenerator = new SeedGeneratorFromRegionHits(hitsGenerator, 0, 
                                                 SeedCreatorFactory::get()->create("SeedFromConsecutiveHitsCreator", creatorPSet)
                                                 );

}
void TSGFromOrderedHits::run ( TrajectorySeedCollection seeds,
const edm::Event ev,
const edm::EventSetup es,
const TrackingRegion region 
) [private, virtual]

Reimplemented from TrackerSeedGenerator.

Definition at line 40 of file TSGFromOrderedHits.cc.

References init(), SeedGeneratorFromRegionHits::run(), edm::Event::run(), theGenerator, and theLastRun.

{
  edm::RunNumber_t thisRun = ev.run();
  if (thisRun != theLastRun) { theLastRun = thisRun; init(); }
  theGenerator->run( seeds, region, ev, es);
}

Member Data Documentation

Definition at line 26 of file TSGFromOrderedHits.h.

Referenced by init().

Definition at line 27 of file TSGFromOrderedHits.h.

Referenced by init(), run(), and ~TSGFromOrderedHits().

Definition at line 25 of file TSGFromOrderedHits.h.

Referenced by run().