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,
46 stubs_.push_back(stub);
50 SLHCEvent::SLHCEvent(istream&
in) {
53 if (
tmp !=
"Event:") {
56 edm::LogVerbatim(
"Tracklet") <<
"WARNING: fewer events to process than specified!";
67 while (
tmp !=
"SimTrackEnd") {
68 if (!(
tmp ==
"SimTrack:" ||
tmp ==
"SimTrackEnd")) {
69 edm::LogVerbatim(
"Tracklet") <<
"Expected to read 'SimTrack:' or 'SimTrackEnd' but found:" <<
tmp;
81 in >> eventid >> trackid >>
type >>
pt >>
eta >>
phi >> vx >> vy >> vz;
83 simtracks_.push_back(simtrack);
89 while (
tmp !=
"Stubend") {
94 if (!(
tmp ==
"Stub:" ||
tmp ==
"Stubend")) {
112 in >> DTClink >>
region >> layerdisk >> stubword >> isPSmodule >> isFlipped >>
x >>
y >>
z >> bend >>
strip >> ntps;
115 bool tiltedBarrel =
false;
116 unsigned int tiltedRingId = 999999;
117 unsigned int endcapRingId = 999999;
118 unsigned int detId = 999999;
120 for (
unsigned int itps = 0; itps < ntps; itps++) {
145 double t =
std::abs(stub.z()) / stub.r();
146 double eta = asinh(
t);
149 stubs_.push_back(stub);
155 out <<
"Event: " << eventnum_ << endl;
157 for (
auto& simtrack : simtracks_) {
160 out <<
"SimTrackEnd" << endl;
162 for (
auto& stub : stubs_) {
165 out <<
"Stubend" << endl;
168 unsigned int SLHCEvent::layersHit(
int tpid,
int&
nlayers,
int& ndisks) {
182 for (
auto& stub : stubs_) {
183 if (stub.tpmatch(tpid)) {
184 if (stub.layer() == 0)
186 if (stub.layer() == 1)
188 if (stub.layer() == 2)
190 if (stub.layer() == 3)
192 if (stub.layer() == 4)
194 if (stub.layer() == 5)
197 if (
abs(stub.disk()) == 1)
199 if (
abs(stub.disk()) == 2)
201 if (
abs(stub.disk()) == 3)
203 if (
abs(stub.disk()) == 4)
205 if (
abs(stub.disk()) == 5)
210 nlayers = l1 + l2 + l3 + l4 + l5 + l6;
211 ndisks =
d1 + d2 + d3 + d4 + d5;
213 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)
static constexpr float d1