6 {
7 RecEmcFractionMap::const_iterator cit;
13
14 EmcRecNeighbor nhb;
15
24 vector<RecEmcEnergy> eVec;
25 vector<RecEmcEnergy>::const_iterator ciVec;
26
27 tmpNearCell.push_back( CellId );
28 tmpNextNearCell.push_back( CellId );
29
30 cit = aShower.
Find( CellId );
31
32 e1 = ( cit->second.getEnergy() ) * ( cit->second.getFraction() );
33 e9 += ( cit->second.getEnergy() ) * ( cit->second.getFraction() );
34 e25 += ( cit->second.getEnergy() ) * ( cit->second.getFraction() );
35
36
37 for ( pNearCell = NearCell.begin(); pNearCell != NearCell.end(); pNearCell++ )
38 {
39 cit = aShower.
Find( *pNearCell );
40 if ( cit != aShower.
End() )
41 {
42 tmpNearCell.push_back( *pNearCell );
43 tmpNextNearCell.push_back( *pNearCell );
44 e9 += cit->second.getEnergy() * cit->second.getFraction();
45 e25 += cit->second.getEnergy() * cit->second.getFraction();
46 }
47 }
48
49
50 for ( pNextNearCell = NextNearCell.begin(); pNextNearCell != NextNearCell.end();
51 pNextNearCell++ )
52 {
53 cit = aShower.
Find( *pNextNearCell );
54 if ( cit != aShower.
End() )
55 {
56 tmpNextNearCell.push_back( *pNextNearCell );
57 e25 += cit->second.getEnergy() * cit->second.getFraction();
58 }
59 }
60
61
62 for ( cit = aShower.
Begin(); cit != aShower.
End(); ++cit )
63 {
64 eall += ( cit->second.getEnergy() ) * ( cit->second.getFraction() );
65 eVec.push_back( cit->second.getEnergy() * cit->second.getFraction() );
66 }
67
68
71 nHit = (int)( Para.
HitNb( 0 ) * log( Para.
HitNb( 1 ) * e9 + Para.
HitNb( 2 ) ) );
73
74
75 sort( eVec.begin(), eVec.end(), greater<RecEmcEnergy>() );
76
77 for ( ciVec = eVec.begin(); ciVec != eVec.end(); ciVec++ )
78 {
80 {
81 elepton += *ciVec;
83 }
84 }
85
86
87
88
91 if ( getthetaid > 21 ) getthetaid = 43 - getthetaid;
92 if ( getmodule == 1 ) getthetaid = getthetaid + 6;
93 double dthetaid = double( getthetaid );
94 double eCorr = Para.
ECorrMC( e25, dthetaid );
95
96
98 de1 = Para.
SigE( 0 ) / eCorr;
99 de2 = Para.
SigE( 1 ) / pow( eCorr, 0.25 );
100 de3 = Para.
SigE( 2 );
101 de = sqrt( de1 * de1 + de2 * de2 + de3 * de3 ) * perCent * eCorr;
102
103 double err = Para.
ErrMC( e25, dthetaid );
104 if ( err > 0 ) de = err * e25;
105
117 aShower.
EAll( eall );
119
120
121
122
123
124
125
126}
RecEmcIDVector::iterator i_RecEmcIDVector
vector< RecEmcID > RecEmcIDVector
void setE3x3(double e3x3)
void setESeed(double eSeed)
void setTrackId(int trackId)
void setE5x5(double e5x5)
RecEmcIDVector GetNeighbors(const Identifier &id)
RecEmcIDVector GetNextNeighbors(const Identifier &id)
double ECorrMC(double eg, double theid) const
double HitNb(int n) const
double ErrMC(double eg, double theid) const
RecEmcFractionMap::const_iterator End() const
void CellId3x3(RecEmcIDVector &id3x3)
RecEmcEnergy EAll(RecEmcEnergy e)
RecEmcEnergy ELepton(RecEmcEnergy e)
RecEmcID getShowerId() const
RecEmcFractionMap::const_iterator Begin() const
RecEmcFractionMap::const_iterator Find(const RecEmcID &CellId) const
unsigned int getSize() const
void CellId5x5(RecEmcIDVector &id5x5)