CMS 3D CMS Logo

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