CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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::ProducerBase &producer)
 

Private Attributes

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

Detailed Description

Definition at line 229 of file HitTripletEDProducerT.h.

Constructor & Destructor Documentation

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

Definition at line 231 of file HitTripletEDProducerT.h.

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

Member Function Documentation

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

Definition at line 245 of file HitTripletEDProducerT.h.

References intermediateHitTriplets_, and eostools::move().

245  {
246  auto filler = intermediateHitTriplets_->beginRegion(region);
247  return std::make_tuple(&(filler.layerHitMapCache()), std::move(filler));
248  }
std::unique_ptr< IntermediateHitTriplets > intermediateHitTriplets_
def move
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 254 of file HitTripletEDProducerT.h.

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

257  {
258  if(tripletLastLayerIndex_.size() != triplets.size()) {
259  throw cms::Exception("LogicError") << "tripletLastLayerIndex_.size() " << tripletLastLayerIndex_.size()
260  << " triplets.size() " << triplets.size();
261  }
263  std::iota(tripletPermutation_.begin(), tripletPermutation_.end(), 0); // assign 0,1,2,...,N
264  std::stable_sort(tripletPermutation_.begin(), tripletPermutation_.end(), [&](size_t i, size_t j) {
266  });
267 
268  // empty triplets need to propagate here
269  filler.addTriplets(layerPair, thirdLayers, triplets, tripletLastLayerIndex_, tripletPermutation_);
270  tripletLastLayerIndex_.clear();
271  }
int i
Definition: DBlmapReader.cc:9
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)
int j
Definition: DBlmapReader.cc:9
virtual unsigned int size() const
static void hitTripletEDProducerT::ImplIntermediateHitTriplets::produces ( edm::ProducerBase producer)
inlinestatic

Definition at line 236 of file HitTripletEDProducerT.h.

References edm::ProductRegistryHelper::produces().

236  {
237  producer.produces<IntermediateHitTriplets>();
238  }
TypeLabelItem const & produces()
declare what type of product will make and with which optional label
void hitTripletEDProducerT::ImplIntermediateHitTriplets::put ( edm::Event iEvent)
inline

Definition at line 273 of file HitTripletEDProducerT.h.

References intermediateHitTriplets_, and putEmpty().

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

Definition at line 277 of file HitTripletEDProducerT.h.

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

Referenced by put().

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

Definition at line 240 of file HitTripletEDProducerT.h.

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

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

Definition at line 250 of file HitTripletEDProducerT.h.

References tripletLastLayerIndex_.

250  {
251  return &tripletLastLayerIndex_;
252  }

Member Data Documentation

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

Definition at line 282 of file HitTripletEDProducerT.h.

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

const SeedingLayerSetsHits* hitTripletEDProducerT::ImplIntermediateHitTriplets::layers_
private

Definition at line 283 of file HitTripletEDProducerT.h.

Referenced by reserve().

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

Definition at line 285 of file HitTripletEDProducerT.h.

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

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

Definition at line 284 of file HitTripletEDProducerT.h.

Referenced by fill().