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