CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
RPCLogCone Class Reference

#include <RPCLogCone.h>

Public Types

typedef std::map< int, std::vector< int > > TLogPlane
 

Public Member Functions

bool addLogHit (const RPCLogHit &logHit)
 Adds next logHit . More...
 
unsigned long long getCompressedCone ()
 Compresses cone. Throws exception, if there is more than one hit in any logplane. More...
 
RPCConst::l1RpcConeCrdnts getConeCrdnts () const
 
int getFiredPlanesCnt () const
 
int getHitsCnt (int logPlane) const
 Gets fired strips count in given logPlane. More...
 
int getIdx () const
 
TLogPlane getLogPlane (int logPlane) const
 
int getLogSector () const
 
int getLogSegment () const
 
std::vector< int > getLogStripDigisIdxs (int logPlane, unsigned int logStripNum) const
 
bool getLogStripState (int logPlane, unsigned int logStripNum) const
 
int getMuonCode () const
 
int getMuonSign () const
 
int getTower () const
 
bool isPlaneFired (int logPlane) const
 
int possibleTrigger () const
 
 RPCLogCone ()
 Default constructor. No hits, no muon. More...
 
 RPCLogCone (int m_tower, int logSector, int logSegment)
 Constructor. Cone coordinates are set. More...
 
 RPCLogCone (const RPCLogHit &logHit)
 Constructor. One hit is added, cone coordinates are set from logHit. More...
 
 RPCLogCone (const unsigned long long &pat, int tower, int logSector, int logSegment)
 Constructor. The cone is built from unsigned long long. More...
 
void setIdx (int index)
 
void setLogStrip (int logPlane, int logStripNum, int m_digiIdx)
 Set logic strip as fired. m_digiIdx - index of digi in digis vector stored by L1RpcTrigg. More...
 
void setLogStrip (int logPlane, int logStripNum)
 Set logic strip as fired. More...
 
void setMuonCode (int code)
 sets pt code of muon that fired the strips */ More...
 
void setMuonSign (int sign)
 
void shift (int pos)
 Changes fired LogStrips: from "stripNum" to "stripNum + pos". More...
 
std::string toString () const
 

Private Attributes

RPCConst::l1RpcConeCrdnts m_ConeCrdnts
 
std::vector< std::vector< int > > m_DigisIdx
 
int m_Index
 m_Index in LogConesVec stored by L1RpcTrigg More...
 
std::vector< TLogPlanem_LogPlanesVec
 Logic Planes. More...
 
int m_MuonCode
 
int m_MuonSign
 

Detailed Description

The input for m_PAC. State of strips in smalest unit of volum in RPC trigger system (Logic Cone), defined by 8 strips of reference plane.

Author
Karol Bunkowski (Warsaw),
Porting to CMSSW - Tomasz Frueboes

Definition at line 23 of file RPCLogCone.h.

Member Typedef Documentation

◆ TLogPlane

typedef std::map<int, std::vector<int> > RPCLogCone::TLogPlane

Hits in one Logic Plane, if strips is fired, its number is added to the map as a key. Vector stores the indexes in DigisVec (stored in L1RpcTrigg) of Digis that formed log hits Logic m_Strips are diferent from RPC strips - Logic m_Strips it is usaly OR of 2 RPC strips with diferent eta (but the same phi).

See also
RPCLogHit

Definition at line 30 of file RPCLogCone.h.

Constructor & Destructor Documentation

◆ RPCLogCone() [1/4]

RPCLogCone::RPCLogCone ( )

Default constructor. No hits, no muon.

Default constructor. No hits, no muon.

Definition at line 19 of file RPCLogCone.cc.

References RPCConst::m_LOGPLANES_COUNT, m_LogPlanesVec, m_MuonCode, and m_MuonSign.

19  : m_ConeCrdnts() {
21  m_MuonCode = 0;
22  m_MuonSign = 0;
23 }
std::map< int, std::vector< int > > TLogPlane
Definition: RPCLogCone.h:30
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:109
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:102
int m_MuonCode
Definition: RPCLogCone.h:111
int m_MuonSign
Definition: RPCLogCone.h:113
static const int m_LOGPLANES_COUNT
Max Logic Planes Count in trigger towers.
Definition: RPCConst.h:45

◆ RPCLogCone() [2/4]

RPCLogCone::RPCLogCone ( int  tower,
int  logSector,
int  logSegment 
)

Constructor. Cone coordinates are set.

Constructor. Cone coordinates are set.

Definition at line 30 of file RPCLogCone.cc.

References RPCConst::m_LOGPLANES_COUNT, m_LogPlanesVec, m_MuonCode, and m_MuonSign.

30  : m_ConeCrdnts(tower, logSector, logSegment) {
32  m_MuonCode = 0;
33  m_MuonSign = 0;
34 }
std::map< int, std::vector< int > > TLogPlane
Definition: RPCLogCone.h:30
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:109
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:102
int m_MuonCode
Definition: RPCLogCone.h:111
int m_MuonSign
Definition: RPCLogCone.h:113
static const int m_LOGPLANES_COUNT
Max Logic Planes Count in trigger towers.
Definition: RPCConst.h:45

◆ RPCLogCone() [3/4]

RPCLogCone::RPCLogCone ( const RPCLogHit logHit)

Constructor. One hit is added, cone coordinates are set from logHit.

Copying Constructor

Definition at line 40 of file RPCLogCone.cc.

References RPCLogHit::getConeCrdnts(), RPCLogHit::getDigiIdx(), RPCLogHit::getlogPlaneNumber(), RPCLogHit::getStripNumberInCone(), m_ConeCrdnts, RPCConst::m_LOGPLANES_COUNT, m_LogPlanesVec, m_MuonCode, m_MuonSign, and setLogStrip().

40  {
42 
43  m_ConeCrdnts = logHit.getConeCrdnts();
44 
45  m_MuonCode = 0;
46  m_MuonSign = 0;
47 
48  setLogStrip(logHit.getlogPlaneNumber() - 1, logHit.getStripNumberInCone(), logHit.getDigiIdx());
49 }
std::map< int, std::vector< int > > TLogPlane
Definition: RPCLogCone.h:30
RPCConst::l1RpcConeCrdnts getConeCrdnts() const
Definition: RPCLogHit.cc:21
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:109
void setLogStrip(int logPlane, int logStripNum, int m_digiIdx)
Set logic strip as fired. m_digiIdx - index of digi in digis vector stored by L1RpcTrigg.
Definition: RPCLogCone.cc:174
int getStripNumberInCone() const
Definition: RPCLogHit.cc:31
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:102
int m_MuonCode
Definition: RPCLogCone.h:111
int m_MuonSign
Definition: RPCLogCone.h:113
static const int m_LOGPLANES_COUNT
Max Logic Planes Count in trigger towers.
Definition: RPCConst.h:45
int getDigiIdx() const
Definition: RPCLogHit.cc:35
int getlogPlaneNumber() const
Definition: RPCLogHit.cc:29

◆ RPCLogCone() [4/4]

RPCLogCone::RPCLogCone ( const unsigned long long &  pat,
int  tower,
int  logSector,
int  logSegment 
)

Constructor. The cone is built from unsigned long long.

Definition at line 51 of file RPCLogCone.cc.

References funct::abs(), getTower(), RPCConst::m_FIRST_PLANE, RPCConst::m_LOGPLANE_SIZE, RPCConst::m_LOGPLANES_COUNT, m_LogPlanesVec, m_MuonCode, m_MuonSign, RPCConst::m_USED_PLANES_COUNT, ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask, setLogStrip(), shift(), and nano_mu_digi_cff::strip.

52  : m_ConeCrdnts(tower, logSector, logSegment) {
54  m_MuonCode = 0;
55  m_MuonSign = 0;
56 
57  unsigned long long int mask = 255; // (first 8 bits)
58  int shift = 0;
59 
60  //std::cout << "Decompressing pattern: " << pat << std::endl;
61  for (int logplane = RPCConst::m_FIRST_PLANE; logplane != RPCConst::m_USED_PLANES_COUNT[std::abs(getTower())];
62  ++logplane) {
63  unsigned int strip = (pat & (mask << shift)) >> shift;
64  //std::cout << logplane << " " << strip << std::endl;
65  shift += 8;
66  // We should prob. use m_NOT_CONNECTED value
67  if (strip != RPCConst::m_LOGPLANE_SIZE[std::abs(getTower())][logplane])
68  setLogStrip(logplane, strip);
69  }
70 }
static const int m_USED_PLANES_COUNT[m_TOWER_COUNT]
m_Number of Logic Planes existing in each m_Tower.
Definition: RPCConst.h:87
std::map< int, std::vector< int > > TLogPlane
Definition: RPCLogCone.h:30
void shift(int pos)
Changes fired LogStrips: from "stripNum" to "stripNum + pos".
Definition: RPCLogCone.cc:126
Definition: HeavyIon.h:7
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:109
void setLogStrip(int logPlane, int logStripNum, int m_digiIdx)
Set logic strip as fired. m_digiIdx - index of digi in digis vector stored by L1RpcTrigg.
Definition: RPCLogCone.cc:174
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static const unsigned int m_LOGPLANE_SIZE[m_TOWER_COUNT][m_LOGPLANES_COUNT]
Definition of Logic Cone Sizes - number of Logic m_Strips in each plane.
Definition: RPCConst.h:81
static const int m_FIRST_PLANE
Use ase a first index in loops.
Definition: RPCConst.h:55
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:102
int m_MuonCode
Definition: RPCLogCone.h:111
int m_MuonSign
Definition: RPCLogCone.h:113
static const int m_LOGPLANES_COUNT
Max Logic Planes Count in trigger towers.
Definition: RPCConst.h:45
int getTower() const
Definition: RPCLogCone.cc:162

Member Function Documentation

◆ addLogHit()

bool RPCLogCone::addLogHit ( const RPCLogHit logHit)

Adds next logHit .

Adds a loghit to a cone

Definition at line 193 of file RPCLogCone.cc.

References RPCLogHit::getDigiIdx(), RPCLogHit::getlogPlaneNumber(), RPCLogHit::getLogSector(), RPCLogHit::getLogSegment(), RPCLogHit::getStripNumberInCone(), RPCLogHit::getTower(), m_ConeCrdnts, RPCConst::l1RpcConeCrdnts::m_LogSector, RPCConst::l1RpcConeCrdnts::m_LogSegment, RPCConst::l1RpcConeCrdnts::m_Tower, and setLogStrip().

193  {
194  if (m_ConeCrdnts.m_Tower == logHit.getTower() && m_ConeCrdnts.m_LogSector == logHit.getLogSector() &&
196  setLogStrip(logHit.getlogPlaneNumber() - 1, logHit.getStripNumberInCone(), logHit.getDigiIdx());
197  return true;
198  } else
199  return false;
200 }
int getLogSegment() const
Definition: RPCLogHit.cc:27
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:109
void setLogStrip(int logPlane, int logStripNum, int m_digiIdx)
Set logic strip as fired. m_digiIdx - index of digi in digis vector stored by L1RpcTrigg.
Definition: RPCLogCone.cc:174
int getTower() const
Definition: RPCLogHit.cc:23
int getLogSector() const
Definition: RPCLogHit.cc:25
int getStripNumberInCone() const
Definition: RPCLogHit.cc:31
int getDigiIdx() const
Definition: RPCLogHit.cc:35
int getlogPlaneNumber() const
Definition: RPCLogHit.cc:29

◆ getCompressedCone()

unsigned long long RPCLogCone::getCompressedCone ( )

Compresses cone. Throws exception, if there is more than one hit in any logplane.

Definition at line 72 of file RPCLogCone.cc.

References funct::abs(), getHitsCnt(), getLogPlane(), getTower(), RPCConst::m_FIRST_PLANE, RPCConst::m_LOGPLANE_SIZE, RPCConst::m_USED_PLANES_COUNT, topSingleLeptonDQM_PU_cfi::pattern, shift(), and nano_mu_digi_cff::strip.

72  {
73  unsigned long long int pattern = 0;
74  int shift = 0;
75 
76  for (int logplane = RPCConst::m_FIRST_PLANE; logplane != RPCConst::m_USED_PLANES_COUNT[std::abs(getTower())];
77  logplane++) {
78  unsigned long long int strip;
79  if (getHitsCnt(logplane) == 0) {
80  // We need to mark somehow, that plane is empty (strip 0 is not fired)
82  } else if (getHitsCnt(logplane) == 1) {
83  RPCLogCone::TLogPlane lp = getLogPlane(logplane);
84  strip = lp.begin()->first;
85  } else {
86  throw RPCException("To many hits in logcone");
87  }
88  pattern = pattern | (strip << shift);
89  shift += 8;
90  }
91 
92  //std::cout << " Compressed cone: " << pattern << std::endl;
93  return pattern;
94 }
static const int m_USED_PLANES_COUNT[m_TOWER_COUNT]
m_Number of Logic Planes existing in each m_Tower.
Definition: RPCConst.h:87
std::map< int, std::vector< int > > TLogPlane
Definition: RPCLogCone.h:30
void shift(int pos)
Changes fired LogStrips: from "stripNum" to "stripNum + pos".
Definition: RPCLogCone.cc:126
TLogPlane getLogPlane(int logPlane) const
Definition: RPCLogCone.cc:147
int getHitsCnt(int logPlane) const
Gets fired strips count in given logPlane.
Definition: RPCLogCone.cc:150
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static const unsigned int m_LOGPLANE_SIZE[m_TOWER_COUNT][m_LOGPLANES_COUNT]
Definition of Logic Cone Sizes - number of Logic m_Strips in each plane.
Definition: RPCConst.h:81
static const int m_FIRST_PLANE
Use ase a first index in loops.
Definition: RPCConst.h:55
int getTower() const
Definition: RPCLogCone.cc:162

◆ getConeCrdnts()

RPCConst::l1RpcConeCrdnts RPCLogCone::getConeCrdnts ( ) const

Definition at line 168 of file RPCLogCone.cc.

References m_ConeCrdnts.

168 { return m_ConeCrdnts; }
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:109

◆ getFiredPlanesCnt()

int RPCLogCone::getFiredPlanesCnt ( ) const

Definition at line 217 of file RPCLogCone.cc.

References funct::abs(), isPlaneFired(), m_ConeCrdnts, RPCConst::m_FIRST_PLANE, RPCConst::l1RpcConeCrdnts::m_Tower, and RPCConst::m_USED_PLANES_COUNT.

217  {
218  int firedPlanes = 0;
220  logPlane++) {
221  firedPlanes = firedPlanes + isPlaneFired(logPlane);
222  }
223  return firedPlanes;
224 }
static const int m_USED_PLANES_COUNT[m_TOWER_COUNT]
m_Number of Logic Planes existing in each m_Tower.
Definition: RPCConst.h:87
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:109
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static const int m_FIRST_PLANE
Use ase a first index in loops.
Definition: RPCConst.h:55
bool isPlaneFired(int logPlane) const
Definition: RPCLogCone.cc:210

◆ getHitsCnt()

int RPCLogCone::getHitsCnt ( int  logPlane) const

Gets fired strips count in given logPlane.

Definition at line 150 of file RPCLogCone.cc.

References m_LogPlanesVec.

Referenced by getCompressedCone().

150 { return m_LogPlanesVec[logPlane].size(); }
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:102

◆ getIdx()

int RPCLogCone::getIdx ( ) const

Definition at line 172 of file RPCLogCone.cc.

References m_Index.

172 { return m_Index; }
int m_Index
m_Index in LogConesVec stored by L1RpcTrigg
Definition: RPCLogCone.h:116

◆ getLogPlane()

RPCLogCone::TLogPlane RPCLogCone::getLogPlane ( int  logPlane) const

Definition at line 147 of file RPCLogCone.cc.

References m_LogPlanesVec.

Referenced by getCompressedCone().

147 { return m_LogPlanesVec[logPlane]; }
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:102

◆ getLogSector()

int RPCLogCone::getLogSector ( ) const

Definition at line 164 of file RPCLogCone.cc.

References m_ConeCrdnts, and RPCConst::l1RpcConeCrdnts::m_LogSector.

164 { return m_ConeCrdnts.m_LogSector; }
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:109

◆ getLogSegment()

int RPCLogCone::getLogSegment ( ) const

Definition at line 166 of file RPCLogCone.cc.

References m_ConeCrdnts, and RPCConst::l1RpcConeCrdnts::m_LogSegment.

166 { return m_ConeCrdnts.m_LogSegment; }
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:109

◆ getLogStripDigisIdxs()

std::vector< int > RPCLogCone::getLogStripDigisIdxs ( int  logPlane,
unsigned int  logStripNum 
) const

Get vector of didgis indexes (in digis vector stored by L1RpcTrigg) for given logic strip. If strip was not fired returns empty vector

Definition at line 202 of file RPCLogCone.cc.

References mps_fire::end, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and m_LogPlanesVec.

202  {
203  TLogPlane::const_iterator it = m_LogPlanesVec[logPlane].find(logStripNum);
204  if (it != m_LogPlanesVec[logPlane].end())
205  return it->second;
206  else
207  return std::vector<int>();
208 }
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:102

◆ getLogStripState()

bool RPCLogCone::getLogStripState ( int  logPlane,
unsigned int  logStripNum 
) const

Get logic strip state.

Returns
true if fired

Definition at line 184 of file RPCLogCone.cc.

References m_LogPlanesVec.

Referenced by RPCPacData::getTPatternsGroupShape(), and toString().

184  {
185  return m_LogPlanesVec[logPlane].count(logStripNum);
186 }
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:102

◆ getMuonCode()

int RPCLogCone::getMuonCode ( ) const
Returns
pt code of muon that fired the strips

Definition at line 156 of file RPCLogCone.cc.

References m_MuonCode.

156 { return m_MuonCode; }
int m_MuonCode
Definition: RPCLogCone.h:111

◆ getMuonSign()

int RPCLogCone::getMuonSign ( ) const

Definition at line 160 of file RPCLogCone.cc.

References m_MuonSign.

160 { return m_MuonSign; }
int m_MuonSign
Definition: RPCLogCone.h:113

◆ getTower()

int RPCLogCone::getTower ( ) const

Definition at line 162 of file RPCLogCone.cc.

References m_ConeCrdnts, and RPCConst::l1RpcConeCrdnts::m_Tower.

Referenced by getCompressedCone(), and RPCLogCone().

162 { return m_ConeCrdnts.m_Tower; }
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:109

◆ isPlaneFired()

bool RPCLogCone::isPlaneFired ( int  logPlane) const

Definition at line 210 of file RPCLogCone.cc.

References relativeConstraints::empty, and m_LogPlanesVec.

Referenced by getFiredPlanesCnt(), and possibleTrigger().

210  {
211  if (m_LogPlanesVec[logPlane].empty())
212  return false;
213  else
214  return true;
215 }
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:102

◆ possibleTrigger()

int RPCLogCone::possibleTrigger ( ) const
Returns
0 - trigger not possible, 1 - 3 inner planes fired, 2 - 4 or more planes fired

Definition at line 226 of file RPCLogCone.cc.

References funct::abs(), isPlaneFired(), m_ConeCrdnts, RPCConst::m_FIRST_PLANE, RPCConst::m_LOGPLANE4, RPCConst::l1RpcConeCrdnts::m_Tower, RPCConst::m_USED_PLANES_COUNT, and HLT_2024v13_cff::triggerType.

226  {
227  int triggerType = 0; //0 - trigger not possible
228  //1 - 3/4 (3 inner planes fired)
229  //2 - 4/6 (four palnes fired)
230  int firedPlanes = 0;
231 
232  int logPlane = RPCConst::m_FIRST_PLANE;
233  for (; logPlane <= RPCConst::m_LOGPLANE4; logPlane++) {
234  firedPlanes = firedPlanes + isPlaneFired(logPlane);
235  }
236  if (firedPlanes >= 3)
237  triggerType = 1;
238 
239  for (; logPlane < RPCConst::m_USED_PLANES_COUNT[abs(m_ConeCrdnts.m_Tower)]; logPlane++) {
240  firedPlanes = firedPlanes + isPlaneFired(logPlane);
241  }
242  if (firedPlanes >= 4)
243  triggerType = 2;
244 
245  return triggerType;
246 }
static const int m_USED_PLANES_COUNT[m_TOWER_COUNT]
m_Number of Logic Planes existing in each m_Tower.
Definition: RPCConst.h:87
static const int m_LOGPLANE4
Definition: RPCConst.h:51
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:109
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static const int m_FIRST_PLANE
Use ase a first index in loops.
Definition: RPCConst.h:55
bool isPlaneFired(int logPlane) const
Definition: RPCLogCone.cc:210

◆ setIdx()

void RPCLogCone::setIdx ( int  index)

Definition at line 170 of file RPCLogCone.cc.

References m_Index.

Referenced by RPCConeBuilderFromES::getConesFromES().

170 { m_Index = index; }
int m_Index
m_Index in LogConesVec stored by L1RpcTrigg
Definition: RPCLogCone.h:116

◆ setLogStrip() [1/2]

void RPCLogCone::setLogStrip ( int  logPlane,
int  logStripNum,
int  m_digiIdx 
)

Set logic strip as fired. m_digiIdx - index of digi in digis vector stored by L1RpcTrigg.

Definition at line 174 of file RPCLogCone.cc.

References m_LogPlanesVec.

Referenced by addLogHit(), RPCLogCone(), and TPatternsGroup::updateShape().

174  {
175  //m_LogPlanesVec[logPlane].insert(logStripNum);
176  //m_LogPlanesVec[logPlane].insert(TLogPlane::value_type(logStripNum, vector<int>()));
177  m_LogPlanesVec[logPlane][logStripNum].push_back(m_digiIdx);
178 }
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:102

◆ setLogStrip() [2/2]

void RPCLogCone::setLogStrip ( int  logPlane,
int  logStripNum 
)

Set logic strip as fired.

Definition at line 180 of file RPCLogCone.cc.

References m_LogPlanesVec.

180  {
181  m_LogPlanesVec[logPlane].insert(TLogPlane::value_type(logStripNum, std::vector<int>()));
182 }
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:102

◆ setMuonCode()

void RPCLogCone::setMuonCode ( int  code)

sets pt code of muon that fired the strips */

Definition at line 153 of file RPCLogCone.cc.

References m_MuonCode.

153 { m_MuonCode = code; }
int m_MuonCode
Definition: RPCLogCone.h:111

◆ setMuonSign()

void RPCLogCone::setMuonSign ( int  sign)

◆ shift()

void RPCLogCone::shift ( int  pos)

Changes fired LogStrips: from "stripNum" to "stripNum + pos".

Definition at line 126 of file RPCLogCone.cc.

References funct::abs(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, m_ConeCrdnts, RPCConst::m_FIRST_PLANE, RPCConst::m_LAST_PLANE, RPCConst::m_LOGPLANE_SIZE, m_LogPlanesVec, and RPCConst::l1RpcConeCrdnts::m_Tower.

Referenced by getCompressedCone(), and RPCLogCone().

126  {
127  int shiftPos;
128  for (int logPlane = RPCConst::m_FIRST_PLANE; logPlane <= RPCConst::m_LAST_PLANE; logPlane++) {
129  TLogPlane shifted;
130  for (TLogPlane::iterator it = m_LogPlanesVec[logPlane].begin(); it != m_LogPlanesVec[logPlane].end(); it++) {
131  shiftPos = it->first + pos;
132  /* std::cout << shiftPos << " "
133  << RPCConst::m_LOGPLANE_SIZE[abs(m_ConeCrdnts.m_Tower)]
134  << std::endl;*/
135  if (shiftPos >= 0 && shiftPos < (int)RPCConst::m_LOGPLANE_SIZE[abs(m_ConeCrdnts.m_Tower)][logPlane])
136  shifted.insert(TLogPlane::value_type(shiftPos, it->second));
137  }
138  m_LogPlanesVec[logPlane] = shifted;
139  }
140 }
std::map< int, std::vector< int > > TLogPlane
Definition: RPCLogCone.h:30
static const int m_LAST_PLANE
Use ase a last index in loops.
Definition: RPCConst.h:56
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:109
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static const unsigned int m_LOGPLANE_SIZE[m_TOWER_COUNT][m_LOGPLANES_COUNT]
Definition of Logic Cone Sizes - number of Logic m_Strips in each plane.
Definition: RPCConst.h:81
static const int m_FIRST_PLANE
Use ase a first index in loops.
Definition: RPCConst.h:55
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:102

◆ toString()

std::string RPCLogCone::toString ( ) const

Definition at line 96 of file RPCLogCone.cc.

References funct::abs(), getLogStripState(), mps_fire::i, m_ConeCrdnts, RPCConst::m_FIRST_PLANE, RPCConst::m_LAST_PLANE, RPCConst::m_LOGPLANE_SIZE, RPCConst::m_LOGPLANE_STR, RPCConst::l1RpcConeCrdnts::m_LogSector, RPCConst::l1RpcConeCrdnts::m_LogSegment, RPCConst::l1RpcConeCrdnts::m_Tower, and AlCaHLTBitMon_QueryRunRegistry::string.

96  {
97  std::ostringstream ostr;
98  ostr << "\n ======================> TOWER = ";
99  ostr << std::setw(2) << m_ConeCrdnts.m_Tower << ", m_LogSector = " << m_ConeCrdnts.m_LogSector
100  << ", m_LogSegment = " << m_ConeCrdnts.m_LogSegment << " <=======================" << std::endl;
101 
102  std::string spacer;
103 
104  for (int logPlane = RPCConst::m_LAST_PLANE; logPlane >= RPCConst::m_FIRST_PLANE; logPlane--) {
105  ostr << RPCConst::m_LOGPLANE_STR[logPlane] << " ";
106  spacer.assign((72 - RPCConst::m_LOGPLANE_SIZE[abs(m_ConeCrdnts.m_Tower)][logPlane]) / 2, ' ');
107  ostr << spacer;
108 
109  for (int i = RPCConst::m_LOGPLANE_SIZE[abs(m_ConeCrdnts.m_Tower)][logPlane] - 1; i >= 0; i--) {
110  if (getLogStripState(logPlane, i))
111  ostr << "X";
112  else {
113  if (i % 8 == 0)
114  ostr << i % 10;
115  else
116  ostr << ".";
117  }
118  }
119 
120  ostr << std::endl;
121  }
122 
123  ostr << std::endl;
124  return ostr.str();
125 }
static const int m_LAST_PLANE
Use ase a last index in loops.
Definition: RPCConst.h:56
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:109
static const std::string m_LOGPLANE_STR[]
Log Planes names.
Definition: RPCConst.h:78
bool getLogStripState(int logPlane, unsigned int logStripNum) const
Definition: RPCLogCone.cc:184
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static const unsigned int m_LOGPLANE_SIZE[m_TOWER_COUNT][m_LOGPLANES_COUNT]
Definition of Logic Cone Sizes - number of Logic m_Strips in each plane.
Definition: RPCConst.h:81
static const int m_FIRST_PLANE
Use ase a first index in loops.
Definition: RPCConst.h:55

Member Data Documentation

◆ m_ConeCrdnts

RPCConst::l1RpcConeCrdnts RPCLogCone::m_ConeCrdnts
private

◆ m_DigisIdx

std::vector<std::vector<int> > RPCLogCone::m_DigisIdx
private

Digis that formed log hits in this LogCone, m_DigisIdx[logPlaneNum][i] gets the index in DigisVec stored in L1RpcTrigg

Definition at line 107 of file RPCLogCone.h.

◆ m_Index

int RPCLogCone::m_Index
private

m_Index in LogConesVec stored by L1RpcTrigg

Definition at line 116 of file RPCLogCone.h.

Referenced by getIdx(), and setIdx().

◆ m_LogPlanesVec

std::vector<TLogPlane> RPCLogCone::m_LogPlanesVec
private

◆ m_MuonCode

int RPCLogCone::m_MuonCode
private

Definition at line 111 of file RPCLogCone.h.

Referenced by getMuonCode(), RPCLogCone(), and setMuonCode().

◆ m_MuonSign

int RPCLogCone::m_MuonSign
private

Definition at line 113 of file RPCLogCone.h.

Referenced by getMuonSign(), RPCLogCone(), and setMuonSign().