CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes
L1TMuon::TTTriggerPrimitive Class Reference

#include <TTMuonTriggerPrimitive.h>

Classes

struct  TTData
 

Public Types

enum  subsystem_type { kTT = 20, kNSubsystems }
 
typedef DetId TTDetId
 
typedef TTStub< Ref_Phase2TrackerDigi_TTDigi
 

Public Member Functions

TTDataaccessTTData ()
 
TTDetId detId () const
 
const int getBend () const
 
const int getBX () const
 
const double getCMSGlobalEta () const
 
const double getCMSGlobalPhi () const
 
const GlobalPoint getCMSGlobalPoint () const
 
const double getCMSGlobalRho () const
 
const unsigned getGlobalSector () const
 
const int getSegment () const
 
const int getStrip () const
 
const unsigned getSubSector () const
 
const TTData getTTData () const
 
TTTriggerPrimitiveoperator= (const TTTriggerPrimitive &tp)
 
bool operator== (const TTTriggerPrimitive &tp) const
 
void print (std::ostream &) const
 
TTDetId rawId () const
 
void setCMSGlobalEta (const double eta)
 
void setCMSGlobalPhi (const double phi)
 
void setCMSGlobalRho (const double rho)
 
void setTTData (const TTData &data)
 
const subsystem_type subsystem () const
 
 TTTriggerPrimitive ()
 
 TTTriggerPrimitive (const TTDetId &detid, const TTDigi &digi)
 
 TTTriggerPrimitive (const TTTriggerPrimitive &)
 
 ~TTTriggerPrimitive ()
 

Private Member Functions

void calculateTTGlobalSector (const TTDetId &detid, unsigned &globalsector, unsigned &subsector)
 

Private Attributes

TTData _data
 
double _eta
 
unsigned _globalsector
 
TTDetId _id
 
double _phi
 
double _rho
 
unsigned _subsector
 
subsystem_type _subsystem
 
double _theta
 

Detailed Description

Definition at line 23 of file TTMuonTriggerPrimitive.h.

Member Typedef Documentation

Definition at line 31 of file TTMuonTriggerPrimitive.h.

Definition at line 30 of file TTMuonTriggerPrimitive.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

L1TMuon::TTTriggerPrimitive::TTTriggerPrimitive ( )
inline
TTTriggerPrimitive::TTTriggerPrimitive ( const TTDetId detid,
const TTDigi digi 
)

Definition at line 12 of file TTMuonTriggerPrimitive.cc.

References _data, _globalsector, _subsector, L1TMuon::TTTriggerPrimitive::TTData::bend, L1TMuon::TTTriggerPrimitive::TTData::bx, calculateTTGlobalSector(), L1TMuon::TTTriggerPrimitive::TTData::col_f, TTStub< T >::getClusterRef(), TTStub< T >::getTriggerBend(), L1TMuon::TTTriggerPrimitive::TTData::row_f, PV2DBase< T, PVType, FrameType >::x(), and PV2DBase< T, PVType, FrameType >::y().

12  :
13  _id(detid),
14  _subsystem(kTT) {
16 
17  const MeasurementPoint& mp = digi.getClusterRef(0)->findAverageLocalCoordinatesCentered();
18  _data.row_f = mp.x();
19  _data.col_f = mp.y();
20  _data.bend = digi.getTriggerBend();
21  _data.bx = 0;
22 }
T y() const
Definition: PV2DBase.h:46
void calculateTTGlobalSector(const TTDetId &detid, unsigned &globalsector, unsigned &subsector)
T x() const
Definition: PV2DBase.h:45
TTTriggerPrimitive::TTTriggerPrimitive ( const TTTriggerPrimitive tp)
L1TMuon::TTTriggerPrimitive::~TTTriggerPrimitive ( )
inline

Definition at line 52 of file TTMuonTriggerPrimitive.h.

References operator=(), and operator==().

52 {}

Member Function Documentation

TTData& L1TMuon::TTTriggerPrimitive::accessTTData ( )
inline

Definition at line 87 of file TTMuonTriggerPrimitive.h.

References _data, getBend(), getBX(), getSegment(), and getStrip().

void TTTriggerPrimitive::calculateTTGlobalSector ( const TTDetId detid,
unsigned &  globalsector,
unsigned &  subsector 
)
private

Definition at line 111 of file TTMuonTriggerPrimitive.cc.

Referenced by getSubSector(), and TTTriggerPrimitive().

113  {
114  globalsector = 0;
115  subsector = 0;
116 }
TTDetId L1TMuon::TTTriggerPrimitive::detId ( ) const
inline
const int TTTriggerPrimitive::getBend ( ) const

Definition at line 99 of file TTMuonTriggerPrimitive.cc.

References _data, _subsystem, L1TMuon::TTTriggerPrimitive::TTData::bend, Exception, and kTT.

Referenced by accessTTData().

99  {
100  switch(_subsystem) {
101  case kTT:
102  return static_cast<int>(_data.bend);
103  default:
104  throw cms::Exception("Invalid Subsytem")
105  << "The specified subsystem for this track stub is out of range"
106  << std::endl;
107  }
108  return -1;
109 }
const int TTTriggerPrimitive::getBX ( ) const

Definition at line 63 of file TTMuonTriggerPrimitive.cc.

References _data, _subsystem, L1TMuon::TTTriggerPrimitive::TTData::bx, Exception, and kTT.

Referenced by accessTTData().

63  {
64  switch(_subsystem) {
65  case kTT:
66  return _data.bx;
67  default:
68  throw cms::Exception("Invalid Subsytem")
69  << "The specified subsystem for this track stub is out of range"
70  << std::endl;
71  }
72  return -1;
73 }
const double L1TMuon::TTTriggerPrimitive::getCMSGlobalEta ( ) const
inline

Definition at line 64 of file TTMuonTriggerPrimitive.h.

References _eta.

const double L1TMuon::TTTriggerPrimitive::getCMSGlobalPhi ( ) const
inline

Definition at line 66 of file TTMuonTriggerPrimitive.h.

References _phi.

const GlobalPoint L1TMuon::TTTriggerPrimitive::getCMSGlobalPoint ( ) const
inline

Definition at line 71 of file TTMuonTriggerPrimitive.h.

References _eta, _phi, _rho, JetChargeProducer_cfi::exp, funct::tan(), and theta().

71  {
72  double theta = 2. * atan( exp(-_eta) );
74  };
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Geom::Theta< T > theta() const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
const double L1TMuon::TTTriggerPrimitive::getCMSGlobalRho ( ) const
inline

Definition at line 68 of file TTMuonTriggerPrimitive.h.

References _rho.

const unsigned L1TMuon::TTTriggerPrimitive::getGlobalSector ( ) const
inline

Definition at line 95 of file TTMuonTriggerPrimitive.h.

References _globalsector.

const int TTTriggerPrimitive::getSegment ( ) const

Definition at line 87 of file TTMuonTriggerPrimitive.cc.

References _data, _subsystem, L1TMuon::TTTriggerPrimitive::TTData::col_f, Exception, and kTT.

Referenced by accessTTData().

87  {
88  switch(_subsystem) {
89  case kTT:
90  return static_cast<int>(_data.col_f);
91  default:
92  throw cms::Exception("Invalid Subsytem")
93  << "The specified subsystem for this track stub is out of range"
94  << std::endl;
95  }
96  return -1;
97 }
const int TTTriggerPrimitive::getStrip ( ) const

Definition at line 75 of file TTMuonTriggerPrimitive.cc.

References _data, _subsystem, Exception, kTT, and L1TMuon::TTTriggerPrimitive::TTData::row_f.

Referenced by accessTTData().

75  {
76  switch(_subsystem) {
77  case kTT:
78  return static_cast<int>(_data.row_f);
79  default:
80  throw cms::Exception("Invalid Subsytem")
81  << "The specified subsystem for this track stub is out of range"
82  << std::endl;
83  }
84  return -1;
85 }
const unsigned L1TMuon::TTTriggerPrimitive::getSubSector ( ) const
inline

Definition at line 96 of file TTMuonTriggerPrimitive.h.

References _subsector, calculateTTGlobalSector(), and print().

const TTData L1TMuon::TTTriggerPrimitive::getTTData ( ) const
inline
TTTriggerPrimitive & TTTriggerPrimitive::operator= ( const TTTriggerPrimitive tp)

Definition at line 38 of file TTMuonTriggerPrimitive.cc.

References _data, _eta, _globalsector, _id, _phi, _rho, _subsector, _subsystem, and _theta.

Referenced by ~TTTriggerPrimitive().

bool TTTriggerPrimitive::operator== ( const TTTriggerPrimitive tp) const

Definition at line 52 of file TTMuonTriggerPrimitive.cc.

References _data, _globalsector, _id, _subsector, _subsystem, L1TMuon::TTTriggerPrimitive::TTData::bend, L1TMuon::TTTriggerPrimitive::TTData::bx, L1TMuon::TTTriggerPrimitive::TTData::col_f, and L1TMuon::TTTriggerPrimitive::TTData::row_f.

Referenced by ~TTTriggerPrimitive().

52  {
53  return ( static_cast<int>(this->_data.row_f) == static_cast<int>(tp._data.row_f) &&
54  static_cast<int>(this->_data.col_f) == static_cast<int>(tp._data.col_f) &&
55  this->_data.bend == tp._data.bend &&
56  this->_data.bx == tp._data.bx &&
57  this->_id == tp._id &&
58  this->_subsystem == tp._subsystem &&
59  this->_globalsector == tp._globalsector &&
60  this->_subsector == tp._subsector );
61 }
void TTTriggerPrimitive::print ( std::ostream &  out) const

Definition at line 124 of file TTMuonTriggerPrimitive.cc.

References _data, _eta, _phi, _rho, _subsystem, _theta, L1TMuon::TTTriggerPrimitive::TTData::bend, L1TMuon::TTTriggerPrimitive::TTData::bx, L1TMuon::TTTriggerPrimitive::TTData::col_f, detId(), Exception, training_settings::idx, kTT, and L1TMuon::TTTriggerPrimitive::TTData::row_f.

Referenced by getSubSector().

124  {
125  unsigned idx = (unsigned) _subsystem;
126  out << subsystem_names[idx] << " Trigger Primitive" << std::endl;
127  out << "eta: " << _eta << " phi: " << _phi << " rho: " << _rho
128  << " bend: " << _theta << std::endl;
129  switch(_subsystem) {
130  case kTT:
131  out << detId() << std::endl;
132  out << "Strip : " << static_cast<int>(_data.row_f) << std::endl;
133  out << "Segment : " << static_cast<int>(_data.col_f) << std::endl;
134  out << "Bend : " << _data.bend << std::endl;
135  out << "BX : " << _data.bx << std::endl;
136  break;
137  default:
138  throw cms::Exception("Invalid Subsytem")
139  << "The specified subsystem for this track stub is out of range"
140  << std::endl;
141  }
142 }
TTDetId L1TMuon::TTTriggerPrimitive::rawId ( ) const
inline

Definition at line 80 of file TTMuonTriggerPrimitive.h.

References detId().

80 { return detId(); }
void L1TMuon::TTTriggerPrimitive::setCMSGlobalEta ( const double  eta)
inline
void L1TMuon::TTTriggerPrimitive::setCMSGlobalPhi ( const double  phi)
inline

Definition at line 67 of file TTMuonTriggerPrimitive.h.

References _phi.

void L1TMuon::TTTriggerPrimitive::setCMSGlobalRho ( const double  rho)
inline

Definition at line 69 of file TTMuonTriggerPrimitive.h.

References _rho.

void L1TMuon::TTTriggerPrimitive::setTTData ( const TTData data)
inline

Definition at line 83 of file TTMuonTriggerPrimitive.h.

References _data, and data.

83 { _data = data; }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const subsystem_type L1TMuon::TTTriggerPrimitive::subsystem ( ) const
inline

Member Data Documentation

TTData L1TMuon::TTTriggerPrimitive::_data
private
double L1TMuon::TTTriggerPrimitive::_eta
private
unsigned L1TMuon::TTTriggerPrimitive::_globalsector
private
TTDetId L1TMuon::TTTriggerPrimitive::_id
private

Definition at line 109 of file TTMuonTriggerPrimitive.h.

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

double L1TMuon::TTTriggerPrimitive::_phi
private
double L1TMuon::TTTriggerPrimitive::_rho
private
unsigned L1TMuon::TTTriggerPrimitive::_subsector
private

Definition at line 114 of file TTMuonTriggerPrimitive.h.

Referenced by getSubSector(), operator=(), operator==(), and TTTriggerPrimitive().

subsystem_type L1TMuon::TTTriggerPrimitive::_subsystem
private
double L1TMuon::TTTriggerPrimitive::_theta
private

Definition at line 116 of file TTMuonTriggerPrimitive.h.

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