CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
Phase2EndcapLayer Class Referencefinal

#include <Phase2EndcapLayer.h>

Inheritance diagram for Phase2EndcapLayer:
RingedForwardLayer

Public Member Functions

const std::vector< const GeomDet * > & basicComponents () const override
 
const std::vector< const GeometricSearchDet * > & components () const override __attribute__((cold))
 
void groupedCompatibleDetsV (const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const override __attribute__((hot))
 
Phase2EndcapLayeroperator= (const Phase2EndcapLayer &)=delete
 
 Phase2EndcapLayer (std::vector< const Phase2EndcapRing *> &rings, const bool isOT) __attribute__((cold))
 
 Phase2EndcapLayer (const Phase2EndcapLayer &)=delete
 
SubDetector subDetector () const override
 
 ~Phase2EndcapLayer () override __attribute__((cold))
 

Private Member Functions

BoundDiskcomputeDisk (const std::vector< const Phase2EndcapRing *> &rings) const __attribute__((cold))
 
float computeWindowSize (const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const __attribute__((hot))
 
void fillRingPars (int i) __attribute__((cold))
 
bool overlapInR (const TrajectoryStateOnSurface &tsos, int i, double ymax, std::vector< tkDetUtil::RingPar > ringParams) const __attribute__((hot))
 

Private Attributes

const bool isOuterTracker
 
std::vector< tkDetUtil::RingParringPars
 
std::vector< GeomDet const * > theBasicComps
 
std::atomic< std::vector< const GeometricSearchDet * > * > theComponents
 
std::vector< const Phase2EndcapRing * > theComps
 
int theRingSize
 

Detailed Description

A concrete implementation for Phase 2 Endcap/Forward layer built out of Phase2EndcapRings this classs is used for both OT and Pixel detector

Definition at line 16 of file Phase2EndcapLayer.h.

Constructor & Destructor Documentation

◆ Phase2EndcapLayer() [1/2]

Phase2EndcapLayer::Phase2EndcapLayer ( std::vector< const Phase2EndcapRing *> &  rings,
const bool  isOT 
)

Definition at line 38 of file Phase2EndcapLayer.cc.

39  : RingedForwardLayer(true), isOuterTracker(isOT), theComponents{nullptr} {
40  //They should be already R-ordered. TO BE CHECKED!!
41  //sort( theRings.begin(), theRings.end(), DetLessR());
42 
43  theRingSize = rings.size();
44  LogDebug("TkDetLayers") << "Number of rings in Phase2 OT EC layer is " << theRingSize << std::endl;
45  setSurface(computeDisk(rings));
46 
47  for (unsigned int i = 0; i != rings.size(); ++i) {
48  theComps.push_back(rings[i]);
49  fillRingPars(i);
50  theBasicComps.insert(
51  theBasicComps.end(), (*rings[i]).basicComponents().begin(), (*rings[i]).basicComponents().end());
52  }
53 
54  LogDebug("TkDetLayers") << "==== DEBUG Phase2EndcapLayer =====";
55  LogDebug("TkDetLayers") << "r,zed pos , thickness, innerR, outerR: " << this->position().perp() << " , "
56  << this->position().z() << " , " << this->specificSurface().bounds().thickness() << " , "
57  << this->specificSurface().innerRadius() << " , " << this->specificSurface().outerRadius();
58 }
std::vector< const Phase2EndcapRing * > theComps
void fillRingPars(int i) __attribute__((cold))
ForwardDetLayer RingedForwardLayer
std::atomic< std::vector< const GeometricSearchDet * > * > theComponents
const bool isOuterTracker
std::vector< GeomDet const * > theBasicComps
BoundDisk * computeDisk(const std::vector< const Phase2EndcapRing *> &rings) const __attribute__((cold))
static int position[264][3]
Definition: ReadPGInfo.cc:289
const std::vector< const GeomDet * > & basicComponents() const override
#define LogDebug(id)

◆ ~Phase2EndcapLayer()

Phase2EndcapLayer::~Phase2EndcapLayer ( )
override

Definition at line 64 of file Phase2EndcapLayer.cc.

References DummyCfis::c, theComponents, and theComps.

64  {
65  for (auto c : theComps)
66  delete c;
67 
68  delete theComponents.load();
69 }
std::vector< const Phase2EndcapRing * > theComps
std::atomic< std::vector< const GeometricSearchDet * > * > theComponents

◆ Phase2EndcapLayer() [2/2]

Phase2EndcapLayer::Phase2EndcapLayer ( const Phase2EndcapLayer )
delete

Member Function Documentation

◆ basicComponents()

const std::vector<const GeomDet*>& Phase2EndcapLayer::basicComponents ( ) const
inlineoverride

Definition at line 27 of file Phase2EndcapLayer.h.

References theBasicComps.

27 { return theBasicComps; }
std::vector< GeomDet const * > theBasicComps

◆ components()

const std::vector< const GeometricSearchDet * > & Phase2EndcapLayer::components ( ) const
override

Definition at line 18 of file Phase2EndcapLayer.cc.

References DummyCfis::c, and groupFilesInBlocks::temp.

18  {
19  if (not theComponents) {
20  auto temp = std::make_unique<std::vector<const GeometricSearchDet*>>();
21  temp->reserve(15); // This number is just an upper bound
22  for (auto c : theComps)
23  temp->push_back(c);
24  std::vector<const GeometricSearchDet*>* expected = nullptr;
25  if (theComponents.compare_exchange_strong(expected, temp.get())) {
26  //this thread set the value
27  temp.release();
28  }
29  }
30  return *theComponents;
31 }
std::vector< const Phase2EndcapRing * > theComps
std::atomic< std::vector< const GeometricSearchDet * > * > theComponents

◆ computeDisk()

BoundDisk * Phase2EndcapLayer::computeDisk ( const std::vector< const Phase2EndcapRing *> &  rings) const
private

Definition at line 60 of file Phase2EndcapLayer.cc.

References tkDetUtil::computeDisk().

60  {
61  return tkDetUtil::computeDisk(rings);
62 }
BoundDisk * computeDisk(const std::vector< const T *> &structures)
Definition: TkDetUtil.h:236

◆ computeWindowSize()

float Phase2EndcapLayer::computeWindowSize ( const GeomDet det,
const TrajectoryStateOnSurface tsos,
const MeasurementEstimator est 
) const
private

Definition at line 78 of file Phase2EndcapLayer.cc.

References tkDetUtil::computeYdirWindowSize().

80  {
81  return tkDetUtil::computeYdirWindowSize(det, tsos, est);
82 }
float computeYdirWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est)
Definition: TkDetUtil.cc:71

◆ fillRingPars()

void Phase2EndcapLayer::fillRingPars ( int  i)
private

Definition at line 33 of file Phase2EndcapLayer.cc.

References tkDetUtil::fillRingParametersFromDisk(), and mps_fire::i.

33  {
34  const BoundDisk& ringDisk = static_cast<const BoundDisk&>(theComps[i]->surface());
36 }
std::vector< const Phase2EndcapRing * > theComps
RingPar fillRingParametersFromDisk(const BoundDisk &ringDisk)
Definition: TkDetUtil.cc:124
std::vector< tkDetUtil::RingPar > ringPars

◆ groupedCompatibleDetsV()

void Phase2EndcapLayer::groupedCompatibleDetsV ( const TrajectoryStateOnSurface tsos,
const Propagator prop,
const MeasurementEstimator est,
std::vector< DetGroup > &  result 
) const
override

Definition at line 71 of file Phase2EndcapLayer.cc.

References tkDetUtil::groupedCompatibleDetsV(), mps_fire::result, ringPars, theComps, and theRingSize.

74  {
76 }
std::vector< const Phase2EndcapRing * > theComps
void groupedCompatibleDetsV(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result, const int ringSize, const std::vector< const T *> &diskComponents, const std::vector< RingPar > &ringParams)
Definition: TkDetUtil.h:100
std::vector< tkDetUtil::RingPar > ringPars

◆ operator=()

Phase2EndcapLayer& Phase2EndcapLayer::operator= ( const Phase2EndcapLayer )
delete

◆ overlapInR()

bool Phase2EndcapLayer::overlapInR ( const TrajectoryStateOnSurface tsos,
int  i,
double  ymax,
std::vector< tkDetUtil::RingPar ringParams 
) const
private

Definition at line 84 of file Phase2EndcapLayer.cc.

References tkDetUtil::overlapInR(), and L1TOccupancyClient_cfi::ymax.

87  {
88  return tkDetUtil::overlapInR(tsos, index, ymax, ringParams);
89 }
bool overlapInR(const TrajectoryStateOnSurface &tsos, int index, double ymax, const std::vector< RingPar > &ringParams)
Definition: TkDetUtil.cc:112

◆ subDetector()

SubDetector Phase2EndcapLayer::subDetector ( ) const
inlineoverride

Member Data Documentation

◆ isOuterTracker

const bool Phase2EndcapLayer::isOuterTracker
private

Definition at line 61 of file Phase2EndcapLayer.h.

Referenced by subDetector().

◆ ringPars

std::vector<tkDetUtil::RingPar> Phase2EndcapLayer::ringPars
private

Definition at line 64 of file Phase2EndcapLayer.h.

Referenced by groupedCompatibleDetsV().

◆ theBasicComps

std::vector<GeomDet const*> Phase2EndcapLayer::theBasicComps
private

Definition at line 60 of file Phase2EndcapLayer.h.

Referenced by basicComponents().

◆ theComponents

std::atomic<std::vector<const GeometricSearchDet*>*> Phase2EndcapLayer::theComponents
mutableprivate

Definition at line 62 of file Phase2EndcapLayer.h.

Referenced by ~Phase2EndcapLayer().

◆ theComps

std::vector<const Phase2EndcapRing*> Phase2EndcapLayer::theComps
private

Definition at line 63 of file Phase2EndcapLayer.h.

Referenced by groupedCompatibleDetsV(), and ~Phase2EndcapLayer().

◆ theRingSize

int Phase2EndcapLayer::theRingSize
private

Definition at line 65 of file Phase2EndcapLayer.h.

Referenced by groupedCompatibleDetsV().