#include <PixelTrackReconstruction.h>
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 | |
PixelTrackCleaner * | theCleaner |
edm::ParameterSet | theConfig |
PixelTrackFilter * | theFilter |
const PixelFitter * | theFitter |
OrderedHitsGenerator * | theGenerator |
TrackingRegionProducer * | theRegionProducer |
Definition at line 14 of file PixelTrackReconstruction.h.
PixelTrackReconstruction::PixelTrackReconstruction | ( | const edm::ParameterSet & | conf | ) |
Definition at line 34 of file PixelTrackReconstruction.cc.
: theConfig(cfg), theFitter(0), theFilter(0), theCleaner(0), theGenerator(0), theRegionProducer(0) { }
PixelTrackReconstruction::~PixelTrackReconstruction | ( | ) |
void PixelTrackReconstruction::halt | ( | ) |
Definition at line 43 of file PixelTrackReconstruction.cc.
References theCleaner, theFilter, theFitter, theGenerator, and theRegionProducer.
Referenced by PixelTrackProducer::endRun(), and ~PixelTrackReconstruction().
{ delete theFilter; theFilter=0; delete theFitter; theFitter=0; delete theCleaner; theCleaner=0; delete theGenerator; theGenerator=0; delete theRegionProducer; theRegionProducer=0; }
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, 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( ev, es, hits, region); if (!track) continue; // 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); }
Definition at line 29 of file PixelTrackReconstruction.h.
Definition at line 26 of file PixelTrackReconstruction.h.
Referenced by init().
Definition at line 28 of file PixelTrackReconstruction.h.
const PixelFitter* PixelTrackReconstruction::theFitter [private] |
Definition at line 27 of file PixelTrackReconstruction.h.
Definition at line 30 of file PixelTrackReconstruction.h.
Definition at line 31 of file PixelTrackReconstruction.h.