CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
GenericPairGenerator Class Reference

#include <GenericPairGenerator.h>

Inheritance diagram for GenericPairGenerator:
OrderedHitsGenerator

Public Member Functions

void clear ()
 
 GenericPairGenerator (const edm::ParameterSet &conf, edm::ConsumesCollector &iC)
 
virtual const OrderedSeedingHitsrun (const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es)
 
virtual ~GenericPairGenerator ()
 
- Public Member Functions inherited from OrderedHitsGenerator
 OrderedHitsGenerator ()
 
virtual ~OrderedHitsGenerator ()
 

Private Attributes

OrderedHitPairs hitPairs
 
SeedingLayerSetsBuilder theLsb
 
ctfseeding::SeedingLayerSets theLss
 

Additional Inherited Members

- Public Attributes inherited from OrderedHitsGenerator
unsigned int theMaxElement
 

Detailed Description

Definition at line 14 of file GenericPairGenerator.h.

Constructor & Destructor Documentation

GenericPairGenerator::GenericPairGenerator ( const edm::ParameterSet conf,
edm::ConsumesCollector iC 
)

Definition at line 9 of file GenericPairGenerator.cc.

9  :
10  theLsb(conf.getParameter<edm::ParameterSet>("LayerPSet"), iC){
11  edm::LogInfo("CtfSpecialSeedGenerator|GenericPairGenerator") << "Constructing GenericPairGenerator";
12 }
T getParameter(std::string const &) const
SeedingLayerSetsBuilder theLsb
virtual GenericPairGenerator::~GenericPairGenerator ( )
inlinevirtual

Definition at line 17 of file GenericPairGenerator.h.

17 {};

Member Function Documentation

void GenericPairGenerator::clear ( void  )
inlinevirtual

Reimplemented from OrderedHitsGenerator.

Definition at line 21 of file GenericPairGenerator.h.

References hitPairs.

21 { hitPairs.clear();}
const OrderedSeedingHits & GenericPairGenerator::run ( const TrackingRegion region,
const edm::Event ev,
const edm::EventSetup es 
)
virtual

Implements OrderedHitsGenerator.

Definition at line 15 of file GenericPairGenerator.cc.

References SeedingLayerSetsBuilder::check(), edm::hlt::Exception, hitPairs, TrackingRegion::hits(), SeedingLayerSetsBuilder::layers(), python.rootplot.utilities::ls(), theLsb, and theLss.

17  {
18  hitPairs.clear();
19  hitPairs.reserve(0);
20  if(theLsb.check(es)) {
21  theLss = theLsb.layers(es);
22  }
23  SeedingLayerSets::const_iterator iLss;
24  for (iLss = theLss.begin(); iLss != theLss.end(); iLss++){
25  SeedingLayers ls = *iLss;
26  if (ls.size() != 2){
27  throw cms::Exception("CtfSpecialSeedGenerator") << "You are using " << ls.size() <<" layers in set instead of 2 ";
28  }
29  std::vector<SeedingHit> innerHits = region.hits(e, es, &ls[0]);
30  std::vector<SeedingHit> outerHits = region.hits(e, es, &ls[1]);
31  std::vector<SeedingHit>::const_iterator iOuterHit;
32  for (iOuterHit = outerHits.begin(); iOuterHit != outerHits.end(); iOuterHit++){
33  std::vector<SeedingHit>::const_iterator iInnerHit;
34  for (iInnerHit = innerHits.begin(); iInnerHit != innerHits.end(); iInnerHit++){
35  hitPairs.push_back(OrderedHitPair(*iInnerHit,
36  *iOuterHit));
37  }
38  }
39  }
40  return hitPairs;
41 }
ctfseeding::SeedingLayerSets layers(const edm::EventSetup &es)
virtual Hits hits(const edm::Event &ev, const edm::EventSetup &es, const ctfseeding::SeedingLayer *layer) const =0
get hits from layer compatible with region constraints
SeedingLayerSetsBuilder theLsb
bool check(const edm::EventSetup &es)
ctfseeding::SeedingLayerSets theLss
std::vector< SeedingLayer > SeedingLayers

Member Data Documentation

OrderedHitPairs GenericPairGenerator::hitPairs
private

Definition at line 25 of file GenericPairGenerator.h.

Referenced by clear(), and run().

SeedingLayerSetsBuilder GenericPairGenerator::theLsb
private

Definition at line 23 of file GenericPairGenerator.h.

Referenced by run().

ctfseeding::SeedingLayerSets GenericPairGenerator::theLss
private

Definition at line 24 of file GenericPairGenerator.h.

Referenced by run().