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) {}

Member Function Documentation

◆ beginRegion()

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

Definition at line 252 of file HitTripletEDProducerT.h.

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

References trigObjTnPSource_cfi::filler, intermediateHitTriplets_, eostools::move(), and HLT_FULL_cff::region.

◆ 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.

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  }

References Exception, trigObjTnPSource_cfi::filler, mps_fire::i, dqmiolumiharvest::j, OrderedHitTriplets::size(), tripletLastLayerIndex_, and tripletPermutation_.

◆ produces()

static void hitTripletEDProducerT::ImplIntermediateHitTriplets::produces ( edm::ProducesCollector  producesCollector)
inlinestatic

Definition at line 243 of file HitTripletEDProducerT.h.

243  {
244  producesCollector.produces<IntermediateHitTriplets>();
245  }

References edm::ProducesCollector::produces().

◆ put()

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

Definition at line 278 of file HitTripletEDProducerT.h.

278  {
279  intermediateHitTriplets_->shrink_to_fit();
280  putEmpty(iEvent);
281  }

References iEvent, intermediateHitTriplets_, and putEmpty().

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

◆ reserve()

void hitTripletEDProducerT::ImplIntermediateHitTriplets::reserve ( size_t  regionsSize,
size_t  localRAupper 
)
inline

Definition at line 247 of file HitTripletEDProducerT.h.

247  {
248  intermediateHitTriplets_->reserve(regionsSize, layers_->size(), localRAupper);
249  tripletLastLayerIndex_.reserve(localRAupper);
250  }

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

◆ tripletLastLayerIndexVector()

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

Definition at line 257 of file HitTripletEDProducerT.h.

257 { return &tripletLastLayerIndex_; }

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

hitTripletEDProducerT::ImplIntermediateHitTriplets::intermediateHitTriplets_
std::unique_ptr< IntermediateHitTriplets > intermediateHitTriplets_
Definition: HitTripletEDProducerT.h:285
mps_fire.i
i
Definition: mps_fire.py:428
SeedingLayerSetsHits::size
unsigned short size() const
Get the number of SeedingLayerSets.
Definition: SeedingLayerSetsHits.h:199
hitTripletEDProducerT::ImplIntermediateHitTriplets::putEmpty
void putEmpty(edm::Event &iEvent)
Definition: HitTripletEDProducerT.h:282
hitTripletEDProducerT::ImplIntermediateHitTriplets::tripletPermutation_
std::vector< size_t > tripletPermutation_
Definition: HitTripletEDProducerT.h:287
hitTripletEDProducerT::ImplIntermediateHitTriplets::layers_
const SeedingLayerSetsHits * layers_
Definition: HitTripletEDProducerT.h:286
IntermediateHitTriplets
Definition: IntermediateHitTriplets.h:22
trigObjTnPSource_cfi.filler
filler
Definition: trigObjTnPSource_cfi.py:21
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88338
iEvent
int iEvent
Definition: GenABIO.cc:224
hitTripletEDProducerT::ImplIntermediateHitTriplets::tripletLastLayerIndex_
std::vector< int > tripletLastLayerIndex_
Definition: HitTripletEDProducerT.h:288
OrderedHitTriplets::size
unsigned int size() const override
Definition: OrderedHitTriplets.h:13
edm::ProducesCollector::produces
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
Definition: ProducesCollector.h:52
eostools.move
def move(src, dest)
Definition: eostools.py:511
Exception
Definition: hltDiff.cc:246
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
hgcalTopologyTester_cfi.layers
layers
Definition: hgcalTopologyTester_cfi.py:8