CMS 3D CMS Logo

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

#include <MuonTriggerPrimitive.h>

Classes

struct  CSCData
 
struct  DTData
 
struct  GEMData
 
struct  RPCData
 

Public Types

enum  subsystem_type {
  kDT, kCSC, kRPC, kGEM,
  kNSubsystems
}
 

Public Member Functions

CSCDataaccessCSCData ()
 
DTDataaccessDTData ()
 
GEMDataaccessGEMData ()
 
RPCDataaccessRPCData ()
 
template<typename IDType >
IDType detId () const
 
const int getBX () const
 
const double getCMSGlobalEta () const
 
const double getCMSGlobalPhi () const
 
const GlobalPoint getCMSGlobalPoint () const
 
const double getCMSGlobalRho () const
 
const CSCData getCSCData () const
 
const DTData getDTData () const
 
const GEMData getGEMData () const
 
const unsigned getGlobalSector () const
 
const int getPattern () const
 
const RPCData getRPCData () const
 
const int getStrip () const
 
const unsigned getSubSector () const
 
double getThetaBend () const
 
const int getWire () const
 
TriggerPrimitiveoperator= (const TriggerPrimitive &tp)
 
bool operator== (const TriggerPrimitive &tp) const
 
void print (std::ostream &) const
 
const DetId rawId () const
 
void setCMSGlobalEta (const double eta)
 
void setCMSGlobalPhi (const double phi)
 
void setCMSGlobalRho (const double rho)
 
void setCSCData (const CSCData &csc)
 
void setDTData (const DTData &dt)
 
void setGEMData (const GEMData &gem)
 
void setRPCData (const RPCData &rpc)
 
void setThetaBend (const double theta)
 
const subsystem_type subsystem () const
 
 TriggerPrimitive ()
 
 TriggerPrimitive (const DTChamberId &, const L1MuDTChambPhDigi &, const int segment_number)
 
 TriggerPrimitive (const DTChamberId &, const L1MuDTChambThDigi &, const int segment_number)
 
 TriggerPrimitive (const DTChamberId &, const L1MuDTChambPhDigi &, const L1MuDTChambThDigi &, const int theta_bti_group)
 
 TriggerPrimitive (const CSCDetId &, const CSCCorrelatedLCTDigi &)
 
 TriggerPrimitive (const RPCDetId &detid, const RPCDigi &digi)
 
 TriggerPrimitive (const RPCDetId &detid, const unsigned strip, const unsigned layer, const int bx)
 
 TriggerPrimitive (const RPCDetId &detid, const l1t::CPPFDigi &digi)
 
 TriggerPrimitive (const GEMDetId &detid, const GEMPadDigi &digi)
 
 TriggerPrimitive (const ME0DetId &detid, const ME0PadDigi &digi)
 
 TriggerPrimitive (const TriggerPrimitive &)
 

Private Member Functions

template<typename IDType >
void calculateGlobalSector (const IDType &chid, unsigned &globalsector, unsigned &subsector)
 

Private Attributes

CSCData _csc
 
DTData _dt
 
double _eta
 
GEMData _gem
 
unsigned _globalsector
 
DetId _id
 
double _phi
 
double _rho
 
RPCData _rpc
 
unsigned _subsector
 
subsystem_type _subsystem
 
double _theta
 

Detailed Description

Definition at line 58 of file MuonTriggerPrimitive.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

L1TMuon::TriggerPrimitive::TriggerPrimitive ( )
inline
TriggerPrimitive::TriggerPrimitive ( const DTChamberId detid,
const L1MuDTChambPhDigi digi_phi,
const int  segment_number 
)

Definition at line 26 of file MuonTriggerPrimitive.cc.

References _dt, _globalsector, _subsector, L1TMuon::TriggerPrimitive::DTData::bendingAngle, L1TMuon::TriggerPrimitive::DTData::bx, L1MuDTChambPhDigi::BxCnt(), L1TMuon::TriggerPrimitive::DTData::BxCntCode, L1MuDTChambPhDigi::bxNum(), calculateGlobalSector(), L1MuDTChambPhDigi::code(), L1MuDTChambPhDigi::phi(), L1MuDTChambPhDigi::phiB(), L1TMuon::TriggerPrimitive::DTData::qualityCode, L1TMuon::TriggerPrimitive::DTData::radialAngle, L1MuDTChambPhDigi::scNum(), L1TMuon::TriggerPrimitive::DTData::sector, L1TMuon::TriggerPrimitive::DTData::segment_number, L1TMuon::TriggerPrimitive::DTData::station, L1MuDTChambPhDigi::stNum(), L1TMuon::TriggerPrimitive::DTData::theta_bti_group, L1TMuon::TriggerPrimitive::DTData::theta_code, L1TMuon::TriggerPrimitive::DTData::theta_quality, L1MuDTChambPhDigi::Ts2Tag(), L1TMuon::TriggerPrimitive::DTData::Ts2TagCode, L1TMuon::TriggerPrimitive::DTData::wheel, and L1MuDTChambPhDigi::whNum().

28  :
29  _id(detid),
32  // fill in information from theta trigger
33  _dt.theta_bti_group = -1;
34  _dt.segment_number = segment_number;
35  _dt.theta_code = -1;
36  _dt.theta_quality = -1;
37  // now phi trigger
38  _dt.bx = digi_phi.bxNum();
39  _dt.wheel = digi_phi.whNum();
40  _dt.sector = digi_phi.scNum();
41  _dt.station = digi_phi.stNum();
42  _dt.radialAngle = digi_phi.phi();
43  _dt.bendingAngle = digi_phi.phiB();
44  _dt.qualityCode = digi_phi.code();
45  _dt.Ts2TagCode = digi_phi.Ts2Tag();
46  _dt.BxCntCode = digi_phi.BxCnt();
47 }
void calculateGlobalSector(const IDType &chid, unsigned &globalsector, unsigned &subsector)
TriggerPrimitive::TriggerPrimitive ( const DTChamberId detid,
const L1MuDTChambThDigi digi_th,
const int  segment_number 
)

Definition at line 49 of file MuonTriggerPrimitive.cc.

References _dt, _globalsector, _subsector, L1TMuon::TriggerPrimitive::DTData::bendingAngle, L1TMuon::TriggerPrimitive::DTData::bx, L1TMuon::TriggerPrimitive::DTData::BxCntCode, L1MuDTChambThDigi::bxNum(), calculateGlobalSector(), L1MuDTChambThDigi::code(), L1MuDTChambThDigi::position(), L1MuDTChambThDigi::quality(), L1TMuon::TriggerPrimitive::DTData::qualityCode, L1TMuon::TriggerPrimitive::DTData::radialAngle, L1MuDTChambThDigi::scNum(), L1TMuon::TriggerPrimitive::DTData::sector, L1TMuon::TriggerPrimitive::DTData::segment_number, L1TMuon::TriggerPrimitive::DTData::station, L1MuDTChambThDigi::stNum(), L1TMuon::TriggerPrimitive::DTData::theta_bti_group, L1TMuon::TriggerPrimitive::DTData::theta_code, L1TMuon::TriggerPrimitive::DTData::theta_quality, L1TMuon::TriggerPrimitive::DTData::Ts2TagCode, L1TMuon::TriggerPrimitive::DTData::wheel, and L1MuDTChambThDigi::whNum().

51  :
52  _id(detid),
55  // fill in information from theta trigger
56  _dt.theta_bti_group = theta_bti_group;
57  _dt.segment_number = digi_th.position(theta_bti_group);
58  _dt.theta_code = digi_th.code(theta_bti_group);
59  _dt.theta_quality = digi_th.quality(theta_bti_group);
60  // now phi trigger
61  _dt.bx = digi_th.bxNum();
62  _dt.wheel = digi_th.whNum();
63  _dt.sector = digi_th.scNum();
64  _dt.station = digi_th.stNum();
65  _dt.radialAngle = -1;
66  _dt.bendingAngle = -1;
67  _dt.qualityCode = -1;
68  _dt.Ts2TagCode = -1;
69  _dt.BxCntCode = -1;
70 }
int quality(const int i) const
int position(const int i) const
void calculateGlobalSector(const IDType &chid, unsigned &globalsector, unsigned &subsector)
int code(const int i) const
TriggerPrimitive::TriggerPrimitive ( const DTChamberId detid,
const L1MuDTChambPhDigi digi_phi,
const L1MuDTChambThDigi digi_th,
const int  theta_bti_group 
)

Definition at line 72 of file MuonTriggerPrimitive.cc.

References _dt, _globalsector, _subsector, L1TMuon::TriggerPrimitive::DTData::bendingAngle, L1TMuon::TriggerPrimitive::DTData::bx, L1MuDTChambPhDigi::BxCnt(), L1TMuon::TriggerPrimitive::DTData::BxCntCode, L1MuDTChambPhDigi::bxNum(), calculateGlobalSector(), L1MuDTChambPhDigi::code(), L1MuDTChambThDigi::code(), L1MuDTChambPhDigi::phi(), L1MuDTChambPhDigi::phiB(), L1MuDTChambThDigi::position(), L1MuDTChambThDigi::quality(), L1TMuon::TriggerPrimitive::DTData::qualityCode, L1TMuon::TriggerPrimitive::DTData::radialAngle, L1MuDTChambPhDigi::scNum(), L1TMuon::TriggerPrimitive::DTData::sector, L1TMuon::TriggerPrimitive::DTData::segment_number, L1TMuon::TriggerPrimitive::DTData::station, L1MuDTChambPhDigi::stNum(), L1TMuon::TriggerPrimitive::DTData::theta_bti_group, L1TMuon::TriggerPrimitive::DTData::theta_code, L1TMuon::TriggerPrimitive::DTData::theta_quality, L1MuDTChambPhDigi::Ts2Tag(), L1TMuon::TriggerPrimitive::DTData::Ts2TagCode, L1TMuon::TriggerPrimitive::DTData::wheel, and L1MuDTChambPhDigi::whNum().

75  :
76  _id(detid),
79  // fill in information from theta trigger
80  _dt.theta_bti_group = theta_bti_group;
81  _dt.segment_number = digi_th.position(theta_bti_group);
82  _dt.theta_code = digi_th.code(theta_bti_group);
83  _dt.theta_quality = digi_th.quality(theta_bti_group);
84  // now phi trigger
85  _dt.bx = digi_phi.bxNum();
86  _dt.wheel = digi_phi.whNum();
87  _dt.sector = digi_phi.scNum();
88  _dt.station = digi_phi.stNum();
89  _dt.radialAngle = digi_phi.phi();
90  _dt.bendingAngle = digi_phi.phiB();
91  _dt.qualityCode = digi_phi.code();
92  _dt.Ts2TagCode = digi_phi.Ts2Tag();
93  _dt.BxCntCode = digi_phi.BxCnt();
94 }
int quality(const int i) const
int position(const int i) const
void calculateGlobalSector(const IDType &chid, unsigned &globalsector, unsigned &subsector)
int code(const int i) const
TriggerPrimitive::TriggerPrimitive ( const CSCDetId detid,
const CSCCorrelatedLCTDigi digi 
)

Definition at line 97 of file MuonTriggerPrimitive.cc.

References _csc, _globalsector, _id, _subsector, L1TMuon::TriggerPrimitive::CSCData::alct_quality, L1TMuon::TriggerPrimitive::CSCData::bend, L1TMuon::TriggerPrimitive::CSCData::bx, L1TMuon::TriggerPrimitive::CSCData::bx0, calculateGlobalSector(), CSCDetId::chamber(), L1TMuon::TriggerPrimitive::CSCData::clct_quality, L1TMuon::TriggerPrimitive::CSCData::cscID, CSCDetId::endcap(), CSCCorrelatedLCTDigi::getALCT(), CSCCorrelatedLCTDigi::getBend(), CSCCorrelatedLCTDigi::getBX(), CSCCorrelatedLCTDigi::getBX0(), CSCCorrelatedLCTDigi::getCLCT(), CSCCorrelatedLCTDigi::getCSCID(), CSCCorrelatedLCTDigi::getKeyWG(), CSCCorrelatedLCTDigi::getMPCLink(), CSCCorrelatedLCTDigi::getPattern(), CSCCLCTDigi::getQuality(), CSCALCTDigi::getQuality(), CSCCorrelatedLCTDigi::getQuality(), CSCCorrelatedLCTDigi::getStrip(), CSCCorrelatedLCTDigi::getSyncErr(), CSCCorrelatedLCTDigi::getTrknmb(), CSCCorrelatedLCTDigi::isValid(), L1TMuon::TriggerPrimitive::CSCData::keywire, CSCDetId::layer(), L1TMuon::TriggerPrimitive::CSCData::mpclink, L1TMuon::TriggerPrimitive::CSCData::pattern, L1TMuon::TriggerPrimitive::CSCData::quality, CSCDetId::ring(), CSCDetId::station(), L1TMuon::TriggerPrimitive::CSCData::strip, L1TMuon::TriggerPrimitive::CSCData::syncErr, L1TMuon::TriggerPrimitive::CSCData::trknmb, and L1TMuon::TriggerPrimitive::CSCData::valid.

98  :
99  _id(detid),
102  _csc.trknmb = digi.getTrknmb();
103  _csc.valid = digi.isValid();
104  _csc.quality = digi.getQuality();
105  _csc.keywire = digi.getKeyWG();
106  _csc.strip = digi.getStrip();
107  _csc.pattern = digi.getPattern();
108  _csc.bend = digi.getBend();
109  _csc.bx = digi.getBX();
110  _csc.mpclink = digi.getMPCLink();
111  _csc.bx0 = digi.getBX0();
112  _csc.syncErr = digi.getSyncErr();
113  _csc.cscID = digi.getCSCID();
114 
115  // Use ME1/1a --> ring 4 convention
116  if (detid.station() == 1 && detid.ring() == 1 && digi.getStrip() >= 128) {
117  _id = CSCDetId(detid.endcap(), detid.station(), 4, detid.chamber(), detid.layer());
118  _csc.strip = digi.getStrip() - 128;
119  }
120 
121  CSCCorrelatedLCTDigi digi_clone = digi; // Necessary to get around const qualifier
122  CSCALCTDigi alct = digi_clone.getALCT();
123  CSCCLCTDigi clct = digi_clone.getCLCT();
124  _csc.alct_quality = alct.getQuality();
125  _csc.clct_quality = clct.getQuality();
126 }
int getQuality() const
return quality of a pattern (number of layers hit!)
Definition: CSCCLCTDigi.h:36
const CSCALCTDigi & getALCT() const
int chamber() const
Definition: CSCDetId.h:68
int getStrip() const
return the key halfstrip from 0,159
uint16_t getSyncErr() const
int getQuality() const
return the 4 bit Correlated LCT Quality
int getBend() const
return bend
int layer() const
Definition: CSCDetId.h:61
const CSCCLCTDigi & getCLCT() const
int endcap() const
Definition: CSCDetId.h:93
void calculateGlobalSector(const IDType &chid, unsigned &globalsector, unsigned &subsector)
uint16_t getCSCID() const
int getTrknmb() const
return track number
int getBX() const
return BX
uint16_t getBX0() const
int ring() const
Definition: CSCDetId.h:75
int getQuality() const
return quality of a pattern
Definition: CSCALCTDigi.h:36
int getMPCLink() const
return MPC link number, 0 means not sorted, 1-3 give MPC sorting rank
bool isValid() const
return valid pattern bit
int getPattern() const
return pattern
int station() const
Definition: CSCDetId.h:86
int getKeyWG() const
return the key wire group. counts from 0.
TriggerPrimitive::TriggerPrimitive ( const RPCDetId detid,
const RPCDigi digi 
)

Definition at line 129 of file MuonTriggerPrimitive.cc.

References _globalsector, _rpc, _subsector, RPCDigi::bx(), L1TMuon::TriggerPrimitive::RPCData::bx, calculateGlobalSector(), L1TMuon::TriggerPrimitive::RPCData::emtf_sector, L1TMuon::TriggerPrimitive::RPCData::layer, RPCDetId::layer(), L1TMuon::TriggerPrimitive::RPCData::phi_int, RPCDigi::strip(), L1TMuon::TriggerPrimitive::RPCData::strip, L1TMuon::TriggerPrimitive::RPCData::strip_hi, L1TMuon::TriggerPrimitive::RPCData::strip_low, L1TMuon::TriggerPrimitive::RPCData::theta_int, RPCDigi::time(), L1TMuon::TriggerPrimitive::RPCData::time, and L1TMuon::TriggerPrimitive::RPCData::valid.

130  :
131  _id(detid),
134  _rpc.strip = digi.strip();
135  _rpc.strip_low = digi.strip();
136  _rpc.strip_hi = digi.strip();
137  _rpc.phi_int = 0;
138  _rpc.theta_int = 0;
139  _rpc.emtf_sector = 0;
140  _rpc.layer = detid.layer();
141  _rpc.bx = digi.bx();
142  _rpc.valid = 1;
143  _rpc.time = digi.time();
144 }
int bx() const
Definition: RPCDigi.h:29
double time() const
Definition: RPCDigi.h:30
int strip() const
Definition: RPCDigi.h:28
void calculateGlobalSector(const IDType &chid, unsigned &globalsector, unsigned &subsector)
int layer() const
Definition: RPCDetId.h:108
TriggerPrimitive::TriggerPrimitive ( const RPCDetId detid,
const unsigned  strip,
const unsigned  layer,
const int  bx 
)

Definition at line 146 of file MuonTriggerPrimitive.cc.

References _globalsector, _rpc, _subsector, L1TMuon::TriggerPrimitive::RPCData::bx, calculateGlobalSector(), L1TMuon::TriggerPrimitive::RPCData::emtf_sector, L1TMuon::TriggerPrimitive::RPCData::layer, L1TMuon::TriggerPrimitive::RPCData::phi_int, digitizers_cfi::strip, L1TMuon::TriggerPrimitive::RPCData::strip, L1TMuon::TriggerPrimitive::RPCData::strip_hi, L1TMuon::TriggerPrimitive::RPCData::strip_low, L1TMuon::TriggerPrimitive::RPCData::theta_int, L1TMuon::TriggerPrimitive::RPCData::time, and L1TMuon::TriggerPrimitive::RPCData::valid.

149  :
150  _id(detid),
153  _rpc.strip = strip;
154  _rpc.strip_low = strip;
155  _rpc.strip_hi = strip;
156  _rpc.phi_int = 0;
157  _rpc.theta_int = 0;
158  _rpc.emtf_sector = 0;
159  _rpc.layer = layer;
160  _rpc.bx = bx;
161  _rpc.valid = 1;
162  _rpc.time = -999999.;
163 }
void calculateGlobalSector(const IDType &chid, unsigned &globalsector, unsigned &subsector)
TriggerPrimitive::TriggerPrimitive ( const RPCDetId detid,
const l1t::CPPFDigi digi 
)

Definition at line 166 of file MuonTriggerPrimitive.cc.

References _globalsector, _rpc, _subsector, l1t::CPPFDigi::bx(), L1TMuon::TriggerPrimitive::RPCData::bx, calculateGlobalSector(), l1t::CPPFDigi::cluster_size(), l1t::CPPFDigi::emtf_sector(), L1TMuon::TriggerPrimitive::RPCData::emtf_sector, l1t::CPPFDigi::first_strip(), L1TMuon::TriggerPrimitive::RPCData::isCPPF, L1TMuon::TriggerPrimitive::RPCData::layer, RPCDetId::layer(), l1t::CPPFDigi::phi_int(), L1TMuon::TriggerPrimitive::RPCData::phi_int, L1TMuon::TriggerPrimitive::RPCData::strip, L1TMuon::TriggerPrimitive::RPCData::strip_hi, L1TMuon::TriggerPrimitive::RPCData::strip_low, l1t::CPPFDigi::theta_int(), L1TMuon::TriggerPrimitive::RPCData::theta_int, l1t::CPPFDigi::valid(), and L1TMuon::TriggerPrimitive::RPCData::valid.

167  :
168  _id(detid),
171  // In unpacked CPPF digis, the strip number and cluster size are not available, and are set to -99
172  _rpc.strip = ( digi.first_strip() < 0 ? 0 : digi.first_strip() + (digi.cluster_size() / 2) );
173  _rpc.strip_low = ( digi.first_strip() < 0 ? 0 : digi.first_strip() );
174  _rpc.strip_hi = ( digi.first_strip() < 0 ? 0 : digi.first_strip() + digi.cluster_size() - 1 );
175  _rpc.phi_int = digi.phi_int();
176  _rpc.theta_int = digi.theta_int();
177  _rpc.emtf_sector = digi.emtf_sector();
178  _rpc.layer = detid.layer();
179  _rpc.bx = digi.bx();
180  _rpc.valid = digi.valid();
181  _rpc.isCPPF = true;
182 }
int emtf_sector() const
Definition: CPPFDigi.h:42
int first_strip() const
Definition: CPPFDigi.h:44
int cluster_size() const
Definition: CPPFDigi.h:45
int bx() const
Definition: CPPFDigi.h:36
void calculateGlobalSector(const IDType &chid, unsigned &globalsector, unsigned &subsector)
int theta_int() const
Definition: CPPFDigi.h:38
int layer() const
Definition: RPCDetId.h:108
int valid() const
Definition: CPPFDigi.h:39
int phi_int() const
Definition: CPPFDigi.h:37
TriggerPrimitive::TriggerPrimitive ( const GEMDetId detid,
const GEMPadDigi digi 
)

Definition at line 185 of file MuonTriggerPrimitive.cc.

References _gem, _globalsector, _subsector, L1TMuon::TriggerPrimitive::GEMData::bend, GEMPadDigi::bx(), L1TMuon::TriggerPrimitive::GEMData::bx, calculateGlobalSector(), L1TMuon::TriggerPrimitive::GEMData::isME0, GEMPadDigi::pad(), L1TMuon::TriggerPrimitive::GEMData::pad, L1TMuon::TriggerPrimitive::GEMData::pad_hi, and L1TMuon::TriggerPrimitive::GEMData::pad_low.

186  :
187  _id(detid),
190  _gem.pad = digi.pad();
191  _gem.pad_low = digi.pad();
192  _gem.pad_hi = digi.pad();
193  _gem.bx = digi.bx();
194  _gem.bend = 0;
195  _gem.isME0 = false;
196 }
void calculateGlobalSector(const IDType &chid, unsigned &globalsector, unsigned &subsector)
int pad() const
Definition: GEMPadDigi.h:27
int bx() const
Definition: GEMPadDigi.h:28
TriggerPrimitive::TriggerPrimitive ( const ME0DetId detid,
const ME0PadDigi digi 
)

Definition at line 198 of file MuonTriggerPrimitive.cc.

References _gem, _globalsector, _subsector, L1TMuon::TriggerPrimitive::GEMData::bend, ME0PadDigi::bx(), L1TMuon::TriggerPrimitive::GEMData::bx, calculateGlobalSector(), L1TMuon::TriggerPrimitive::GEMData::isME0, ME0PadDigi::pad(), L1TMuon::TriggerPrimitive::GEMData::pad, L1TMuon::TriggerPrimitive::GEMData::pad_hi, and L1TMuon::TriggerPrimitive::GEMData::pad_low.

199  :
200  _id(detid),
203  _gem.pad = digi.pad();
204  _gem.pad_low = digi.pad();
205  _gem.pad_hi = digi.pad();
206  _gem.bx = digi.bx();
207  _gem.bend = 0;
208  _gem.isME0 = true;
209 }
int pad() const
Definition: ME0PadDigi.h:26
int bx() const
Definition: ME0PadDigi.h:27
void calculateGlobalSector(const IDType &chid, unsigned &globalsector, unsigned &subsector)
TriggerPrimitive::TriggerPrimitive ( const TriggerPrimitive tp)

Member Function Documentation

CSCData& L1TMuon::TriggerPrimitive::accessCSCData ( )
inline

Definition at line 216 of file MuonTriggerPrimitive.h.

Referenced by PrimitiveSelection::process().

216 { return _csc; }
DTData& L1TMuon::TriggerPrimitive::accessDTData ( )
inline

Definition at line 215 of file MuonTriggerPrimitive.h.

215 { return _dt; }
GEMData& L1TMuon::TriggerPrimitive::accessGEMData ( )
inline

Definition at line 218 of file MuonTriggerPrimitive.h.

218 { return _gem; }
RPCData& L1TMuon::TriggerPrimitive::accessRPCData ( )
inline

Definition at line 217 of file MuonTriggerPrimitive.h.

217 { return _rpc; }
template<typename IDType >
void L1TMuon::TriggerPrimitive::calculateGlobalSector ( const IDType &  chid,
unsigned &  globalsector,
unsigned &  subsector 
)
inlineprivate

Definition at line 236 of file MuonTriggerPrimitive.h.

Referenced by TriggerPrimitive().

238  {
239  // Not sure if this is ever going to get implemented
240  globalsector = 0;
241  subsector = 0;
242  }
template<typename IDType >
IDType L1TMuon::TriggerPrimitive::detId ( ) const
inline
const int TriggerPrimitive::getBX ( ) const

Definition at line 291 of file MuonTriggerPrimitive.cc.

References _csc, _dt, _gem, _rpc, _subsystem, L1TMuon::TriggerPrimitive::RPCData::bx, L1TMuon::TriggerPrimitive::CSCData::bx, L1TMuon::TriggerPrimitive::DTData::bx, L1TMuon::TriggerPrimitive::GEMData::bx, Exception, kCSC, kDT, kGEM, and kRPC.

Referenced by PrimitiveSelection::process().

291  {
292  switch(_subsystem) {
293  case kDT:
294  return _dt.bx;
295  case kCSC:
296  return _csc.bx;
297  case kRPC:
298  return _rpc.bx;
299  case kGEM:
300  return _gem.bx;
301  default:
302  throw cms::Exception("Invalid Subsytem")
303  << "The specified subsystem for this track stub is out of range"
304  << std::endl;
305  }
306  return -1;
307 }
const double L1TMuon::TriggerPrimitive::getCMSGlobalEta ( ) const
inline

Definition at line 184 of file MuonTriggerPrimitive.h.

184 { return _eta; }
const double L1TMuon::TriggerPrimitive::getCMSGlobalPhi ( ) const
inline

Definition at line 186 of file MuonTriggerPrimitive.h.

186 { return _phi; }
const GlobalPoint L1TMuon::TriggerPrimitive::getCMSGlobalPoint ( ) const
inline

Definition at line 191 of file MuonTriggerPrimitive.h.

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

191  { double theta = 2. * atan( exp(-_eta) );
192  return GlobalPoint( GlobalPoint::Cylindrical( _rho, _phi, _rho/tan(theta)) ); };
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::TriggerPrimitive::getCMSGlobalRho ( ) const
inline

Definition at line 188 of file MuonTriggerPrimitive.h.

188 { return _rho; }
const CSCData L1TMuon::TriggerPrimitive::getCSCData ( ) const
inline
const DTData L1TMuon::TriggerPrimitive::getDTData ( ) const
inline
const GEMData L1TMuon::TriggerPrimitive::getGEMData ( ) const
inline
const unsigned L1TMuon::TriggerPrimitive::getGlobalSector ( ) const
inline

Definition at line 227 of file MuonTriggerPrimitive.h.

227 { return _globalsector; }
const int TriggerPrimitive::getPattern ( ) const

Definition at line 345 of file MuonTriggerPrimitive.cc.

References _csc, _subsystem, Exception, kCSC, kDT, kGEM, kRPC, and L1TMuon::TriggerPrimitive::CSCData::pattern.

345  {
346  switch(_subsystem) {
347  case kDT:
348  return -1;
349  case kCSC:
350  return _csc.pattern;
351  case kRPC:
352  return -1;
353  case kGEM:
354  return -1;
355  default:
356  throw cms::Exception("Invalid Subsytem")
357  << "The specified subsystem for this track stub is out of range"
358  << std::endl;
359  }
360  return -1;
361 }
const RPCData L1TMuon::TriggerPrimitive::getRPCData ( ) const
inline
const int TriggerPrimitive::getStrip ( ) const

Definition at line 309 of file MuonTriggerPrimitive.cc.

References _csc, _gem, _rpc, _subsystem, Exception, kCSC, kDT, kGEM, kRPC, L1TMuon::TriggerPrimitive::GEMData::pad, L1TMuon::TriggerPrimitive::RPCData::strip, and L1TMuon::TriggerPrimitive::CSCData::strip.

Referenced by PrimitiveSelection::process().

309  {
310  switch(_subsystem) {
311  case kDT:
312  return -1;
313  case kCSC:
314  return _csc.strip;
315  case kRPC:
316  return _rpc.strip;
317  case kGEM:
318  return _gem.pad;
319  default:
320  throw cms::Exception("Invalid Subsytem")
321  << "The specified subsystem for this track stub is out of range"
322  << std::endl;
323  }
324  return -1;
325 }
const unsigned L1TMuon::TriggerPrimitive::getSubSector ( ) const
inline

Definition at line 228 of file MuonTriggerPrimitive.h.

References edm::print().

228 { return _subsector; }
double L1TMuon::TriggerPrimitive::getThetaBend ( ) const
inline

Definition at line 199 of file MuonTriggerPrimitive.h.

199 { return _theta; }
const int TriggerPrimitive::getWire ( ) const

Definition at line 327 of file MuonTriggerPrimitive.cc.

References _csc, _subsystem, Exception, kCSC, kDT, L1TMuon::TriggerPrimitive::CSCData::keywire, kGEM, and kRPC.

Referenced by PrimitiveSelection::process().

327  {
328  switch(_subsystem) {
329  case kDT:
330  return -1;
331  case kCSC:
332  return _csc.keywire;
333  case kRPC:
334  return -1;
335  case kGEM:
336  return -1;
337  default:
338  throw cms::Exception("Invalid Subsytem")
339  << "The specified subsystem for this track stub is out of range"
340  << std::endl;
341  }
342  return -1;
343 }
TriggerPrimitive & TriggerPrimitive::operator= ( const TriggerPrimitive tp)

Definition at line 226 of file MuonTriggerPrimitive.cc.

References _csc, _dt, _eta, _gem, _globalsector, _id, _phi, _rho, _rpc, _subsector, _subsystem, and _theta.

226  {
227  this->_dt = tp._dt;
228  this->_csc = tp._csc;
229  this->_rpc = tp._rpc;
230  this->_gem = tp._gem;
231  this->_id = tp._id;
232  this->_subsystem = tp._subsystem;
233  this->_globalsector = tp._globalsector;
234  this->_subsector = tp._subsector;
235  this->_eta = tp._eta;
236  this->_phi = tp._phi;
237  this->_rho = tp._rho;
238  this->_theta = tp._theta;
239  return *this;
240 }
bool TriggerPrimitive::operator== ( const TriggerPrimitive tp) const

Definition at line 242 of file MuonTriggerPrimitive.cc.

References _csc, _dt, _gem, _globalsector, _id, _rpc, _subsector, _subsystem, L1TMuon::TriggerPrimitive::CSCData::bend, L1TMuon::TriggerPrimitive::GEMData::bend, L1TMuon::TriggerPrimitive::DTData::bendingAngle, L1TMuon::TriggerPrimitive::RPCData::bx, L1TMuon::TriggerPrimitive::CSCData::bx, L1TMuon::TriggerPrimitive::DTData::bx, L1TMuon::TriggerPrimitive::GEMData::bx, L1TMuon::TriggerPrimitive::CSCData::bx0, L1TMuon::TriggerPrimitive::DTData::BxCntCode, L1TMuon::TriggerPrimitive::CSCData::cscID, L1TMuon::TriggerPrimitive::RPCData::emtf_sector, L1TMuon::TriggerPrimitive::RPCData::isCPPF, L1TMuon::TriggerPrimitive::GEMData::isME0, L1TMuon::TriggerPrimitive::CSCData::keywire, L1TMuon::TriggerPrimitive::RPCData::layer, L1TMuon::TriggerPrimitive::CSCData::mpclink, L1TMuon::TriggerPrimitive::GEMData::pad, L1TMuon::TriggerPrimitive::GEMData::pad_hi, L1TMuon::TriggerPrimitive::GEMData::pad_low, L1TMuon::TriggerPrimitive::CSCData::pattern, L1TMuon::TriggerPrimitive::RPCData::phi_int, L1TMuon::TriggerPrimitive::CSCData::quality, L1TMuon::TriggerPrimitive::DTData::qualityCode, L1TMuon::TriggerPrimitive::DTData::radialAngle, L1TMuon::TriggerPrimitive::DTData::sector, L1TMuon::TriggerPrimitive::DTData::segment_number, L1TMuon::TriggerPrimitive::DTData::station, L1TMuon::TriggerPrimitive::RPCData::strip, L1TMuon::TriggerPrimitive::CSCData::strip, L1TMuon::TriggerPrimitive::RPCData::strip_hi, L1TMuon::TriggerPrimitive::RPCData::strip_low, L1TMuon::TriggerPrimitive::CSCData::syncErr, L1TMuon::TriggerPrimitive::DTData::theta_bti_group, L1TMuon::TriggerPrimitive::DTData::theta_code, L1TMuon::TriggerPrimitive::RPCData::theta_int, L1TMuon::TriggerPrimitive::DTData::theta_quality, L1TMuon::TriggerPrimitive::CSCData::trknmb, L1TMuon::TriggerPrimitive::DTData::Ts2TagCode, L1TMuon::TriggerPrimitive::RPCData::valid, L1TMuon::TriggerPrimitive::CSCData::valid, and L1TMuon::TriggerPrimitive::DTData::wheel.

242  {
243  return ( this->_dt.bx == tp._dt.bx &&
244  this->_dt.wheel == tp._dt.wheel &&
245  this->_dt.sector == tp._dt.sector &&
246  this->_dt.station == tp._dt.station &&
247  this->_dt.radialAngle == tp._dt.radialAngle &&
248  this->_dt.bendingAngle == tp._dt.bendingAngle &&
249  this->_dt.qualityCode == tp._dt.qualityCode &&
250  this->_dt.Ts2TagCode == tp._dt.Ts2TagCode &&
251  this->_dt.BxCntCode == tp._dt.BxCntCode &&
252  this->_dt.theta_bti_group == tp._dt.theta_bti_group &&
253  this->_dt.segment_number == tp._dt.segment_number &&
254  this->_dt.theta_code == tp._dt.theta_code &&
255  this->_dt.theta_quality == tp._dt.theta_quality &&
256  this->_csc.trknmb == tp._csc.trknmb &&
257  this->_csc.valid == tp._csc.valid &&
258  this->_csc.quality == tp._csc.quality &&
259  this->_csc.keywire == tp._csc.keywire &&
260  this->_csc.strip == tp._csc.strip &&
261  this->_csc.pattern == tp._csc.pattern &&
262  this->_csc.bend == tp._csc.bend &&
263  this->_csc.bx == tp._csc.bx &&
264  this->_csc.mpclink == tp._csc.mpclink &&
265  this->_csc.bx0 == tp._csc.bx0 &&
266  this->_csc.syncErr == tp._csc.syncErr &&
267  this->_csc.cscID == tp._csc.cscID &&
268  this->_rpc.strip == tp._rpc.strip &&
269  this->_rpc.strip_low == tp._rpc.strip_low &&
270  this->_rpc.strip_hi == tp._rpc.strip_hi &&
271  this->_rpc.phi_int == tp._rpc.phi_int &&
272  this->_rpc.theta_int == tp._rpc.theta_int &&
273  this->_rpc.emtf_sector == tp._rpc.emtf_sector &&
274  this->_rpc.layer == tp._rpc.layer &&
275  this->_rpc.bx == tp._rpc.bx &&
276  this->_rpc.valid == tp._rpc.valid &&
277  //this->_rpc.time == tp._rpc.time &&
278  this->_rpc.isCPPF == tp._rpc.isCPPF &&
279  this->_gem.pad == tp._gem.pad &&
280  this->_gem.pad_low == tp._gem.pad_low &&
281  this->_gem.pad_hi == tp._gem.pad_hi &&
282  this->_gem.bx == tp._gem.bx &&
283  this->_gem.bend == tp._gem.bend &&
284  this->_gem.isME0 == tp._gem.isME0 &&
285  this->_id == tp._id &&
286  this->_subsystem == tp._subsystem &&
287  this->_globalsector == tp._globalsector &&
288  this->_subsector == tp._subsector );
289 }
void TriggerPrimitive::print ( std::ostream &  out) const

Definition at line 363 of file MuonTriggerPrimitive.cc.

References _csc, _dt, _eta, _gem, _phi, _rho, _rpc, _subsystem, _theta, L1TMuon::TriggerPrimitive::CSCData::bend, L1TMuon::TriggerPrimitive::GEMData::bend, L1TMuon::TriggerPrimitive::DTData::bendingAngle, L1TMuon::TriggerPrimitive::RPCData::bx, L1TMuon::TriggerPrimitive::CSCData::bx, L1TMuon::TriggerPrimitive::DTData::bx, L1TMuon::TriggerPrimitive::GEMData::bx, L1TMuon::TriggerPrimitive::CSCData::bx0, L1TMuon::TriggerPrimitive::DTData::BxCntCode, L1TMuon::TriggerPrimitive::CSCData::cscID, L1TMuon::TriggerPrimitive::RPCData::emtf_sector, Exception, training_settings::idx, L1TMuon::TriggerPrimitive::RPCData::isCPPF, L1TMuon::TriggerPrimitive::GEMData::isME0, kCSC, kDT, L1TMuon::TriggerPrimitive::CSCData::keywire, kGEM, kRPC, L1TMuon::TriggerPrimitive::RPCData::layer, L1TMuon::TriggerPrimitive::CSCData::mpclink, L1TMuon::TriggerPrimitive::GEMData::pad, L1TMuon::TriggerPrimitive::GEMData::pad_hi, L1TMuon::TriggerPrimitive::GEMData::pad_low, L1TMuon::TriggerPrimitive::CSCData::pattern, L1TMuon::TriggerPrimitive::RPCData::phi_int, L1TMuon::TriggerPrimitive::CSCData::quality, L1TMuon::TriggerPrimitive::DTData::qualityCode, L1TMuon::TriggerPrimitive::DTData::radialAngle, L1TMuon::TriggerPrimitive::DTData::segment_number, L1TMuon::TriggerPrimitive::RPCData::strip, L1TMuon::TriggerPrimitive::CSCData::strip, L1TMuon::TriggerPrimitive::RPCData::strip_hi, L1TMuon::TriggerPrimitive::RPCData::strip_low, L1TMuon::TriggerPrimitive::CSCData::syncErr, L1TMuon::TriggerPrimitive::DTData::theta_bti_group, L1TMuon::TriggerPrimitive::DTData::theta_code, L1TMuon::TriggerPrimitive::RPCData::theta_int, L1TMuon::TriggerPrimitive::DTData::theta_quality, L1TMuon::TriggerPrimitive::RPCData::time, L1TMuon::TriggerPrimitive::CSCData::trknmb, L1TMuon::TriggerPrimitive::DTData::Ts2TagCode, L1TMuon::TriggerPrimitive::RPCData::valid, and L1TMuon::TriggerPrimitive::CSCData::valid.

363  {
364  unsigned idx = (unsigned) _subsystem;
365  out << subsystem_names[idx] << " Trigger Primitive" << std::endl;
366  out << "eta: " << _eta << " phi: " << _phi << " rho: " << _rho
367  << " theta: " << _theta << std::endl;
368  switch(_subsystem) {
369  case kDT:
370  out << detId<DTChamberId>() << std::endl;
371  out << "Local BX : " << _dt.bx << std::endl;
372  out << "Segment Nmb : " << _dt.segment_number << std::endl;
373  out << "Packed Phi : " << _dt.radialAngle << std::endl;
374  out << "Packed Bend : " << _dt.bendingAngle << std::endl;
375  out << "Quality Code : " << _dt.qualityCode << std::endl;
376  out << "Ts2Tag Code : " << _dt.Ts2TagCode << std::endl;
377  out << "BXCnt Code : " << _dt.BxCntCode << std::endl;
378  out << "Theta BTI Grp : " << _dt.theta_bti_group << std::endl;
379  out << "Theta Code : " << _dt.theta_code << std::endl;
380  out << "Theta Quality : " << _dt.theta_quality << std::endl;
381  break;
382  case kCSC:
383  out << detId<CSCDetId>() << std::endl;
384  out << "Local BX : " << _csc.bx << std::endl;
385  out << "Segment Nmb : " << _csc.trknmb << std::endl;
386  out << "Segment Valid : " << _csc.valid << std::endl;
387  out << "Quality Code : " << _csc.quality << std::endl;
388  out << "Key Wire Grp : " << _csc.keywire << std::endl;
389  out << "Half-Strip : " << _csc.strip << std::endl;
390  out << "CLCT Pattern : " << _csc.pattern << std::endl;
391  out << "Packed Bend : " << _csc.bend << std::endl;
392  out << "MPC Link : " << _csc.mpclink << std::endl;
393  out << "BX0 : " << _csc.bx0 << std::endl;
394  out << "Sync Error : " << _csc.syncErr << std::endl;
395  out << "CSCID : " << _csc.cscID << std::endl;
396  break;
397  case kRPC:
398  out << detId<RPCDetId>() << std::endl;
399  out << "Local BX : " << _rpc.bx << std::endl;
400  out << "Strip : " << _rpc.strip << std::endl;
401  out << "Strip Low : " << _rpc.strip_low << std::endl;
402  out << "Strip High : " << _rpc.strip_hi << std::endl;
403  out << "Integer phi : " << _rpc.phi_int << std::endl;
404  out << "Integer theta : " << _rpc.theta_int << std::endl;
405  out << "EMTF sector : " << _rpc.emtf_sector << std::endl;
406  out << "Layer : " << _rpc.layer << std::endl;
407  out << "Valid : " << _rpc.valid << std::endl;
408  out << "Time : " << _rpc.time << std::endl;
409  out << "IsCPPF : " << _rpc.isCPPF << std::endl;
410  break;
411  case kGEM:
412  if (!_gem.isME0)
413  out << detId<GEMDetId>() << std::endl;
414  else
415  out << detId<ME0DetId>() << std::endl;
416  out << "Local BX : " << _gem.bx << std::endl;
417  out << "Pad : " << _gem.pad << std::endl;
418  out << "Pad Low : " << _gem.pad_low << std::endl;
419  out << "Pad High : " << _gem.pad_hi << std::endl;
420  out << "Packed Bend : " << _gem.bend << std::endl;
421  out << "Is ME0 : " << _gem.isME0 << std::endl;
422  break;
423  default:
424  throw cms::Exception("Invalid Subsytem")
425  << "The specified subsystem for this track stub is out of range"
426  << std::endl;
427  }
428 }
const DetId L1TMuon::TriggerPrimitive::rawId ( ) const
inline

Definition at line 225 of file MuonTriggerPrimitive.h.

References electrons_cff::_id.

void L1TMuon::TriggerPrimitive::setCMSGlobalEta ( const double  eta)
inline
void L1TMuon::TriggerPrimitive::setCMSGlobalPhi ( const double  phi)
inline

Definition at line 187 of file MuonTriggerPrimitive.h.

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

Definition at line 189 of file MuonTriggerPrimitive.h.

void L1TMuon::TriggerPrimitive::setCSCData ( const CSCData csc)
inline
void L1TMuon::TriggerPrimitive::setDTData ( const DTData dt)
inline

Definition at line 205 of file MuonTriggerPrimitive.h.

References dt.

205 { _dt = dt; }
float dt
Definition: AMPTWrapper.h:126
void L1TMuon::TriggerPrimitive::setGEMData ( const GEMData gem)
inline
void L1TMuon::TriggerPrimitive::setRPCData ( const RPCData rpc)
inline
void L1TMuon::TriggerPrimitive::setThetaBend ( const double  theta)
inline

Definition at line 198 of file MuonTriggerPrimitive.h.

References theta().

198 { _theta = theta; }
Geom::Theta< T > theta() const
const subsystem_type L1TMuon::TriggerPrimitive::subsystem ( ) const
inline

Member Data Documentation

CSCData L1TMuon::TriggerPrimitive::_csc
private
DTData L1TMuon::TriggerPrimitive::_dt
private

Definition at line 244 of file MuonTriggerPrimitive.h.

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

double L1TMuon::TriggerPrimitive::_eta
private

Definition at line 255 of file MuonTriggerPrimitive.h.

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

GEMData L1TMuon::TriggerPrimitive::_gem
private

Definition at line 247 of file MuonTriggerPrimitive.h.

Referenced by getBX(), getStrip(), operator=(), operator==(), print(), and TriggerPrimitive().

unsigned L1TMuon::TriggerPrimitive::_globalsector
private

Definition at line 253 of file MuonTriggerPrimitive.h.

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

DetId L1TMuon::TriggerPrimitive::_id
private

Definition at line 249 of file MuonTriggerPrimitive.h.

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

double L1TMuon::TriggerPrimitive::_phi
private

Definition at line 255 of file MuonTriggerPrimitive.h.

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

double L1TMuon::TriggerPrimitive::_rho
private

Definition at line 255 of file MuonTriggerPrimitive.h.

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

RPCData L1TMuon::TriggerPrimitive::_rpc
private

Definition at line 246 of file MuonTriggerPrimitive.h.

Referenced by getBX(), getStrip(), operator=(), operator==(), print(), and TriggerPrimitive().

unsigned L1TMuon::TriggerPrimitive::_subsector
private

Definition at line 254 of file MuonTriggerPrimitive.h.

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

subsystem_type L1TMuon::TriggerPrimitive::_subsystem
private

Definition at line 251 of file MuonTriggerPrimitive.h.

Referenced by getBX(), getPattern(), getStrip(), getWire(), operator=(), operator==(), and print().

double L1TMuon::TriggerPrimitive::_theta
private

Definition at line 256 of file MuonTriggerPrimitive.h.

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