Main Page
Namespaces
Classes
Package Documentation
RecoLocalMuon
GEMRecHit
src
GEMCluster.cc
Go to the documentation of this file.
1
#include "
RecoLocalMuon/GEMRecHit/interface/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
GEMCluster::GEMCluster
(
int
fs,
int
ls
,
int
bx
) :
fstrip
(fs),
lstrip
(ls),
bunchx
(bx) {}
10
11
GEMCluster::~GEMCluster
() {}
12
13
int
GEMCluster::firstStrip
()
const
{
return
fstrip
; }
14
15
int
GEMCluster::lastStrip
()
const
{
return
lstrip
; }
16
17
int
GEMCluster::clusterSize
()
const
{
return
-(
fstrip
-
lstrip
) + 1; }
18
19
int
GEMCluster::bx
()
const
{
return
bunchx
; }
20
21
bool
GEMCluster::isAdjacent
(
const
GEMCluster
&
cl
)
const
{
22
return
((cl.
firstStrip
() == this->
firstStrip
() - 1) && (cl.
bx
() == this->
bx
()));
23
}
24
25
void
GEMCluster::merge
(
const
GEMCluster
&
cl
) {
26
if
(this->
isAdjacent
(cl)) {
27
fstrip
= cl.
firstStrip
();
28
}
29
}
30
31
bool
GEMCluster::operator<
(
const
GEMCluster
&
cl
)
const
{
32
if
(cl.
bx
() == this->
bx
())
33
return
cl.
firstStrip
() < this->
firstStrip
();
34
else
35
return
cl.
bx
() < this->
bx
();
36
}
37
38
bool
GEMCluster::operator==
(
const
GEMCluster
&
cl
)
const
{
39
return
((this->
clusterSize
() == cl.
clusterSize
()) && (this->
bx
() == cl.
bx
()) &&
40
(this->
firstStrip
() == cl.
firstStrip
()));
41
}
GEMCluster.h
GEMCluster::bunchx
int16_t bunchx
Definition:
GEMCluster.h:25
std
Definition:
JetResolutionObject.h:76
GEMCluster::merge
void merge(const GEMCluster &cl)
Definition:
GEMCluster.cc:25
GEMCluster::~GEMCluster
~GEMCluster()
Definition:
GEMCluster.cc:11
GEMCluster::operator<
bool operator<(const GEMCluster &cl) const
Definition:
GEMCluster.cc:31
GEMCluster
Definition:
GEMCluster.h:5
GEMCluster::GEMCluster
GEMCluster()
Definition:
GEMCluster.cc:7
GEMCluster::lstrip
uint16_t lstrip
Definition:
GEMCluster.h:24
GEMCluster::lastStrip
int lastStrip() const
Definition:
GEMCluster.cc:15
eostools.ls
def ls(path, rec=False)
Definition:
eostools.py:349
GEMCluster::bx
int bx() const
Definition:
GEMCluster.cc:19
GEMCluster::firstStrip
int firstStrip() const
Definition:
GEMCluster.cc:13
GEMCluster::fstrip
uint16_t fstrip
Definition:
GEMCluster.h:23
GEMCluster::clusterSize
int clusterSize() const
Definition:
GEMCluster.cc:17
GetRecoTauVFromDQM_MC_cff.cl
cl
Definition:
GetRecoTauVFromDQM_MC_cff.py:38
GEMCluster::isAdjacent
bool isAdjacent(const GEMCluster &cl) const
Definition:
GEMCluster.cc:21
GEMCluster::operator==
bool operator==(const GEMCluster &cl) const
Definition:
GEMCluster.cc:38
Generated for CMSSW Reference Manual by
1.8.11