BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Emc/EmcRecEventModel/include/EmcRecEventModel/RecEmcCluster.h
Go to the documentation of this file.
1//
2// Bes EMC Rec Cluster
3//
4// Created by Zhe Wang 2003, 10, 1
5//
6#ifndef REC_EMC_CLUSTER_H
7#define REC_EMC_CLUSTER_H
8
9#include "EmcRecEventModel/RecEmcDataType.h"
10#include "EmcRecEventModel/RecEmcHit.h"
11#include "EventModel/EventModel.h"
12#include "GaudiKernel/ContainedObject.h"
13#include "GaudiKernel/ObjectVector.h"
14
15using namespace std;
16
17extern const CLID& CLID_RecEmcCluster;
18
19// class RecEmcShower;
20
21class RecEmcCluster : virtual public ContainedObject {
22public:
23 virtual const CLID& clID() const { return RecEmcCluster::classID(); }
24 static const CLID& classID() { return CLID_RecEmcCluster; }
25
26 // Constructors and destructors
29
30 // Copy and assignment
31 // RecEmcCluster(const RecEmcCluster& aCluster);
32 // RecEmcCluster& operator=(const RecEmcCluster& aCluster);
33
34 // Other methods
35 // Reset all data members to default value
36 void Clear();
37
38 // Access a cluster
39 RecEmcID getClusterId() const { return fClusterId; }
40 void ClusterId( const RecEmcID id );
41 // Cluster energy
42 RecEmcEnergy getEnergy() const;
43 // Cluster position
44 HepPoint3D getPosition() const;
45 // Second moment
46 double getSecondMoment() const;
47
48 // Read hit map of a cluster
49 // Only const_iterator is supplied.
50 // Use Insert and Erase to add and delete hit.
51 RecEmcHitMap::const_iterator Begin() const;
52 RecEmcHitMap::const_iterator End() const;
53 RecEmcHitMap::const_iterator Find( const RecEmcID& CellId ) const;
54
55 // Append and remove a hit
56 void Insert( const RecEmcHit& aHit );
57 void Erase( const RecEmcHit& aHit );
58
59 // Use Insert and Erase to add and delete seed.
60 RecEmcHitMap::const_iterator BeginSeed() const;
61 RecEmcHitMap::const_iterator EndSeed() const;
62 RecEmcHitMap::const_iterator FindSeed( const RecEmcID& CellId ) const;
63 int getSeedSize() const;
64
65 // Append and remove a seed
66 void InsertSeed( const RecEmcHit& aSeed );
67
68 int getShowerSize() const;
69 void InsertShowerId( const RecEmcID id );
70 vector<RecEmcID> getShowerIdVec() const { return fShowerIdVec; }
71 void ShowerIdVec( const vector<RecEmcID>& showerIdVec ) { fShowerIdVec = showerIdVec; }
72
73 // Dump out
74 void Dump() const;
75
76protected:
77 // fClusterId: the minimum CellId.
79 // fClusterHitMap: hit members of a cluster.
81 // fSeedMap: seed members of a cluster.
83 // fShowerMap: shower members of a cluster.
84 // map<RecEmcID,RecEmcShower*,less<RecEmcID> > fShowerMap;
85 vector<RecEmcID> fShowerIdVec;
86};
87
88ostream& operator<<( ostream& os, const RecEmcCluster& aCluster );
89
90typedef map<RecEmcID, RecEmcCluster, less<RecEmcID>> RecEmcClusterMap;
91typedef ObjectVector<RecEmcCluster> RecEmcClusterCol;
92
93#endif // REC_EMC_CLUSTER_H
HepGeom::Point3D< double > HepPoint3D
ostream & operator<<(ostream &os, const RecEmcCluster &aCluster)
map< RecEmcID, RecEmcCluster, less< RecEmcID > > RecEmcClusterMap
const CLID & CLID_RecEmcCluster
ObjectVector< RecEmcCluster > RecEmcClusterCol
map< RecEmcID, RecEmcHit, less< RecEmcID > > RecEmcHitMap
const CLID & CLID_RecEmcCluster
RecEmcEnergy getEnergy() 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
RecEmcHitMap::const_iterator Find(const RecEmcID &CellId) const
int getSeedSize() const
void ShowerIdVec(const vector< RecEmcID > &showerIdVec)
double getSecondMoment() const
RecEmcHitMap::const_iterator Begin() const
void Dump() const
void Erase(const RecEmcHit &aHit)
void InsertSeed(const RecEmcHit &aSeed)
RecEmcHitMap::const_iterator End() const
void ClusterId(const RecEmcID id)
void InsertShowerId(const RecEmcID id)
int getShowerSize() const