#include <GenericPairGenerator.h>
Public Member Functions | |
void | clear () |
GenericPairGenerator (const edm::ParameterSet &conf) | |
virtual const OrderedSeedingHits & | run (const TrackingRegion ®ion, const edm::Event &ev, const edm::EventSetup &es) |
virtual | ~GenericPairGenerator () |
Private Member Functions | |
ctfseeding::SeedingLayerSets | init (const edm::EventSetup &es) |
Private Attributes | |
OrderedHitPairs | hitPairs |
SeedingLayerSetsBuilder | theLsb |
Definition at line 14 of file GenericPairGenerator.h.
GenericPairGenerator::GenericPairGenerator | ( | const edm::ParameterSet & | conf | ) |
Definition at line 9 of file GenericPairGenerator.cc.
: theLsb(conf.getParameter<edm::ParameterSet>("LayerPSet")){ edm::LogInfo("CtfSpecialSeedGenerator|GenericPairGenerator") << "Constructing GenericPairGenerator"; }
virtual GenericPairGenerator::~GenericPairGenerator | ( | ) | [inline, virtual] |
Definition at line 17 of file GenericPairGenerator.h.
{};
void GenericPairGenerator::clear | ( | void | ) | [inline, virtual] |
Reimplemented from OrderedHitsGenerator.
Definition at line 21 of file GenericPairGenerator.h.
References hitPairs.
{ hitPairs.clear();}
SeedingLayerSets GenericPairGenerator::init | ( | const edm::EventSetup & | es | ) | [private] |
Definition at line 15 of file GenericPairGenerator.cc.
References SeedingLayerSetsBuilder::layers(), and theLsb.
Referenced by run().
{ //edm::ParameterSet leyerPSet = conf_.getParameter<edm::ParameterSet>("LayerPSet"); //SeedingLayerSetsBuilder lsBuilder(leyerPSet); SeedingLayerSets lss = theLsb.layers(es); return lss; }
const OrderedSeedingHits & GenericPairGenerator::run | ( | const TrackingRegion & | region, |
const edm::Event & | ev, | ||
const edm::EventSetup & | es | ||
) | [virtual] |
Implements OrderedHitsGenerator.
Definition at line 23 of file GenericPairGenerator.cc.
References Exception, hitPairs, TrackingRegion::hits(), init(), and python::rootplot::utilities::ls().
{ hitPairs.clear(); hitPairs.reserve(0); SeedingLayerSets lss = init(es); SeedingLayerSets::const_iterator iLss; for (iLss = lss.begin(); iLss != lss.end(); iLss++){ SeedingLayers ls = *iLss; if (ls.size() != 2){ throw cms::Exception("CtfSpecialSeedGenerator") << "You are using " << ls.size() <<" layers in set instead of 2 "; } std::vector<SeedingHit> innerHits = region.hits(e, es, &ls[0]); std::vector<SeedingHit> outerHits = region.hits(e, es, &ls[1]); std::vector<SeedingHit>::const_iterator iOuterHit; for (iOuterHit = outerHits.begin(); iOuterHit != outerHits.end(); iOuterHit++){ std::vector<SeedingHit>::const_iterator iInnerHit; for (iInnerHit = innerHits.begin(); iInnerHit != innerHits.end(); iInnerHit++){ hitPairs.push_back(OrderedHitPair(*iInnerHit, *iOuterHit)); } } } return hitPairs; }
Definition at line 26 of file GenericPairGenerator.h.
Definition at line 25 of file GenericPairGenerator.h.
Referenced by init().