Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:22:03

0001 #ifndef L1Trigger_DTTriggerPhase2_DTprimitive_h
0002 #define L1Trigger_DTTriggerPhase2_DTprimitive_h
0003 
0004 #include "L1Trigger/DTTriggerPhase2/interface/constants.h"
0005 #include <ostream>
0006 #include <memory>
0007 #include <vector>
0008 
0009 class DTPrimitive {
0010 public:
0011   DTPrimitive();
0012   DTPrimitive(std::shared_ptr<DTPrimitive>& ptr);
0013   DTPrimitive(DTPrimitive* ptr);
0014   virtual ~DTPrimitive();
0015 
0016   bool isValidTime();
0017   float wireHorizPos();
0018 
0019   void setTimeCorrection(int time) { timeCorrection_ = time; };
0020   void setTDCTimeStamp(int tstamp) { tdcTimeStamp_ = tstamp; };
0021   void setOrbit(int orb) { orbit_ = orb; }
0022   void setPayload(double hitTag, int idx) { this->payLoad_[idx] = hitTag; };
0023   void setChannelId(int channel) { channelId_ = channel; };
0024   void setLayerId(int layer) { layerId_ = layer; };
0025   void setCameraId(int camera) { cameraId_ = camera; };
0026   void setSuperLayerId(int lay) { superLayerId_ = lay; };
0027   void setLaterality(cmsdt::LATERAL_CASES lat) { laterality_ = lat; };
0028 
0029   const int timeCorrection() const { return timeCorrection_; };
0030   const int tdcTimeStamp() const { return tdcTimeStamp_; };
0031   const int orbit() const { return orbit_; };
0032   const int tdcTimeStampNoOffset() const { return tdcTimeStamp_ - timeCorrection_; };
0033   const double payLoad(int idx) const { return payLoad_[idx]; };
0034   const int channelId() const { return channelId_; };
0035   const int layerId() const { return layerId_; };
0036   const int cameraId() const { return cameraId_; };
0037   const int superLayerId() const { return superLayerId_; };
0038   const cmsdt::LATERAL_CASES laterality() const { return laterality_; };
0039 
0040 private:
0041   int cameraId_;                     // Chamber ID
0042   int superLayerId_;                 // SL ID
0043   int layerId_;                      // Layer ID
0044   int channelId_;                    // Wire number
0045   cmsdt::LATERAL_CASES laterality_;  // LEFT, RIGHT, NONE
0046 
0047   int timeCorrection_;
0048   int tdcTimeStamp_;
0049   int orbit_;
0050   double payLoad_[cmsdt::PAYLOAD_ENTRIES];
0051 };
0052 
0053 typedef std::vector<DTPrimitive> DTPrimitives;
0054 typedef std::shared_ptr<DTPrimitive> DTPrimitivePtr;
0055 typedef std::vector<DTPrimitivePtr> DTPrimitivePtrs;
0056 
0057 #endif