2#include "EmcRec/EmcRecShowerShape.h"
3#include "EmcRecEventModel/RecEmcEventModel.h"
5#include "EmcRec/EmcRecParameter.h"
26 RecEmcFractionMap::const_iterator it;
27 for(it=fracMap.begin();
36 RecEmcID id = it->second.getCellId();
41 lengthemc =
abs(pos.z()/
cos(pos.theta()));
43 if(module==1) posDataCorPar=Para.
BarrPosDataCor(thetaModule,phiModule);
44 if(module==0) posDataCorPar=Para.
EastPosDataCor(thetaModule,phiModule);
45 if(module==2) posDataCorPar=Para.
WestPosDataCor(thetaModule,phiModule);
47 pos.setTheta(pos.theta()-posDataCorPar/lengthemc);
53 etot+=it->second.getEnergy()*it->second.getFraction();
54 sum+=it->second.getEnergy()*it->second.getFraction()*pos.distance2(center);
67 if(fracMap.size()<2) {
72 vector<RecEmcFraction> aFractionVec;
73 RecEmcFractionMap::const_iterator it;
74 for(it=fracMap.begin();
77 aFractionVec.push_back(it->second);
81 partial_sort(aFractionVec.begin(),
82 aFractionVec.begin()+2,
84 greater<RecEmcFraction>());
87 vector<RecEmcFraction>::iterator iVec;
91 for(iVec=aFractionVec.begin();
92 iVec!=aFractionVec.end();
106 lengthemc =
abs(pos.z()/
cos(pos.theta()));
107 double posDataCorPar;
108 if(module==1) posDataCorPar=Para.
BarrPosDataCor(thetaModule,phiModule);
109 if(module==0) posDataCorPar=Para.
EastPosDataCor(thetaModule,phiModule);
110 if(module==2) posDataCorPar=Para.
WestPosDataCor(thetaModule,phiModule);
112 pos.setTheta(pos.theta()-posDataCorPar/lengthemc);
118 double r=pos.mag()*
sin(aShower.
position().angle(pos));
120 double energy=(*iVec).getEnergy()*(*iVec).getFraction();
122 denominator+=5.2*5.2*
energy;
129 if(denominator>0) lat=numerator/denominator;
138 const double R0=15.6;
141 RecEmcFractionMap::const_iterator it;
142 for(it=fracMap.begin();
145 double energy=it->second.getEnergy()*it->second.getFraction();
149 r=r-r.dot(r0)*r0/(r0.mag()*r0.mag());
151 a20+=(
energy/aShower.
e5x5())*(2*pow(r.mag()/R0,2.)-1);
160 const double R0=15.6;
163 RecEmcFractionMap::const_iterator it;
164 for(it=fracMap.begin();
167 double energy=it->second.getEnergy()*it->second.getFraction();
171 r=r-r.dot(r0)*r0/(r0.mag()*r0.mag());
175 a42+=(
energy/aShower.
e5x5())*(4.*pow(r.mag()/R0,4.)-3.*pow(r.mag()/R0,2.))*
exp(a);
map< RecEmcID, RecEmcFraction, less< RecEmcID > > RecEmcFractionMap
EvtComplex exp(const EvtComplex &c)
double sin(const BesAngle a)
double cos(const BesAngle a)
************Class m_ypar INTEGER m_KeyWgt INTEGER m_KeyIHVP INTEGER m_KeyGPS INTEGER m_IsBeamPolarized INTEGER m_EvtGenInterface DOUBLE PRECISION m_Emin DOUBLE PRECISION m_sphot DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_q2 DOUBLE PRECISION m_PolBeam2 DOUBLE PRECISION m_xErrPb *COMMON c_KK2f $ !CMS energy average $ !Spin Polarization vector first beam $ !Spin Polarization vector second beam $ !Beam energy spread[GeV] $ !minimum hadronization energy[GeV] $ !input READ never touch them !$ !debug facility $ !maximum weight $ !inverse alfaQED $ !minimum real photon energy
HepPoint3D position() const
void setSecondMoment(double secondMoment)
void setA20Moment(double a20Moment)
void setA42Moment(double a42Moment)
void setLatMoment(double latMoment)
static unsigned int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
static unsigned int theta_module(const Identifier &id)
static unsigned int phi_module(const Identifier &id)
static EmcRecParameter & GetInstance()
double EastPosDataCor(int ntheta, int nphi) const
double WestPosDataCor(int ntheta, int nphi) const
double BarrPosDataCor(int ntheta, int nphi) const
void SecondMoment(RecEmcShower &aShower) const
void CalculateMoment(RecEmcShower &aShower) const
void LatMoment(RecEmcShower &aShower) const
void A20Moment(RecEmcShower &aShower) const
void A42Moment(RecEmcShower &aShower) const
RecEmcFractionMap getFractionMap5x5() const