CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
PixelInactiveAreaFinder::InactiveAreas Class Reference

#include <PixelInactiveAreaFinder.h>

Public Types

template<typename T >
using VecArray2 = edm::VecArray< T, 2 >
 

Public Member Functions

std::vector< std::pair< VecArray2< Area >, std::vector< LayerSetIndex > > > areasAndLayerSets (const GlobalPoint &point, float zwidth) const
 
 InactiveAreas (const std::vector< SeedingLayerId > *inactiveLayers, std::vector< DetGroupSpanContainer > &&inactiveSpans, const std::vector< std::pair< unsigned short, unsigned short > > *inactiveLayerPairIndices, const std::vector< std::vector< LayerSetIndex > > *layerSetIndexInactiveToActive)
 
std::vector< std::pair< VecArray2< DetGroupSpan >, std::vector< LayerSetIndex > > > spansAndLayerSets (const GlobalPoint &point, float zwidth) const
 

Private Attributes

const std::vector< std::pair< unsigned short, unsigned short > > * inactiveLayerPairIndices_
 
const std::vector< SeedingLayerId > * inactiveLayers_
 
std::vector< DetGroupSpanContainerinactiveSpans_
 
const std::vector< std::vector< LayerSetIndex > > * layerSetIndexInactiveToActive_
 

Detailed Description

Definition at line 40 of file PixelInactiveAreaFinder.h.

Member Typedef Documentation

◆ VecArray2

Definition at line 54 of file PixelInactiveAreaFinder.h.

Constructor & Destructor Documentation

◆ InactiveAreas()

PixelInactiveAreaFinder::InactiveAreas::InactiveAreas ( const std::vector< SeedingLayerId > *  inactiveLayers,
std::vector< DetGroupSpanContainer > &&  inactiveSpans,
const std::vector< std::pair< unsigned short, unsigned short > > *  inactiveLayerPairIndices,
const std::vector< std::vector< LayerSetIndex > > *  layerSetIndexInactiveToActive 
)
inline

Definition at line 42 of file PixelInactiveAreaFinder.h.

46  : inactiveLayers_(inactiveLayers),
47  inactiveSpans_(std::move(inactiveSpans)),
48  inactiveLayerPairIndices_(inactiveLayerPairIndices),
49  layerSetIndexInactiveToActive_(layerSetIndexInactiveToActive) {}
const std::vector< std::pair< unsigned short, unsigned short > > * inactiveLayerPairIndices_
const std::vector< std::vector< LayerSetIndex > > * layerSetIndexInactiveToActive_
const std::vector< SeedingLayerId > * inactiveLayers_
std::vector< DetGroupSpanContainer > inactiveSpans_
def move(src, dest)
Definition: eostools.py:511

Member Function Documentation

◆ areasAndLayerSets()

std::vector< std::pair< edm::VecArray< PixelInactiveAreaFinder::Area, 2 >, std::vector< PixelInactiveAreaFinder::LayerSetIndex > > > PixelInactiveAreaFinder::InactiveAreas::areasAndLayerSets ( const GlobalPoint point,
float  zwidth 
) const

Definition at line 370 of file PixelInactiveAreaFinder.cc.

References edm::VecArray< T, N >::emplace_back(), B2GTnPMonitor_cfi::item, eostools::move(), point, runTheMatrix::ret, and spansAndLayerSets().

Referenced by PixelInactiveAreaTrackingRegionsSeedingLayersProducer::produce().

370  {
371  auto spansLayerSets = spansAndLayerSets(point, zwidth);
372 
373  // TODO: try to remove this conversion...
374  std::vector<std::pair<VecArray2<Area>, std::vector<LayerSetIndex>>> ret;
375  for (auto& item : spansLayerSets) {
376  auto& innerSpan = item.first[0];
377  auto& outerSpan = item.first[1];
378  VecArray2<Area> areas;
379  areas.emplace_back(innerSpan.rSpan.first,
380  innerSpan.rSpan.second,
381  innerSpan.phiSpan.first,
382  innerSpan.phiSpan.second,
383  innerSpan.zSpan.first,
384  innerSpan.zSpan.second);
385  areas.emplace_back(outerSpan.rSpan.first,
386  outerSpan.rSpan.second,
387  outerSpan.phiSpan.first,
388  outerSpan.phiSpan.second,
389  outerSpan.zSpan.first,
390  outerSpan.zSpan.second);
391  ret.emplace_back(areas, std::move(item.second));
392  }
393 
394  return ret;
395 }
ret
prodAgent to be discontinued
std::vector< std::pair< VecArray2< DetGroupSpan >, std::vector< LayerSetIndex > > > spansAndLayerSets(const GlobalPoint &point, float zwidth) const
def move(src, dest)
Definition: eostools.py:511
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5

◆ spansAndLayerSets()

std::vector< std::pair< edm::VecArray< PixelInactiveAreaFinder::DetGroupSpan, 2 >, std::vector< PixelInactiveAreaFinder::LayerSetIndex > > > PixelInactiveAreaFinder::InactiveAreas::spansAndLayerSets ( const GlobalPoint point,
float  zwidth 
) const

Definition at line 399 of file PixelInactiveAreaFinder.cc.

References edm::VecArray< T, N >::emplace_back(), mps_fire::end, Exception, mps_fire::i, PixelInactiveAreaFinder::layerSetIndexInactiveToActive_, LogDebug, LogTrace, eostools::move(), GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, point, FastTimerService_cff::range, runTheMatrix::ret, contentValuesCheck::ss, SiStripMonitorCluster_cfi::zmax, and SiStripMonitorCluster_cfi::zmin.

Referenced by areasAndLayerSets().

399  {
400  // TODO: in the future use 2D-r for the origin for the phi overlap check
401  const float zmin = point.z() - zwidth;
402  const float zmax = point.z() + zwidth;
403 
404  std::vector<std::pair<VecArray2<DetGroupSpan>, std::vector<LayerSetIndex>>> ret;
405 
406  LogDebug("PixelInactiveAreaFinder") << "Origin at " << point.x() << "," << point.y() << "," << point.z()
407  << " z half width " << zwidth;
408 
409  for (LayerSetIndex i = 0, end = inactiveLayerPairIndices_->size(); i < end; ++i) {
410  const auto& layerIdxPair = (*inactiveLayerPairIndices_)[i];
411  const auto& innerSpans = inactiveSpans_[layerIdxPair.first];
412  const auto& outerSpans = inactiveSpans_[layerIdxPair.second];
413 
414  for (const auto& innerSpan : innerSpans) {
415  for (const auto& outerSpan : outerSpans) {
416  if (phiRangesOverlap(innerSpan.phiSpan, outerSpan.phiSpan)) {
417  std::pair<float, float> range(0, 0);
418 
419  bool zOverlap = false;
420  const auto innerDet = std::get<0>((*inactiveLayers_)[layerIdxPair.first]);
421  const auto outerDet = std::get<0>((*inactiveLayers_)[layerIdxPair.second]);
422  if (innerDet == GeomDetEnumerators::PixelBarrel) {
423  if (outerDet == GeomDetEnumerators::PixelBarrel)
424  zOverlap = getZAxisOverlapRangeBarrel(innerSpan, outerSpan, range);
425  else
426  zOverlap = getZAxisOverlapRangeBarrelEndcap(innerSpan, outerSpan, range);
427  } else {
428  if (outerDet == GeomDetEnumerators::PixelEndcap)
429  zOverlap = getZAxisOverlapRangeEndcap(innerSpan, outerSpan, range);
430  else
431  throw cms::Exception("LogicError") << "Forward->barrel transition is not supported";
432  }
433 
434  if (zOverlap && zmin <= range.second && range.first <= zmax) {
435 #ifdef EDM_ML_DEBUG
436  Stream ss;
437  for (auto ind : (*layerSetIndexInactiveToActive_)[i]) {
438  ss << ind << ",";
439  }
440  ss << "\n ";
441  detGroupSpanInfo(innerSpan, ss);
442  ss << "\n ";
443  detGroupSpanInfo(outerSpan, ss);
444  LogTrace("PixelInactiveAreaFinder") << " adding areas for active layer sets " << ss.str();
445 #endif
446  VecArray2<DetGroupSpan> vec;
447  vec.emplace_back(innerSpan);
448  vec.emplace_back(outerSpan);
449  ret.emplace_back(std::move(vec), (*layerSetIndexInactiveToActive_)[i]);
450  }
451  }
452  }
453  }
454  }
455 
456  return ret;
457 }
const std::vector< std::pair< unsigned short, unsigned short > > * inactiveLayerPairIndices_
const std::vector< std::vector< LayerSetIndex > > * layerSetIndexInactiveToActive_
ret
prodAgent to be discontinued
#define LogTrace(id)
std::vector< DetGroupSpanContainer > inactiveSpans_
def move(src, dest)
Definition: eostools.py:511
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
SeedingLayerSetsHits::LayerSetIndex LayerSetIndex
#define LogDebug(id)

Member Data Documentation

◆ inactiveLayerPairIndices_

const std::vector<std::pair<unsigned short, unsigned short> >* PixelInactiveAreaFinder::InactiveAreas::inactiveLayerPairIndices_
private

Definition at line 64 of file PixelInactiveAreaFinder.h.

◆ inactiveLayers_

const std::vector<SeedingLayerId>* PixelInactiveAreaFinder::InactiveAreas::inactiveLayers_
private

Definition at line 61 of file PixelInactiveAreaFinder.h.

◆ inactiveSpans_

std::vector<DetGroupSpanContainer> PixelInactiveAreaFinder::InactiveAreas::inactiveSpans_
private

Definition at line 62 of file PixelInactiveAreaFinder.h.

◆ layerSetIndexInactiveToActive_

const std::vector<std::vector<LayerSetIndex> >* PixelInactiveAreaFinder::InactiveAreas::layerSetIndexInactiveToActive_
private

Definition at line 66 of file PixelInactiveAreaFinder.h.