CMS 3D CMS Logo

Public Member Functions | Private Attributes

PixelTrackReconstruction Class Reference

#include <PixelTrackReconstruction.h>

List of all members.

Public Member Functions

void halt ()
void init (const edm::EventSetup &es)
 PixelTrackReconstruction (const edm::ParameterSet &conf)
void run (pixeltrackfitting::TracksWithTTRHs &tah, edm::Event &ev, const edm::EventSetup &es)
 ~PixelTrackReconstruction ()

Private Attributes

PixelTrackCleanertheCleaner
edm::ParameterSet theConfig
PixelTrackFiltertheFilter
const PixelFittertheFitter
OrderedHitsGeneratortheGenerator
TrackingRegionProducertheRegionProducer

Detailed Description

Definition at line 14 of file PixelTrackReconstruction.h.


Constructor & Destructor Documentation

PixelTrackReconstruction::PixelTrackReconstruction ( const edm::ParameterSet conf)

Definition at line 34 of file PixelTrackReconstruction.cc.

PixelTrackReconstruction::~PixelTrackReconstruction ( )

Definition at line 38 of file PixelTrackReconstruction.cc.

References halt().

{
  halt();
}

Member Function Documentation

void PixelTrackReconstruction::halt ( )
void PixelTrackReconstruction::init ( const edm::EventSetup es)

Definition at line 52 of file PixelTrackReconstruction.cc.

References reco_skim_cfg_mod::filterName, reco::get(), edm::ParameterSet::getParameter(), theCleaner, theConfig, theFilter, theFitter, theGenerator, and theRegionProducer.

Referenced by PixelTrackProducer::beginRun().

{
  ParameterSet regfactoryPSet = theConfig.getParameter<ParameterSet>("RegionFactoryPSet");
  std::string regfactoryName = regfactoryPSet.getParameter<std::string>("ComponentName");
  theRegionProducer = TrackingRegionProducerFactory::get()->create(regfactoryName,regfactoryPSet);

  ParameterSet orderedPSet =
      theConfig.getParameter<ParameterSet>("OrderedHitsFactoryPSet");
  std::string orderedName = orderedPSet.getParameter<std::string>("ComponentName");
  theGenerator = OrderedHitsGeneratorFactory::get()->create( orderedName, orderedPSet);

  ParameterSet fitterPSet = theConfig.getParameter<ParameterSet>("FitterPSet");
  std::string fitterName = fitterPSet.getParameter<std::string>("ComponentName");
  theFitter = PixelFitterFactory::get()->create( fitterName, fitterPSet);

  ParameterSet filterPSet = theConfig.getParameter<ParameterSet>("FilterPSet");
  std::string  filterName = filterPSet.getParameter<std::string>("ComponentName");
  if (filterName != "none") {
    theFilter = theConfig.getParameter<bool>("useFilterWithES") ?
      PixelTrackFilterWithESFactory::get()->create( filterName, filterPSet, es) :
      PixelTrackFilterFactory::get()->create( filterName, filterPSet);
  }

  ParameterSet cleanerPSet = theConfig.getParameter<ParameterSet>("CleanerPSet");
  std::string  cleanerName = cleanerPSet.getParameter<std::string>("ComponentName");
  if (cleanerName != "none") theCleaner = PixelTrackCleanerFactory::get()->create( cleanerName, cleanerPSet);

}
void PixelTrackReconstruction::run ( pixeltrackfitting::TracksWithTTRHs tah,
edm::Event ev,
const edm::EventSetup es 
)

Definition at line 81 of file PixelTrackReconstruction.cc.

References PixelTrackCleanerWrapper::clean(), OrderedHitsGenerator::clear(), TrackingRegionProducer::regions(), PixelFitter::run(), OrderedHitsGenerator::run(), SeedingHitSet::size(), OrderedSeedingHits::size(), theCleaner, theFilter, theFitter, theGenerator, theRegionProducer, ExpressReco_HICollisions_FallBack::track, and PixelTrackFilter::update().

Referenced by PixelTrackProducer::produce().

{
  typedef std::vector<TrackingRegion* > Regions;
  typedef Regions::const_iterator IR;
  Regions regions = theRegionProducer->regions(ev,es);

  if (theFilter) theFilter->update(ev);

  for (IR ir=regions.begin(), irEnd=regions.end(); ir < irEnd; ++ir) {
    const TrackingRegion & region = **ir;

    const OrderedSeedingHits & triplets =  theGenerator->run(region,ev,es);
    unsigned int nTriplets = triplets.size();

    // producing tracks
    for (unsigned int iTriplet = 0; iTriplet < nTriplets; ++iTriplet) {
      const SeedingHitSet & triplet = triplets[iTriplet];

      std::vector<const TrackingRecHit *> hits;
      for (unsigned int iHit = 0, nHits = triplet.size(); iHit < nHits; ++iHit) {
        hits.push_back( triplet[iHit]->hit() );
      }

      // fitting
      reco::Track* track = theFitter->run(es, hits, region);

      // decide if track should be skipped according to filter
      if (theFilter && !(*theFilter)(track, hits) ) {
        delete track;
        continue;
      }

      // add tracks
      tracks.push_back(TrackWithTTRHs(track, triplet));
    }
    theGenerator->clear();
  }

  // skip ovelrapped tracks
  if (theCleaner) tracks = PixelTrackCleanerWrapper(theCleaner).clean(tracks);

  // clean memory
  for (IR ir=regions.begin(), irEnd=regions.end(); ir < irEnd; ++ir) delete (*ir);
}

Member Data Documentation

Definition at line 29 of file PixelTrackReconstruction.h.

Referenced by halt(), init(), and run().

Definition at line 26 of file PixelTrackReconstruction.h.

Referenced by init().

Definition at line 28 of file PixelTrackReconstruction.h.

Referenced by halt(), init(), and run().

Definition at line 27 of file PixelTrackReconstruction.h.

Referenced by halt(), init(), and run().

Definition at line 30 of file PixelTrackReconstruction.h.

Referenced by halt(), init(), and run().

Definition at line 31 of file PixelTrackReconstruction.h.

Referenced by halt(), init(), and run().