CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 25 of file RPCLogCone.h.

Member Typedef Documentation

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 34 of file RPCLogCone.h.

Constructor & Destructor Documentation

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  :
20  m_ConeCrdnts()
21 {
23  m_MuonCode = 0;
24  m_MuonSign = 0;
25 }
std::map< int, std::vector< int > > TLogPlane
Definition: RPCLogCone.h:34
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:116
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:109
int m_MuonCode
Definition: RPCLogCone.h:118
int m_MuonSign
Definition: RPCLogCone.h:120
static const int m_LOGPLANES_COUNT
Max Logic Planes Count in trigger towers.
Definition: RPCConst.h:47
RPCLogCone::RPCLogCone ( int  tower,
int  logSector,
int  logSegment 
)

Constructor. Cone coordinates are set.

Constructor. Cone coordinates are set.

Definition at line 32 of file RPCLogCone.cc.

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

32  :
33  m_ConeCrdnts(tower, logSector, logSegment)
34 {
36  m_MuonCode = 0;
37  m_MuonSign = 0;
38 }
std::map< int, std::vector< int > > TLogPlane
Definition: RPCLogCone.h:34
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:116
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:109
int m_MuonCode
Definition: RPCLogCone.h:118
int m_MuonSign
Definition: RPCLogCone.h:120
static const int m_LOGPLANES_COUNT
Max Logic Planes Count in trigger towers.
Definition: RPCConst.h:47
RPCLogCone::RPCLogCone ( const RPCLogHit logHit)

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

Copying Constructor

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

45 {
47 
48  m_ConeCrdnts = logHit.getConeCrdnts();
49 
50  m_MuonCode = 0;
51  m_MuonSign = 0;
52 
53  setLogStrip(logHit.getlogPlaneNumber() -1, logHit.getStripNumberInCone(), logHit.getDigiIdx());
54 }
std::map< int, std::vector< int > > TLogPlane
Definition: RPCLogCone.h:34
RPCConst::l1RpcConeCrdnts getConeCrdnts() const
Definition: RPCLogHit.cc:24
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:116
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:200
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:109
int m_MuonCode
Definition: RPCLogCone.h:118
int getStripNumberInCone() const
Definition: RPCLogHit.cc:44
int m_MuonSign
Definition: RPCLogCone.h:120
static const int m_LOGPLANES_COUNT
Max Logic Planes Count in trigger towers.
Definition: RPCConst.h:47
int getlogPlaneNumber() const
Definition: RPCLogHit.cc:40
int getDigiIdx() const
Definition: RPCLogHit.cc:52
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 56 of file RPCLogCone.cc.

References 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, setLogStrip(), shift(), and strip().

56  :
57  m_ConeCrdnts(tower, logSector, logSegment)
58 {
60  m_MuonCode = 0;
61  m_MuonSign = 0;
62 
63  unsigned long long int mask = 255; // (first 8 bits)
64  int shift = 0;
65 
66  //std::cout << "Decompressing pattern: " << pat << std::endl;
67  for (int logplane = RPCConst::m_FIRST_PLANE;
69  ++logplane )
70  {
71  unsigned int strip = (pat & (mask<<shift) ) >> shift;
72  //std::cout << logplane << " " << strip << std::endl;
73  shift += 8;
74  // We should prob. use m_NOT_CONNECTED value
75  if (strip != RPCConst::m_LOGPLANE_SIZE[std::abs(getTower())][logplane])
76  setLogStrip(logplane,strip);
77  }
78 }
static const int m_USED_PLANES_COUNT[m_TOWER_COUNT]
m_Number of Logic Planes existing in each m_Tower.
Definition: RPCConst.h:88
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
std::map< int, std::vector< int > > TLogPlane
Definition: RPCLogCone.h:34
void shift(int pos)
Changes fired LogStrips: from &quot;stripNum&quot; to &quot;stripNum + pos&quot;.
Definition: RPCLogCone.cc:145
#define abs(x)
Definition: mlp_lapack.h:159
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:116
int getTower() const
Definition: RPCLogCone.cc:188
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:200
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:82
static const int m_FIRST_PLANE
Use ase a first index in loops.
Definition: RPCConst.h:56
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:109
int m_MuonCode
Definition: RPCLogCone.h:118
int m_MuonSign
Definition: RPCLogCone.h:120
static const int m_LOGPLANES_COUNT
Max Logic Planes Count in trigger towers.
Definition: RPCConst.h:47

Member Function Documentation

bool RPCLogCone::addLogHit ( const RPCLogHit logHit)

Adds next logHit .

Adds a loghit to a cone

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

221  {
222 
223  if (m_ConeCrdnts.m_Tower == logHit.getTower() &&
224  m_ConeCrdnts.m_LogSector == logHit.getLogSector() &&
226  {
227  setLogStrip(logHit.getlogPlaneNumber()-1, logHit.getStripNumberInCone(), logHit.getDigiIdx());
228  return true;
229  }
230  else
231  return false;
232 }
int getLogSegment() const
Definition: RPCLogHit.cc:36
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:116
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:200
int getStripNumberInCone() const
Definition: RPCLogHit.cc:44
int getTower() const
Definition: RPCLogHit.cc:28
int getlogPlaneNumber() const
Definition: RPCLogHit.cc:40
int getLogSector() const
Definition: RPCLogHit.cc:32
int getDigiIdx() const
Definition: RPCLogHit.cc:52
unsigned long long RPCLogCone::getCompressedCone ( )

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

Definition at line 80 of file RPCLogCone.cc.

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

80  {
81 
82  unsigned long long int pattern = 0;
83  int shift = 0;
84 
85  for (int logplane = RPCConst::m_FIRST_PLANE;
87  logplane++ )
88  {
89  unsigned long long int strip;
90  if (getHitsCnt(logplane)==0) {
91  // We need to mark somehow, that plane is empty (strip 0 is not fired)
92  strip = RPCConst::m_LOGPLANE_SIZE[std::abs(getTower())][logplane];
93  }
94  else if (getHitsCnt(logplane)==1) {
95  RPCLogCone::TLogPlane lp = getLogPlane(logplane);
96  strip = lp.begin()->first;
97  }
98  else {
99  throw RPCException("To many hits in logcone");
100  }
101  pattern = pattern | (strip << shift);
102  shift += 8;
103  }
104 
105  //std::cout << " Compressed cone: " << pattern << std::endl;
106  return pattern;
107 }
static const int m_USED_PLANES_COUNT[m_TOWER_COUNT]
m_Number of Logic Planes existing in each m_Tower.
Definition: RPCConst.h:88
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
std::map< int, std::vector< int > > TLogPlane
Definition: RPCLogCone.h:34
void shift(int pos)
Changes fired LogStrips: from &quot;stripNum&quot; to &quot;stripNum + pos&quot;.
Definition: RPCLogCone.cc:145
#define abs(x)
Definition: mlp_lapack.h:159
TLogPlane getLogPlane(int logPlane) const
Definition: RPCLogCone.cc:169
int getTower() const
Definition: RPCLogCone.cc:188
int getHitsCnt(int logPlane) const
Gets fired strips count in given logPlane.
Definition: RPCLogCone.cc:174
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:82
static const int m_FIRST_PLANE
Use ase a first index in loops.
Definition: RPCConst.h:56
RPCConst::l1RpcConeCrdnts RPCLogCone::getConeCrdnts ( ) const

Definition at line 194 of file RPCLogCone.cc.

References m_ConeCrdnts.

Referenced by RPCTriggerCrate::runCone().

194 { return m_ConeCrdnts; }
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:116
int RPCLogCone::getFiredPlanesCnt ( ) const

Definition at line 251 of file RPCLogCone.cc.

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

251  {
252  int firedPlanes = 0;
253  for(int logPlane = RPCConst::m_FIRST_PLANE;
255  logPlane++)
256  {
257  firedPlanes = firedPlanes + isPlaneFired(logPlane);
258  }
259  return firedPlanes;
260 }
static const int m_USED_PLANES_COUNT[m_TOWER_COUNT]
m_Number of Logic Planes existing in each m_Tower.
Definition: RPCConst.h:88
#define abs(x)
Definition: mlp_lapack.h:159
bool isPlaneFired(int logPlane) const
Definition: RPCLogCone.cc:244
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:116
static const int m_FIRST_PLANE
Use ase a first index in loops.
Definition: RPCConst.h:56
int RPCLogCone::getHitsCnt ( int  logPlane) const

Gets fired strips count in given logPlane.

Definition at line 174 of file RPCLogCone.cc.

References m_LogPlanesVec.

Referenced by getCompressedCone(), and RPCPac::runEnergeticPatternsGroups().

174  {
175  return m_LogPlanesVec[logPlane].size();
176 }
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:109
int RPCLogCone::getIdx ( ) const

Definition at line 198 of file RPCLogCone.cc.

References m_Index.

Referenced by RPCPac::run().

198 { return m_Index; }
int m_Index
m_Index in LogConesVec stored by L1RpcTrigg
Definition: RPCLogCone.h:123
RPCLogCone::TLogPlane RPCLogCone::getLogPlane ( int  logPlane) const

Definition at line 169 of file RPCLogCone.cc.

References m_LogPlanesVec.

Referenced by getCompressedCone(), and RPCPac::runEnergeticPatternsGroups().

169  {
170  return m_LogPlanesVec[logPlane];
171 }
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:109
int RPCLogCone::getLogSector ( ) const

Definition at line 190 of file RPCLogCone.cc.

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

190 { return m_ConeCrdnts.m_LogSector; }
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:116
int RPCLogCone::getLogSegment ( ) const

Definition at line 192 of file RPCLogCone.cc.

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

Referenced by RPCTriggerBoard::runCone().

192 { return m_ConeCrdnts.m_LogSegment; }
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:116
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 235 of file RPCLogCone.cc.

References end, and m_LogPlanesVec.

Referenced by RPCPac::runEnergeticPatternsGroups(), and RPCPac::runTrackPatternsGroup().

235  {
236  TLogPlane::const_iterator it = m_LogPlanesVec[logPlane].find(logStripNum);
237  if(it != m_LogPlanesVec[logPlane].end())
238  return it->second;
239  else
240  return std::vector<int>();
241 }
#define end
Definition: vmac.h:38
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:109
bool RPCLogCone::getLogStripState ( int  logPlane,
unsigned int  logStripNum 
) const

Get logic strip state.

Returns
true if fired

Definition at line 211 of file RPCLogCone.cc.

References m_LogPlanesVec.

Referenced by RPCPacData::getTPatternsGroupShape(), RPCPac::runEnergeticPatternsGroups(), RPCPac::runTrackPatternsGroup(), and toString().

211  {
212  return m_LogPlanesVec[logPlane].count(logStripNum);
213 }
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:109
int RPCLogCone::getMuonCode ( ) const
Returns
pt code of muon that fired the strips

Definition at line 182 of file RPCLogCone.cc.

References m_MuonCode.

182 { return m_MuonCode; }
int m_MuonCode
Definition: RPCLogCone.h:118
int RPCLogCone::getMuonSign ( ) const

Definition at line 186 of file RPCLogCone.cc.

References m_MuonSign.

186 { return m_MuonSign; }
int m_MuonSign
Definition: RPCLogCone.h:120
int RPCLogCone::getTower ( ) const

Definition at line 188 of file RPCLogCone.cc.

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

Referenced by getCompressedCone(), RPCLogCone(), and RPCTriggerBoard::runCone().

188 { return m_ConeCrdnts.m_Tower; }
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:116
bool RPCLogCone::isPlaneFired ( int  logPlane) const

Definition at line 244 of file RPCLogCone.cc.

References m_LogPlanesVec, and findQualityFiles::size.

Referenced by getFiredPlanesCnt(), and possibleTrigger().

244  {
245  if(m_LogPlanesVec[logPlane].size() == 0)
246  return false;
247  else
248  return true;
249 }
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:109
tuple size
Write out results.
int RPCLogCone::possibleTrigger ( ) const
Returns
0 - trigger not possible, 1 - 3 inner planes fired, 2 - 4 or more planes fired

Definition at line 263 of file RPCLogCone.cc.

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

263  {
264  int triggerType = 0; //0 - trigger not possible
265  //1 - 3/4 (3 inner planes fired)
266  //2 - 4/6 (four palnes fired)
267  int firedPlanes = 0;
268 
269  int logPlane = RPCConst::m_FIRST_PLANE;
270  for( ; logPlane <= RPCConst::m_LOGPLANE4; logPlane++) {
271  firedPlanes = firedPlanes + isPlaneFired(logPlane);
272  }
273  if(firedPlanes >= 3)
274  triggerType = 1;
275 
276  for( ;
278  logPlane++)
279  {
280  firedPlanes = firedPlanes + isPlaneFired(logPlane);
281  }
282  if(firedPlanes >= 4)
283  triggerType = 2;
284 
285  return triggerType;
286 }
static const int m_USED_PLANES_COUNT[m_TOWER_COUNT]
m_Number of Logic Planes existing in each m_Tower.
Definition: RPCConst.h:88
#define abs(x)
Definition: mlp_lapack.h:159
bool isPlaneFired(int logPlane) const
Definition: RPCLogCone.cc:244
static const int m_LOGPLANE4
Definition: RPCConst.h:52
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:116
static const int m_FIRST_PLANE
Use ase a first index in loops.
Definition: RPCConst.h:56
void RPCLogCone::setIdx ( int  index)

Definition at line 196 of file RPCLogCone.cc.

References getHLTprescales::index, and m_Index.

Referenced by RPCConeBuilderFromES::getConesFromES().

196 { m_Index = index; }
int m_Index
m_Index in LogConesVec stored by L1RpcTrigg
Definition: RPCLogCone.h:123
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 200 of file RPCLogCone.cc.

References m_LogPlanesVec.

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

200  {
201 //m_LogPlanesVec[logPlane].insert(logStripNum);
202 //m_LogPlanesVec[logPlane].insert(TLogPlane::value_type(logStripNum, vector<int>()));
203  m_LogPlanesVec[logPlane][logStripNum].push_back(m_digiIdx);
204 }
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:109
void RPCLogCone::setLogStrip ( int  logPlane,
int  logStripNum 
)

Set logic strip as fired.

Definition at line 206 of file RPCLogCone.cc.

References m_LogPlanesVec.

206  {
207  m_LogPlanesVec[logPlane].insert(TLogPlane::value_type(logStripNum, std::vector<int>()));
208 }
Container::value_type value_type
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:109
void RPCLogCone::setMuonCode ( int  code)

sets pt code of muon that fired the strips */

Definition at line 179 of file RPCLogCone.cc.

References m_MuonCode.

179 { m_MuonCode = code; }
int m_MuonCode
Definition: RPCLogCone.h:118
void RPCLogCone::setMuonSign ( int  sign)

Definition at line 184 of file RPCLogCone.cc.

References m_MuonSign.

184 { m_MuonSign = sign; }
int m_MuonSign
Definition: RPCLogCone.h:120
void RPCLogCone::shift ( int  pos)

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

Definition at line 145 of file RPCLogCone.cc.

References abs, begin, m_ConeCrdnts, RPCConst::m_FIRST_PLANE, RPCConst::m_LAST_PLANE, RPCConst::m_LOGPLANE_SIZE, m_LogPlanesVec, RPCConst::l1RpcConeCrdnts::m_Tower, and pos.

Referenced by getCompressedCone(), and RPCLogCone().

145  {
146  int shiftPos;
147  for(int logPlane = RPCConst::m_FIRST_PLANE; logPlane <= RPCConst::m_LAST_PLANE; logPlane++) {
148  TLogPlane shifted;
149  for(TLogPlane::iterator it = m_LogPlanesVec[logPlane].begin();
150  it != m_LogPlanesVec[logPlane].end();
151  it++)
152  {
153  shiftPos = it->first + pos;
154  /* std::cout << shiftPos << " "
155  << RPCConst::m_LOGPLANE_SIZE[abs(m_ConeCrdnts.m_Tower)]
156  << std::endl;*/
157  if ( shiftPos >= 0 && shiftPos < (int)RPCConst::m_LOGPLANE_SIZE[abs(m_ConeCrdnts.m_Tower)][logPlane])
158  shifted.insert(TLogPlane::value_type(shiftPos, it->second));
159  }
160  m_LogPlanesVec[logPlane] = shifted;
161  }
162 }
std::map< int, std::vector< int > > TLogPlane
Definition: RPCLogCone.h:34
static const int m_LAST_PLANE
Use ase a last index in loops.
Definition: RPCConst.h:57
#define abs(x)
Definition: mlp_lapack.h:159
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:116
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:82
static const int m_FIRST_PLANE
Use ase a first index in loops.
Definition: RPCConst.h:56
Container::value_type value_type
std::vector< TLogPlane > m_LogPlanesVec
Logic Planes.
Definition: RPCLogCone.h:109
#define begin
Definition: vmac.h:31
std::string RPCLogCone::toString ( ) const

Definition at line 110 of file RPCLogCone.cc.

References abs, getLogStripState(), 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, and RPCConst::l1RpcConeCrdnts::m_Tower.

110  {
111  std::ostringstream ostr;
112  ostr << "\n ======================> TOWER = ";
113  ostr<<std::setw(2)
115  <<", m_LogSector = "
117  <<", m_LogSegment = "
119  <<" <======================="<< std::endl;
120 
121  std::string spacer;
122 
123  for (int logPlane = RPCConst::m_LAST_PLANE; logPlane >= RPCConst::m_FIRST_PLANE; logPlane--) {
124  ostr<<RPCConst::m_LOGPLANE_STR[logPlane]<<" ";
125  spacer.assign((72 - RPCConst::m_LOGPLANE_SIZE[abs(m_ConeCrdnts.m_Tower)][logPlane])/2, ' ');
126  ostr<<spacer;
127 
128  for(int i = RPCConst::m_LOGPLANE_SIZE[abs(m_ConeCrdnts.m_Tower)][logPlane]-1; i >=0; i--) {
129  if(getLogStripState(logPlane, i))
130  ostr<<"X";
131  else {
132  if(i%8 == 0)
133  ostr<<i%10;
134  else
135  ostr<<".";
136  }
137  }
138 
139  ostr<<std::endl;
140  }
141 
142  ostr<< std::endl;
143  return ostr.str();
144 }
int i
Definition: DBlmapReader.cc:9
bool getLogStripState(int logPlane, unsigned int logStripNum) const
Definition: RPCLogCone.cc:211
static const int m_LAST_PLANE
Use ase a last index in loops.
Definition: RPCConst.h:57
#define abs(x)
Definition: mlp_lapack.h:159
RPCConst::l1RpcConeCrdnts m_ConeCrdnts
Definition: RPCLogCone.h:116
static const std::string m_LOGPLANE_STR[]
Log Planes names.
Definition: RPCConst.h:79
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:82
static const int m_FIRST_PLANE
Use ase a first index in loops.
Definition: RPCConst.h:56

Member Data Documentation

RPCConst::l1RpcConeCrdnts RPCLogCone::m_ConeCrdnts
private
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 114 of file RPCLogCone.h.

int RPCLogCone::m_Index
private

m_Index in LogConesVec stored by L1RpcTrigg

Definition at line 123 of file RPCLogCone.h.

Referenced by getIdx(), and setIdx().

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

Definition at line 118 of file RPCLogCone.h.

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

int RPCLogCone::m_MuonSign
private

Definition at line 120 of file RPCLogCone.h.

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