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 38 of file PixelInactiveAreaFinder.h.

Member Typedef Documentation

◆ VecArray2

Definition at line 52 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 40 of file PixelInactiveAreaFinder.h.

44  : inactiveLayers_(inactiveLayers),
45  inactiveSpans_(std::move(inactiveSpans)),
46  inactiveLayerPairIndices_(inactiveLayerPairIndices),
47  layerSetIndexInactiveToActive_(layerSetIndexInactiveToActive) {}

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 373 of file PixelInactiveAreaFinder.cc.

373  {
374  auto spansLayerSets = spansAndLayerSets(point, zwidth);
375 
376  // TODO: try to remove this conversion...
377  std::vector<std::pair<VecArray2<Area>, std::vector<LayerSetIndex>>> ret;
378  for (auto& item : spansLayerSets) {
379  auto& innerSpan = item.first[0];
380  auto& outerSpan = item.first[1];
381  VecArray2<Area> areas;
382  areas.emplace_back(innerSpan.rSpan.first,
383  innerSpan.rSpan.second,
384  innerSpan.phiSpan.first,
385  innerSpan.phiSpan.second,
386  innerSpan.zSpan.first,
387  innerSpan.zSpan.second);
388  areas.emplace_back(outerSpan.rSpan.first,
389  outerSpan.rSpan.second,
390  outerSpan.phiSpan.first,
391  outerSpan.phiSpan.second,
392  outerSpan.zSpan.first,
393  outerSpan.zSpan.second);
394  ret.emplace_back(areas, std::move(item.second));
395  }
396 
397  return ret;
398 }

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

Referenced by PixelInactiveAreaTrackingRegionsSeedingLayersProducer::produce().

◆ 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 402 of file PixelInactiveAreaFinder.cc.

402  {
403  // TODO: in the future use 2D-r for the origin for the phi overlap check
404  const float zmin = point.z() - zwidth;
405  const float zmax = point.z() + zwidth;
406 
407  std::vector<std::pair<VecArray2<DetGroupSpan>, std::vector<LayerSetIndex>>> ret;
408 
409  LogDebug("PixelInactiveAreaFinder") << "Origin at " << point.x() << "," << point.y() << "," << point.z()
410  << " z half width " << zwidth;
411 
412  for (LayerSetIndex i = 0, end = inactiveLayerPairIndices_->size(); i < end; ++i) {
413  const auto& layerIdxPair = (*inactiveLayerPairIndices_)[i];
414  const auto& innerSpans = inactiveSpans_[layerIdxPair.first];
415  const auto& outerSpans = inactiveSpans_[layerIdxPair.second];
416 
417  for (const auto& innerSpan : innerSpans) {
418  for (const auto& outerSpan : outerSpans) {
419  if (phiRangesOverlap(innerSpan.phiSpan, outerSpan.phiSpan)) {
420  std::pair<float, float> range(0, 0);
421 
422  bool zOverlap = false;
423  const auto innerDet = std::get<0>((*inactiveLayers_)[layerIdxPair.first]);
424  const auto outerDet = std::get<0>((*inactiveLayers_)[layerIdxPair.second]);
425  if (innerDet == GeomDetEnumerators::PixelBarrel) {
426  if (outerDet == GeomDetEnumerators::PixelBarrel)
427  zOverlap = getZAxisOverlapRangeBarrel(innerSpan, outerSpan, range);
428  else
429  zOverlap = getZAxisOverlapRangeBarrelEndcap(innerSpan, outerSpan, range);
430  } else {
431  if (outerDet == GeomDetEnumerators::PixelEndcap)
432  zOverlap = getZAxisOverlapRangeEndcap(innerSpan, outerSpan, range);
433  else
434  throw cms::Exception("LogicError") << "Forward->barrel transition is not supported";
435  }
436 
437  if (zOverlap && zmin <= range.second && range.first <= zmax) {
438 #ifdef EDM_ML_DEBUG
439  Stream ss;
440  for (auto ind : (*layerSetIndexInactiveToActive_)[i]) {
441  ss << ind << ",";
442  }
443  ss << "\n ";
444  detGroupSpanInfo(innerSpan, ss);
445  ss << "\n ";
446  detGroupSpanInfo(outerSpan, ss);
447  LogTrace("PixelInactiveAreaFinder") << " adding areas for active layer sets " << ss.str();
448 #endif
449  VecArray2<DetGroupSpan> vec;
450  vec.emplace_back(innerSpan);
451  vec.emplace_back(outerSpan);
452  ret.emplace_back(std::move(vec), (*layerSetIndexInactiveToActive_)[i]);
453  }
454  }
455  }
456  }
457  }
458 
459  return ret;
460 }

References edm::VecArray< T, N >::emplace_back(), mps_fire::end, Exception, mps_fire::i, PixelInactiveAreaFinder::inactiveLayers_, 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().

Member Data Documentation

◆ inactiveLayerPairIndices_

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

Definition at line 62 of file PixelInactiveAreaFinder.h.

◆ inactiveLayers_

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

Definition at line 59 of file PixelInactiveAreaFinder.h.

◆ inactiveSpans_

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

Definition at line 60 of file PixelInactiveAreaFinder.h.

◆ layerSetIndexInactiveToActive_

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

Definition at line 64 of file PixelInactiveAreaFinder.h.

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:367
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
mps_fire.i
i
Definition: mps_fire.py:428
PixelInactiveAreaFinder::InactiveAreas::inactiveLayers_
const std::vector< SeedingLayerId > * inactiveLayers_
Definition: PixelInactiveAreaFinder.h:59
SiStripMonitorCluster_cfi.zmin
zmin
Definition: SiStripMonitorCluster_cfi.py:200
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
GeomDetEnumerators::PixelBarrel
Definition: GeomDetEnumerators.h:11
PixelInactiveAreaFinder::Stream
std::stringstream Stream
Definition: PixelInactiveAreaFinder.h:104
SiStripMonitorCluster_cfi.zmax
zmax
Definition: SiStripMonitorCluster_cfi.py:201
mps_fire.end
end
Definition: mps_fire.py:242
PixelInactiveAreaFinder::InactiveAreas::inactiveLayerPairIndices_
const std::vector< std::pair< unsigned short, unsigned short > > * inactiveLayerPairIndices_
Definition: PixelInactiveAreaFinder.h:62
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
PixelInactiveAreaFinder::InactiveAreas::inactiveSpans_
std::vector< DetGroupSpanContainer > inactiveSpans_
Definition: PixelInactiveAreaFinder.h:60
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
PixelInactiveAreaFinder::InactiveAreas::spansAndLayerSets
std::vector< std::pair< VecArray2< DetGroupSpan >, std::vector< LayerSetIndex > > > spansAndLayerSets(const GlobalPoint &point, float zwidth) const
Definition: PixelInactiveAreaFinder.cc:402
PixelInactiveAreaFinder::LayerSetIndex
SeedingLayerSetsHits::LayerSetIndex LayerSetIndex
Definition: PixelInactiveAreaFinder.h:25
eostools.move
def move(src, dest)
Definition: eostools.py:511
Exception
Definition: hltDiff.cc:246
GeomDetEnumerators::PixelEndcap
Definition: GeomDetEnumerators.h:12
PixelInactiveAreaFinder::InactiveAreas::layerSetIndexInactiveToActive_
const std::vector< std::vector< LayerSetIndex > > * layerSetIndexInactiveToActive_
Definition: PixelInactiveAreaFinder.h:64
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
point
*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