CMS 3D CMS Logo

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

#include <DTC.h>

Public Member Functions

void addLink (double phimin, double phimax)
 
void addphi (double phi, unsigned int layerdisk)
 
void addSec (int sector)
 
int addStub (std::pair< Stub *, L1TStub * > stub)
 
void clean ()
 
 DTC (std::string name="")
 
const DTCLinklink (unsigned int i) const
 
double max (unsigned int i) const
 
double min (unsigned int i) const
 
unsigned int nLinks () const
 
void setName (std::string name)
 
 ~DTC ()=default
 

Private Attributes

std::vector< DTCLinklinks_
 
std::string name_
 
double phimax_ [N_LAYER+N_DISK]
 
double phimin_ [N_LAYER+N_DISK]
 
std::vector< int > sectors_
 

Detailed Description

Definition at line 12 of file DTC.h.

Constructor & Destructor Documentation

◆ DTC()

trklet::DTC::DTC ( std::string  name = "")

◆ ~DTC()

trklet::DTC::~DTC ( )
default

Member Function Documentation

◆ addLink()

void DTC::addLink ( double  phimin,
double  phimax 
)

Definition at line 30 of file DTC.cc.

30  {
32  links_.push_back(link);
33 }

References MainPageGenerator::link, phimax, and phimin.

◆ addphi()

void DTC::addphi ( double  phi,
unsigned int  layerdisk 
)

Definition at line 22 of file DTC.cc.

22  {
23  assert(layerdisk < N_LAYER + N_DISK);
24  if (phi < phimin_[layerdisk])
25  phimin_[layerdisk] = phi;
26  if (phi > phimax_[layerdisk])
27  phimax_[layerdisk] = phi;
28 }

References cms::cuda::assert(), trklet::N_DISK, and trklet::N_LAYER.

◆ addSec()

void DTC::addSec ( int  sector)

Definition at line 20 of file DTC.cc.

20 { sectors_.push_back(sector); }

◆ addStub()

int DTC::addStub ( std::pair< Stub *, L1TStub * >  stub)

Definition at line 35 of file DTC.cc.

35  {
36  double phi = reco::reduceRange(stub.second->phi());
37  bool overlaplayer = ((stub.second->layer() + 1) % 2 == 0);
38  int added = 0;
39  for (auto& link : links_) {
40  if (link.inRange(phi, overlaplayer)) {
41  added++;
42  link.addStub(stub);
43  }
44  }
45  return added;
46 }

References MainPageGenerator::link, and reco::reduceRange().

◆ clean()

void DTC::clean ( )

Definition at line 48 of file DTC.cc.

48  {
49  for (auto& link : links_) {
50  link.clean();
51  }
52 }

References MainPageGenerator::link.

◆ link()

const DTCLink& trklet::DTC::link ( unsigned int  i) const
inline

Definition at line 30 of file DTC.h.

30 { return links_[i]; }

References mps_fire::i, and links_.

◆ max()

double trklet::DTC::max ( unsigned int  i) const
inline

Definition at line 35 of file DTC.h.

35 { return phimax_[i]; }

References mps_fire::i, and phimax_.

◆ min()

double trklet::DTC::min ( unsigned int  i) const
inline

Definition at line 34 of file DTC.h.

34 { return phimin_[i]; }

References mps_fire::i, and phimin_.

◆ nLinks()

unsigned int trklet::DTC::nLinks ( ) const
inline

Definition at line 28 of file DTC.h.

28 { return links_.size(); }

References links_.

◆ setName()

void DTC::setName ( std::string  name)

Definition at line 18 of file DTC.cc.

18 { name_ = name; }

References Skims_PA_cff::name.

Member Data Documentation

◆ links_

std::vector<DTCLink> trklet::DTC::links_
private

Definition at line 39 of file DTC.h.

Referenced by link(), and nLinks().

◆ name_

std::string trklet::DTC::name_
private

Definition at line 38 of file DTC.h.

◆ phimax_

double trklet::DTC::phimax_[N_LAYER+N_DISK]
private

Definition at line 43 of file DTC.h.

Referenced by max().

◆ phimin_

double trklet::DTC::phimin_[N_LAYER+N_DISK]
private

Definition at line 42 of file DTC.h.

Referenced by min().

◆ sectors_

std::vector<int> trklet::DTC::sectors_
private

Definition at line 40 of file DTC.h.

trklet::DTC::sectors_
std::vector< int > sectors_
Definition: DTC.h:40
mps_fire.i
i
Definition: mps_fire.py:428
phimin
float phimin
Definition: ReggeGribovPartonMCHadronizer.h:107
cms::cuda::assert
assert(be >=bs)
trklet::N_DISK
constexpr int N_DISK
Definition: Settings.h:20
trklet::DTC::name_
std::string name_
Definition: DTC.h:38
trklet::DTC::phimax_
double phimax_[N_LAYER+N_DISK]
Definition: DTC.h:43
trklet::N_LAYER
constexpr int N_LAYER
Definition: Settings.h:19
trklet::DTC::phimin_
double phimin_[N_LAYER+N_DISK]
Definition: DTC.h:42
trklet::DTC::links_
std::vector< DTCLink > links_
Definition: DTC.h:39
PVValHelper::phi
Definition: PVValidationHelpers.h:68
trklet::DTC::link
const DTCLink & link(unsigned int i) const
Definition: DTC.h:30
phimax
float phimax
Definition: ReggeGribovPartonMCHadronizer.h:106
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
reco::reduceRange
constexpr T reduceRange(T x)
Definition: deltaPhi.h:18