test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GEMCluster.cc
Go to the documentation of this file.
1 #include "GEMCluster.h"
2 #include <iostream>
3 #include <fstream>
4 
5 using namespace std;
6 
7 GEMCluster::GEMCluster() : fstrip(0), lstrip(0), bunchx(0)
8 {
9 }
10 
11 GEMCluster::GEMCluster(int fs, int ls, int bx) :
12  fstrip(fs), lstrip(ls), bunchx(bx)
13 {
14 }
15 
17 {
18 }
19 
20 int
22 {
23  return fstrip;
24 }
25 
26 int
28 {
29  return lstrip;
30 }
31 
32 int
34 {
35  return -(fstrip-lstrip)+1;
36 }
37 
38 int
40 {
41  return bunchx;
42 }
43 
45 
46  return ((cl.firstStrip() == this->firstStrip()-1) &&
47  (cl.bx() == this->bx()));
48 }
49 
51 
52  if(this->isAdjacent(cl))
53  {
54  fstrip = cl.firstStrip();
55  }
56 }
57 
58 bool GEMCluster::operator<(const GEMCluster& cl) const{
59 
60 if(cl.bx() == this->bx())
61  return cl.firstStrip()<this->firstStrip();
62 else
63  return cl.bx()<this->bx();
64 }
65 
66 bool
68  return ( (this->clusterSize() == cl.clusterSize()) &&
69  (this->bx() == cl.bx()) &&
70  (this->firstStrip() == cl.firstStrip()) );
71 }
int16_t bunchx
Definition: GEMCluster.h:24
def ls
Definition: eostools.py:348
void merge(const GEMCluster &cl)
Definition: GEMCluster.cc:50
bool operator<(const GEMCluster &cl) const
Definition: GEMCluster.cc:58
uint16_t lstrip
Definition: GEMCluster.h:23
int lastStrip() const
Definition: GEMCluster.cc:27
int bx() const
Definition: GEMCluster.cc:39
int firstStrip() const
Definition: GEMCluster.cc:21
uint16_t fstrip
Definition: GEMCluster.h:22
int clusterSize() const
Definition: GEMCluster.cc:33
bool isAdjacent(const GEMCluster &cl) const
Definition: GEMCluster.cc:44
bool operator==(const GEMCluster &cl) const
Definition: GEMCluster.cc:67