CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
TSGSmart Class Reference

#include <TSGSmart.h>

Inheritance diagram for TSGSmart:
TrackerSeedGenerator

Public Member Functions

 TSGSmart (const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
 
 ~TSGSmart () override
 
- Public Member Functions inherited from TrackerSeedGenerator
const edm::EventgetEvent () const
 
virtual void init (const MuonServiceProxy *service)
 
virtual void setEvent (const edm::Event &)
 
 TrackerSeedGenerator ()
 
virtual void trackerSeeds (const TrackCand &, const TrackingRegion &, const TrackerTopology *, BTSeedCollection &)
 
virtual ~TrackerSeedGenerator ()
 destructor More...
 

Private Member Functions

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

Private Attributes

edm::ParameterSet theConfig
 
double theEtaBound
 
std::unique_ptr< SeedGeneratorFromRegionHitstheMixedGenerator
 
std::unique_ptr< SeedGeneratorFromRegionHitsthePairGenerator
 
std::unique_ptr< SeedGeneratorFromRegionHitstheTripletGenerator
 

Additional Inherited Members

- Public Types inherited from TrackerSeedGenerator
typedef std::vector< TrajectorySeedBTSeedCollection
 
typedef std::pair< const Trajectory *, reco::TrackRefTrackCand
 
- Protected Attributes inherited from TrackerSeedGenerator
const edm::EventtheEvent
 
const MuonServiceProxytheProxyService
 

Detailed Description

Definition at line 11 of file TSGSmart.h.

Constructor & Destructor Documentation

TSGSmart::TSGSmart ( const edm::ParameterSet pset,
edm::ConsumesCollector iC 
)

Definition at line 10 of file TSGSmart.cc.

References edm::ParameterSet::addParameter(), reco::get(), edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, theEtaBound, theMixedGenerator, thePairGenerator, theTripletGenerator, and ~TSGSmart().

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 }
T getParameter(std::string const &) const
double theEtaBound
Definition: TSGSmart.h:28
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 get(const Candidate &c)
Definition: component.h:55
TSGSmart::~TSGSmart ( )
overridedefault

Referenced by TSGSmart().

Member Function Documentation

void TSGSmart::run ( TrajectorySeedCollection seeds,
const edm::Event ev,
const edm::EventSetup es,
const TrackingRegion region 
)
overrideprivatevirtual

Reimplemented from TrackerSeedGenerator.

Definition at line 52 of file TSGSmart.cc.

References TrackingRegion::direction(), PV3DBase< T, PVType, FrameType >::eta(), theEtaBound, theMixedGenerator, thePairGenerator, and theTripletGenerator.

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 }
GlobalVector const & direction() const
the direction around which region is constructed
double theEtaBound
Definition: TSGSmart.h:28
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

Member Data Documentation

edm::ParameterSet TSGSmart::theConfig
private

Definition at line 23 of file TSGSmart.h.

double TSGSmart::theEtaBound
private

Definition at line 28 of file TSGSmart.h.

Referenced by run(), and TSGSmart().

std::unique_ptr<SeedGeneratorFromRegionHits> TSGSmart::theMixedGenerator
private

Definition at line 26 of file TSGSmart.h.

Referenced by run(), and TSGSmart().

std::unique_ptr<SeedGeneratorFromRegionHits> TSGSmart::thePairGenerator
private

Definition at line 24 of file TSGSmart.h.

Referenced by run(), and TSGSmart().

std::unique_ptr<SeedGeneratorFromRegionHits> TSGSmart::theTripletGenerator
private

Definition at line 25 of file TSGSmart.h.

Referenced by run(), and TSGSmart().