CMS 3D CMS Logo

TSGSmart.cc
Go to the documentation of this file.
2 
8 
9 
11 {
12 
13  theEtaBound = pset.getParameter<double>("EtaBound");
14 
15  // FIXME??
16  edm::ParameterSet creatorPSet;
17  creatorPSet.addParameter<std::string>("propagator","PropagatorWithMaterial");
18 
19  edm::ParameterSet PairPSet = pset.getParameter<edm::ParameterSet>("PixelPairGeneratorSet");
20  edm::ParameterSet pairhitsfactoryPSet =
21  PairPSet.getParameter<edm::ParameterSet>("OrderedHitsFactoryPSet");
22  std::string pairhitsfactoryName = pairhitsfactoryPSet.getParameter<std::string>("ComponentName");
23 
24  thePairGenerator = std::make_unique<SeedGeneratorFromRegionHits>( OrderedHitsGeneratorFactory::get()->create( pairhitsfactoryName, pairhitsfactoryPSet, iC),
25  nullptr,
26  SeedCreatorFactory::get()->create("SeedFromConsecutiveHitsCreator", creatorPSet)
27  );
28 
29  edm::ParameterSet TripletPSet = pset.getParameter<edm::ParameterSet>("PixelTripletGeneratorSet");
30  edm::ParameterSet triplethitsfactoryPSet =
31  TripletPSet.getParameter<edm::ParameterSet>("OrderedHitsFactoryPSet");
32  std::string triplethitsfactoryName = triplethitsfactoryPSet.getParameter<std::string>("ComponentName");
33 
34  theTripletGenerator = std::make_unique<SeedGeneratorFromRegionHits>( OrderedHitsGeneratorFactory::get()->create( triplethitsfactoryName, triplethitsfactoryPSet, iC),
35  nullptr,
36  SeedCreatorFactory::get()->create("SeedFromConsecutiveHitsCreator", creatorPSet)
37  );
38 
39  edm::ParameterSet MixedPSet = pset.getParameter<edm::ParameterSet>("MixedGeneratorSet");
40  edm::ParameterSet mixedhitsfactoryPSet =
41  MixedPSet.getParameter<edm::ParameterSet>("OrderedHitsFactoryPSet");
42  std::string mixedhitsfactoryName = mixedhitsfactoryPSet.getParameter<std::string>("ComponentName");
43 
44  theMixedGenerator = std::make_unique<SeedGeneratorFromRegionHits>( OrderedHitsGeneratorFactory::get()->create( mixedhitsfactoryName, mixedhitsfactoryPSet, iC),
45  nullptr,
46  SeedCreatorFactory::get()->create("SeedFromConsecutiveHitsCreator", creatorPSet)
47  );
48 }
49 
50 TSGSmart::~TSGSmart() = default;
51 
53  const edm::Event &ev, const edm::EventSetup &es, const TrackingRegion& region)
54 {
55  if( fabs(region.direction().eta()) > theEtaBound ) {
56  theMixedGenerator->run(seeds, region, ev, es);
57  } else {
58  theTripletGenerator->run(seeds, region, ev, es);
59  if(seeds.empty()) thePairGenerator->run(seeds, region, ev, es);
60  }
61 }
T getParameter(std::string const &) const
TSGSmart(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
Definition: TSGSmart.cc:10
bool ev
~TSGSmart() override
void run(TrajectorySeedCollection &seeds, const edm::Event &ev, const edm::EventSetup &es, const TrackingRegion &region) override
Definition: TSGSmart.cc:52
GlobalVector const & direction() const
the direction around which region is constructed
double theEtaBound
Definition: TSGSmart.h:28
std::vector< TrajectorySeed > TrajectorySeedCollection
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:125
std::unique_ptr< SeedGeneratorFromRegionHits > theTripletGenerator
Definition: TSGSmart.h:25
std::unique_ptr< SeedGeneratorFromRegionHits > thePairGenerator
Definition: TSGSmart.h:24
std::unique_ptr< SeedGeneratorFromRegionHits > theMixedGenerator
Definition: TSGSmart.h:26
T eta() const
Definition: PV3DBase.h:76
T get(const Candidate &c)
Definition: component.h:55