7 void SLHCEvent::addL1SimTrack(
8 int eventid,
int trackid,
int type,
double pt,
double eta,
double phi,
double vx,
double vy,
double vz) {
10 simtracks_.push_back(simtrack);
13 bool SLHCEvent::addStub(
string DTClink,
20 unsigned int tiltedRingId,
21 unsigned int endcapRingId,
48 stubs_.push_back(stub);
52 SLHCEvent::SLHCEvent(istream&
in) {
55 if (
tmp !=
"Event:") {
58 edm::LogVerbatim(
"Tracklet") <<
"WARNING: fewer events to process than specified!";
69 while (
tmp !=
"SimTrackEnd") {
70 if (!(
tmp ==
"SimTrack:" ||
tmp ==
"SimTrackEnd")) {
71 edm::LogVerbatim(
"Tracklet") <<
"Expected to read 'SimTrack:' or 'SimTrackEnd' but found:" <<
tmp;
85 simtracks_.push_back(simtrack);
91 while (
tmp !=
"Stubend") {
96 if (!(
tmp ==
"Stub:" ||
tmp ==
"Stubend")) {
114 in >> DTClink >>
region >> layerdisk >> stubword >> isPSmodule >> isFlipped >>
x >>
y >>
z >> bend >>
strip >> ntps;
117 bool tiltedBarrel =
false;
118 unsigned int tiltedRingId = 999999;
119 unsigned int endcapRingId = 999999;
120 unsigned int detId = 999999;
122 for (
unsigned int itps = 0; itps < ntps; itps++) {
147 double t =
std::abs(stub.z()) / stub.r();
148 double eta = asinh(
t);
151 stubs_.push_back(stub);
157 out <<
"Event: " << eventnum_ << endl;
159 for (
auto& simtrack : simtracks_) {
162 out <<
"SimTrackEnd" << endl;
164 for (
auto& stub : stubs_) {
167 out <<
"Stubend" << endl;
170 unsigned int SLHCEvent::layersHit(
int tpid,
int&
nlayers,
int& ndisks) {
184 for (
auto& stub : stubs_) {
185 if (stub.tpmatch(tpid)) {
186 if (stub.layer() == 0)
188 if (stub.layer() == 1)
190 if (stub.layer() == 2)
192 if (stub.layer() == 3)
194 if (stub.layer() == 4)
196 if (stub.layer() == 5)
199 if (
abs(stub.disk()) == 1)
201 if (
abs(stub.disk()) == 2)
203 if (
abs(stub.disk()) == 3)
205 if (
abs(stub.disk()) == 4)
207 if (
abs(stub.disk()) == 5)
212 nlayers = l1 + l2 + l3 + l4 + l5 + l6;
213 ndisks =
d1 + d2 + d3 + d4 + d5;
215 return l1 + 2 * l2 + 4 * l3 + 8 * l4 + 16 * l5 + 32 * l6 + 64 *
d1 + 128 * d2 + 256 * d3 + 512 * d4 + 1024 * d5;
Log< level::Info, true > LogVerbatim
Abs< T >::type abs(const T &t)
void setUniqueIndex(unsigned int index)
static constexpr float d1