CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
trklet::DTCLink Class Reference

#include <DTCLink.h>

Public Member Functions

void addStub (std::pair< Stub *, L1TStub * > stub)
 
void clean ()
 
 DTCLink (double phimin, double phimax)
 
StubgetFPGAStub (unsigned int i) const
 
L1TStubgetL1TStub (unsigned int i) const
 
std::pair< Stub *, L1TStub * > getStub (unsigned int i) const
 
bool inRange (double phi, bool overlaplayer)
 
unsigned int nStubs () const
 
 ~DTCLink ()=default
 

Private Attributes

double phimax_
 
double phimin_
 
std::vector< std::pair< Stub *, L1TStub * > > stubs_
 

Detailed Description

Definition at line 10 of file DTCLink.h.

Constructor & Destructor Documentation

◆ DTCLink()

DTCLink::DTCLink ( double  phimin,
double  phimax 
)

Definition at line 6 of file DTCLink.cc.

6  {
7  if (phimin > M_PI) {
8  phimin -= 2 * M_PI;
9  phimax -= 2 * M_PI;
10  }
11  assert(phimax > phimin);
12  phimin_ = phimin;
13  phimax_ = phimax;
14 }

References cms::cuda::assert(), M_PI, phimax, and phimin.

◆ ~DTCLink()

trklet::DTCLink::~DTCLink ( )
default

Member Function Documentation

◆ addStub()

void DTCLink::addStub ( std::pair< Stub *, L1TStub * >  stub)

Definition at line 16 of file DTCLink.cc.

16 { stubs_.push_back(stub); }

◆ clean()

void trklet::DTCLink::clean ( )
inline

Definition at line 26 of file DTCLink.h.

26 { stubs_.clear(); }

References stubs_.

◆ getFPGAStub()

Stub* trklet::DTCLink::getFPGAStub ( unsigned int  i) const
inline

Definition at line 22 of file DTCLink.h.

22 { return stubs_[i].first; }

References mps_fire::i, and stubs_.

◆ getL1TStub()

L1TStub* trklet::DTCLink::getL1TStub ( unsigned int  i) const
inline

Definition at line 23 of file DTCLink.h.

23 { return stubs_[i].second; }

References mps_fire::i, and stubs_.

◆ getStub()

std::pair<Stub*, L1TStub*> trklet::DTCLink::getStub ( unsigned int  i) const
inline

Definition at line 24 of file DTCLink.h.

24 { return stubs_[i]; }

References mps_fire::i, and stubs_.

◆ inRange()

bool DTCLink::inRange ( double  phi,
bool  overlaplayer 
)

Definition at line 18 of file DTCLink.cc.

18  {
19  double phimax = phimax_;
20  double phimin = phimin_;
21  if (overlaplayer) {
22  double dphi = phimax - phimin;
23  assert(dphi > 0.0);
24  assert(dphi < M_PI);
25  phimin -= dphi / 6.0;
26  phimax += dphi / 6.0;
27  }
28  return (phi < phimax && phi > phimin) || (phi + 2 * M_PI < phimax && phi + 2 * M_PI > phimin);
29 }

References cms::cuda::assert(), M_PI, phimax, and phimin.

◆ nStubs()

unsigned int trklet::DTCLink::nStubs ( ) const
inline

Definition at line 20 of file DTCLink.h.

20 { return stubs_.size(); }

References stubs_.

Member Data Documentation

◆ phimax_

double trklet::DTCLink::phimax_
private

Definition at line 30 of file DTCLink.h.

◆ phimin_

double trklet::DTCLink::phimin_
private

Definition at line 29 of file DTCLink.h.

◆ stubs_

std::vector<std::pair<Stub*, L1TStub*> > trklet::DTCLink::stubs_
private

Definition at line 31 of file DTCLink.h.

Referenced by clean(), getFPGAStub(), getL1TStub(), getStub(), and nStubs().

mps_fire.i
i
Definition: mps_fire.py:428
phimin
float phimin
Definition: ReggeGribovPartonMCHadronizer.h:107
cms::cuda::assert
assert(be >=bs)
PVValHelper::phi
Definition: PVValidationHelpers.h:68
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
phimax
float phimax
Definition: ReggeGribovPartonMCHadronizer.h:106