CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
hitTripletEDProducerT::ImplIntermediateHitTriplets Class Reference

#include <HitTripletEDProducerT.h>

Public Member Functions

auto beginRegion (const TrackingRegion *region, LayerHitMapCache *)
 
void fill (IntermediateHitTriplets::RegionFiller &filler, const IntermediateHitTriplets::LayerPair &layerPair, const std::vector< SeedingLayerSetsHits::SeedingLayer > &thirdLayers, const OrderedHitTriplets &triplets)
 
 ImplIntermediateHitTriplets (const SeedingLayerSetsHits *layers)
 
void put (edm::Event &iEvent)
 
void putEmpty (edm::Event &iEvent)
 
void reserve (size_t regionsSize, size_t localRAupper)
 
std::vector< int > * tripletLastLayerIndexVector ()
 

Static Public Member Functions

static void produces (edm::ProducerBase &producer)
 

Private Attributes

std::unique_ptr< IntermediateHitTripletsintermediateHitTriplets_
 
const SeedingLayerSetsHitslayers_
 
std::vector< int > tripletLastLayerIndex_
 
std::vector< size_t > tripletPermutation_
 

Detailed Description

Definition at line 231 of file HitTripletEDProducerT.h.

Constructor & Destructor Documentation

hitTripletEDProducerT::ImplIntermediateHitTriplets::ImplIntermediateHitTriplets ( const SeedingLayerSetsHits layers)
inlineexplicit

Definition at line 233 of file HitTripletEDProducerT.h.

233  :
234  intermediateHitTriplets_(std::make_unique<IntermediateHitTriplets>(layers)),
235  layers_(layers)
236  {}
std::unique_ptr< IntermediateHitTriplets > intermediateHitTriplets_

Member Function Documentation

auto hitTripletEDProducerT::ImplIntermediateHitTriplets::beginRegion ( const TrackingRegion region,
LayerHitMapCache  
)
inline

Definition at line 247 of file HitTripletEDProducerT.h.

References objects.autophobj::filler, and eostools::move().

247  {
248  auto filler = intermediateHitTriplets_->beginRegion(region);
249  return std::make_tuple(&(filler.layerHitMapCache()), std::move(filler));
250  }
std::unique_ptr< IntermediateHitTriplets > intermediateHitTriplets_
def move(src, dest)
Definition: eostools.py:510
void hitTripletEDProducerT::ImplIntermediateHitTriplets::fill ( IntermediateHitTriplets::RegionFiller filler,
const IntermediateHitTriplets::LayerPair layerPair,
const std::vector< SeedingLayerSetsHits::SeedingLayer > &  thirdLayers,
const OrderedHitTriplets triplets 
)
inline

Definition at line 256 of file HitTripletEDProducerT.h.

References IntermediateHitTriplets::RegionFiller::addTriplets(), Exception, mps_fire::i, and OrderedHitTriplets::size().

259  {
260  if(tripletLastLayerIndex_.size() != triplets.size()) {
261  throw cms::Exception("LogicError") << "tripletLastLayerIndex_.size() " << tripletLastLayerIndex_.size()
262  << " triplets.size() " << triplets.size();
263  }
265  std::iota(tripletPermutation_.begin(), tripletPermutation_.end(), 0); // assign 0,1,2,...,N
266  std::stable_sort(tripletPermutation_.begin(), tripletPermutation_.end(), [&](size_t i, size_t j) {
268  });
269 
270  // empty triplets need to propagate here
271  filler.addTriplets(layerPair, thirdLayers, triplets, tripletLastLayerIndex_, tripletPermutation_);
272  tripletLastLayerIndex_.clear();
273  }
void addTriplets(const LayerPair &layerPair, const std::vector< SeedingLayerSetsHits::SeedingLayer > &thirdLayers, const OrderedHitTriplets &triplets, const std::vector< int > &thirdLayerIndex, const std::vector< size_t > &permutations)
unsigned int size() const override
static void hitTripletEDProducerT::ImplIntermediateHitTriplets::produces ( edm::ProducerBase producer)
inlinestatic

Definition at line 238 of file HitTripletEDProducerT.h.

References edm::ProductRegistryHelper::produces().

238  {
239  producer.produces<IntermediateHitTriplets>();
240  }
BranchAliasSetterT< ProductType > produces()
declare what type of product will make and with which optional label
void hitTripletEDProducerT::ImplIntermediateHitTriplets::put ( edm::Event iEvent)
inline

Definition at line 275 of file HitTripletEDProducerT.h.

275  {
276  intermediateHitTriplets_->shrink_to_fit();
277  putEmpty(iEvent);
278  }
std::unique_ptr< IntermediateHitTriplets > intermediateHitTriplets_
void hitTripletEDProducerT::ImplIntermediateHitTriplets::putEmpty ( edm::Event iEvent)
inline

Definition at line 279 of file HitTripletEDProducerT.h.

References eostools::move(), and edm::Event::put().

279  {
281  }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:127
std::unique_ptr< IntermediateHitTriplets > intermediateHitTriplets_
def move(src, dest)
Definition: eostools.py:510
void hitTripletEDProducerT::ImplIntermediateHitTriplets::reserve ( size_t  regionsSize,
size_t  localRAupper 
)
inline

Definition at line 242 of file HitTripletEDProducerT.h.

242  {
243  intermediateHitTriplets_->reserve(regionsSize, layers_->size(), localRAupper);
244  tripletLastLayerIndex_.reserve(localRAupper);
245  }
std::unique_ptr< IntermediateHitTriplets > intermediateHitTriplets_
unsigned short size() const
Get the number of SeedingLayerSets.
std::vector<int>* hitTripletEDProducerT::ImplIntermediateHitTriplets::tripletLastLayerIndexVector ( )
inline

Definition at line 252 of file HitTripletEDProducerT.h.

252  {
253  return &tripletLastLayerIndex_;
254  }

Member Data Documentation

std::unique_ptr<IntermediateHitTriplets> hitTripletEDProducerT::ImplIntermediateHitTriplets::intermediateHitTriplets_
private

Definition at line 284 of file HitTripletEDProducerT.h.

const SeedingLayerSetsHits* hitTripletEDProducerT::ImplIntermediateHitTriplets::layers_
private

Definition at line 285 of file HitTripletEDProducerT.h.

std::vector<int> hitTripletEDProducerT::ImplIntermediateHitTriplets::tripletLastLayerIndex_
private

Definition at line 287 of file HitTripletEDProducerT.h.

std::vector<size_t> hitTripletEDProducerT::ImplIntermediateHitTriplets::tripletPermutation_
private

Definition at line 286 of file HitTripletEDProducerT.h.