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 22 of file TTMuonTriggerPrimitive.h.

Member Typedef Documentation

Definition at line 30 of file TTMuonTriggerPrimitive.h.

Definition at line 29 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, TTStub< T >::bendFE(), L1TMuon::TTTriggerPrimitive::TTData::bx, calculateTTGlobalSector(), TTStub< T >::clusterRef(), L1TMuon::TTTriggerPrimitive::TTData::col_f, L1TMuon::TTTriggerPrimitive::TTData::row_f, PV2DBase< T, PVType, FrameType >::x(), and PV2DBase< T, PVType, FrameType >::y().

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

Definition at line 51 of file TTMuonTriggerPrimitive.h.

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

51 {}

Member Function Documentation

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

Definition at line 85 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 101 of file TTMuonTriggerPrimitive.cc.

Referenced by getSubSector(), and TTTriggerPrimitive().

101  {
102  globalsector = 0;
103  subsector = 0;
104 }
TTDetId L1TMuon::TTTriggerPrimitive::detId ( ) const
inline
const int TTTriggerPrimitive::getBend ( ) const

Definition at line 90 of file TTMuonTriggerPrimitive.cc.

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

Referenced by accessTTData().

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

Definition at line 57 of file TTMuonTriggerPrimitive.cc.

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

Referenced by accessTTData().

57  {
58  switch (_subsystem) {
59  case kTT:
60  return _data.bx;
61  default:
62  throw cms::Exception("Invalid Subsytem")
63  << "The specified subsystem for this track stub is out of range" << std::endl;
64  }
65  return -1;
66 }
const double L1TMuon::TTTriggerPrimitive::getCMSGlobalEta ( ) const
inline

Definition at line 63 of file TTMuonTriggerPrimitive.h.

References _eta.

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

Definition at line 65 of file TTMuonTriggerPrimitive.h.

References _phi.

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

Definition at line 70 of file TTMuonTriggerPrimitive.h.

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

70  {
71  double theta = 2. * atan(exp(-_eta));
73  };
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 67 of file TTMuonTriggerPrimitive.h.

References _rho.

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

Definition at line 93 of file TTMuonTriggerPrimitive.h.

References _globalsector.

const int TTTriggerPrimitive::getSegment ( ) const

Definition at line 79 of file TTMuonTriggerPrimitive.cc.

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

Referenced by accessTTData().

79  {
80  switch (_subsystem) {
81  case kTT:
82  return static_cast<int>(_data.col_f);
83  default:
84  throw cms::Exception("Invalid Subsytem")
85  << "The specified subsystem for this track stub is out of range" << std::endl;
86  }
87  return -1;
88 }
const int TTTriggerPrimitive::getStrip ( ) const

Definition at line 68 of file TTMuonTriggerPrimitive.cc.

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

Referenced by accessTTData().

68  {
69  switch (_subsystem) {
70  case kTT:
71  return static_cast<int>(_data.row_f);
72  default:
73  throw cms::Exception("Invalid Subsytem")
74  << "The specified subsystem for this track stub is out of range" << std::endl;
75  }
76  return -1;
77 }
const unsigned L1TMuon::TTTriggerPrimitive::getSubSector ( ) const
inline

Definition at line 94 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 35 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 49 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().

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

Definition at line 112 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().

112  {
113  unsigned idx = (unsigned)_subsystem;
114  out << subsystem_names[idx] << " Trigger Primitive" << std::endl;
115  out << "eta: " << _eta << " phi: " << _phi << " rho: " << _rho << " bend: " << _theta << std::endl;
116  switch (_subsystem) {
117  case kTT:
118  out << detId() << std::endl;
119  out << "Strip : " << static_cast<int>(_data.row_f) << std::endl;
120  out << "Segment : " << static_cast<int>(_data.col_f) << std::endl;
121  out << "Bend : " << _data.bend << std::endl;
122  out << "BX : " << _data.bx << std::endl;
123  break;
124  default:
125  throw cms::Exception("Invalid Subsytem")
126  << "The specified subsystem for this track stub is out of range" << std::endl;
127  }
128 }
TTDetId L1TMuon::TTTriggerPrimitive::rawId ( ) const
inline

Definition at line 78 of file TTMuonTriggerPrimitive.h.

References detId().

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

Definition at line 66 of file TTMuonTriggerPrimitive.h.

References _phi.

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

Definition at line 68 of file TTMuonTriggerPrimitive.h.

References _rho.

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

Definition at line 81 of file TTMuonTriggerPrimitive.h.

References _data, and data.

81 { _data = data; }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
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 105 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 110 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 112 of file TTMuonTriggerPrimitive.h.

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