File indexing completed on 2024-04-06 12:21:55
0001
0002
0003
0004
0005 #ifndef L1Trigger_TrackFindingTracklet_interface_SLHCEvent_h
0006 #define L1Trigger_TrackFindingTracklet_interface_SLHCEvent_h
0007
0008 #include <iostream>
0009 #include <fstream>
0010 #include <cstdlib>
0011 #include <vector>
0012 #include <cmath>
0013 #include <cassert>
0014
0015 #include "L1Trigger/TrackFindingTracklet/interface/L1TStub.h"
0016 #include "L1Trigger/TrackFindingTracklet/interface/L1SimTrack.h"
0017
0018 namespace trklet {
0019
0020 class SLHCEvent {
0021 public:
0022 SLHCEvent() {
0023
0024 eventnum_ = 0;
0025 }
0026 SLHCEvent(std::istream& in);
0027 ~SLHCEvent() = default;
0028
0029 void setEventNum(int eventnum) { eventnum_ = eventnum; }
0030
0031 void addL1SimTrack(
0032 int eventid, int trackid, int type, double pt, double eta, double phi, double vx, double vy, double vz);
0033
0034 bool addStub(std::string DTClink,
0035 int region,
0036 int layerdisk,
0037 std::string stubword,
0038 int isPSmodule,
0039 int isFlipped,
0040 bool tiltedBarrel,
0041 unsigned int tiltedRingId,
0042 unsigned int endcapRingId,
0043 unsigned int detId,
0044 double x,
0045 double y,
0046 double z,
0047 double bend,
0048 double strip,
0049 std::vector<int> tpstt,
0050 int stubindex);
0051
0052 const L1TStub& lastStub() const { return stubs_.back(); }
0053
0054 void setIP(double x, double y) {
0055 ipx_ = x;
0056 ipy_ = y;
0057 }
0058
0059 void write(std::ofstream& out);
0060
0061 unsigned int layersHit(int tpid, int& nlayers, int& ndisks);
0062
0063 int nstubs() const { return stubs_.size(); }
0064
0065 const L1TStub& stub(int i) const { return stubs_[i]; }
0066
0067 unsigned int nsimtracks() const { return simtracks_.size(); }
0068
0069 const L1SimTrack& simtrack(int i) const { return simtracks_[i]; }
0070
0071 int eventnum() const { return eventnum_; }
0072
0073 private:
0074 int eventnum_;
0075 std::vector<L1SimTrack> simtracks_;
0076 std::vector<L1TStub> stubs_;
0077 double ipx_, ipy_;
0078 };
0079
0080 };
0081 #endif