BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Emc/EmcRecEventModel/include/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 "DstEvent/DstEmcShower.h"
10#include "EmcRecEventModel/RecEmcCluster.h"
11#include "EmcRecEventModel/RecEmcDataType.h"
12#include "EmcRecEventModel/RecEmcFraction.h"
13#include "EventModel/EventModel.h"
14#include "GaudiKernel/ContainedObject.h"
15#include "GaudiKernel/ObjectVector.h"
16
17using namespace std;
18
19extern const CLID& CLID_RecEmcShower;
20
21class RecEmcShower : public DstEmcShower {
22public:
23 virtual const CLID& clID() const { return RecEmcShower::classID(); }
24 static const CLID& classID() { return CLID_RecEmcShower; }
25
26 // Constructors and destructors
29
30 // Copy and assignment
31 // RecEmcShower(const RecEmcShower& aShower);
32 // RecEmcShower& operator=(const RecEmcShower& aShower);
33 RecEmcShower( const DstEmcShower& aShower );
34 RecEmcShower& operator=( const DstEmcShower& aShower );
35
36 bool operator<( const RecEmcShower& aShower ) const { return energy() < aShower.energy(); }
37
38 bool operator>( const RecEmcShower& aShower ) const { return energy() > aShower.energy(); }
39
40 // Other methods
41 // Reset all data members to default value
42 void Clear();
43
44 // Whether this shower comes from Tof
45 inline bool TofShower() const { return fTofShower; }
46 inline void TofShower( bool tof ) { fTofShower = tof; }
47
48 // Access a Shower
49 RecEmcID getShowerId() const { return fShowerId; }
51
52 // Access a cluster
53 RecEmcID getClusterId() const { return fClusterId; }
54 void ClusterId( const RecEmcID id );
55
56 RecEmcCluster* getCluster() const { return fCluster; }
57 void Cluster( RecEmcCluster* pCluster );
58
60 void CellId3x3( RecEmcIDVector& id3x3 );
61
63 void CellId5x5( RecEmcIDVector& id5x5 );
64
65 // Read fraction map of a cluster
66 // Only const_iterator is supplied.
67 RecEmcFractionMap::const_iterator Begin() const;
68 RecEmcFractionMap::const_iterator End() const;
69 RecEmcFractionMap::const_iterator Find( const RecEmcID& CellId ) const;
70
71 // Append and remove a Fraction
72 void Insert( const RecEmcFraction& aFraction );
73 void Erase( const RecEmcFraction& aFraction );
74
75 // Dump out
76 void Dump() const;
77
78public:
79 // physics attributes
80 unsigned int getSize() const;
81
85
86 RecEmcEnergy getEAll() const { return fEAll; }
88
89 RecEmcEnergy getELepton() const { return fELepton; }
91
92 RecEmcEnergy getETof2x1() const { return fETof2x1; }
94
95 RecEmcEnergy getETof2x3() const { return fETof2x3; }
97
98 // NearestSeed
99 RecEmcID NearestSeed() const;
101
102 // ThetaGap
103 int ThetaGap() const;
104 int ThetaGap( int ThetaGap );
105 // PhiGap
106 int PhiGap() const;
107 int PhiGap( int PhiGap );
108
109protected:
110 // only from Tof
112 // fShowerId: the max fraction's CellId.
114 // fCluster: the cluster belongs to
117 // 3x3 Id vector
119 // 5x5 Id vector
121 // fShowerFractionMap: Fraction members of a Shower.
123
124 // attribute
125 //
126 // To do: add other physics attributes.
127 // At the same time you should add corresponding statements
128 // in the following method.
129 // Clear(), copy & assignment, read & write interface
130 // Others is optional.
131 //
132
133 // Some usable attribute of a shower
134 // Energy with all crystals included
136 // Energy of shower with certain crystals corrding to E3x3
138
139 // Energy of TOF 2x1 scintillators
141 // Energy of TOF 2x3 scintillators
143
144 // Position
145 // HepPoint3D fPosition;
146
147 // Nearest neighbor seed in the same cluster
148 // If it exists it will be an ID value, else it it an invalid value.
150 //
151 // Gap: gap between its seed and its nearest neighbor seed
152 // in the same cluster.
153 // 1: **; 2: *o*; 3: *oo*; 4: *ooo*; 5: *oooo*;
154 // 6: gap>=6;
155 // 9: only one seed is in this cluster.
158};
159
160ostream& operator<<( ostream& os, const RecEmcShower& aShower );
161
162typedef map<RecEmcID, RecEmcShower, less<RecEmcID>> RecEmcShowerMap;
163typedef vector<RecEmcShower> RecEmcShowerVec;
164typedef ObjectVector<RecEmcShower> RecEmcShowerCol;
165
166#endif // REC_EMC_SHOWER_H
map< RecEmcID, RecEmcFraction, less< RecEmcID > > RecEmcFractionMap
map< RecEmcID, RecEmcShower, less< RecEmcID > > RecEmcShowerMap
ostream & operator<<(ostream &os, const RecEmcShower &aShower)
ObjectVector< RecEmcShower > RecEmcShowerCol
const CLID & CLID_RecEmcShower
const CLID & CLID_RecEmcShower
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
bool operator<(const RecEmcShower &aShower) const
void Insert(const RecEmcFraction &aFraction)
int PhiGap() const
RecEmcShower & operator=(const DstEmcShower &aShower)
RecEmcFractionMap getFractionMap3x3() const
void CellId5x5(RecEmcIDVector &id5x5)
bool operator>(const RecEmcShower &aShower) const
#define ns(x)
Definition xmltok.c:1355