12#include "MucRecEvent/MucRecHitContainer.h"
13#include "Identifier/MucID.h"
40 m_GapHitCount[gapID] = 0;
58 count += m_GapHitCount[gapID];
67 if ( m_GapHitCount.count( gapID ) )
return m_GapHitCount[gapID];
73 return m_GapHitCount[gapID];
77 if ( m_pHit.count(
id ) )
return m_pHit[id];
97 const int gap,
const int strip ) {
102 if (
id == hit->
GetID() ) {
return hit; }
115 AddHit( part, seg, gap, strip );
129 int hitCount = m_GapHitCount[gapID];
134 m_pMucRecHitCol->push_back( pHit );
138 { cout <<
"MucRecHitContainer::AddHit-F1 failed to create new MucRecHit" << endl; }
139 else { m_GapHitCount[gapID]++; }
146 MucRecHitCol::iterator imuchit;
147 for ( imuchit = p->begin(); imuchit != p->end(); imuchit++ )
149 int part = ( *imuchit )->Part();
150 int seg = ( *imuchit )->Seg();
151 int gap = ( *imuchit )->Gap();
152 int strip = ( *imuchit )->Strip();
155 int hitCount = m_GapHitCount[gapID];
158 m_pHit[id] = *imuchit;
160 { cout <<
"MucRecHitContainer::AddHit-F1 failed to create new MucRecHit" << endl; }
161 else { m_GapHitCount[gapID]++; }
DOUBLE_PRECISION count[3]
ObjectVector< MucRecHit > MucRecHitCol
static int part(const Identifier &id)
static value_type getPartNum()
static Identifier channel_id(int barrel_ec, int segment, int layer, int channel)
For a single crystal.
static int gap(const Identifier &id)
static int seg(const Identifier &id)
static value_type getSegNum(int part)
static value_type getStripNum(int part, int seg, int gap)
static int strip(const Identifier &id)
static value_type getGapNum(int part)
void Clear()
Remove all hit objects from the container, and destroy them.
int GetHitCount()
How many hits are there in this event?
MucRecHit * GetHit(const MucRecHitID hitID)
Get a MucRecHit object by hit identifier.
void AddHit(const Identifier id)
void Init()
Points to the single instance of MucRecHitContainer.
MucRecHit * GetHitByIdentifier(const Identifier id)
void SetMucRecHitCol(MucRecHitCol *p)
int GetGapHitCount(const MucRecHitID gapID)
How many hits are there in this gap?
Identifier GetID() const
Get soft identifier of this hit.