1 #include "../interface/EcalClusterLocal.h" 25 localCoordsEB( bclus, *pG, etacry, phicry, ieta, iphi, thetatilt, phitilt);
39 double Theta = -position_.theta()+0.5*
TMath::Pi();
40 double Eta = position_.eta();
41 double Phi = TVector2::Phi_mpi_pi(position_.phi());
45 const float X0 = 0.89;
const float T0 = 7.4;
49 std::vector< std::pair<DetId, float> > crystals_vector = bclus.
hitsAndFractions();
53 for (
unsigned int icry=0; icry!=crystals_vector.size(); ++icry) {
57 auto cell=geom->getGeometry(crystal);
60 double EtaCentr = center_pos.
eta();
61 double PhiCentr = TVector2::Phi_mpi_pi(center_pos.
phi());
66 crystalseed = crystal;
71 ieta = crystalseed.
ieta();
72 iphi = crystalseed.
iphi();
75 auto cell=geom->getGeometry(crystalseed);
83 double PhiCentr = TVector2::Phi_mpi_pi(center_pos.
phi());
85 phicry = (TVector2::Phi_mpi_pi(Phi-PhiCentr))/PhiWidth;
87 if (ieta<0) phicry *= -1.;
90 double ThetaWidth = (
TMath::Pi()/180.)*TMath::Cos(ThetaCentr);
91 etacry = (Theta-ThetaCentr)/ThetaWidth;
93 if (ieta<0) etacry *= -1.;
103 localCoordsEE( bclus, *pG, xcry, ycry, ix, iy, thetatilt, phitilt);
115 double Eta = position_.eta();
116 double Phi = TVector2::Phi_mpi_pi(position_.phi());
117 double X = position_.x();
118 double Y = position_.y();
122 const float X0 = 0.89;
float T0 = 1.2;
129 std::vector< std::pair<DetId, float> > crystals_vector = bclus.
hitsAndFractions();
133 for (
unsigned int icry=0; icry!=crystals_vector.size(); ++icry) {
137 auto cell=geom->getGeometry(crystal);
140 double EtaCentr = center_pos.
eta();
141 double PhiCentr = TVector2::Phi_mpi_pi(center_pos.
phi());
146 crystalseed = crystal;
151 ix = crystalseed.
ix();
152 iy = crystalseed.
iy();
155 auto cell=geom->getGeometry(crystalseed);
163 double XCentr = center_pos.
x();
164 double XWidth = 2.59;
165 xcry = (X-XCentr)/XWidth;
168 double YCentr = center_pos.
y();
169 double YWidth = 2.59;
170 ycry = (Y-YCentr)/YWidth;
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
const math::XYZPoint & position() const
cluster centroid position
GlobalPoint getPosition(CCGFloat depth) const override
Geom::Phi< T > phi() const
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
CCGFloat getPhiAxis() const
double eta() const
pseudorapidity of cluster centroid
Geom::Theta< T > theta() const
int iphi() const
get the crystal iphi
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
double energy() const
cluster energy
int ieta() const
get the crystal ieta
CCGFloat getThetaAxis() const
XYZPointD XYZPoint
point in space with cartesian internal representation
void localCoordsEB(const reco::CaloCluster &bclus, const edm::EventSetup &es, float &etacry, float &phicry, int &ieta, int &iphi, float &thetatilt, float &phitilt) const
A base class to handle the particular shape of Ecal Xtals. Taken from ORCA Calorimetry Code...
void localCoordsEE(const reco::CaloCluster &bclus, const edm::EventSetup &es, float &xcry, float &ycry, int &ix, int &iy, float &thetatilt, float &phitilt) const