CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TSGFromOrderedHits.cc
Go to the documentation of this file.
1 #include "TSGFromOrderedHits.h"
2 
8 
11 
12 
14  : theLastRun(0), theConfig(pset), theGenerator(0)
15 {
16  init();
17 }
19 {
20  edm::ParameterSet hitsfactoryPSet =
21  theConfig.getParameter<edm::ParameterSet>("OrderedHitsFactoryPSet");
22  std::string hitsfactoryName = hitsfactoryPSet.getParameter<std::string>("ComponentName");
23  OrderedHitsGenerator* hitsGenerator =
24  OrderedHitsGeneratorFactory::get()->create( hitsfactoryName, hitsfactoryPSet);
25 
26  if (theGenerator) delete theGenerator;
27  edm::ParameterSet creatorPSet;
28  creatorPSet.addParameter<std::string>("propagator","PropagatorWithMaterial");
29  theGenerator = new SeedGeneratorFromRegionHits(hitsGenerator, 0,
30  SeedCreatorFactory::get()->create("SeedFromConsecutiveHitsCreator", creatorPSet)
31  );
32 
33 }
34 
36 {
37  delete theGenerator;
38 }
39 
41  const edm::Event &ev, const edm::EventSetup &es, const TrackingRegion& region)
42 {
43  edm::RunNumber_t thisRun = ev.run();
44  if (thisRun != theLastRun) { theLastRun = thisRun; init(); }
45  theGenerator->run( seeds, region, ev, es);
46 }
T getParameter(std::string const &) const
SeedGeneratorFromRegionHits * theGenerator
std::vector< TrajectorySeed > TrajectorySeedCollection
edm::RunNumber_t theLastRun
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:145
RunNumber_t run() const
Definition: Event.h:67
edm::ParameterSet theConfig
virtual void run(TrajectorySeedCollection &seeds, const edm::Event &ev, const edm::EventSetup &es, const TrackingRegion &region)
void run(TrajectorySeedCollection &seedCollection, const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es)
unsigned int RunNumber_t
Definition: EventRange.h:32
TSGFromOrderedHits(const edm::ParameterSet &pset)
SurfaceDeformation * create(int type, const std::vector< double > &params)
T get(const Candidate &c)
Definition: component.h:56