7{
8 RecEmcFractionMap::const_iterator cit;
14
16
25 vector<RecEmcEnergy> eVec;
26 vector<RecEmcEnergy>::const_iterator ciVec;
27
28 tmpNearCell.push_back(CellId);
29 tmpNextNearCell.push_back(CellId);
30
31 cit=aShower.
Find(CellId);
32
33 e1=(cit->second.getEnergy())*(cit->second.getFraction());
34 e9+=(cit->second.getEnergy())*(cit->second.getFraction());
35 e25+=(cit->second.getEnergy())*(cit->second.getFraction());
36
37
38 for(pNearCell=NearCell.begin();
39 pNearCell!=NearCell.end();
40 pNearCell++) {
41 cit=aShower.
Find(*pNearCell);
42 if(cit!=aShower.
End()) {
43 tmpNearCell.push_back(*pNearCell);
44 tmpNextNearCell.push_back(*pNearCell);
45 e9+=cit->second.getEnergy()*cit->second.getFraction();
46 e25+=cit->second.getEnergy()*cit->second.getFraction();
47 }
48 }
49
50
51 for(pNextNearCell=NextNearCell.begin();
52 pNextNearCell!=NextNearCell.end();
53 pNextNearCell++) {
54 cit=aShower.
Find(*pNextNearCell);
55 if(cit!=aShower.
End()) {
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 eall+=(cit->second.getEnergy())*(cit->second.getFraction());
64 eVec.push_back(cit->second.getEnergy()*cit->second.getFraction());
65 }
66
67
72
73
74 sort(eVec.begin(), eVec.end(), greater<RecEmcEnergy>());
75
76 for(ciVec=eVec.begin();ciVec!=eVec.end();ciVec++) {
78 elepton+=*ciVec;
80 }
81 }
82
83
84
85
88 if(getthetaid>21)getthetaid=43-getthetaid;
89 if(getmodule==1)getthetaid=getthetaid+6;
90 double dthetaid=double(getthetaid);
91 double eCorr = Para.
ECorrMC(e25,dthetaid);
92
93
95 de1 = Para.
SigE(0)/eCorr;
96 de2 = Para.
SigE(1)/pow(eCorr,0.25);
98 de = sqrt(de1*de1+de2*de2+de3*de3)*perCent*eCorr;
99
100 double err = Para.
ErrMC(e25,dthetaid);
101 if(err>0) de = err*e25;
102
116
117
118
119
120
121
122
123}
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)