BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
RecEmcShower.h
Go to the documentation of this file.
1//
2// Bes EMC Rec Shower
3//
4// Created by Zhe Wang 2003, 10, 1
5//
6#ifndef REC_EMC_SHOWER_H
7#define REC_EMC_SHOWER_H
8
9#include "GaudiKernel/ContainedObject.h"
10#include "GaudiKernel/ObjectVector.h"
16
17using namespace std;
18
19extern const CLID& CLID_RecEmcShower;
20
22{
23 public:
24
25 virtual const CLID& clID() const { return RecEmcShower::classID();}
26 static const CLID& classID() { return CLID_RecEmcShower; }
27
28 //Constructors and destructors
31
32 //Copy and assignment
33 //RecEmcShower(const RecEmcShower& aShower);
34 //RecEmcShower& operator=(const RecEmcShower& aShower);
35 RecEmcShower(const DstEmcShower& aShower);
36 RecEmcShower& operator=(const DstEmcShower& aShower);
37
38 bool operator < (const RecEmcShower& aShower) const {
39 return energy() < aShower.energy();
40 }
41
42 bool operator > (const RecEmcShower& aShower) const {
43 return energy() > aShower.energy();
44 }
45
46 //Other methods
47 //Reset all data members to default value
48 void Clear();
49
50 //Whether this shower comes from Tof
51 inline bool TofShower() const {return fTofShower;}
52 inline void TofShower(bool tof) {fTofShower=tof;}
53
54 //Access a Shower
55 RecEmcID getShowerId() const { return fShowerId; }
57
58 //Access a cluster
59 RecEmcID getClusterId() const { return fClusterId; }
60 void ClusterId(const RecEmcID id);
61
62 RecEmcCluster* getCluster() const { return fCluster; }
63 void Cluster(RecEmcCluster *pCluster);
64
66 void CellId3x3(RecEmcIDVector& id3x3);
67
69 void CellId5x5(RecEmcIDVector& id5x5);
70
71 //Read fraction map of a cluster
72 //Only const_iterator is supplied.
73 RecEmcFractionMap::const_iterator Begin() const;
74 RecEmcFractionMap::const_iterator End() const;
75 RecEmcFractionMap::const_iterator Find(const RecEmcID& CellId) const;
76
77 //Append and remove a Fraction
78 void Insert(const RecEmcFraction& aFraction);
79 void Erase(const RecEmcFraction& aFraction);
80
81 //Dump out
82 void Dump() const;
83
84 public:
85 //physics attributes
86 unsigned int getSize() const;
87
91
92 RecEmcEnergy getEAll() const { return fEAll; }
94
95 RecEmcEnergy getELepton() const { return fELepton; }
97
98 RecEmcEnergy getETof2x1() const { return fETof2x1; }
100
101 RecEmcEnergy getETof2x3() const { return fETof2x3; }
103
104 // NearestSeed
105 RecEmcID NearestSeed() const;
107
108 // ThetaGap
109 int ThetaGap() const;
110 int ThetaGap(int ThetaGap);
111 // PhiGap
112 int PhiGap() const;
113 int PhiGap(int PhiGap);
114
115 protected:
116 //only from Tof
118 //fShowerId: the max fraction's CellId.
120 //fCluster: the cluster belongs to
123 //3x3 Id vector
125 //5x5 Id vector
127 //fShowerFractionMap: Fraction members of a Shower.
129
130 //attribute
131 //
132 // To do: add other physics attributes.
133 // At the same time you should add corresponding statements
134 // in the following method.
135 // Clear(), copy & assignment, read & write interface
136 // Others is optional.
137 //
138
139 // Some usable attribute of a shower
140 // Energy with all crystals included
142 // Energy of shower with certain crystals corrding to E3x3
144
145 // Energy of TOF 2x1 scintillators
147 // Energy of TOF 2x3 scintillators
149
150 // Position
151 //HepPoint3D fPosition;
152
153 // Nearest neighbor seed in the same cluster
154 // If it exists it will be an ID value, else it it an invalid value.
156 //
157 // Gap: gap between its seed and its nearest neighbor seed
158 // in the same cluster.
159 // 1: **; 2: *o*; 3: *oo*; 4: *ooo*; 5: *oooo*;
160 // 6: gap>=6;
161 // 9: only one seed is in this cluster.
164
165};
166
167ostream& operator<<(ostream & os, const RecEmcShower& aShower);
168
169typedef map<RecEmcID,RecEmcShower,less<RecEmcID> > RecEmcShowerMap;
170typedef vector<RecEmcShower> RecEmcShowerVec;
171typedef ObjectVector<RecEmcShower> RecEmcShowerCol;
172
173#endif // REC_EMC_SHOWER_H
double RecEmcEnergy
vector< RecEmcID > RecEmcIDVector
map< RecEmcID, RecEmcFraction, less< RecEmcID > > RecEmcFractionMap
map< RecEmcID, RecEmcShower, less< RecEmcID > > RecEmcShowerMap
Definition: RecEmcShower.h:169
ostream & operator<<(ostream &os, const RecEmcShower &aShower)
ObjectVector< RecEmcShower > RecEmcShowerCol
Definition: RecEmcShower.h:171
vector< RecEmcShower > RecEmcShowerVec
Definition: RecEmcShower.h:170
const CLID & CLID_RecEmcShower
Definition: EventModel.cxx:317
double energy() const
Definition: DstEmcShower.h:45
RecEmcFractionMap::const_iterator End() const
void CellId3x3(RecEmcIDVector &id3x3)
RecEmcFractionMap getFractionMap5x5() const
RecEmcIDVector getCellId3x3() const
Definition: RecEmcShower.h:65
RecEmcEnergy ETof2x3(RecEmcEnergy e)
RecEmcEnergy EAll(RecEmcEnergy e)
RecEmcFractionMap getFractionMap() const
RecEmcID getClusterId() const
Definition: RecEmcShower.h:59
RecEmcEnergy ETof2x1(RecEmcEnergy e)
RecEmcEnergy ELepton(RecEmcEnergy e)
RecEmcID getShowerId() const
Definition: RecEmcShower.h:55
RecEmcEnergy getELepton() const
Definition: RecEmcShower.h:95
RecEmcID fShowerId
Definition: RecEmcShower.h:119
RecEmcFractionMap::const_iterator Begin() const
virtual const CLID & clID() const
Definition: RecEmcShower.h:25
RecEmcEnergy fETof2x1
Definition: RecEmcShower.h:146
RecEmcCluster * fCluster
Definition: RecEmcShower.h:122
static const CLID & classID()
Definition: RecEmcShower.h:26
void ClusterId(const RecEmcID id)
RecEmcEnergy fETof2x3
Definition: RecEmcShower.h:148
RecEmcFractionMap::const_iterator Find(const RecEmcID &CellId) const
RecEmcCluster * getCluster() const
Definition: RecEmcShower.h:62
RecEmcEnergy getETof2x1() const
Definition: RecEmcShower.h:98
RecEmcID ShowerId(RecEmcID id)
void Dump() const
unsigned int getSize() const
RecEmcID fClusterId
Definition: RecEmcShower.h:121
void Cluster(RecEmcCluster *pCluster)
void Erase(const RecEmcFraction &aFraction)
int ThetaGap() const
RecEmcID NearestSeed() const
bool operator<(const RecEmcShower &aShower) const
Definition: RecEmcShower.h:38
void Insert(const RecEmcFraction &aFraction)
int PhiGap() const
RecEmcFractionMap fFractionMap
Definition: RecEmcShower.h:128
RecEmcEnergy getEAll() const
Definition: RecEmcShower.h:92
RecEmcEnergy fEAll
Definition: RecEmcShower.h:141
RecEmcEnergy getETof2x3() const
Definition: RecEmcShower.h:101
RecEmcShower & operator=(const DstEmcShower &aShower)
RecEmcEnergy fELepton
Definition: RecEmcShower.h:143
RecEmcFractionMap getFractionMap3x3() const
void TofShower(bool tof)
Definition: RecEmcShower.h:52
RecEmcID fNearestSeed
Definition: RecEmcShower.h:155
RecEmcIDVector getCellId5x5() const
Definition: RecEmcShower.h:68
void CellId5x5(RecEmcIDVector &id5x5)
bool TofShower() const
Definition: RecEmcShower.h:51
RecEmcIDVector fCellId5x5
Definition: RecEmcShower.h:126
RecEmcIDVector fCellId3x3
Definition: RecEmcShower.h:124
bool operator>(const RecEmcShower &aShower) const
Definition: RecEmcShower.h:42
#define ns(x)
Definition: xmltok.c:1504