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::ProducesCollector producesCollector)
 

Private Attributes

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

Detailed Description

Definition at line 238 of file HitTripletEDProducerT.h.

Constructor & Destructor Documentation

◆ ImplIntermediateHitTriplets()

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

◆ beginRegion()

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

Definition at line 252 of file HitTripletEDProducerT.h.

References trigObjTnPSource_cfi::filler, intermediateHitTriplets_, and HLT_2023v12_cff::region.

252  {
253  auto filler = intermediateHitTriplets_->beginRegion(region);
254  return std::make_tuple(&(filler.layerHitMapCache()), filler);
255  }
std::unique_ptr< IntermediateHitTriplets > intermediateHitTriplets_

◆ fill()

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 Exception, trigObjTnPSource_cfi::filler, 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  }
unsigned int size() const override

◆ produces()

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()

◆ put()

void hitTripletEDProducerT::ImplIntermediateHitTriplets::put ( edm::Event iEvent)
inline

Definition at line 278 of file HitTripletEDProducerT.h.

References iEvent, intermediateHitTriplets_, and putEmpty().

278  {
279  intermediateHitTriplets_->shrink_to_fit();
280  putEmpty(iEvent);
281  }
int iEvent
Definition: GenABIO.cc:224
std::unique_ptr< IntermediateHitTriplets > intermediateHitTriplets_

◆ putEmpty()

void hitTripletEDProducerT::ImplIntermediateHitTriplets::putEmpty ( edm::Event iEvent)
inline

Definition at line 282 of file HitTripletEDProducerT.h.

References iEvent, intermediateHitTriplets_, and eostools::move().

Referenced by put().

int iEvent
Definition: GenABIO.cc:224
std::unique_ptr< IntermediateHitTriplets > intermediateHitTriplets_
def move(src, dest)
Definition: eostools.py:511

◆ reserve()

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  }
unsigned short size() const
Get the number of SeedingLayerSets.
std::unique_ptr< IntermediateHitTriplets > intermediateHitTriplets_

◆ tripletLastLayerIndexVector()

std::vector<int>* hitTripletEDProducerT::ImplIntermediateHitTriplets::tripletLastLayerIndexVector ( )
inline

Definition at line 257 of file HitTripletEDProducerT.h.

References tripletLastLayerIndex_.

Member Data Documentation

◆ intermediateHitTriplets_

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

Definition at line 285 of file HitTripletEDProducerT.h.

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

◆ layers_

const SeedingLayerSetsHits* hitTripletEDProducerT::ImplIntermediateHitTriplets::layers_
private

Definition at line 286 of file HitTripletEDProducerT.h.

Referenced by reserve().

◆ tripletLastLayerIndex_

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

Definition at line 288 of file HitTripletEDProducerT.h.

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

◆ tripletPermutation_

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

Definition at line 287 of file HitTripletEDProducerT.h.

Referenced by fill().