2#include "EmcRec/EmcRecShowerShape.h"
3#include "EmcRec/EmcRecParameter.h"
5#include "EmcRecEventModel/RecEmcEventModel.h"
26 RecEmcFractionMap::const_iterator it;
27 for ( it = fracMap.begin(); it != fracMap.end(); it++ )
36 RecEmcID id = it->second.getCellId();
41 lengthemc =
abs( pos.z() /
cos( pos.theta() ) );
42 double posDataCorPar = 0.0;
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 );
64 if ( fracMap.size() < 2 )
70 vector<RecEmcFraction> aFractionVec;
71 RecEmcFractionMap::const_iterator it;
72 for ( it = fracMap.begin(); it != fracMap.end(); it++ )
73 { aFractionVec.push_back( it->second ); }
76 partial_sort( aFractionVec.begin(), aFractionVec.begin() + 2, aFractionVec.end(),
77 greater<RecEmcFraction>() );
80 vector<RecEmcFraction>::iterator iVec;
82 double denominator = 0;
84 for ( iVec = aFractionVec.begin(); iVec != aFractionVec.end(); iVec++ )
99 lengthemc =
abs( pos.z() /
cos( pos.theta() ) );
100 double posDataCorPar = 0.0;
101 if ( module == 1 ) posDataCorPar = Para.
BarrPosDataCor( thetaModule, phiModule );
102 if ( module == 0 ) posDataCorPar = Para.
EastPosDataCor( thetaModule, phiModule );
103 if ( module == 2 ) posDataCorPar = Para.
WestPosDataCor( thetaModule, phiModule );
105 pos.setTheta( pos.theta() - posDataCorPar / lengthemc );
111 double r = pos.mag() *
sin( aShower.
position().angle( pos ) );
113 double energy = ( *iVec ).getEnergy() * ( *iVec ).getFraction();
114 if (
n < 3 ) { denominator += 5.2 * 5.2 *
energy; }
117 numerator += r * r *
energy;
118 denominator += r * r *
energy;
122 if ( denominator > 0 ) lat = numerator / denominator;
129 const double R0 = 15.6;
130 Hep3Vector r0( aShower.
position() );
132 RecEmcFractionMap::const_iterator it;
133 for ( it = fracMap.begin(); it != fracMap.end(); it++ )
135 double energy = it->second.getEnergy() * it->second.getFraction();
136 HepPoint3D pos( it->second.getFrontCenter() );
138 Hep3Vector r = pos - r0;
139 r = r - r.dot( r0 ) * r0 / ( r0.mag() * r0.mag() );
141 a20 += (
energy / aShower.
e5x5() ) * ( 2 * pow( r.mag() / R0, 2. ) - 1 );
149 const double R0 = 15.6;
150 Hep3Vector r0( aShower.
position() );
152 RecEmcFractionMap::const_iterator it;
153 for ( it = fracMap.begin(); it != fracMap.end(); it++ )
155 double energy = it->second.getEnergy() * it->second.getFraction();
156 HepPoint3D pos( it->second.getFrontCenter() );
158 Hep3Vector r = pos - r0;
159 r = r - r.dot( r0 ) * r0 / ( r0.mag() * r0.mag() );
164 ( 4. * pow( r.mag() / R0, 4. ) - 3. * pow( r.mag() / R0, 2. ) ) *
exp( a );
HepGeom::Point3D< double > HepPoint3D
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