8#include "EmcRecEventModel/RecEmcCluster.h"
9#include "EmcRecGeoSvc/EmcRecGeoSvc.h"
10#include "GaudiKernel/Bootstrap.h"
11#include "GaudiKernel/ISvcLocator.h"
141 RecEmcHitMap::const_iterator pHitMap;
218 RecEmcHitMap::const_iterator pHitMap;
224 etot+=pHitMap->second.getEnergy();
233 ISvcLocator* svcLocator = Gaudi::svcLocator();
234 StatusCode sc = svcLocator->service(
"EmcRecGeoSvc",iGeoSvc);
235 if(sc!=StatusCode::SUCCESS) {
236 cout<<
"Error: Can't get EmcRecGeoSvc"<<endl;
239 RecEmcHitMap::const_iterator pHitMap;
247 etot+=pHitMap->second.getEnergy();
249 possum+=pos*pHitMap->second.getEnergy();
262 ISvcLocator* svcLocator = Gaudi::svcLocator();
263 StatusCode sc = svcLocator->service(
"EmcRecGeoSvc",iGeoSvc);
264 if(sc!=StatusCode::SUCCESS) {
265 cout<<
"Error: Can't get EmcRecGeoSvc"<<endl;
271 RecEmcHitMap::const_iterator pHitMap;
276 HepPoint3D pos(pHitMap->second.getFrontCenter());
277 etot+=pHitMap->second.getEnergy();
278 sum+=pHitMap->second.getEnergy()*pos.distance2(center);
290 RecEmcHitMap::const_iterator pHitMap;
292 cout<<
"EMC Cluster: ";
294 cout<<
"Cluster Id= ";
301 pHitMap->second.Dump();
307 RecEmcHitMap::const_iterator pHitMap;
309 cout<<
"EMC Cluster: ";
311 cout<<
"Cluster Id= ";
314 for(pHitMap=aCluster.
Begin();
315 pHitMap!=aCluster.
End();
318 os<< (pHitMap->second);
322 cout<<
"Contains "<<aCluster.
getSeedSize()<<
" Seeds:"<<endl;
323 RecEmcHitMap::const_iterator pSeedMap;
328 os<< (pSeedMap->second);
334 vector<RecEmcID>::iterator iShowerId;
335 os<<
"Contains "<<aCluster.
getShowerSize()<<
" Showers:"<<endl;
336 for(iShowerId=aShowerIdVec.begin();
337 iShowerId!=aShowerIdVec.end();
339 os << *iShowerId <<endl;
ostream & operator<<(ostream &os, const RecEmcCluster &aCluster)
virtual HepPoint3D GetCFrontCenter(const Identifier &id) const =0
virtual void clear()
Reset to invalid state.
RecEmcEnergy getEnergy() const
RecEmcID getClusterId() const
HepPoint3D getPosition() const
void Insert(const RecEmcHit &aHit)
RecEmcHitMap::const_iterator FindSeed(const RecEmcID &CellId) const
RecEmcHitMap::const_iterator EndSeed() const
RecEmcHitMap::const_iterator BeginSeed() const
vector< RecEmcID > fShowerIdVec
RecEmcHitMap::const_iterator Find(const RecEmcID &CellId) const
double getSecondMoment() const
RecEmcHitMap::const_iterator Begin() const
void Erase(const RecEmcHit &aHit)
void InsertSeed(const RecEmcHit &aSeed)
RecEmcHitMap::const_iterator End() const
void ClusterId(const RecEmcID id)
vector< RecEmcID > getShowerIdVec() const
void InsertShowerId(const RecEmcID id)
int getShowerSize() const
RecEmcID getCellId() const