#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 |
QuadrupletSeedMerger * | theMerger_ |
TrackingRegionProducer * | theRegionProducer |
Definition at line 17 of file PixelTrackReconstruction.h.
PixelTrackReconstruction::PixelTrackReconstruction | ( | const edm::ParameterSet & | conf | ) |
Definition at line 36 of file PixelTrackReconstruction.cc.
References edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, theConfig, and theMerger_.
: theConfig(cfg), theFitter(0), theFilter(0), theCleaner(0), theGenerator(0), theRegionProducer(0), theMerger_(0) { if ( cfg.exists("SeedMergerPSet") ) { edm::ParameterSet mergerPSet = theConfig.getParameter<edm::ParameterSet>( "SeedMergerPSet" ); std::string seedmergerTTRHBuilderLabel = mergerPSet.getParameter<std::string>( "ttrhBuilderLabel" ); std::string seedmergerLayerListName = mergerPSet.getParameter<std::string>( "layerListName" ); bool seedmergerAddTriplets = mergerPSet.getParameter<bool>( "addRemainingTriplets" ); bool seedmergerMergeTriplets = mergerPSet.getParameter<bool>( "mergeTriplets" ); theMerger_ = new QuadrupletSeedMerger(); theMerger_->setMergeTriplets( seedmergerMergeTriplets ); theMerger_->setAddRemainingTriplets( seedmergerAddTriplets ); theMerger_->setTTRHBuilderLabel( seedmergerTTRHBuilderLabel ); theMerger_->setLayerListName( seedmergerLayerListName ); } }
PixelTrackReconstruction::~PixelTrackReconstruction | ( | ) |
void PixelTrackReconstruction::halt | ( | ) |
Definition at line 58 of file PixelTrackReconstruction.cc.
References theCleaner, theFilter, theFitter, theGenerator, theMerger_, 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; delete theMerger_; theMerger_=0; }
void PixelTrackReconstruction::init | ( | const edm::EventSetup & | es | ) |
Definition at line 68 of file PixelTrackReconstruction.cc.
References reco_skim_cfg_mod::filterName, reco::get(), edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, theCleaner, theConfig, theFilter, theFitter, theGenerator, theMerger_, theRegionProducer, and QuadrupletSeedMerger::update().
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); if ( theMerger_ !=0 ) { theMerger_->update( es ); } }
void PixelTrackReconstruction::run | ( | pixeltrackfitting::TracksWithTTRHs & | tah, |
edm::Event & | ev, | ||
const edm::EventSetup & | es | ||
) |
Definition at line 100 of file PixelTrackReconstruction.cc.
References PixelTrackCleanerWrapper::clean(), OrderedHitsGenerator::clear(), QuadrupletSeedMerger::mergeTriplets(), TrackingRegionProducer::regions(), PixelFitter::run(), OrderedHitsGenerator::run(), SeedingHitSet::size(), OrderedSeedingHits::size(), theCleaner, theFilter, theFitter, theGenerator, theMerger_, 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); const OrderedSeedingHits &tuplets= (theMerger_==0)? triplets : theMerger_->mergeTriplets( triplets, es ); unsigned int nTuplets = tuplets.size(); tracks.reserve(tracks.size()+nTuplets); // producing tracks for (unsigned int iTuplet = 0; iTuplet < nTuplets; ++iTuplet) { const SeedingHitSet & tuplet = tuplets[iTuplet]; std::vector<const TrackingRecHit *> hits; for (unsigned int iHit = 0, nHits = tuplet.size(); iHit < nHits; ++iHit) { hits.push_back( tuplet[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, tuplet)); } 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 32 of file PixelTrackReconstruction.h.
Definition at line 29 of file PixelTrackReconstruction.h.
Referenced by init(), and PixelTrackReconstruction().
Definition at line 31 of file PixelTrackReconstruction.h.
const PixelFitter* PixelTrackReconstruction::theFitter [private] |
Definition at line 30 of file PixelTrackReconstruction.h.
Definition at line 33 of file PixelTrackReconstruction.h.
Definition at line 35 of file PixelTrackReconstruction.h.
Referenced by halt(), init(), PixelTrackReconstruction(), and run().
Definition at line 34 of file PixelTrackReconstruction.h.