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 (DTPrimitive *ptr)
 
 DTPrimitive (std::shared_ptr< 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() [1/3]

DTPrimitive::DTPrimitive ( )

Definition at line 10 of file DTprimitive.cc.

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 }

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

◆ DTPrimitive() [2/3]

DTPrimitive::DTPrimitive ( std::shared_ptr< DTPrimitive > &  ptr)

Definition at line 24 of file DTprimitive.cc.

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 }

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

◆ DTPrimitive() [3/3]

DTPrimitive::DTPrimitive ( DTPrimitive ptr)

Definition at line 38 of file DTprimitive.cc.

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 }

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

◆ ~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.

36 { return cameraId_; };

References cameraId_.

Referenced by DTPrimitive().

◆ channelId()

const int DTPrimitive::channelId ( ) const
inline

Definition at line 34 of file DTprimitive.h.

34 { return channelId_; };

References channelId_.

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

◆ isValidTime()

bool DTPrimitive::isValidTime ( void  )

Definition at line 57 of file DTprimitive.cc.

57 { return (tdcTimeStamp_ >= 0 ? true : false); }

◆ laterality()

const cmsdt::LATERAL_CASES DTPrimitive::laterality ( ) const
inline

Definition at line 38 of file DTprimitive.h.

38 { return laterality_; };

References laterality_.

Referenced by DTPrimitive().

◆ layerId()

const int DTPrimitive::layerId ( ) const
inline

Definition at line 35 of file DTprimitive.h.

35 { return layerId_; };

References layerId_.

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

◆ orbit()

const int DTPrimitive::orbit ( ) const
inline

Definition at line 31 of file DTprimitive.h.

31 { return orbit_; };

References orbit_.

Referenced by DTPrimitive().

◆ payLoad()

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

Definition at line 33 of file DTprimitive.h.

33 { return payLoad_[idx]; };

References training_settings::idx, and payLoad_.

Referenced by DTPrimitive().

◆ setCameraId()

void DTPrimitive::setCameraId ( int  camera)
inline

Definition at line 25 of file DTprimitive.h.

25 { cameraId_ = camera; };

References cameraId_.

Referenced by PseudoBayesGrouping::FillDigisByLayer().

◆ setChannelId()

void DTPrimitive::setChannelId ( int  channel)
inline

Definition at line 23 of file DTprimitive.h.

23 { channelId_ = channel; };

References channelId_.

Referenced by PseudoBayesGrouping::FillDigisByLayer().

◆ setLaterality()

void DTPrimitive::setLaterality ( cmsdt::LATERAL_CASES  lat)
inline

Definition at line 27 of file DTprimitive.h.

27 { laterality_ = lat; };

References laterality_.

◆ setLayerId()

void DTPrimitive::setLayerId ( int  layer)
inline

Definition at line 24 of file DTprimitive.h.

24 { layerId_ = layer; };

References layerId_.

Referenced by PseudoBayesGrouping::FillDigisByLayer().

◆ setOrbit()

void DTPrimitive::setOrbit ( int  orb)
inline

Definition at line 21 of file DTprimitive.h.

21 { orbit_ = orb; }

References orbit_.

◆ setPayload()

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

Definition at line 22 of file DTprimitive.h.

22 { this->payLoad_[idx] = hitTag; };

References training_settings::idx, and payLoad_.

◆ setSuperLayerId()

void DTPrimitive::setSuperLayerId ( int  lay)
inline

Definition at line 26 of file DTprimitive.h.

26 { superLayerId_ = lay; };

References superLayerId_.

Referenced by PseudoBayesGrouping::FillDigisByLayer().

◆ setTDCTimeStamp()

void DTPrimitive::setTDCTimeStamp ( int  tstamp)
inline

Definition at line 20 of file DTprimitive.h.

20 { tdcTimeStamp_ = tstamp; };

References tdcTimeStamp_.

Referenced by PseudoBayesGrouping::FillDigisByLayer().

◆ setTimeCorrection()

void DTPrimitive::setTimeCorrection ( int  time)
inline

Definition at line 19 of file DTprimitive.h.

19 { timeCorrection_ = time; };

References ntuplemaker::time, and timeCorrection_.

◆ superLayerId()

const int DTPrimitive::superLayerId ( ) const
inline

Definition at line 37 of file DTprimitive.h.

37 { return superLayerId_; };

References superLayerId_.

Referenced by DTPrimitive().

◆ tdcTimeStamp()

const int DTPrimitive::tdcTimeStamp ( ) const
inline

Definition at line 30 of file DTprimitive.h.

30 { return tdcTimeStamp_; };

References tdcTimeStamp_.

Referenced by DTPrimitive().

◆ tdcTimeStampNoOffset()

const int DTPrimitive::tdcTimeStampNoOffset ( ) const
inline

Definition at line 32 of file DTprimitive.h.

32 { return tdcTimeStamp_ - timeCorrection_; };

References tdcTimeStamp_, and timeCorrection_.

◆ timeCorrection()

const int DTPrimitive::timeCorrection ( ) const
inline

Definition at line 29 of file DTprimitive.h.

29 { return timeCorrection_; };

References timeCorrection_.

Referenced by DTPrimitive().

◆ wireHorizPos()

float DTPrimitive::wireHorizPos ( void  )

Definition at line 59 of file DTprimitive.cc.

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 }

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

Member Data Documentation

◆ cameraId_

int DTPrimitive::cameraId_
private

Definition at line 38 of file DTprimitive.h.

Referenced by cameraId(), and setCameraId().

◆ channelId_

int DTPrimitive::channelId_
private

Definition at line 44 of file DTprimitive.h.

Referenced by channelId(), and setChannelId().

◆ laterality_

cmsdt::LATERAL_CASES DTPrimitive::laterality_
private

Definition at line 45 of file DTprimitive.h.

Referenced by laterality(), and setLaterality().

◆ layerId_

int DTPrimitive::layerId_
private

Definition at line 43 of file DTprimitive.h.

Referenced by layerId(), and setLayerId().

◆ orbit_

int DTPrimitive::orbit_
private

Definition at line 49 of file DTprimitive.h.

Referenced by orbit(), and setOrbit().

◆ payLoad_

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

Definition at line 50 of file DTprimitive.h.

Referenced by payLoad(), and setPayload().

◆ superLayerId_

int DTPrimitive::superLayerId_
private

Definition at line 42 of file DTprimitive.h.

Referenced by setSuperLayerId(), and superLayerId().

◆ tdcTimeStamp_

int DTPrimitive::tdcTimeStamp_
private

Definition at line 48 of file DTprimitive.h.

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

◆ timeCorrection_

int DTPrimitive::timeCorrection_
private

Definition at line 47 of file DTprimitive.h.

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

DTPrimitive::layerId_
int layerId_
Definition: DTprimitive.h:43
mps_fire.i
i
Definition: mps_fire.py:355
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:234
DTPrimitive::channelId
const int channelId() const
Definition: DTprimitive.h:34
DTPrimitive::setChannelId
void setChannelId(int channel)
Definition: DTprimitive.h:23
training_settings.idx
idx
Definition: training_settings.py:16
DTPrimitive::timeCorrection_
int timeCorrection_
Definition: DTprimitive.h:47
DTPrimitive::setLayerId
void setLayerId(int layer)
Definition: DTprimitive.h:24
cmsdt::CELL_SEMILENGTH
constexpr int CELL_SEMILENGTH
Definition: constants.h:180
DTPrimitive::layerId
const int layerId() const
Definition: DTprimitive.h:35
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
cmsdt::CELL_LENGTH
constexpr int CELL_LENGTH
Definition: constants.h:179
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
NONE
Definition: TkAlStyle.cc:47
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
ntuplemaker.time
time
Definition: ntuplemaker.py:310
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