CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CosmicHitTripletGenerator.cc
Go to the documentation of this file.
4 
5 #include <vector>
6 
7 using namespace std;
8 
10  const edm::EventSetup& iSetup)
11 {
12  // vector<LayerTriplets::LayerTriplet> layerTriplets = layers();
13  vector<CosmicLayerTriplets::LayerPairAndLayers> layerTriplets = layers.layers();
14  vector<CosmicLayerTriplets::LayerPairAndLayers>::const_iterator it;
15  for (it = layerTriplets.begin(); it != layerTriplets.end(); it++) {
16  vector<const LayerWithHits*>::const_iterator ilwh;
17  for(ilwh=(*it).second.begin();ilwh!=(*it).second.end();ilwh++){
18  // const LayerWithHits* first=(*it).first.first;
19 // const LayerWithHits* second=(*it).first.second;
20 // const LayerWithHits* third=(*ilwh);
21  // add( (*it).first.first, (*it).first.second, (*it).second,iSetup);
22  add( (*it).first.first, (*it).first.second, (*ilwh),iSetup);
23  }
24  }
25 
26 }
27 
28 
29 
31 {
32  Container::const_iterator it;
33  for (it = theGenerators.begin(); it!= theGenerators.end(); it++) {
34  delete (*it);
35  }
36 }
37 
38 
40  const LayerWithHits *inner,
41  const LayerWithHits* middle,
42  const LayerWithHits *outer,
43  const edm::EventSetup& iSetup)
44 {
45  theGenerators.push_back(
46  new CosmicHitTripletGeneratorFromLayerTriplet( inner,middle, outer, iSetup));
47 }
48 
50  const TrackingRegion& region,
51  OrderedHitTriplets & pairs,
52  const edm::EventSetup& iSetup)
53 {
54 
55  Container::const_iterator i;
56  for (i=theGenerators.begin(); i!=theGenerators.end(); i++) {
57  (**i).hitTriplets( region, pairs, iSetup);
58  }
59 
60 }
61 
62 
CosmicHitTripletGenerator(CosmicLayerTriplets &layers, const edm::EventSetup &iSetup)
int i
Definition: DBlmapReader.cc:9
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
virtual void hitTriplets(const TrackingRegion &reg, OrderedHitTriplets &prs, const edm::EventSetup &iSetup)
form base class
std::vector< LayerPairAndLayers > layers()
void add(const LayerWithHits *inner, const LayerWithHits *middle, const LayerWithHits *outer, const edm::EventSetup &iSetup)
add generators based on layers