5 using namespace trklet;
7 void SLHCEvent::addL1SimTrack(
8 int eventid,
int trackid,
int type,
double pt,
double eta,
double phi,
double vx,
double vy,
double vz) {
9 L1SimTrack simtrack(eventid, trackid, type, pt, eta, phi, vx, vy, vz);
10 simtracks_.push_back(simtrack);
13 bool SLHCEvent::addStub(
string DTClink,
25 L1TStub stub(DTClink, region, layerdisk, stubword, isPSmodule, isFlipped, x, y, z, bend, strip, tps);
27 stubs_.push_back(stub);
31 SLHCEvent::SLHCEvent(istream&
in) {
34 if (tmp !=
"Event:") {
37 edm::LogVerbatim(
"Tracklet") <<
"WARNING: fewer events to process than specified!";
48 while (tmp !=
"SimTrackEnd") {
49 if (!(tmp ==
"SimTrack:" || tmp ==
"SimTrackEnd")) {
50 edm::LogVerbatim(
"Tracklet") <<
"Expected to read 'SimTrack:' or 'SimTrackEnd' but found:" <<
tmp;
62 in >> eventid >> trackid >> type >> pt >> eta >> phi >> vx >> vy >> vz;
63 L1SimTrack simtrack(eventid, trackid, type, pt, eta, phi, vx, vy, vz);
64 simtracks_.push_back(simtrack);
70 while (tmp !=
"Stubend") {
75 if (!(tmp ==
"Stub:" || tmp ==
"Stubend")) {
93 in >> DTClink >> region >> layerdisk >> stubword >> isPSmodule >> isFlipped >> x >> y >> z >> bend >> strip >> ntps;
95 for (
unsigned int itps = 0; itps < ntps; itps++) {
101 L1TStub stub(DTClink, region, layerdisk, stubword, isPSmodule, isFlipped, x, y, z, bend, strip, tps);
105 double t =
std::abs(stub.z()) / stub.r();
106 double eta = asinh(t);
109 stubs_.push_back(stub);
115 out <<
"Event: " << eventnum_ << endl;
117 for (
auto& simtrack : simtracks_) {
120 out <<
"SimTrackEnd" << endl;
122 for (
auto& stub : stubs_) {
125 out <<
"Stubend" << endl;
128 unsigned int SLHCEvent::layersHit(
int tpid,
int&
nlayers,
int& ndisks) {
142 for (
auto& stub : stubs_) {
143 if (stub.tpmatch(tpid)) {
144 if (stub.layer() == 0)
146 if (stub.layer() == 1)
148 if (stub.layer() == 2)
150 if (stub.layer() == 3)
152 if (stub.layer() == 4)
154 if (stub.layer() == 5)
157 if (
abs(stub.disk()) == 1)
159 if (
abs(stub.disk()) == 2)
161 if (
abs(stub.disk()) == 3)
163 if (
abs(stub.disk()) == 4)
165 if (
abs(stub.disk()) == 5)
170 nlayers = l1 + l2 + l3 + l4 + l5 + l6;
171 ndisks = d1 + d2 + d3 + d4 + d5;
173 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)
uint16_t const *__restrict__ x
static constexpr float d1