BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
Emc/EmcRecEventModel/EmcRecEventModel-01-01-18/EmcRecEventModel/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"
11#include "EventModel/EventModel.h"
12#include "EmcRecEventModel/RecEmcFraction.h"
13#include "EmcRecEventModel/RecEmcCluster.h"
14#include "EmcRecEventModel/RecEmcDataType.h"
15#include "DstEvent/DstEmcShower.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
map< RecEmcID, RecEmcFraction, less< RecEmcID > > RecEmcFractionMap
map< RecEmcID, RecEmcShower, less< RecEmcID > > RecEmcShowerMap
ostream & operator<<(ostream &os, const RecEmcShower &aShower)
const CLID & CLID_RecEmcShower
Definition: EventModel.cxx:317
const CLID & CLID_RecEmcShower
Definition: EventModel.cxx:317
RecEmcFractionMap::const_iterator End() const
void CellId3x3(RecEmcIDVector &id3x3)
RecEmcFractionMap getFractionMap5x5() const
RecEmcEnergy ETof2x3(RecEmcEnergy e)
RecEmcEnergy EAll(RecEmcEnergy e)
RecEmcFractionMap getFractionMap() const
RecEmcEnergy ETof2x1(RecEmcEnergy e)
RecEmcEnergy ELepton(RecEmcEnergy e)
RecEmcFractionMap::const_iterator Begin() const
void ClusterId(const RecEmcID id)
RecEmcFractionMap::const_iterator Find(const RecEmcID &CellId) const
RecEmcID ShowerId(RecEmcID id)
void Dump() const
unsigned int getSize() const
void Cluster(RecEmcCluster *pCluster)
void Erase(const RecEmcFraction &aFraction)
int ThetaGap() const
RecEmcID NearestSeed() const
void Insert(const RecEmcFraction &aFraction)
int PhiGap() const
RecEmcShower & operator=(const DstEmcShower &aShower)
RecEmcFractionMap getFractionMap3x3() const
void CellId5x5(RecEmcIDVector &id5x5)
#define ns(x)
Definition: xmltok.c:1504