CMS 3D CMS Logo

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
 
bool operator== (const DTPrimitive &dtp)
 
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() [1/3]

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:53
void setPayload(double hitTag, int idx)
Definition: DTprimitive.h:22
int timeCorrection_
Definition: DTprimitive.h:52
int channelId_
Definition: DTprimitive.h:49
int superLayerId_
Definition: DTprimitive.h:47
cmsdt::LATERAL_CASES laterality_
Definition: DTprimitive.h:50
Definition: TkAlStyle.h:43
constexpr int PAYLOAD_ENTRIES
Definition: constants.h:388

◆ DTPrimitive() [2/3]

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:388

◆ DTPrimitive() [3/3]

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 }
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
void setLayerId(int layer)
Definition: DTprimitive.h:24
const int layerId() const
Definition: DTprimitive.h:35
void setChannelId(int channel)
Definition: DTprimitive.h:23
void setTDCTimeStamp(int tstamp)
Definition: DTprimitive.h:20
const int tdcTimeStamp() const
Definition: DTprimitive.h:30
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
void setOrbit(int orb)
Definition: DTprimitive.h:21
const int cameraId() const
Definition: DTprimitive.h:36
constexpr int PAYLOAD_ENTRIES
Definition: constants.h:388
const int superLayerId() const
Definition: DTprimitive.h:37

◆ ~DTPrimitive()

DTPrimitive::~DTPrimitive ( )
virtual

Definition at line 52 of file DTprimitive.cc.

52 {}

Member Function Documentation

◆ cameraId()

const int DTPrimitive::cameraId ( ) const
inline

Definition at line 36 of file DTprimitive.h.

References cameraId_.

Referenced by DTPrimitive(), and operator==().

36 { return cameraId_; };

◆ channelId()

const int DTPrimitive::channelId ( ) const
inline

Definition at line 34 of file DTprimitive.h.

References channelId_.

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

34 { return channelId_; };
int channelId_
Definition: DTprimitive.h:49

◆ isValidTime()

bool DTPrimitive::isValidTime ( void  )

Definition at line 57 of file DTprimitive.cc.

57 { return (tdcTimeStamp_ >= 0 ? true : false); }
int tdcTimeStamp_
Definition: DTprimitive.h:53

◆ laterality()

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:50

◆ layerId()

const int DTPrimitive::layerId ( ) const
inline

Definition at line 35 of file DTprimitive.h.

References layerId_.

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

35 { return layerId_; };

◆ operator==()

bool DTPrimitive::operator== ( const DTPrimitive dtp)
inline

Definition at line 40 of file DTprimitive.h.

References cameraId(), channelId(), layerId(), superLayerId(), and tdcTimeStamp().

40  {
41  return (tdcTimeStamp() == dtp.tdcTimeStamp() && channelId() == dtp.channelId() && layerId() == dtp.layerId() &&
42  cameraId() == dtp.cameraId() && cameraId() == dtp.cameraId() && superLayerId() == dtp.superLayerId());
43  }
const int channelId() const
Definition: DTprimitive.h:34
const int layerId() const
Definition: DTprimitive.h:35
const int tdcTimeStamp() const
Definition: DTprimitive.h:30
const int cameraId() const
Definition: DTprimitive.h:36
const int superLayerId() const
Definition: DTprimitive.h:37

◆ orbit()

const int DTPrimitive::orbit ( ) const
inline

Definition at line 31 of file DTprimitive.h.

References orbit_.

Referenced by DTPrimitive().

31 { return orbit_; };

◆ payLoad()

const double DTPrimitive::payLoad ( int  idx) const
inline

Definition at line 33 of file DTprimitive.h.

References heavyIonCSV_trainingSettings::idx, and payLoad_.

Referenced by DTPrimitive().

33 { return payLoad_[idx]; };
double payLoad_[cmsdt::PAYLOAD_ENTRIES]
Definition: DTprimitive.h:55

◆ setCameraId()

void DTPrimitive::setCameraId ( int  camera)
inline

Definition at line 25 of file DTprimitive.h.

References cameraId_.

Referenced by PseudoBayesGrouping::FillDigisByLayer().

25 { cameraId_ = camera; };

◆ setChannelId()

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:49

◆ setLaterality()

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:50

◆ setLayerId()

void DTPrimitive::setLayerId ( int  layer)
inline

Definition at line 24 of file DTprimitive.h.

References nano_mu_digi_cff::layer, and layerId_.

Referenced by PseudoBayesGrouping::FillDigisByLayer().

◆ setOrbit()

void DTPrimitive::setOrbit ( int  orb)
inline

Definition at line 21 of file DTprimitive.h.

References orbit_.

21 { orbit_ = orb; }

◆ setPayload()

void DTPrimitive::setPayload ( double  hitTag,
int  idx 
)
inline

Definition at line 22 of file DTprimitive.h.

References heavyIonCSV_trainingSettings::idx, and payLoad_.

22 { this->payLoad_[idx] = hitTag; };
double payLoad_[cmsdt::PAYLOAD_ENTRIES]
Definition: DTprimitive.h:55

◆ setSuperLayerId()

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:47

◆ setTDCTimeStamp()

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:53

◆ setTimeCorrection()

void DTPrimitive::setTimeCorrection ( int  time)
inline

Definition at line 19 of file DTprimitive.h.

References hcalRecHitTable_cff::time, and timeCorrection_.

◆ superLayerId()

const int DTPrimitive::superLayerId ( ) const
inline

Definition at line 37 of file DTprimitive.h.

References superLayerId_.

Referenced by DTPrimitive(), and operator==().

37 { return superLayerId_; };
int superLayerId_
Definition: DTprimitive.h:47

◆ tdcTimeStamp()

const int DTPrimitive::tdcTimeStamp ( ) const
inline

Definition at line 30 of file DTprimitive.h.

References tdcTimeStamp_.

Referenced by DTPrimitive(), TrapezoidalGrouping::group_hits(), hitTimeSort(), and operator==().

30 { return tdcTimeStamp_; };
int tdcTimeStamp_
Definition: DTprimitive.h:53

◆ tdcTimeStampNoOffset()

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:53
int timeCorrection_
Definition: DTprimitive.h:52

◆ timeCorrection()

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:52

◆ wireHorizPos()

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)
65  return wireHorizPos;
66 }
const int channelId() const
Definition: DTprimitive.h:34
constexpr int CELL_LENGTH
Definition: constants.h:313
constexpr int CELL_SEMILENGTH
Definition: constants.h:314
const int layerId() const
Definition: DTprimitive.h:35
float wireHorizPos()
Definition: DTprimitive.cc:59

Member Data Documentation

◆ cameraId_

int DTPrimitive::cameraId_
private

Definition at line 46 of file DTprimitive.h.

Referenced by cameraId(), and setCameraId().

◆ channelId_

int DTPrimitive::channelId_
private

Definition at line 49 of file DTprimitive.h.

Referenced by channelId(), and setChannelId().

◆ laterality_

cmsdt::LATERAL_CASES DTPrimitive::laterality_
private

Definition at line 50 of file DTprimitive.h.

Referenced by laterality(), and setLaterality().

◆ layerId_

int DTPrimitive::layerId_
private

Definition at line 48 of file DTprimitive.h.

Referenced by layerId(), and setLayerId().

◆ orbit_

int DTPrimitive::orbit_
private

Definition at line 54 of file DTprimitive.h.

Referenced by orbit(), and setOrbit().

◆ payLoad_

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

Definition at line 55 of file DTprimitive.h.

Referenced by payLoad(), and setPayload().

◆ superLayerId_

int DTPrimitive::superLayerId_
private

Definition at line 47 of file DTprimitive.h.

Referenced by setSuperLayerId(), and superLayerId().

◆ tdcTimeStamp_

int DTPrimitive::tdcTimeStamp_
private

Definition at line 53 of file DTprimitive.h.

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

◆ timeCorrection_

int DTPrimitive::timeCorrection_
private

Definition at line 52 of file DTprimitive.h.

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