CMS 3D CMS Logo

SLHCEvent.h
Go to the documentation of this file.
1 // This holds two classes: L1SimTrack (truth level simulated track), and SLHCEvent (support for maintaining standalone running)
2 #ifndef L1Trigger_TrackFindingTracklet_interface_SLHCEvent_h
3 #define L1Trigger_TrackFindingTracklet_interface_SLHCEvent_h
4 
5 #include <iostream>
6 #include <fstream>
7 #include <cstdlib>
8 #include <vector>
9 #include <cmath>
10 #include <cassert>
11 
14 
15 namespace trklet {
16 
17  class SLHCEvent {
18  public:
20  //empty constructor to be used with 'filler' functions
21  eventnum_ = 0;
22  }
23  SLHCEvent(std::istream& in);
24  ~SLHCEvent() = default;
25 
27 
28  void addL1SimTrack(
29  int eventid, int trackid, int type, double pt, double eta, double phi, double vx, double vy, double vz);
30 
31  bool addStub(std::string DTClink,
32  int region,
33  int layerdisk,
34  std::string stubword,
35  int isPSmodule,
36  int isFlipped,
37  double x,
38  double y,
39  double z,
40  double bend,
41  double strip,
42  std::vector<int> tps);
43 
44  const L1TStub& lastStub() const { return stubs_.back(); }
45 
46  void setIP(double x, double y) {
47  ipx_ = x;
48  ipy_ = y;
49  }
50 
51  void write(std::ofstream& out);
52 
53  unsigned int layersHit(int tpid, int& nlayers, int& ndisks);
54 
55  int nstubs() const { return stubs_.size(); }
56 
57  const L1TStub& stub(int i) const { return stubs_[i]; }
58 
59  unsigned int nsimtracks() const { return simtracks_.size(); }
60 
61  const L1SimTrack& simtrack(int i) const { return simtracks_[i]; }
62 
63  int eventnum() const { return eventnum_; }
64 
65  private:
66  int eventnum_;
67  std::vector<L1SimTrack> simtracks_;
68  std::vector<L1TStub> stubs_;
69  double ipx_, ipy_;
70  };
71 
72 }; // namespace trklet
73 #endif
trklet::SLHCEvent::stub
const L1TStub & stub(int i) const
Definition: SLHCEvent.h:57
L1TStub.h
mps_fire.i
i
Definition: mps_fire.py:428
trklet::SLHCEvent::addStub
bool addStub(std::string DTClink, int region, int layerdisk, std::string stubword, int isPSmodule, int isFlipped, double x, double y, double z, double bend, double strip, std::vector< int > tps)
Definition: SLHCEvent.cc:13
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
trklet::L1TStub
Definition: L1TStub.h:14
trklet::L1SimTrack
Definition: L1SimTrack.h:14
trklet::SLHCEvent::setEventNum
void setEventNum(int eventnum)
Definition: SLHCEvent.h:26
trklet::SLHCEvent::SLHCEvent
SLHCEvent()
Definition: SLHCEvent.h:19
PVValHelper::eta
Definition: PVValidationHelpers.h:70
trklet::SLHCEvent::nstubs
int nstubs() const
Definition: SLHCEvent.h:55
trklet::SLHCEvent::setIP
void setIP(double x, double y)
Definition: SLHCEvent.h:46
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
recoMuon::in
Definition: RecoMuonEnumerators.h:6
trklet::SLHCEvent
Definition: SLHCEvent.h:17
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88286
trklet::SLHCEvent::eventnum
int eventnum() const
Definition: SLHCEvent.h:63
trklet::SLHCEvent::nsimtracks
unsigned int nsimtracks() const
Definition: SLHCEvent.h:59
trklet::SLHCEvent::layersHit
unsigned int layersHit(int tpid, int &nlayers, int &ndisks)
Definition: SLHCEvent.cc:128
trklet::SLHCEvent::ipx_
double ipx_
Definition: SLHCEvent.h:69
L1SimTrack.h
trklet::SLHCEvent::ipy_
double ipy_
Definition: SLHCEvent.h:69
trklet::SLHCEvent::write
void write(std::ofstream &out)
Definition: SLHCEvent.cc:114
trklet
Definition: AllInnerStubsMemory.h:10
trklet::SLHCEvent::addL1SimTrack
void addL1SimTrack(int eventid, int trackid, int type, double pt, double eta, double phi, double vx, double vy, double vz)
Definition: SLHCEvent.cc:7
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
trklet::SLHCEvent::eventnum_
int eventnum_
Definition: SLHCEvent.h:66
trklet::SLHCEvent::lastStub
const L1TStub & lastStub() const
Definition: SLHCEvent.h:44
trklet::SLHCEvent::~SLHCEvent
~SLHCEvent()=default
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
trklet::SLHCEvent::simtrack
const L1SimTrack & simtrack(int i) const
Definition: SLHCEvent.h:61
trklet::SLHCEvent::simtracks_
std::vector< L1SimTrack > simtracks_
Definition: SLHCEvent.h:67
trklet::SLHCEvent::stubs_
std::vector< L1TStub > stubs_
Definition: SLHCEvent.h:68
nlayers
Definition: HIMultiTrackSelector.h:48