CMS 3D CMS Logo

L1TStub.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTracklet_interface_L1TStub_h
2 #define L1Trigger_TrackFindingTracklet_interface_L1TStub_h
3 
5 
6 #include <iostream>
7 #include <fstream>
8 #include <cassert>
9 #include <cmath>
10 #include <vector>
11 
12 namespace trklet {
13 
14  class L1TStub {
15  public:
16  L1TStub();
17 
19  int region,
20  int layerdisk,
22  int isPSmodule,
23  int isFlipped,
24  double x,
25  double y,
26  double z,
27  double bend,
28  double strip,
29  std::vector<int> tps);
30 
31  ~L1TStub() = default;
32 
33  void write(std::ofstream& out);
34 
35  double diphi();
36 
37  double iphiouter();
38 
39  double diz();
40 
41  unsigned int layer() const { return layer_; }
42  int disk() const {
43  if (layerdisk_ < N_LAYER) {
44  return 0;
45  }
46  int disk = layerdisk_ - N_LAYER + 1;
47  if (z_ < 0.0) {
48  return -disk;
49  }
50  return disk;
51  }
52  unsigned int ladder() const { return ladder_; }
53  unsigned int module() const { return module_; }
54 
55  double x() const { return x_; }
56  double y() const { return y_; }
57  double z() const { return z_; }
58  double r() const { return std::hypot(x_, y_); }
59  double pt() const { return pt_; }
60  double r2() const { return x_ * x_ + y_ * y_; }
61  double bend() const { return bend_; }
62 
63  double phi() const { return atan2(y_, x_); }
64 
65  unsigned int iphi() const { return iphi_; }
66  unsigned int iz() const { return iz_; }
67 
68  void setiphi(int iphi) { iphi_ = iphi; }
69  void setiz(int iz) { iz_ = iz; }
70 
71  double sigmax() const { return sigmax_; }
72  double sigmaz() const { return sigmaz_; }
73 
74  bool operator==(const L1TStub& other) const;
75 
76  void lorentzcor(double shift);
77 
78  int eventid() const { return eventid_; }
79  std::vector<int> tps() const { return tps_; }
80 
81  void setAllStubIndex(unsigned int index) { allstubindex_ = index; }
82 
83  unsigned int allStubIndex() const { return allstubindex_; }
84 
85  unsigned int strip() const { return strip_; }
86 
87  double alpha(double pitch) const;
88 
89  //Scaled to go between -1 and +1
90  double alphanorm() const;
91 
92  void setXY(double x, double y);
93 
94  unsigned int isPSmodule() const { return isPSmodule_; }
95  unsigned int isFlipped() const { return isFlipped_; }
96 
97  bool isTilted() const;
98 
99  bool tpmatch(int tp) const;
100  bool tpmatch2(int tp) const;
101 
102  const std::string& DTClink() const { return DTClink_; }
103 
104  int layerdisk() const { return layerdisk_; }
105 
106  int region() const { return region_; }
107 
108  const std::string& stubword() const { return stubword_; }
109 
110  private:
113  int region_;
115  int eventid_;
116  std::vector<int> tps_;
117  unsigned int iphi_;
118  unsigned int iz_;
119  unsigned int layer_;
120  unsigned int ladder_;
121  unsigned int module_;
122  unsigned int strip_;
123  double x_;
124  double y_;
125  double z_;
126  double sigmax_;
127  double sigmaz_;
128  double pt_;
129  double bend_;
130  unsigned int allstubindex_;
131 
132  unsigned int isPSmodule_;
133  unsigned int isFlipped_;
134  };
135 }; // namespace trklet
136 #endif
Settings.h
trklet::L1TStub::setXY
void setXY(double x, double y)
Definition: L1TStub.cc:97
trklet::L1TStub::tps
std::vector< int > tps() const
Definition: L1TStub.h:79
trklet::L1TStub::eventid_
int eventid_
Definition: L1TStub.h:115
trklet::L1TStub::region_
int region_
Definition: L1TStub.h:113
trklet::L1TStub::ladder
unsigned int ladder() const
Definition: L1TStub.h:52
trklet::L1TStub::sigmax
double sigmax() const
Definition: L1TStub.h:71
trklet::L1TStub::layer
unsigned int layer() const
Definition: L1TStub.h:41
trklet::L1TStub::pt
double pt() const
Definition: L1TStub.h:59
trklet::L1TStub::sigmaz_
double sigmaz_
Definition: L1TStub.h:127
trklet::L1TStub::strip_
unsigned int strip_
Definition: L1TStub.h:122
trklet::L1TStub::diphi
double diphi()
trklet::L1TStub::diz
double diz()
trklet::L1TStub::module_
unsigned int module_
Definition: L1TStub.h:121
trklet::L1TStub::isPSmodule_
unsigned int isPSmodule_
Definition: L1TStub.h:132
trklet::L1TStub::bend
double bend() const
Definition: L1TStub.h:61
trklet::L1TStub
Definition: L1TStub.h:14
trklet::L1TStub::z
double z() const
Definition: L1TStub.h:57
trklet::L1TStub::tps_
std::vector< int > tps_
Definition: L1TStub.h:116
trklet::L1TStub::ladder_
unsigned int ladder_
Definition: L1TStub.h:120
trklet::L1TStub::DTClink
const std::string & DTClink() const
Definition: L1TStub.h:102
trklet::L1TStub::y
double y() const
Definition: L1TStub.h:56
trklet::L1TStub::isTilted
bool isTilted() const
Definition: L1TStub.cc:126
trklet::L1TStub::L1TStub
L1TStub()
Definition: L1TStub.cc:6
trklet::L1TStub::DTClink_
std::string DTClink_
Definition: L1TStub.h:112
trklet::L1TStub::x
double x() const
Definition: L1TStub.h:55
trklet::L1TStub::write
void write(std::ofstream &out)
Definition: L1TStub.cc:51
trklet::L1TStub::sigmax_
double sigmax_
Definition: L1TStub.h:126
trklet::L1TStub::stubword_
std::string stubword_
Definition: L1TStub.h:114
trklet::L1TStub::~L1TStub
~L1TStub()=default
trklet::L1TStub::strip
unsigned int strip() const
Definition: L1TStub.h:85
trklet::L1TStub::isPSmodule
unsigned int isPSmodule() const
Definition: L1TStub.h:94
trklet::L1TStub::x_
double x_
Definition: L1TStub.h:123
trklet::N_LAYER
constexpr int N_LAYER
Definition: Settings.h:21
trackingPlots.other
other
Definition: trackingPlots.py:1464
trklet::L1TStub::module
unsigned int module() const
Definition: L1TStub.h:53
trklet::L1TStub::layerdisk
int layerdisk() const
Definition: L1TStub.h:104
cmsswSequenceInfo.tp
tp
Definition: cmsswSequenceInfo.py:17
trklet::L1TStub::tpmatch2
bool tpmatch2(int tp) const
Definition: L1TStub.cc:111
trklet::L1TStub::y_
double y_
Definition: L1TStub.h:124
trklet::L1TStub::allStubIndex
unsigned int allStubIndex() const
Definition: L1TStub.h:83
trklet::L1TStub::disk
int disk() const
Definition: L1TStub.h:42
trklet::L1TStub::isFlipped
unsigned int isFlipped() const
Definition: L1TStub.h:95
trklet::L1TStub::alphanorm
double alphanorm() const
Definition: L1TStub.cc:85
trklet::L1TStub::z_
double z_
Definition: L1TStub.h:125
trklet::L1TStub::layer_
unsigned int layer_
Definition: L1TStub.h:119
trklet::L1TStub::iz
unsigned int iz() const
Definition: L1TStub.h:66
trklet::L1TStub::layerdisk_
int layerdisk_
Definition: L1TStub.h:111
trklet::L1TStub::alpha
double alpha(double pitch) const
Definition: L1TStub.cc:73
trklet
Definition: AllInnerStubsMemory.h:10
trklet::L1TStub::pt_
double pt_
Definition: L1TStub.h:128
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
trklet::L1TStub::eventid
int eventid() const
Definition: L1TStub.h:78
trklet::L1TStub::lorentzcor
void lorentzcor(double shift)
Definition: L1TStub.cc:66
trklet::L1TStub::iphiouter
double iphiouter()
trklet::L1TStub::operator==
bool operator==(const L1TStub &other) const
Definition: L1TStub.cc:61
trklet::L1TStub::stubword
const std::string & stubword() const
Definition: L1TStub.h:108
edm::shift
static unsigned const int shift
Definition: LuminosityBlockID.cc:7
trklet::L1TStub::allstubindex_
unsigned int allstubindex_
Definition: L1TStub.h:130
trklet::L1TStub::setiphi
void setiphi(int iphi)
Definition: L1TStub.h:68
trklet::L1TStub::isFlipped_
unsigned int isFlipped_
Definition: L1TStub.h:133
trklet::L1TStub::iphi_
unsigned int iphi_
Definition: L1TStub.h:117
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
trklet::L1TStub::iphi
unsigned int iphi() const
Definition: L1TStub.h:65
trklet::L1TStub::sigmaz
double sigmaz() const
Definition: L1TStub.h:72
trklet::L1TStub::r
double r() const
Definition: L1TStub.h:58
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
trklet::L1TStub::tpmatch
bool tpmatch(int tp) const
Definition: L1TStub.cc:102
trklet::L1TStub::setAllStubIndex
void setAllStubIndex(unsigned int index)
Definition: L1TStub.h:81
trklet::L1TStub::setiz
void setiz(int iz)
Definition: L1TStub.h:69
trklet::L1TStub::region
int region() const
Definition: L1TStub.h:106
trklet::L1TStub::bend_
double bend_
Definition: L1TStub.h:129
trklet::L1TStub::r2
double r2() const
Definition: L1TStub.h:60
trklet::L1TStub::phi
double phi() const
Definition: L1TStub.h:63
trklet::L1TStub::iz_
unsigned int iz_
Definition: L1TStub.h:118