12 PFClusterRef_(PFClusterRef)
18 for(
int i=0;
i<5; ++
i)
29 const std::vector< reco::PFRecHitFraction >& PFRecHits=
32 for(std::vector< reco::PFRecHitFraction >::const_iterator it = PFRecHits.begin();
33 it != PFRecHits.end(); ++it){
35 double frac=it->fraction();
36 float E= RefPFRecHit->energy()*
frac;
39 axis=RefPFRecHit->getAxisXYZ();
40 position=RefPFRecHit->position();
41 idseed = RefPFRecHit->detId();
64 double ThetaCentr = -center_pos.theta()+0.5*
Pi;
65 double ThetaWidth = (Pi/180.)*
cos(ThetaCentr);
67 double EtaCry = (Theta-ThetaCentr)/ThetaWidth;
71 if(
abs(CrysIEta_)==1 ||
abs(CrysIEta_)==2 )
73 if(
abs(CrysIEta_)>2 &&
abs(CrysIEta_)<24)
75 if(
abs(CrysIEta_)==24)
77 if(
abs(CrysIEta_)==25)
79 if(
abs(CrysIEta_)==26)
81 if(
abs(CrysIEta_)==27)
83 if(
abs(CrysIEta_)>27 &&
abs(CrysIEta_)<44)
85 if(
abs(CrysIEta_)==44)
87 if(
abs(CrysIEta_)==45)
89 if(
abs(CrysIEta_)==46)
91 if(
abs(CrysIEta_)==47)
93 if(
abs(CrysIEta_)>47 &&
abs(CrysIEta_)<64)
95 if(
abs(CrysIEta_)==64)
97 if(
abs(CrysIEta_)==65)
99 if(
abs(CrysIEta_)==66)
101 if(
abs(CrysIEta_)==67)
103 if(
abs(CrysIEta_)>67 &&
abs(CrysIEta_)<84)
105 if(
abs(CrysIEta_)==84)
107 if(
abs(CrysIEta_)==85)
115 float X0 = 0.89;
float T0 = 1.2;
119 double XCentr = center_pos.x();
120 double YCentr = center_pos.y();
121 double XWidth = 2.59;
122 double YWidth = 2.59;
130 const std::vector< reco::PFRecHitFraction >& PFRecHits=
PFClusterRef_->recHitFractions();
131 for(std::vector< reco::PFRecHitFraction >::const_iterator it = PFRecHits.begin(); it != PFRecHits.end(); ++it){
133 DetId id=RefPFRecHit->detId();
134 double frac=it->fraction();
135 float E=RefPFRecHit->energy()*
frac;
139 if(
abs(deta)>2 ||
abs(dphi)>2)
continue;
143 int ind1=EBidSeed.
ieta()-EBid.ieta();
144 int ind2=EBid.iphi()-EBidSeed.
iphi();
145 if(EBidSeed.
ieta() * EBid.ieta() > 0){
146 ind1=EBid.ieta()-EBidSeed.
ieta();
149 ind1=(1-(EBidSeed.
ieta()-EBid.ieta()));
154 if (iEta*5 + iPhi > 24 || iEta*5 + iPhi < 0){
155 edm::LogInfo(
"OutOfBounds")<<
"iEta = "<<iEta<<
" iPhi = "<<iPhi;
163 if(
abs(dx)>2 ||
abs(dy>2))
continue;
166 int ind1=EEid.ix()-EEidSeed.
ix();
167 int ind2=EEid.iy()-EEidSeed.
iy();
171 if (ix*5 + iy > 24 || ix*5 + iy < 0 ){
181 double numeratorEtaWidth = 0.;
182 double numeratorPhiWidth = 0.;
183 double numeratorEtaPhiWidth = 0.;
186 const std::vector< reco::PFRecHitFraction >& PFRecHits=
PFClusterRef_->recHitFractions();
187 for(std::vector< reco::PFRecHitFraction >::const_iterator it = PFRecHits.begin(); it != PFRecHits.end(); ++it){
189 float E=RefPFRecHit->energy() * it->fraction();
190 double dEta = RefPFRecHit->position().eta() - ClustEta;
191 double dPhi = RefPFRecHit->position().phi() - ClustPhi;
194 numeratorEtaWidth += E * dEta * dEta;
195 numeratorPhiWidth += E * dPhi *
dPhi;
196 numeratorEtaPhiWidth += E * fabs(dPhi) * fabs(dEta);
static int distanceX(const EEDetId &a, const EEDetId &b)
double Phi_mpi_pi(double x)
static int position[TOTALCHAMBERS][3]
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)
int ieta() const
get the crystal ieta
static int distanceY(const EEDetId &a, const EEDetId &b)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
PFPhotonClusters(PFClusterRef PFClusterRef)
PFClusterRef PFClusterRef_
math::XYZVector seedPosition_