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 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)
 
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 Member Functions

ctfseeding::SeedingLayerSets init (const edm::EventSetup &es)
 

Private Attributes

OrderedHitPairs hitPairs
 
SeedingLayerSetsBuilder theLsb
 

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)

Definition at line 9 of file GenericPairGenerator.cc.

9  :
10  theLsb(conf.getParameter<edm::ParameterSet>("LayerPSet")){
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();}
SeedingLayerSets GenericPairGenerator::init ( const edm::EventSetup es)
private

Definition at line 15 of file GenericPairGenerator.cc.

References SeedingLayerSetsBuilder::layers(), and theLsb.

Referenced by run().

15  {
16  //edm::ParameterSet leyerPSet = conf_.getParameter<edm::ParameterSet>("LayerPSet");
17  //SeedingLayerSetsBuilder lsBuilder(leyerPSet);
18  SeedingLayerSets lss = theLsb.layers(es);
19  return lss;
20 }
SeedingLayerSetsBuilder theLsb
ctfseeding::SeedingLayerSets layers(const edm::EventSetup &es) const
std::vector< std::vector< SeedingLayer > > SeedingLayerSets
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 edm::hlt::Exception, hitPairs, TrackingRegion::hits(), init(), and python.rootplot.utilities::ls().

25  {
26  hitPairs.clear();
27  hitPairs.reserve(0);
28  SeedingLayerSets lss = init(es);
29  SeedingLayerSets::const_iterator iLss;
30  for (iLss = lss.begin(); iLss != lss.end(); iLss++){
31  SeedingLayers ls = *iLss;
32  if (ls.size() != 2){
33  throw cms::Exception("CtfSpecialSeedGenerator") << "You are using " << ls.size() <<" layers in set instead of 2 ";
34  }
35  std::vector<SeedingHit> innerHits = region.hits(e, es, &ls[0]);
36  std::vector<SeedingHit> outerHits = region.hits(e, es, &ls[1]);
37  std::vector<SeedingHit>::const_iterator iOuterHit;
38  for (iOuterHit = outerHits.begin(); iOuterHit != outerHits.end(); iOuterHit++){
39  std::vector<SeedingHit>::const_iterator iInnerHit;
40  for (iInnerHit = innerHits.begin(); iInnerHit != innerHits.end(); iInnerHit++){
41  hitPairs.push_back(OrderedHitPair(*iInnerHit,
42  *iOuterHit));
43  }
44  }
45  }
46  return hitPairs;
47 }
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
ctfseeding::SeedingLayerSets init(const edm::EventSetup &es)
std::vector< SeedingLayer > SeedingLayers
std::vector< std::vector< SeedingLayer > > SeedingLayerSets

Member Data Documentation

OrderedHitPairs GenericPairGenerator::hitPairs
private

Definition at line 26 of file GenericPairGenerator.h.

Referenced by clear(), and run().

SeedingLayerSetsBuilder GenericPairGenerator::theLsb
private

Definition at line 25 of file GenericPairGenerator.h.

Referenced by init().