14 : id(-1), hitmap(), layers(), layerMaxID()
28 delete hitmap.begin()->second;
43 os <<
"Number of hits: " <<
size() << endl;
44 for (iter =
hitmap.begin(); iter !=
hitmap.end(); ++iter)
46 os <<
"hit key 0x" << hex << iter->first << dec << endl;
49 set<unsigned int>::const_iterator siter;
50 os <<
"Number of layers: " <<
num_layers() << endl;
51 for (siter =
layers.begin(); siter !=
layers.end(); ++siter)
53 os <<
"layer : " << *siter << endl;
70 cout <<
PHWHERE <<
" detector id too large: " << detid << endl;
82 cout <<
PHWHERE <<
" duplicate key: 0x"
83 << hex << newkey << dec
84 <<
" for detector " << detid
85 <<
" hitmap.size: " <<
hitmap.size()
86 <<
" hitid: " << hitid <<
" exiting now" << endl;
98 cout <<
"hit with id 0x" << hex << key << dec <<
" exists already" << endl;
122 cout <<
" detector id too large: " << detid << endl;
128 retpair.first =
hitmap.lower_bound(keylow);
129 retpair.second =
hitmap.upper_bound(keyup);
134 {
return std::make_pair(
hitmap.begin(),
hitmap.end() ); }
168 for (; itr != last; )
PHG4HitDefs::keytype getmaxkey(const unsigned int detid)
Map::const_iterator ConstIterator
unsigned int size(void) const
unsigned int num_layers(void) const
ConstIterator AddHit(PHG4Hit *newhit)
PHG4Hit * findHit(PHG4HitDefs::keytype key)
void registerHitOnLayer(const PHG4Hit *hit)
Iterator findOrAddHit(PHG4HitDefs::keytype key)
void identify(std::ostream &os=std::cout) const
std::pair< ConstIterator, ConstIterator > ConstRange
void AddLayer(const unsigned int ilayer)
std::map< unsigned int, PHG4HitDefs::keytype > layerMaxID
PHG4HitDefs::keytype genkey(const unsigned int detid)
std::set< unsigned int > layers
ConstRange getHits(void) const
return all hist
virtual float get_edep() const
virtual void set_hit_id(const PHG4HitDefs::keytype i)
virtual PHG4HitDefs::keytype get_hit_id() const
virtual void set_edep(const float f)
static const keytype hitid_mask
static const unsigned int hit_idbits
static const unsigned int keybits
int get_volume_id(const std::string &nodename)
static const keytype detid_mask