#include <CombinedHitPairGeneratorForPhotonConversion.h>
Hides set of HitPairGeneratorFromLayerPairForPhotonConversion generators.
Definition at line 26 of file CombinedHitPairGeneratorForPhotonConversion.h.
typedef std::vector<HitPairGeneratorFromLayerPairForPhotonConversion *> CombinedHitPairGeneratorForPhotonConversion::Container [private] |
Definition at line 71 of file CombinedHitPairGeneratorForPhotonConversion.h.
Definition at line 28 of file CombinedHitPairGeneratorForPhotonConversion.h.
CombinedHitPairGeneratorForPhotonConversion::CombinedHitPairGeneratorForPhotonConversion | ( | const edm::ParameterSet & | cfg | ) |
Definition at line 14 of file CombinedHitPairGeneratorForPhotonConversion.cc.
References edm::ParameterSet::getParameter(), maxHitPairsPerTrackAndGenerator, and OrderedHitsGenerator::theMaxElement.
Referenced by clone().
: initialised(false), theConfig(cfg) { theMaxElement = cfg.getParameter<unsigned int>("maxElement"); maxHitPairsPerTrackAndGenerator = cfg.getParameter<unsigned int>("maxHitPairsPerTrackAndGenerator"); }
CombinedHitPairGeneratorForPhotonConversion::~CombinedHitPairGeneratorForPhotonConversion | ( | ) | [virtual] |
Definition at line 55 of file CombinedHitPairGeneratorForPhotonConversion.cc.
References cleanup().
{ cleanup(); }
CombinedHitPairGeneratorForPhotonConversion::CombinedHitPairGeneratorForPhotonConversion | ( | const CombinedHitPairGeneratorForPhotonConversion & | cb | ) | [private] |
void CombinedHitPairGeneratorForPhotonConversion::add | ( | const ctfseeding::SeedingLayer & | inner, |
const ctfseeding::SeedingLayer & | outer | ||
) |
Definition at line 57 of file CombinedHitPairGeneratorForPhotonConversion.cc.
References maxHitPairsPerTrackAndGenerator, theGenerators, and theLayerCache.
Referenced by init().
{ theGenerators.push_back( new HitPairGeneratorFromLayerPairForPhotonConversion( inner, outer, &theLayerCache, 0, maxHitPairsPerTrackAndGenerator)); }
void CombinedHitPairGeneratorForPhotonConversion::cleanup | ( | void | ) | [private] |
Definition at line 46 of file CombinedHitPairGeneratorForPhotonConversion.cc.
References theGenerators.
Referenced by hitPairs(), and ~CombinedHitPairGeneratorForPhotonConversion().
{ Container::const_iterator it; for (it = theGenerators.begin(); it!= theGenerators.end(); it++) { delete (*it); } theGenerators.clear(); }
void CombinedHitPairGeneratorForPhotonConversion::clearLayerCache | ( | ) | [inline] |
Definition at line 53 of file CombinedHitPairGeneratorForPhotonConversion.h.
References LayerHitMapCache::clear(), and theLayerCache.
Referenced by PhotonConversionTrajectorySeedProducerFromSingleLegAlgo::analyze().
{theLayerCache.clear();}
virtual CombinedHitPairGeneratorForPhotonConversion* CombinedHitPairGeneratorForPhotonConversion::clone | ( | void | ) | const [inline, virtual] |
from base class
Implements HitPairGenerator.
Definition at line 41 of file CombinedHitPairGeneratorForPhotonConversion.h.
References CombinedHitPairGeneratorForPhotonConversion(), and theConfig.
{ return new CombinedHitPairGeneratorForPhotonConversion(theConfig); }
virtual void CombinedHitPairGeneratorForPhotonConversion::hitPairs | ( | const TrackingRegion & | , |
OrderedHitPairs & | , | ||
const edm::Event & | , | ||
const edm::EventSetup & | |||
) | [inline, virtual] |
form base class
Implements HitPairGenerator.
Definition at line 38 of file CombinedHitPairGeneratorForPhotonConversion.h.
Referenced by run().
{};
void CombinedHitPairGeneratorForPhotonConversion::hitPairs | ( | const ConversionRegion & | convRegion, |
const TrackingRegion & | reg, | ||
OrderedHitPairs & | result, | ||
const edm::Event & | ev, | ||
const edm::EventSetup & | es | ||
) |
Definition at line 72 of file CombinedHitPairGeneratorForPhotonConversion.cc.
References edm::ESWatcher< T >::check(), cleanup(), i, init(), initialised, maxHitPairsPerTrackAndGenerator, OrderedHitPairs::size(), theConfig, theESWatcher, theGenerators, and OrderedHitsGenerator::theMaxElement.
{ if (theESWatcher.check(es) || !initialised ) { cleanup(); init(theConfig,es); } Container::const_iterator i; OrderedHitPairs resultTmp; resultTmp.reserve(maxHitPairsPerTrackAndGenerator); for (i=theGenerators.begin(); i!=theGenerators.end() && result.size() < theMaxElement; i++) { resultTmp.clear(); (**i).hitPairs(convRegion, region, resultTmp, ev, es); result.insert(result.end(),resultTmp.begin(),resultTmp.end()); } //theLayerCache.clear(); //Don't want to clear now, because have to loop on all the tracks. will be cleared later, calling a specific method }
void CombinedHitPairGeneratorForPhotonConversion::init | ( | const edm::ParameterSet & | cfg, |
const edm::EventSetup & | es | ||
) | [private] |
Definition at line 22 of file CombinedHitPairGeneratorForPhotonConversion.cc.
References edm::EventSetup::get(), edm::ParameterSet::getParameter(), init(), maxHitPairsPerTrackAndGenerator, AlCaHLTBitMon_QueryRunRegistry::string, and OrderedHitsGenerator::theMaxElement.
{ theMaxElement = cfg.getParameter<unsigned int>("maxElement"); maxHitPairsPerTrackAndGenerator = cfg.getParameter<unsigned int>("maxHitPairsPerTrackAndGenerator"); std::string layerBuilderName = cfg.getParameter<std::string>("SeedingLayers"); edm::ESHandle<SeedingLayerSetsBuilder> layerBuilder; es.get<TrackerDigiGeometryRecord>().get(layerBuilderName, layerBuilder); SeedingLayerSets layerSets = layerBuilder->layers(es); init(layerSets); }
void CombinedHitPairGeneratorForPhotonConversion::init | ( | const ctfseeding::SeedingLayerSets & | layerSets | ) | [private] |
Definition at line 35 of file CombinedHitPairGeneratorForPhotonConversion.cc.
References add(), initialised, and findQualityFiles::size.
Referenced by hitPairs(), and init().
{ initialised = true; typedef SeedingLayerSets::const_iterator IL; for (IL il=layerSets.begin(), ilEnd=layerSets.end(); il != ilEnd; ++il) { const SeedingLayers & set = *il; if (set.size() != 2) continue; add( set[0], set[1] ); } }
const OrderedHitPairs & CombinedHitPairGeneratorForPhotonConversion::run | ( | const ConversionRegion & | convRegion, |
const TrackingRegion & | region, | ||
const edm::Event & | ev, | ||
const edm::EventSetup & | es | ||
) |
Definition at line 62 of file CombinedHitPairGeneratorForPhotonConversion.cc.
References hitPairs(), and thePairs.
Referenced by PhotonConversionTrajectorySeedProducerFromSingleLegAlgo::inspectTrack().
bool CombinedHitPairGeneratorForPhotonConversion::initialised [mutable, private] |
Definition at line 63 of file CombinedHitPairGeneratorForPhotonConversion.h.
Referenced by hitPairs(), and init().
uint32_t CombinedHitPairGeneratorForPhotonConversion::maxHitPairsPerTrackAndGenerator [private] |
Definition at line 65 of file CombinedHitPairGeneratorForPhotonConversion.h.
Referenced by add(), CombinedHitPairGeneratorForPhotonConversion(), hitPairs(), and init().
Definition at line 64 of file CombinedHitPairGeneratorForPhotonConversion.h.
Referenced by clone(), and hitPairs().
edm::ESWatcher<TrackerDigiGeometryRecord> CombinedHitPairGeneratorForPhotonConversion::theESWatcher [private] |
Definition at line 69 of file CombinedHitPairGeneratorForPhotonConversion.h.
Referenced by hitPairs().
Definition at line 72 of file CombinedHitPairGeneratorForPhotonConversion.h.
Referenced by add(), cleanup(), and hitPairs().
Definition at line 67 of file CombinedHitPairGeneratorForPhotonConversion.h.
Referenced by add(), and clearLayerCache().
Reimplemented from HitPairGenerator.
Definition at line 74 of file CombinedHitPairGeneratorForPhotonConversion.h.
Referenced by run().