CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
 
virtual ~TSGSmart ()
 
- 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 &, BTSeedCollection &)
 
virtual ~TrackerSeedGenerator ()
 destructor More...
 

Private Member Functions

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

Private Attributes

edm::ParameterSet theConfig
 
double theEtaBound
 
SeedGeneratorFromRegionHitstheMixedGenerator
 
SeedGeneratorFromRegionHitsthePairGenerator
 
SeedGeneratorFromRegionHitstheTripletGenerator
 

Additional Inherited Members

- Public Types inherited from TrackerSeedGenerator
typedef std::vector
< TrajectorySeed
BTSeedCollection
 
typedef std::pair< const
Trajectory *, reco::TrackRef
TrackCand
 
- 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)

Definition at line 9 of file TSGSmart.cc.

References reco::get(), edm::ParameterSet::getParameter(), theConfig, theEtaBound, theMixedGenerator, thePairGenerator, and theTripletGenerator.

11 {
12 
13  theEtaBound = theConfig.getParameter<double>("EtaBound");
14 
15  edm::ParameterSet PairPSet = theConfig.getParameter<edm::ParameterSet>("PixelPairGeneratorSet");
16  edm::ParameterSet pairhitsfactoryPSet =
17  PairPSet.getParameter<edm::ParameterSet>("OrderedHitsFactoryPSet");
18  std::string pairhitsfactoryName = pairhitsfactoryPSet.getParameter<std::string>("ComponentName");
19  OrderedHitsGenerator* pairhitsGenerator =
20  OrderedHitsGeneratorFactory::get()->create( pairhitsfactoryName, pairhitsfactoryPSet);
21  thePairGenerator = new SeedGeneratorFromRegionHits( pairhitsGenerator, PairPSet);
22 
23  edm::ParameterSet TripletPSet = theConfig.getParameter<edm::ParameterSet>("PixelTripletGeneratorSet");
24  edm::ParameterSet triplethitsfactoryPSet =
25  TripletPSet.getParameter<edm::ParameterSet>("OrderedHitsFactoryPSet");
26  std::string triplethitsfactoryName = triplethitsfactoryPSet.getParameter<std::string>("ComponentName");
27  OrderedHitsGenerator* triplethitsGenerator =
28  OrderedHitsGeneratorFactory::get()->create( triplethitsfactoryName, triplethitsfactoryPSet);
29  theTripletGenerator = new SeedGeneratorFromRegionHits( triplethitsGenerator, TripletPSet);
30 
31  edm::ParameterSet MixedPSet = theConfig.getParameter<edm::ParameterSet>("MixedGeneratorSet");
32  edm::ParameterSet mixedhitsfactoryPSet =
33  MixedPSet.getParameter<edm::ParameterSet>("OrderedHitsFactoryPSet");
34  std::string mixedhitsfactoryName = mixedhitsfactoryPSet.getParameter<std::string>("ComponentName");
35  OrderedHitsGenerator* mixedhitsGenerator =
36  OrderedHitsGeneratorFactory::get()->create( mixedhitsfactoryName, mixedhitsfactoryPSet);
37  theMixedGenerator = new SeedGeneratorFromRegionHits( mixedhitsGenerator, MixedPSet);
38 
39 
40 }
T getParameter(std::string const &) const
double theEtaBound
Definition: TSGSmart.h:28
SeedGeneratorFromRegionHits * theTripletGenerator
Definition: TSGSmart.h:25
SeedGeneratorFromRegionHits * theMixedGenerator
Definition: TSGSmart.h:26
edm::ParameterSet theConfig
Definition: TSGSmart.h:23
SeedGeneratorFromRegionHits * thePairGenerator
Definition: TSGSmart.h:24
T get(const Candidate &c)
Definition: component.h:56
TSGSmart::~TSGSmart ( )
virtual

Definition at line 42 of file TSGSmart.cc.

References theMixedGenerator, thePairGenerator, and theTripletGenerator.

43 {
44  delete thePairGenerator;
45  delete theTripletGenerator;
46  delete theMixedGenerator;
47 }
SeedGeneratorFromRegionHits * theTripletGenerator
Definition: TSGSmart.h:25
SeedGeneratorFromRegionHits * theMixedGenerator
Definition: TSGSmart.h:26
SeedGeneratorFromRegionHits * thePairGenerator
Definition: TSGSmart.h:24

Member Function Documentation

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

Reimplemented from TrackerSeedGenerator.

Definition at line 49 of file TSGSmart.cc.

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

51 {
52  if( fabs(region.direction().eta()) > theEtaBound ) {
53  theMixedGenerator->run(seeds, region, ev, es);
54  } else {
55  theTripletGenerator->run(seeds, region, ev, es);
56  if(seeds.size() < 1) thePairGenerator->run(seeds, region, ev, es);
57  }
58 }
virtual GlobalVector direction() const =0
the direction around which region is constructed
double theEtaBound
Definition: TSGSmart.h:28
SeedGeneratorFromRegionHits * theTripletGenerator
Definition: TSGSmart.h:25
SeedGeneratorFromRegionHits * theMixedGenerator
Definition: TSGSmart.h:26
void run(TrajectorySeedCollection &seedCollection, const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es)
T eta() const
Definition: PV3DBase.h:70
SeedGeneratorFromRegionHits * thePairGenerator
Definition: TSGSmart.h:24

Member Data Documentation

edm::ParameterSet TSGSmart::theConfig
private

Definition at line 23 of file TSGSmart.h.

Referenced by TSGSmart().

double TSGSmart::theEtaBound
private

Definition at line 28 of file TSGSmart.h.

Referenced by run(), and TSGSmart().

SeedGeneratorFromRegionHits* TSGSmart::theMixedGenerator
private

Definition at line 26 of file TSGSmart.h.

Referenced by run(), TSGSmart(), and ~TSGSmart().

SeedGeneratorFromRegionHits* TSGSmart::thePairGenerator
private

Definition at line 24 of file TSGSmart.h.

Referenced by run(), TSGSmart(), and ~TSGSmart().

SeedGeneratorFromRegionHits* TSGSmart::theTripletGenerator
private

Definition at line 25 of file TSGSmart.h.

Referenced by run(), TSGSmart(), and ~TSGSmart().