File indexing completed on 2023-03-17 11:13:45
0001
0002 #ifndef L1Trigger_TrackFindingTracklet_interface_L1SimTrack_h
0003 #define L1Trigger_TrackFindingTracklet_interface_L1SimTrack_h
0004
0005 #include <iostream>
0006 #include <fstream>
0007 #include <cstdlib>
0008 #include <vector>
0009 #include <cmath>
0010 #include <cassert>
0011
0012 namespace trklet {
0013
0014 class L1SimTrack {
0015 public:
0016 L1SimTrack();
0017 L1SimTrack(int eventid, int trackid, int type, double pt, double eta, double phi, double vx, double vy, double vz);
0018 ~L1SimTrack() = default;
0019
0020 void write(std::ofstream& out);
0021 void write(std::ostream& out);
0022
0023 int eventid() const { return eventid_; }
0024 int trackid() const { return trackid_; }
0025 int type() const { return type_; }
0026 double pt() const { return pt_; }
0027 double eta() const { return eta_; }
0028 double phi() const { return phi_; }
0029 double vx() const { return vx_; }
0030 double vy() const { return vy_; }
0031 double vz() const { return vz_; }
0032 double dxy() const { return -vx() * sin(phi()) + vy() * cos(phi()); }
0033 double d0() const { return -dxy(); }
0034 int charge() const {
0035 if (type_ == 11 || type_ == 13 || type_ == -211 || type_ == -321 || type_ == -2212)
0036 return -1;
0037 return 1;
0038 }
0039
0040 private:
0041 int eventid_;
0042 int trackid_;
0043 int type_;
0044 double pt_;
0045 double eta_;
0046 double phi_;
0047 double vx_;
0048 double vy_;
0049 double vz_;
0050 };
0051
0052 };
0053 #endif