test
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, edm::ConsumesCollector &iC)
 
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 &, const TrackerTopology *, 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,
edm::ConsumesCollector iC 
)

Definition at line 10 of file TSGSmart.cc.

References edm::ParameterSet::addParameter(), SurfaceDeformationFactory::create(), reco::get(), edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, theConfig, theEtaBound, theMixedGenerator, thePairGenerator, and theTripletGenerator.

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, 0,
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, 0,
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, 0,
49  SeedCreatorFactory::get()->create("SeedFromConsecutiveHitsCreator", creatorPSet)
50  );
51 
52 
53 }
T getParameter(std::string const &) const
double theEtaBound
Definition: TSGSmart.h:28
SeedGeneratorFromRegionHits * theTripletGenerator
Definition: TSGSmart.h:25
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
SeedGeneratorFromRegionHits * thePairGenerator
Definition: TSGSmart.h:24
SurfaceDeformation * create(int type, const std::vector< double > &params)
T get(const Candidate &c)
Definition: component.h:55
TSGSmart::~TSGSmart ( )
virtual

Definition at line 55 of file TSGSmart.cc.

References theMixedGenerator, thePairGenerator, and theTripletGenerator.

56 {
57  delete thePairGenerator;
58  delete theTripletGenerator;
59  delete theMixedGenerator;
60 }
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 62 of file TSGSmart.cc.

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

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.size() < 1) thePairGenerator->run(seeds, region, ev, es);
70  }
71 }
GlobalVector const & direction() const
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:76
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().