10 PFClusterRef_(PFClusterRef)
16 for(
int i=0;
i<5; ++
i)
27 const std::vector< reco::PFRecHitFraction >& PFRecHits=
30 for(std::vector< reco::PFRecHitFraction >::const_iterator it = PFRecHits.begin();
31 it != PFRecHits.end(); ++it){
33 double frac=it->fraction();
34 float E= RefPFRecHit->energy()*
frac;
37 axis=RefPFRecHit->getAxisXYZ();
38 position=RefPFRecHit->position();
39 idseed = RefPFRecHit->detId();
62 double ThetaCentr = -center_pos.theta()+0.5*
Pi;
63 double ThetaWidth = (Pi/180.)*
cos(ThetaCentr);
65 double EtaCry = (Theta-ThetaCentr)/ThetaWidth;
69 if(
abs(CrysIEta_)==1 ||
abs(CrysIEta_)==2 )
71 if(
abs(CrysIEta_)>2 &&
abs(CrysIEta_)<24)
73 if(
abs(CrysIEta_)==24)
75 if(
abs(CrysIEta_)==25)
77 if(
abs(CrysIEta_)==26)
79 if(
abs(CrysIEta_)==27)
81 if(
abs(CrysIEta_)>27 &&
abs(CrysIEta_)<44)
83 if(
abs(CrysIEta_)==44)
85 if(
abs(CrysIEta_)==45)
87 if(
abs(CrysIEta_)==46)
89 if(
abs(CrysIEta_)==47)
91 if(
abs(CrysIEta_)>47 &&
abs(CrysIEta_)<64)
93 if(
abs(CrysIEta_)==64)
95 if(
abs(CrysIEta_)==65)
97 if(
abs(CrysIEta_)==66)
99 if(
abs(CrysIEta_)==67)
101 if(
abs(CrysIEta_)>67 &&
abs(CrysIEta_)<84)
103 if(
abs(CrysIEta_)==84)
105 if(
abs(CrysIEta_)==85)
113 float X0 = 0.89;
float T0 = 1.2;
117 double XCentr = center_pos.x();
118 double YCentr = center_pos.y();
119 double XWidth = 2.59;
120 double YWidth = 2.59;
128 const std::vector< reco::PFRecHitFraction >& PFRecHits=
PFClusterRef_->recHitFractions();
129 for(std::vector< reco::PFRecHitFraction >::const_iterator it = PFRecHits.begin(); it != PFRecHits.end(); ++it){
131 DetId id=RefPFRecHit->detId();
132 double frac=it->fraction();
133 float E=RefPFRecHit->energy()*
frac;
138 if(
abs(deta)>2 ||
abs(dphi)>2)
continue;
143 int ind1=EBidSeed.
ieta()-EBid.ieta();
144 int ind2=EBidSeed.
iphi()-EBid.iphi();
145 if(EBidSeed.
ieta() * EBid.ieta() > 0){
146 ind1=EBid.ieta()-EBidSeed.
ieta();
154 if( (EBidSeed.
iphi()<5&&EBid.iphi()>355) || (EBidSeed.
iphi()>355&&EBid.iphi()<5)) {
156 ind2 =
shift + EBidSeed.
iphi() - EBid.iphi();
180 if(
abs(dx)>2 ||
abs(dy>2))
continue;
183 int ind1=EEid.ix()-EEidSeed.
ix();
184 int ind2=EEid.iy()-EEidSeed.
iy();
198 double numeratorEtaWidth = 0.;
199 double numeratorPhiWidth = 0.;
200 double numeratorEtaPhiWidth = 0.;
203 const std::vector< reco::PFRecHitFraction >& PFRecHits=
PFClusterRef_->recHitFractions();
204 for(std::vector< reco::PFRecHitFraction >::const_iterator it = PFRecHits.begin(); it != PFRecHits.end(); ++it){
206 float E=RefPFRecHit->energy() * it->fraction();
207 double dEta = RefPFRecHit->position().eta() - ClustEta;
208 double dPhi = RefPFRecHit->position().phi() - ClustPhi;
211 numeratorEtaWidth += E * dEta * dEta;
212 numeratorPhiWidth += E * dPhi *
dPhi;
213 numeratorEtaPhiWidth += E * fabs(dPhi) * fabs(dEta);
static int distanceX(const EEDetId &a, const EEDetId &b)
double Phi_mpi_pi(double x)
reco::PFClusterRef PFClusterRef_
int iphi() const
get the crystal iphi
uint32_t rawId() const
get the raw id
static int distanceEta(const EBDetId &a, const EBDetId &b)
math::XYZVector seedAxis_
double dPhi(double phi1, double phi2)
static int distancePhi(const EBDetId &a, const EBDetId &b)
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
PFPhotonClusters(reco::PFClusterRef PFClusterRef)
int ieta() const
get the crystal ieta
static int distanceY(const EEDetId &a, const EEDetId &b)
static const int MAX_IPHI
XYZVectorD XYZVector
spatial vector with cartesian internal representation
static int position[264][3]
static unsigned int const shift
math::XYZVector seedPosition_