CMS 3D CMS Logo

DTprimitive.h
Go to the documentation of this file.
1 #ifndef L1Trigger_DTTriggerPhase2_DTprimitive_h
2 #define L1Trigger_DTTriggerPhase2_DTprimitive_h
3 
5 #include <ostream>
6 #include <memory>
7 #include <vector>
8 
9 class DTPrimitive {
10 public:
11  DTPrimitive();
12  DTPrimitive(std::shared_ptr<DTPrimitive>& ptr);
14  virtual ~DTPrimitive();
15 
16  bool isValidTime();
17  float wireHorizPos();
18 
20  void setTDCTimeStamp(int tstamp) { tdcTimeStamp_ = tstamp; };
21  void setOrbit(int orb) { orbit_ = orb; }
22  void setPayload(double hitTag, int idx) { this->payLoad_[idx] = hitTag; };
23  void setChannelId(int channel) { channelId_ = channel; };
24  void setLayerId(int layer) { layerId_ = layer; };
25  void setCameraId(int camera) { cameraId_ = camera; };
26  void setSuperLayerId(int lay) { superLayerId_ = lay; };
28 
29  const int timeCorrection() const { return timeCorrection_; };
30  const int tdcTimeStamp() const { return tdcTimeStamp_; };
31  const int orbit() const { return orbit_; };
32  const int tdcTimeStampNoOffset() const { return tdcTimeStamp_ - timeCorrection_; };
33  const double payLoad(int idx) const { return payLoad_[idx]; };
34  const int channelId() const { return channelId_; };
35  const int layerId() const { return layerId_; };
36  const int cameraId() const { return cameraId_; };
37  const int superLayerId() const { return superLayerId_; };
38  const cmsdt::LATERAL_CASES laterality() const { return laterality_; };
39 
40 private:
41  int cameraId_; // Chamber ID
42  int superLayerId_; // SL ID
43  int layerId_; // Layer ID
44  int channelId_; // Wire number
45  cmsdt::LATERAL_CASES laterality_; // LEFT, RIGHT, NONE
46 
49  int orbit_;
51 };
52 
53 typedef std::vector<DTPrimitive> DTPrimitives;
54 typedef std::shared_ptr<DTPrimitive> DTPrimitivePtr;
55 typedef std::vector<DTPrimitivePtr> DTPrimitivePtrs;
56 
57 #endif
std::vector< DTPrimitivePtr > DTPrimitivePtrs
Definition: DTprimitive.h:55
int tdcTimeStamp_
Definition: DTprimitive.h:48
void setTimeCorrection(int time)
Definition: DTprimitive.h:19
const int channelId() const
Definition: DTprimitive.h:34
const cmsdt::LATERAL_CASES laterality() const
Definition: DTprimitive.h:38
void setPayload(double hitTag, int idx)
Definition: DTprimitive.h:22
LATERAL_CASES
Definition: constants.h:45
void setLayerId(int layer)
Definition: DTprimitive.h:24
bool isValidTime()
Definition: DTprimitive.cc:57
int timeCorrection_
Definition: DTprimitive.h:47
int channelId_
Definition: DTprimitive.h:44
const int tdcTimeStampNoOffset() const
Definition: DTprimitive.h:32
const int layerId() const
Definition: DTprimitive.h:35
void setChannelId(int channel)
Definition: DTprimitive.h:23
void setTDCTimeStamp(int tstamp)
Definition: DTprimitive.h:20
double payLoad_[cmsdt::PAYLOAD_ENTRIES]
Definition: DTprimitive.h:50
virtual ~DTPrimitive()
Definition: DTprimitive.cc:52
const int tdcTimeStamp() const
Definition: DTprimitive.h:30
float wireHorizPos()
Definition: DTprimitive.cc:59
int superLayerId_
Definition: DTprimitive.h:42
void setLaterality(cmsdt::LATERAL_CASES lat)
Definition: DTprimitive.h:27
const double payLoad(int idx) const
Definition: DTprimitive.h:33
const int orbit() const
Definition: DTprimitive.h:31
void setSuperLayerId(int lay)
Definition: DTprimitive.h:26
const int timeCorrection() const
Definition: DTprimitive.h:29
void setCameraId(int camera)
Definition: DTprimitive.h:25
cmsdt::LATERAL_CASES laterality_
Definition: DTprimitive.h:45
void setOrbit(int orb)
Definition: DTprimitive.h:21
std::vector< DTPrimitive > DTPrimitives
Definition: DTprimitive.h:53
const int cameraId() const
Definition: DTprimitive.h:36
std::shared_ptr< DTPrimitive > DTPrimitivePtr
Definition: DTprimitive.h:54
constexpr int PAYLOAD_ENTRIES
Definition: constants.h:249
const int superLayerId() const
Definition: DTprimitive.h:37