ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::RpcClusterObj Struct Reference

#include <RpcHitClustering.h>

Collaboration diagram for Muon::RpcClusterObj:

Public Types

typedef std::vector< const RpcPrepData * > HitList
typedef HitList::iterator HitIt
typedef HitList::const_iterator HitCit

Public Member Functions

 RpcClusterObj ()
void add (const RpcPrepData *prd, int gasgap)
bool addSecond (const RpcPrepData *prd, int gasgap)
void merge (RpcClusterObj &cluster)
bool active () const
int layers () const

Public Attributes

int ngasgap1
int ngasgap2
HitList hitList

Detailed Description

Definition at line 18 of file RpcHitClustering.h.

Member Typedef Documentation

◆ HitCit

typedef HitList::const_iterator Muon::RpcClusterObj::HitCit

Definition at line 22 of file RpcHitClustering.h.

◆ HitIt

typedef HitList::iterator Muon::RpcClusterObj::HitIt

Definition at line 21 of file RpcHitClustering.h.

◆ HitList

typedef std::vector< const RpcPrepData* > Muon::RpcClusterObj::HitList

Definition at line 20 of file RpcHitClustering.h.

Constructor & Destructor Documentation

◆ RpcClusterObj()

Muon::RpcClusterObj::RpcClusterObj ( )
inline

Definition at line 23 of file RpcHitClustering.h.

Member Function Documentation

◆ active()

bool Muon::RpcClusterObj::active ( ) const
inline

Definition at line 55 of file RpcHitClustering.h.

55{ return !hitList.empty(); }

◆ add()

void Muon::RpcClusterObj::add ( const RpcPrepData * prd,
int gasgap )
inline

Definition at line 25 of file RpcHitClustering.h.

25 {
26 if( gasgap == 1 ) ++ngasgap1;
27 else ++ngasgap2;
28 hitList.push_back(prd);
29 }

◆ addSecond()

bool Muon::RpcClusterObj::addSecond ( const RpcPrepData * prd,
int gasgap )
inline

Definition at line 31 of file RpcHitClustering.h.

31 {
32
33 HitIt it = hitList.begin();
34 HitIt it_end = hitList.end();
35 for( ;it!=it_end;++it ){
36 if( (*it)->identify() != prd->identify() ) continue;
37 if( fabs( (*it)->time() - 12.5) > fabs( prd->time() - 12.5 ) ){
38 *it = prd;
39 }
40 return true;
41 }
42 add(prd,gasgap);
43 return false;
44 }
void add(const RpcPrepData *prd, int gasgap)
HitList::iterator HitIt

◆ layers()

int Muon::RpcClusterObj::layers ( ) const
inline

Definition at line 57 of file RpcHitClustering.h.

57 {
58 if( hitList.empty() ) return 0;
59 else if( ngasgap1 > 0 && ngasgap2 > 0 ) return 2;
60 return 1;
61 }

◆ merge()

void Muon::RpcClusterObj::merge ( RpcClusterObj & cluster)
inline

Definition at line 46 of file RpcHitClustering.h.

46 {
47 hitList.insert(hitList.end(),cluster.hitList.begin(),cluster.hitList.end());
48 ngasgap1 += cluster.ngasgap1;
49 ngasgap2 += cluster.ngasgap2;
50 cluster.ngasgap1 = 0;
51 cluster.ngasgap2 = 0;
52 cluster.hitList.clear();
53 }

Member Data Documentation

◆ hitList

HitList Muon::RpcClusterObj::hitList

Definition at line 65 of file RpcHitClustering.h.

◆ ngasgap1

int Muon::RpcClusterObj::ngasgap1

Definition at line 63 of file RpcHitClustering.h.

◆ ngasgap2

int Muon::RpcClusterObj::ngasgap2

Definition at line 64 of file RpcHitClustering.h.


The documentation for this struct was generated from the following file: