CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

TSGSmart Class Reference

#include <TSGSmart.h>

Inheritance diagram for TSGSmart:
TrackerSeedGenerator

List of all members.

Public Member Functions

 TSGSmart (const edm::ParameterSet &pset)
virtual ~TSGSmart ()

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

Detailed Description

Definition at line 11 of file TSGSmart.h.


Constructor & Destructor Documentation

TSGSmart::TSGSmart ( const edm::ParameterSet pset)

Definition at line 10 of file TSGSmart.cc.

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

  : theConfig(pset), thePairGenerator(0), theTripletGenerator(0), theMixedGenerator(0)
{

  theEtaBound = theConfig.getParameter<double>("EtaBound");

  // FIXME??
  edm::ParameterSet creatorPSet;
  creatorPSet.addParameter<std::string>("propagator","PropagatorWithMaterial");

  edm::ParameterSet PairPSet = theConfig.getParameter<edm::ParameterSet>("PixelPairGeneratorSet"); 
  edm::ParameterSet pairhitsfactoryPSet =
    PairPSet.getParameter<edm::ParameterSet>("OrderedHitsFactoryPSet");
  std::string pairhitsfactoryName = pairhitsfactoryPSet.getParameter<std::string>("ComponentName");
  OrderedHitsGenerator*  pairhitsGenerator =
    OrderedHitsGeneratorFactory::get()->create( pairhitsfactoryName, pairhitsfactoryPSet);


  thePairGenerator = new SeedGeneratorFromRegionHits( pairhitsGenerator, 0, 
                                                 SeedCreatorFactory::get()->create("SeedFromConsecutiveHitsCreator", creatorPSet)
                                                 );

  edm::ParameterSet TripletPSet = theConfig.getParameter<edm::ParameterSet>("PixelTripletGeneratorSet"); 
  edm::ParameterSet triplethitsfactoryPSet =
    TripletPSet.getParameter<edm::ParameterSet>("OrderedHitsFactoryPSet");
  std::string triplethitsfactoryName = triplethitsfactoryPSet.getParameter<std::string>("ComponentName");
  OrderedHitsGenerator*  triplethitsGenerator =
    OrderedHitsGeneratorFactory::get()->create( triplethitsfactoryName, triplethitsfactoryPSet);
  theTripletGenerator = new SeedGeneratorFromRegionHits( triplethitsGenerator, 0, 
                                                 SeedCreatorFactory::get()->create("SeedFromConsecutiveHitsCreator", creatorPSet)
                                                 );

  edm::ParameterSet MixedPSet = theConfig.getParameter<edm::ParameterSet>("MixedGeneratorSet"); 
  edm::ParameterSet mixedhitsfactoryPSet =
    MixedPSet.getParameter<edm::ParameterSet>("OrderedHitsFactoryPSet");
  std::string mixedhitsfactoryName = mixedhitsfactoryPSet.getParameter<std::string>("ComponentName");
  OrderedHitsGenerator*  mixedhitsGenerator =
    OrderedHitsGeneratorFactory::get()->create( mixedhitsfactoryName, mixedhitsfactoryPSet);
  theMixedGenerator = new SeedGeneratorFromRegionHits( mixedhitsGenerator, 0, 
                                                 SeedCreatorFactory::get()->create("SeedFromConsecutiveHitsCreator", creatorPSet)
                                                 );
  
 
}
TSGSmart::~TSGSmart ( ) [virtual]

Definition at line 55 of file TSGSmart.cc.

References theMixedGenerator, thePairGenerator, and theTripletGenerator.


Member Function Documentation

void TSGSmart::run ( TrajectorySeedCollection seeds,
const edm::Event ev,
const edm::EventSetup es,
const TrackingRegion region 
) [private, virtual]

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.

{
  if( fabs(region.direction().eta()) >  theEtaBound ) {
    theMixedGenerator->run(seeds, region, ev, es);
  } else {
    theTripletGenerator->run(seeds, region, ev, es);
    if(seeds.size() < 1) thePairGenerator->run(seeds, region, ev, es);
  }
}

Member Data Documentation

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().

Definition at line 26 of file TSGSmart.h.

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

Definition at line 24 of file TSGSmart.h.

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

Definition at line 25 of file TSGSmart.h.

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