CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
DTPrimitive Class Reference

#include <DTprimitive.h>

Public Member Functions

const int cameraId () const
 
const int channelId () const
 
 DTPrimitive ()
 
 DTPrimitive (std::shared_ptr< DTPrimitive > &ptr)
 
 DTPrimitive (DTPrimitive *ptr)
 
bool isValidTime ()
 
const cmsdt::LATERAL_CASES laterality () const
 
const int layerId () const
 
const int orbit () const
 
const double payLoad (int idx) const
 
void setCameraId (int camera)
 
void setChannelId (int channel)
 
void setLaterality (cmsdt::LATERAL_CASES lat)
 
void setLayerId (int layer)
 
void setOrbit (int orb)
 
void setPayload (double hitTag, int idx)
 
void setSuperLayerId (int lay)
 
void setTDCTimeStamp (int tstamp)
 
void setTimeCorrection (int time)
 
const int superLayerId () const
 
const int tdcTimeStamp () const
 
const int tdcTimeStampNoOffset () const
 
const int timeCorrection () const
 
float wireHorizPos ()
 
virtual ~DTPrimitive ()
 

Private Attributes

int cameraId_
 
int channelId_
 
cmsdt::LATERAL_CASES laterality_
 
int layerId_
 
int orbit_
 
double payLoad_ [cmsdt::PAYLOAD_ENTRIES]
 
int superLayerId_
 
int tdcTimeStamp_
 
int timeCorrection_
 

Detailed Description

Definition at line 9 of file DTprimitive.h.

Constructor & Destructor Documentation

DTPrimitive::DTPrimitive ( )

Definition at line 10 of file DTprimitive.cc.

References mps_fire::i, cmsdt::NONE, and cmsdt::PAYLOAD_ENTRIES.

10  {
11  cameraId_ = -1;
12  superLayerId_ = -1;
13  layerId_ = -1;
14  channelId_ = -1;
15  tdcTimeStamp_ = -1;
16  orbit_ = -1;
17  timeCorrection_ = 0;
18  laterality_ = NONE;
19 
20  for (int i = 0; i < PAYLOAD_ENTRIES; i++)
21  setPayload(0.0, i);
22 }
int tdcTimeStamp_
Definition: DTprimitive.h:48
void setPayload(double hitTag, int idx)
Definition: DTprimitive.h:22
int timeCorrection_
Definition: DTprimitive.h:47
int channelId_
Definition: DTprimitive.h:44
int superLayerId_
Definition: DTprimitive.h:42
cmsdt::LATERAL_CASES laterality_
Definition: DTprimitive.h:45
constexpr int PAYLOAD_ENTRIES
Definition: constants.h:249
DTPrimitive::DTPrimitive ( std::shared_ptr< DTPrimitive > &  ptr)

Definition at line 24 of file DTprimitive.cc.

References mps_fire::i, and cmsdt::PAYLOAD_ENTRIES.

24  {
25  setTimeCorrection(ptr->timeCorrection());
26  setTDCTimeStamp(ptr->tdcTimeStamp());
27  setOrbit(ptr->orbit());
28  setChannelId(ptr->channelId());
29  setLayerId(ptr->layerId());
30  setCameraId(ptr->cameraId());
31  setSuperLayerId(ptr->superLayerId());
32  setLaterality(ptr->laterality());
33 
34  for (int i = 0; i < PAYLOAD_ENTRIES; i++)
35  setPayload(ptr->payLoad(i), i);
36 }
void setTimeCorrection(int time)
Definition: DTprimitive.h:19
void setPayload(double hitTag, int idx)
Definition: DTprimitive.h:22
void setLayerId(int layer)
Definition: DTprimitive.h:24
void setChannelId(int channel)
Definition: DTprimitive.h:23
void setTDCTimeStamp(int tstamp)
Definition: DTprimitive.h:20
void setLaterality(cmsdt::LATERAL_CASES lat)
Definition: DTprimitive.h:27
void setSuperLayerId(int lay)
Definition: DTprimitive.h:26
void setCameraId(int camera)
Definition: DTprimitive.h:25
void setOrbit(int orb)
Definition: DTprimitive.h:21
constexpr int PAYLOAD_ENTRIES
Definition: constants.h:249
DTPrimitive::DTPrimitive ( DTPrimitive ptr)

Definition at line 38 of file DTprimitive.cc.

References cameraId(), channelId(), mps_fire::i, laterality(), layerId(), orbit(), payLoad(), cmsdt::PAYLOAD_ENTRIES, superLayerId(), tdcTimeStamp(), and timeCorrection().

38  {
41  setOrbit(ptr->orbit());
42  setChannelId(ptr->channelId());
43  setLayerId(ptr->layerId());
44  setCameraId(ptr->cameraId());
46  setLaterality(ptr->laterality());
47 
48  for (int i = 0; i < PAYLOAD_ENTRIES; i++)
49  setPayload(ptr->payLoad(i), i);
50 }
const double payLoad(int idx) const
Definition: DTprimitive.h:33
void setTimeCorrection(int time)
Definition: DTprimitive.h:19
void setPayload(double hitTag, int idx)
Definition: DTprimitive.h:22
void setLayerId(int layer)
Definition: DTprimitive.h:24
const int channelId() const
Definition: DTprimitive.h:34
const int cameraId() const
Definition: DTprimitive.h:36
void setChannelId(int channel)
Definition: DTprimitive.h:23
void setTDCTimeStamp(int tstamp)
Definition: DTprimitive.h:20
const int timeCorrection() const
Definition: DTprimitive.h:29
void setLaterality(cmsdt::LATERAL_CASES lat)
Definition: DTprimitive.h:27
void setSuperLayerId(int lay)
Definition: DTprimitive.h:26
const int orbit() const
Definition: DTprimitive.h:31
const cmsdt::LATERAL_CASES laterality() const
Definition: DTprimitive.h:38
void setCameraId(int camera)
Definition: DTprimitive.h:25
void setOrbit(int orb)
Definition: DTprimitive.h:21
const int superLayerId() const
Definition: DTprimitive.h:37
const int layerId() const
Definition: DTprimitive.h:35
const int tdcTimeStamp() const
Definition: DTprimitive.h:30
constexpr int PAYLOAD_ENTRIES
Definition: constants.h:249
DTPrimitive::~DTPrimitive ( )
virtual

Definition at line 52 of file DTprimitive.cc.

52 {}

Member Function Documentation

const int DTPrimitive::cameraId ( ) const
inline

Definition at line 36 of file DTprimitive.h.

References cameraId_.

Referenced by DTPrimitive().

36 { return cameraId_; };
const int DTPrimitive::channelId ( ) const
inline

Definition at line 34 of file DTprimitive.h.

References channelId_.

Referenced by DTPrimitive(), and dtbayesam::CandidateGroup::removeHit().

34 { return channelId_; };
int channelId_
Definition: DTprimitive.h:44
bool DTPrimitive::isValidTime ( void  )

Definition at line 57 of file DTprimitive.cc.

57 { return (tdcTimeStamp_ >= 0 ? true : false); }
int tdcTimeStamp_
Definition: DTprimitive.h:48
const cmsdt::LATERAL_CASES DTPrimitive::laterality ( ) const
inline

Definition at line 38 of file DTprimitive.h.

References laterality_.

Referenced by DTPrimitive().

38 { return laterality_; };
cmsdt::LATERAL_CASES laterality_
Definition: DTprimitive.h:45
const int DTPrimitive::layerId ( ) const
inline

Definition at line 35 of file DTprimitive.h.

References layerId_.

Referenced by DTPrimitive(), and dtbayesam::CandidateGroup::removeHit().

35 { return layerId_; };
const int DTPrimitive::orbit ( ) const
inline

Definition at line 31 of file DTprimitive.h.

References orbit_.

Referenced by DTPrimitive().

31 { return orbit_; };
const double DTPrimitive::payLoad ( int  idx) const
inline

Definition at line 33 of file DTprimitive.h.

References payLoad_.

Referenced by DTPrimitive().

33 { return payLoad_[idx]; };
double payLoad_[cmsdt::PAYLOAD_ENTRIES]
Definition: DTprimitive.h:50
void DTPrimitive::setCameraId ( int  camera)
inline

Definition at line 25 of file DTprimitive.h.

References cameraId_.

Referenced by PseudoBayesGrouping::FillDigisByLayer().

25 { cameraId_ = camera; };
void DTPrimitive::setChannelId ( int  channel)
inline

Definition at line 23 of file DTprimitive.h.

References channelId_.

Referenced by PseudoBayesGrouping::FillDigisByLayer().

23 { channelId_ = channel; };
int channelId_
Definition: DTprimitive.h:44
void DTPrimitive::setLaterality ( cmsdt::LATERAL_CASES  lat)
inline

Definition at line 27 of file DTprimitive.h.

References laterality_.

27 { laterality_ = lat; };
cmsdt::LATERAL_CASES laterality_
Definition: DTprimitive.h:45
void DTPrimitive::setLayerId ( int  layer)
inline

Definition at line 24 of file DTprimitive.h.

References phase1PixelTopology::layer, and layerId_.

Referenced by PseudoBayesGrouping::FillDigisByLayer().

24 { layerId_ = layer; };
constexpr std::array< uint8_t, layerIndexSize > layer
void DTPrimitive::setOrbit ( int  orb)
inline

Definition at line 21 of file DTprimitive.h.

References orbit_.

21 { orbit_ = orb; }
void DTPrimitive::setPayload ( double  hitTag,
int  idx 
)
inline

Definition at line 22 of file DTprimitive.h.

References payLoad_.

22 { this->payLoad_[idx] = hitTag; };
double payLoad_[cmsdt::PAYLOAD_ENTRIES]
Definition: DTprimitive.h:50
void DTPrimitive::setSuperLayerId ( int  lay)
inline

Definition at line 26 of file DTprimitive.h.

References superLayerId_.

Referenced by PseudoBayesGrouping::FillDigisByLayer().

26 { superLayerId_ = lay; };
int superLayerId_
Definition: DTprimitive.h:42
void DTPrimitive::setTDCTimeStamp ( int  tstamp)
inline

Definition at line 20 of file DTprimitive.h.

References tdcTimeStamp_.

Referenced by PseudoBayesGrouping::FillDigisByLayer().

20 { tdcTimeStamp_ = tstamp; };
int tdcTimeStamp_
Definition: DTprimitive.h:48
void DTPrimitive::setTimeCorrection ( int  time)
inline

Definition at line 19 of file DTprimitive.h.

References timeCorrection_.

19 { timeCorrection_ = time; };
int timeCorrection_
Definition: DTprimitive.h:47
const int DTPrimitive::superLayerId ( ) const
inline

Definition at line 37 of file DTprimitive.h.

References superLayerId_.

Referenced by DTPrimitive().

37 { return superLayerId_; };
int superLayerId_
Definition: DTprimitive.h:42
const int DTPrimitive::tdcTimeStamp ( ) const
inline

Definition at line 30 of file DTprimitive.h.

References tdcTimeStamp_.

Referenced by DTPrimitive().

30 { return tdcTimeStamp_; };
int tdcTimeStamp_
Definition: DTprimitive.h:48
const int DTPrimitive::tdcTimeStampNoOffset ( ) const
inline

Definition at line 32 of file DTprimitive.h.

References tdcTimeStamp_, and timeCorrection_.

32 { return tdcTimeStamp_ - timeCorrection_; };
int tdcTimeStamp_
Definition: DTprimitive.h:48
int timeCorrection_
Definition: DTprimitive.h:47
const int DTPrimitive::timeCorrection ( ) const
inline

Definition at line 29 of file DTprimitive.h.

References timeCorrection_.

Referenced by DTPrimitive().

29 { return timeCorrection_; };
int timeCorrection_
Definition: DTprimitive.h:47
float DTPrimitive::wireHorizPos ( void  )

Definition at line 59 of file DTprimitive.cc.

References cmsdt::CELL_LENGTH, and cmsdt::CELL_SEMILENGTH.

59  {
60  // For layers with odd-number
62  // If layer is even, you must correct by half a cell
63  if (layerId() == 0 || layerId() == 2)
64  wireHorizPos += CELL_SEMILENGTH;
65  return wireHorizPos;
66 }
const int channelId() const
Definition: DTprimitive.h:34
constexpr int CELL_LENGTH
Definition: constants.h:186
constexpr int CELL_SEMILENGTH
Definition: constants.h:187
float wireHorizPos()
Definition: DTprimitive.cc:59
const int layerId() const
Definition: DTprimitive.h:35

Member Data Documentation

int DTPrimitive::cameraId_
private

Definition at line 38 of file DTprimitive.h.

Referenced by cameraId(), and setCameraId().

int DTPrimitive::channelId_
private

Definition at line 44 of file DTprimitive.h.

Referenced by channelId(), and setChannelId().

cmsdt::LATERAL_CASES DTPrimitive::laterality_
private

Definition at line 45 of file DTprimitive.h.

Referenced by laterality(), and setLaterality().

int DTPrimitive::layerId_
private

Definition at line 43 of file DTprimitive.h.

Referenced by layerId(), and setLayerId().

int DTPrimitive::orbit_
private

Definition at line 49 of file DTprimitive.h.

Referenced by orbit(), and setOrbit().

double DTPrimitive::payLoad_[cmsdt::PAYLOAD_ENTRIES]
private

Definition at line 50 of file DTprimitive.h.

Referenced by payLoad(), and setPayload().

int DTPrimitive::superLayerId_
private

Definition at line 42 of file DTprimitive.h.

Referenced by setSuperLayerId(), and superLayerId().

int DTPrimitive::tdcTimeStamp_
private

Definition at line 48 of file DTprimitive.h.

Referenced by setTDCTimeStamp(), tdcTimeStamp(), and tdcTimeStampNoOffset().

int DTPrimitive::timeCorrection_
private

Definition at line 47 of file DTprimitive.h.

Referenced by setTimeCorrection(), tdcTimeStampNoOffset(), and timeCorrection().