CMS 3D CMS Logo

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

#include <L1TStub.h>

Public Member Functions

unsigned int allStubIndex () const
 
double alpha (double pitch) const
 
double alphanorm () const
 
double bend () const
 
double diphi ()
 
int disk () const
 
double diz ()
 
int eventid () const
 
unsigned int iphi () const
 
double iphiouter ()
 
unsigned int isFlipped () const
 
unsigned int isPSmodule () const
 
bool isTilted () const
 
unsigned int iz () const
 
 L1TStub ()
 
 L1TStub (int eventid, std::vector< int > tps, int iphi, int iz, int layer, int ladder, int module, int strip, double x, double y, double z, double sigmax, double sigmaz, double pt, double bend, int isPSmodule, int isFlipped)
 
unsigned int ladder () const
 
unsigned int layer () const
 
void lorentzcor (double shift)
 
unsigned int module () const
 
bool operator== (const L1TStub &other) const
 
double phi () const
 
double pt () const
 
double r () const
 
double r2 () const
 
void setAllStubIndex (unsigned int index)
 
void setiphi (int iphi)
 
void setiz (int iz)
 
void setXY (double x, double y)
 
double sigmax () const
 
double sigmaz () const
 
unsigned int strip () const
 
bool tpmatch (int tp) const
 
std::vector< int > tps () const
 
void write (std::ofstream &out)
 
void write (std::ostream &out)
 
double x () const
 
double y () const
 
double z () const
 
 ~L1TStub ()=default
 

Private Attributes

unsigned int allstubindex_
 
double bend_
 
int eventid_
 
unsigned int iphi_
 
unsigned int isFlipped_
 
unsigned int isPSmodule_
 
unsigned int iz_
 
unsigned int ladder_
 
unsigned int layer_
 
unsigned int module_
 
double pt_
 
double sigmax_
 
double sigmaz_
 
unsigned int strip_
 
std::vector< int > tps_
 
double x_
 
double y_
 
double z_
 

Detailed Description

Definition at line 12 of file L1TStub.h.

Constructor & Destructor Documentation

◆ L1TStub() [1/2]

L1TStub::L1TStub ( )

Definition at line 7 of file L1TStub.cc.

7 {}

◆ L1TStub() [2/2]

L1TStub::L1TStub ( int  eventid,
std::vector< int >  tps,
int  iphi,
int  iz,
int  layer,
int  ladder,
int  module,
int  strip,
double  x,
double  y,
double  z,
double  sigmax,
double  sigmaz,
double  pt,
double  bend,
int  isPSmodule,
int  isFlipped 
)

Definition at line 9 of file L1TStub.cc.

25  {
26  eventid_ = eventid;
27  tps_ = tps;
28  iphi_ = iphi;
29  iz_ = iz;
30  layer_ = layer;
31  ladder_ = ladder;
32  module_ = module;
33  strip_ = strip;
34  x_ = x;
35  y_ = y;
36  z_ = z;
37  sigmax_ = sigmax;
38  sigmaz_ = sigmaz;
39  pt_ = pt;
40  bend_ = bend;
43 
44  allstubindex_ = 999;
45 }

References trklet::bend(), LEDCalibrationChannels::iphi, PVValHelper::ladder, sistrip::layer_, sistrip::module_, DiDispStaMuonMonitor_cfi::pt, and digitizers_cfi::strip.

◆ ~L1TStub()

trklet::L1TStub::~L1TStub ( )
default

Member Function Documentation

◆ allStubIndex()

unsigned int trklet::L1TStub::allStubIndex ( ) const
inline

Definition at line 82 of file L1TStub.h.

82 { return allstubindex_; }

References allstubindex_.

◆ alpha()

double L1TStub::alpha ( double  pitch) const

Definition at line 79 of file L1TStub.cc.

79  {
80  if (isPSmodule())
81  return 0.0;
82  int flip = 1;
83  if (isFlipped())
84  flip = -1;
85  if (z_ > 0.0) {
86  return ((int)strip_ - 509.5) * pitch * flip / r2();
87  }
88  return -((int)strip_ - 509.5) * pitch * flip / r2();
89 }

References pfNegativeDeepFlavourTagInfos_cfi::flip, createfilelist::int, and diffTwoXMLs::r2.

Referenced by trklet::MatchCalculator::execute(), and trklet::MatchProcessor::matchCalculator().

◆ alphanorm()

double L1TStub::alphanorm ( ) const

Definition at line 91 of file L1TStub.cc.

91  {
92  if (isPSmodule())
93  return 0.0;
94  int flip = 1;
95  if (isFlipped())
96  flip = -1;
97  if (z_ > 0.0) {
98  return ((int)strip_ - 509.5) * flip / 510.0;
99  }
100  return -((int)strip_ - 509.5) * flip / 510.0;
101 }

References pfNegativeDeepFlavourTagInfos_cfi::flip, and createfilelist::int.

Referenced by trklet::MatchCalculator::execute(), trklet::MatchProcessor::matchCalculator(), and trklet::Stub::Stub().

◆ bend()

double trklet::L1TStub::bend ( ) const
inline

Definition at line 60 of file L1TStub.h.

60 { return bend_; }

References bend_.

Referenced by trklet::Stub::Stub().

◆ diphi()

double trklet::L1TStub::diphi ( )

◆ disk()

int trklet::L1TStub::disk ( ) const
inline

Definition at line 45 of file L1TStub.h.

45  {
46  if (z_ < 0.0) {
47  return -module_;
48  }
49  return module_;
50  }

References module_, and z_.

Referenced by trklet::Tracklet::disk(), trklet::Tracklet::disk2(), trklet::TrackletEventProcessor::event(), trklet::Tracklet::getStubIDs(), and trklet::Tracklet::Tracklet().

◆ diz()

double trklet::L1TStub::diz ( )

◆ eventid()

int trklet::L1TStub::eventid ( ) const
inline

Definition at line 77 of file L1TStub.h.

77 { return eventid_; }

References eventid_.

◆ iphi()

unsigned int trklet::L1TStub::iphi ( ) const
inline

Definition at line 64 of file L1TStub.h.

64 { return iphi_; }

References iphi_.

Referenced by setiphi().

◆ iphiouter()

double trklet::L1TStub::iphiouter ( )

◆ isFlipped()

unsigned int trklet::L1TStub::isFlipped ( ) const
inline

Definition at line 94 of file L1TStub.h.

94 { return isFlipped_; }

References isFlipped_.

◆ isPSmodule()

unsigned int trklet::L1TStub::isPSmodule ( ) const
inline

◆ isTilted()

bool L1TStub::isTilted ( ) const

Definition at line 117 of file L1TStub.cc.

117  {
118  //here layer_ runs 0-5 for barrel, >1000 for disk
119  //disk modules and outer barrel modules are not tilted by construction
120  if (layer_ >= N_PSLAYER)
121  return false;
122 
123  assert(layer_ < N_PSLAYER); // safety for acccessing # modules/plank
125  return true;
126  return false;
127 }

References cms::cuda::assert(), sistrip::layer_, sistrip::module_, trklet::N_MOD_PLANK, trklet::N_PSLAYER, and trklet::N_TILTED_RINGS.

◆ iz()

unsigned int trklet::L1TStub::iz ( ) const
inline

Definition at line 65 of file L1TStub.h.

65 { return iz_; }

References iz_.

Referenced by setiz().

◆ ladder()

unsigned int trklet::L1TStub::ladder ( ) const
inline

Definition at line 51 of file L1TStub.h.

51 { return ladder_; }

References ladder_.

Referenced by trklet::TrackletEventProcessor::event().

◆ layer()

unsigned int trklet::L1TStub::layer ( ) const
inline

◆ lorentzcor()

void L1TStub::lorentzcor ( double  shift)

Definition at line 72 of file L1TStub.cc.

72  {
73  double r = this->r();
74  double phi = this->phi() - shift / r;
75  this->x_ = r * cos(phi);
76  this->y_ = r * sin(phi);
77 }

References funct::cos(), alignCSCRings::r, edm::shift, and funct::sin().

◆ module()

unsigned int trklet::L1TStub::module ( ) const
inline

Definition at line 52 of file L1TStub.h.

52 { return module_; }

References module_.

Referenced by trklet::TrackletEventProcessor::event(), and trklet::Stub::Stub().

◆ operator==()

bool L1TStub::operator== ( const L1TStub other) const

Definition at line 67 of file L1TStub.cc.

67  {
68  return (other.iphi() == iphi_ && other.iz() == iz_ && other.layer() == layer_ && other.ladder() == ladder_ &&
69  other.module() == module_);
70 }

References sistrip::layer_, sistrip::module_, and trackingPlots::other.

◆ phi()

double trklet::L1TStub::phi ( void  ) const
inline

◆ pt()

double trklet::L1TStub::pt ( ) const
inline

◆ r()

double trklet::L1TStub::r ( ) const
inline

◆ r2()

double trklet::L1TStub::r2 ( ) const
inline

Definition at line 59 of file L1TStub.h.

59 { return x_ * x_ + y_ * y_; }

References x_, and y_.

Referenced by trklet::MatchCalculator::execute(), and trklet::MatchProcessor::matchCalculator().

◆ setAllStubIndex()

void trklet::L1TStub::setAllStubIndex ( unsigned int  index)
inline

Definition at line 80 of file L1TStub.h.

80 { allstubindex_ = index; }

References allstubindex_.

Referenced by trklet::VMRouter::execute().

◆ setiphi()

void trklet::L1TStub::setiphi ( int  iphi)
inline

Definition at line 67 of file L1TStub.h.

67 { iphi_ = iphi; }

References iphi(), and iphi_.

◆ setiz()

void trklet::L1TStub::setiz ( int  iz)
inline

Definition at line 68 of file L1TStub.h.

68 { iz_ = iz; }

References iz(), and iz_.

◆ setXY()

void L1TStub::setXY ( double  x,
double  y 
)

Definition at line 103 of file L1TStub.cc.

103  {
104  x_ = x;
105  y_ = y;
106 }

◆ sigmax()

double trklet::L1TStub::sigmax ( ) const
inline

Definition at line 70 of file L1TStub.h.

70 { return sigmax_; }

References sigmax_.

◆ sigmaz()

double trklet::L1TStub::sigmaz ( ) const
inline

◆ strip()

unsigned int trklet::L1TStub::strip ( void  ) const
inline

Definition at line 84 of file L1TStub.h.

84 { return strip_; }

References strip_.

◆ tpmatch()

bool L1TStub::tpmatch ( int  tp) const

Definition at line 108 of file L1TStub.cc.

108  {
109  for (int itp : tps_) {
110  if (tp == itp)
111  return true;
112  }
113 
114  return false;
115 }

References cmsswSequenceInfo::tp.

◆ tps()

std::vector<int> trklet::L1TStub::tps ( ) const
inline

Definition at line 78 of file L1TStub.h.

78 { return tps_; }

References tps_.

Referenced by trklet::Tracklet::stubtruthmatch(), and trklet::Tracklet::tpseed().

◆ write() [1/2]

void L1TStub::write ( std::ofstream &  out)

Definition at line 47 of file L1TStub.cc.

47  {
48  out << "Stub: " << layer_ + 1 << "\t" << ladder_ << "\t" << module_ << "\t" << strip_ << "\t" << eventid_ << "\t"
49  << pt_ << "\t" << x_ << "\t" << y_ << "\t" << z_ << "\t" << bend_ << "\t" << isPSmodule_ << "\t" << isFlipped_
50  << "\t" << tps_.size() << " \t";
51  for (int itp : tps_) {
52  out << itp << " \t";
53  }
54  out << endl;
55 }

References sistrip::layer_, sistrip::module_, and MillePedeFileConverter_cfg::out.

◆ write() [2/2]

void trklet::L1TStub::write ( std::ostream &  out)

◆ x()

double trklet::L1TStub::x ( ) const
inline

◆ y()

double trklet::L1TStub::y ( ) const
inline

◆ z()

double trklet::L1TStub::z ( ) const
inline

Member Data Documentation

◆ allstubindex_

unsigned int trklet::L1TStub::allstubindex_
private

Definition at line 116 of file L1TStub.h.

Referenced by allStubIndex(), and setAllStubIndex().

◆ bend_

double trklet::L1TStub::bend_
private

Definition at line 115 of file L1TStub.h.

Referenced by bend().

◆ eventid_

int trklet::L1TStub::eventid_
private

Definition at line 101 of file L1TStub.h.

Referenced by eventid().

◆ iphi_

unsigned int trklet::L1TStub::iphi_
private

Definition at line 103 of file L1TStub.h.

Referenced by iphi(), and setiphi().

◆ isFlipped_

unsigned int trklet::L1TStub::isFlipped_
private

Definition at line 119 of file L1TStub.h.

Referenced by isFlipped().

◆ isPSmodule_

unsigned int trklet::L1TStub::isPSmodule_
private

Definition at line 118 of file L1TStub.h.

Referenced by isPSmodule().

◆ iz_

unsigned int trklet::L1TStub::iz_
private

Definition at line 104 of file L1TStub.h.

Referenced by iz(), and setiz().

◆ ladder_

unsigned int trklet::L1TStub::ladder_
private

Definition at line 106 of file L1TStub.h.

Referenced by ladder().

◆ layer_

unsigned int trklet::L1TStub::layer_
private

Definition at line 105 of file L1TStub.h.

Referenced by layer().

◆ module_

unsigned int trklet::L1TStub::module_
private

Definition at line 107 of file L1TStub.h.

Referenced by disk(), and module().

◆ pt_

double trklet::L1TStub::pt_
private

Definition at line 114 of file L1TStub.h.

Referenced by pt().

◆ sigmax_

double trklet::L1TStub::sigmax_
private

Definition at line 112 of file L1TStub.h.

Referenced by sigmax().

◆ sigmaz_

double trklet::L1TStub::sigmaz_
private

Definition at line 113 of file L1TStub.h.

Referenced by sigmaz().

◆ strip_

unsigned int trklet::L1TStub::strip_
private

Definition at line 108 of file L1TStub.h.

Referenced by strip().

◆ tps_

std::vector<int> trklet::L1TStub::tps_
private

Definition at line 102 of file L1TStub.h.

Referenced by tps().

◆ x_

double trklet::L1TStub::x_
private

Definition at line 109 of file L1TStub.h.

Referenced by phi(), r(), r2(), and x().

◆ y_

double trklet::L1TStub::y_
private

Definition at line 110 of file L1TStub.h.

Referenced by phi(), r(), r2(), and y().

◆ z_

double trklet::L1TStub::z_
private

Definition at line 111 of file L1TStub.h.

Referenced by disk(), and z().

trklet::N_PSLAYER
constexpr unsigned int N_PSLAYER
Definition: Settings.h:21
trklet::L1TStub::tps
std::vector< int > tps() const
Definition: L1TStub.h:78
trklet::L1TStub::eventid_
int eventid_
Definition: L1TStub.h:101
trklet::L1TStub::ladder
unsigned int ladder() const
Definition: L1TStub.h:51
trklet::L1TStub::sigmax
double sigmax() const
Definition: L1TStub.h:70
trklet::L1TStub::layer
unsigned int layer() const
Definition: L1TStub.h:44
trklet::L1TStub::pt
double pt() const
Definition: L1TStub.h:58
trklet::L1TStub::sigmaz_
double sigmaz_
Definition: L1TStub.h:113
trklet::L1TStub::strip_
unsigned int strip_
Definition: L1TStub.h:108
trklet::L1TStub::module_
unsigned int module_
Definition: L1TStub.h:107
trklet::L1TStub::isPSmodule_
unsigned int isPSmodule_
Definition: L1TStub.h:118
trklet::L1TStub::bend
double bend() const
Definition: L1TStub.h:60
trklet::L1TStub::z
double z() const
Definition: L1TStub.h:56
trklet::L1TStub::tps_
std::vector< int > tps_
Definition: L1TStub.h:102
cms::cuda::assert
assert(be >=bs)
trklet::L1TStub::ladder_
unsigned int ladder_
Definition: L1TStub.h:106
trklet::L1TStub::y
double y() const
Definition: L1TStub.h:55
trklet::N_TILTED_RINGS
constexpr unsigned int N_TILTED_RINGS
Definition: Settings.h:727
trklet::L1TStub::x
double x() const
Definition: L1TStub.h:54
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
trklet::L1TStub::sigmax_
double sigmax_
Definition: L1TStub.h:112
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
pfNegativeDeepFlavourTagInfos_cfi.flip
flip
Definition: pfNegativeDeepFlavourTagInfos_cfi.py:8
trklet::L1TStub::strip
unsigned int strip() const
Definition: L1TStub.h:84
trklet::L1TStub::isPSmodule
unsigned int isPSmodule() const
Definition: L1TStub.h:93
trklet::L1TStub::x_
double x_
Definition: L1TStub.h:109
trackingPlots.other
other
Definition: trackingPlots.py:1467
trklet::L1TStub::module
unsigned int module() const
Definition: L1TStub.h:52
cmsswSequenceInfo.tp
tp
Definition: cmsswSequenceInfo.py:17
trklet::L1TStub::y_
double y_
Definition: L1TStub.h:110
createfilelist.int
int
Definition: createfilelist.py:10
trklet::L1TStub::isFlipped
unsigned int isFlipped() const
Definition: L1TStub.h:94
trklet::L1TStub::z_
double z_
Definition: L1TStub.h:111
trklet::L1TStub::layer_
unsigned int layer_
Definition: L1TStub.h:105
trklet::L1TStub::iz
unsigned int iz() const
Definition: L1TStub.h:65
trklet::L1TStub::pt_
double pt_
Definition: L1TStub.h:114
trklet::L1TStub::eventid
int eventid() const
Definition: L1TStub.h:77
edm::shift
static unsigned const int shift
Definition: LuminosityBlockID.cc:7
trklet::N_MOD_PLANK
constexpr std::array< unsigned int, N_PSLAYER > N_MOD_PLANK
Definition: Settings.h:728
trklet::L1TStub::allstubindex_
unsigned int allstubindex_
Definition: L1TStub.h:116
trklet::L1TStub::isFlipped_
unsigned int isFlipped_
Definition: L1TStub.h:119
trklet::L1TStub::iphi_
unsigned int iphi_
Definition: L1TStub.h:103
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
trklet::L1TStub::iphi
unsigned int iphi() const
Definition: L1TStub.h:64
trklet::L1TStub::sigmaz
double sigmaz() const
Definition: L1TStub.h:71
trklet::L1TStub::r
double r() const
Definition: L1TStub.h:57
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
trklet::L1TStub::bend_
double bend_
Definition: L1TStub.h:115
trklet::L1TStub::r2
double r2() const
Definition: L1TStub.h:59
trklet::L1TStub::phi
double phi() const
Definition: L1TStub.h:62
trklet::L1TStub::iz_
unsigned int iz_
Definition: L1TStub.h:104