#include <LayerTriplets.h>
Public Types | |
typedef std::pair < SeedingLayerPair, std::vector < ctfseeding::SeedingLayer > > | LayerPairAndLayers |
typedef std::pair < ctfseeding::SeedingLayer, ctfseeding::SeedingLayer > | SeedingLayerPair |
Public Member Functions | |
std::vector< LayerPairAndLayers > | layers () const |
LayerTriplets (const ctfseeding::SeedingLayerSets &sets) | |
Private Attributes | |
ctfseeding::SeedingLayerSets | theSets |
A class grouping pixel layers in pairs and associating a vector of layers to each layer pair. The layer pair is used to generate hit pairs and the associated vector of layers to generate a third hit confirming layer pair
Definition at line 14 of file LayerTriplets.h.
typedef std::pair<SeedingLayerPair, std::vector<ctfseeding::SeedingLayer> > LayerTriplets::LayerPairAndLayers |
Definition at line 17 of file LayerTriplets.h.
typedef std::pair<ctfseeding::SeedingLayer, ctfseeding::SeedingLayer> LayerTriplets::SeedingLayerPair |
Definition at line 16 of file LayerTriplets.h.
LayerTriplets::LayerTriplets | ( | const ctfseeding::SeedingLayerSets & | sets | ) | [inline] |
Definition at line 19 of file LayerTriplets.h.
: theSets(sets) {}
std::vector< LayerTriplets::LayerPairAndLayers > LayerTriplets::layers | ( | ) | const |
Definition at line 4 of file LayerTriplets.cc.
References query::result, and findQualityFiles::size.
Referenced by CombinedHitTripletGenerator::init().
{ std::vector<LayerPairAndLayers> result; typedef std::vector<LayerPairAndLayers>::iterator IR; typedef SeedingLayerSets::const_iterator IL; for (IL il=theSets.begin(), ilEnd= theSets.end(); il != ilEnd; ++il) { const SeedingLayers & set = *il; if (set.size() != 3) continue; SeedingLayerPair layerPair = std::make_pair(set[0], set[1]); bool added = false; for (IR ir = result.begin(); ir < result.end(); ++ir) { const SeedingLayerPair & resPair = ir->first; if (resPair.first ==layerPair.first && resPair.second == layerPair.second) { std::vector<SeedingLayer> & thirds = ir->second; thirds.push_back( set[2] ); added = true; break; } } if (!added) { LayerPairAndLayers lpl = std::make_pair(layerPair, std::vector<SeedingLayer>(1, set[2]) ); result.push_back(lpl); } } return result; }
Definition at line 24 of file LayerTriplets.h.