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
DTPrimitive::layerId_
int layerId_
Definition: DTprimitive.h:43
DTPrimitive::cameraId_
int cameraId_
Definition: DTprimitive.h:38
DTPrimitive::setTimeCorrection
void setTimeCorrection(int time)
Definition: DTprimitive.h:19
DTPrimitive::laterality
const cmsdt::LATERAL_CASES laterality() const
Definition: DTprimitive.h:38
DTPrimitive::channelId_
int channelId_
Definition: DTprimitive.h:44
cmsdt::PAYLOAD_ENTRIES
constexpr int PAYLOAD_ENTRIES
Definition: constants.h:249
protons_cff.time
time
Definition: protons_cff.py:35
DTPrimitive::isValidTime
bool isValidTime()
Definition: DTprimitive.cc:57
DTPrimitive::channelId
const int channelId() const
Definition: DTprimitive.h:34
DTPrimitive::setChannelId
void setChannelId(int channel)
Definition: DTprimitive.h:23
DTPrimitive::timeCorrection_
int timeCorrection_
Definition: DTprimitive.h:47
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
DTPrimitive::setLayerId
void setLayerId(int layer)
Definition: DTprimitive.h:24
constants.h
cmsdt::LATERAL_CASES
LATERAL_CASES
Definition: constants.h:45
DTPrimitive::layerId
const int layerId() const
Definition: DTprimitive.h:35
DTPrimitive::~DTPrimitive
virtual ~DTPrimitive()
Definition: DTprimitive.cc:52
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
DTPrimitive
Definition: DTprimitive.h:9
DTPrimitive::tdcTimeStampNoOffset
const int tdcTimeStampNoOffset() const
Definition: DTprimitive.h:32
DTPrimitive::setTDCTimeStamp
void setTDCTimeStamp(int tstamp)
Definition: DTprimitive.h:20
DTPrimitive::tdcTimeStamp
const int tdcTimeStamp() const
Definition: DTprimitive.h:30
DTPrimitive::setLaterality
void setLaterality(cmsdt::LATERAL_CASES lat)
Definition: DTprimitive.h:27
DTPrimitive::payLoad_
double payLoad_[cmsdt::PAYLOAD_ENTRIES]
Definition: DTprimitive.h:50
DTPrimitive::setSuperLayerId
void setSuperLayerId(int lay)
Definition: DTprimitive.h:26
DTPrimitive::setCameraId
void setCameraId(int camera)
Definition: DTprimitive.h:25
DTPrimitive::setOrbit
void setOrbit(int orb)
Definition: DTprimitive.h:21
DTPrimitivePtr
std::shared_ptr< DTPrimitive > DTPrimitivePtr
Definition: DTprimitive.h:54
DTPrimitives
std::vector< DTPrimitive > DTPrimitives
Definition: DTprimitive.h:53
DTPrimitive::wireHorizPos
float wireHorizPos()
Definition: DTprimitive.cc:59
DTPrimitive::superLayerId_
int superLayerId_
Definition: DTprimitive.h:42
DTPrimitive::cameraId
const int cameraId() const
Definition: DTprimitive.h:36
DTPrimitive::payLoad
const double payLoad(int idx) const
Definition: DTprimitive.h:33
DTPrimitive::superLayerId
const int superLayerId() const
Definition: DTprimitive.h:37
DTPrimitive::orbit
const int orbit() const
Definition: DTprimitive.h:31
DTPrimitive::laterality_
cmsdt::LATERAL_CASES laterality_
Definition: DTprimitive.h:45
DTPrimitive::timeCorrection
const int timeCorrection() const
Definition: DTprimitive.h:29
DTPrimitivePtrs
std::vector< DTPrimitivePtr > DTPrimitivePtrs
Definition: DTprimitive.h:55
DTPrimitive::DTPrimitive
DTPrimitive()
Definition: DTprimitive.cc:10
DTPrimitive::setPayload
void setPayload(double hitTag, int idx)
Definition: DTprimitive.h:22
DTPrimitive::orbit_
int orbit_
Definition: DTprimitive.h:49
DTPrimitive::tdcTimeStamp_
int tdcTimeStamp_
Definition: DTprimitive.h:48