CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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::ProducesCollector producesCollector)
 

Private Attributes

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

Detailed Description

Definition at line 238 of file HitTripletEDProducerT.h.

Constructor & Destructor Documentation

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

Definition at line 240 of file HitTripletEDProducerT.h.

241  : intermediateHitTriplets_(std::make_unique<IntermediateHitTriplets>(layers)), layers_(layers) {}
std::unique_ptr< IntermediateHitTriplets > intermediateHitTriplets_

Member Function Documentation

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

Definition at line 252 of file HitTripletEDProducerT.h.

References intermediateHitTriplets_.

252  {
253  auto filler = intermediateHitTriplets_->beginRegion(region);
254  return std::make_tuple(&(filler.layerHitMapCache()), filler);
255  }
std::unique_ptr< IntermediateHitTriplets > intermediateHitTriplets_
void hitTripletEDProducerT::ImplIntermediateHitTriplets::fill ( IntermediateHitTriplets::RegionFiller filler,
const IntermediateHitTriplets::LayerPair layerPair,
const std::vector< SeedingLayerSetsHits::SeedingLayer > &  thirdLayers,
const OrderedHitTriplets triplets 
)
inline

Definition at line 259 of file HitTripletEDProducerT.h.

References IntermediateHitTriplets::RegionFiller::addTriplets(), Exception, mps_fire::i, dqmiolumiharvest::j, OrderedHitTriplets::size(), tripletLastLayerIndex_, and tripletPermutation_.

262  {
263  if (tripletLastLayerIndex_.size() != triplets.size()) {
264  throw cms::Exception("LogicError") << "tripletLastLayerIndex_.size() " << tripletLastLayerIndex_.size()
265  << " triplets.size() " << triplets.size();
266  }
268  std::iota(tripletPermutation_.begin(), tripletPermutation_.end(), 0); // assign 0,1,2,...,N
269  std::stable_sort(tripletPermutation_.begin(), tripletPermutation_.end(), [&](size_t i, size_t j) {
271  });
272 
273  // empty triplets need to propagate here
274  filler.addTriplets(layerPair, thirdLayers, triplets, tripletLastLayerIndex_, tripletPermutation_);
275  tripletLastLayerIndex_.clear();
276  }
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::ProducesCollector  producesCollector)
inlinestatic

Definition at line 243 of file HitTripletEDProducerT.h.

References edm::ProducesCollector::produces().

243  {
244  producesCollector.produces<IntermediateHitTriplets>();
245  }
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
void hitTripletEDProducerT::ImplIntermediateHitTriplets::put ( edm::Event iEvent)
inline

Definition at line 278 of file HitTripletEDProducerT.h.

References intermediateHitTriplets_, and putEmpty().

278  {
279  intermediateHitTriplets_->shrink_to_fit();
280  putEmpty(iEvent);
281  }
std::unique_ptr< IntermediateHitTriplets > intermediateHitTriplets_
void hitTripletEDProducerT::ImplIntermediateHitTriplets::putEmpty ( edm::Event iEvent)
inline

Definition at line 282 of file HitTripletEDProducerT.h.

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

Referenced by put().

OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
std::unique_ptr< IntermediateHitTriplets > intermediateHitTriplets_
def move
Definition: eostools.py:511
void hitTripletEDProducerT::ImplIntermediateHitTriplets::reserve ( size_t  regionsSize,
size_t  localRAupper 
)
inline

Definition at line 247 of file HitTripletEDProducerT.h.

References intermediateHitTriplets_, layers_, SeedingLayerSetsHits::size(), and tripletLastLayerIndex_.

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

Definition at line 257 of file HitTripletEDProducerT.h.

References tripletLastLayerIndex_.

Member Data Documentation

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

Definition at line 285 of file HitTripletEDProducerT.h.

Referenced by beginRegion(), put(), putEmpty(), and reserve().

const SeedingLayerSetsHits* hitTripletEDProducerT::ImplIntermediateHitTriplets::layers_
private

Definition at line 286 of file HitTripletEDProducerT.h.

Referenced by reserve().

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

Definition at line 288 of file HitTripletEDProducerT.h.

Referenced by fill(), reserve(), and tripletLastLayerIndexVector().

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

Definition at line 287 of file HitTripletEDProducerT.h.

Referenced by fill().