BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/EmcRecEventModel/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 "GaudiKernel/ContainedObject.h"
10#include "GaudiKernel/ObjectVector.h"
11#include "EventModel/EventModel.h"
12#include "EmcRecEventModel/RecEmcHit.h"
13#include "EmcRecEventModel/RecEmcDataType.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
45 //Cluster position
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
map< RecEmcID, RecEmcHit, less< RecEmcID > > RecEmcHitMap
ostream & operator<<(ostream &os, const RecEmcCluster &aCluster)
map< RecEmcID, RecEmcCluster, less< RecEmcID > > RecEmcClusterMap
const CLID & CLID_RecEmcCluster
Definition: EventModel.cxx:323
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