21 const GlobalVector caloIntersectVector(caloPoint.
x(), caloPoint.
y(),
25 const GlobalVector rechitVector(rechitPoint.
x(), rechitPoint.
y(), rechitPoint.
z());
27 double dotprod_denominator = caloUnitVector.
dot(rechitUnitVector);
28 double dotprod_numerator = caloUnitVector.dot(caloIntersectVector);
29 double rechitdist = dotprod_numerator / dotprod_denominator;
30 const GlobalVector effectiveRechitVector = rechitdist * rechitUnitVector;
32 effectiveRechitVector.
x(), effectiveRechitVector.
y(), effectiveRechitVector.
z());
33 GlobalVector distance_vector = effectiveRechitPoint - caloPoint;
36 std::cout <<
"getDistInPlaneTrackDir: point " << caloPoint <<
" dirn " << caloVector <<
" numerator "
37 << dotprod_numerator <<
" denominator " << dotprod_denominator <<
" distance " << distance_vector.
mag()
41 if (dotprod_denominator > 0. && dotprod_numerator > 0.) {
42 return distance_vector.mag();
64 double ce1 = cosh(
eta1);
65 double ce2 = cosh(
eta2);
66 double te1 = tanh(
eta1);
67 double te2 = tanh(
eta2);
69 double z =
cos(phi1 - phi2) / ce1 / ce2 + te1 * te2;
71 dR = fabs(Rec * ce1 *
sqrt(1. / z / z - 1.));
76 std::cout <<
"getDistInCMatEcal: between (" <<
eta1 <<
", " << phi1 <<
") and (" <<
eta2 <<
", " << phi2 <<
" is "
101 double ce1 = cosh(
eta1);
102 double ce2 = cosh(
eta2);
103 double te1 = tanh(
eta1);
104 double te2 = tanh(
eta2);
106 double z =
cos(phi1 - phi2) / ce1 / ce2 + te1 * te2;
108 dR = fabs(Rec * ce1 *
sqrt(1. / z / z - 1.));
114 std::cout <<
"getDistInCMatHcal: between (" <<
eta1 <<
", " << phi1 <<
") and (" <<
eta2 <<
", " << phi2 <<
" is "
120 std::vector<int>& RH_ieta,
121 std::vector<int>& RH_iphi,
122 std::vector<double>& RH_ene,
124 RH_ieta.push_back(
hit->
id().ieta());
125 RH_iphi.push_back(
hit->
id().iphi());
126 RH_ene.push_back(
hit->energy());
130 std::vector<int>& RH_ieta,
131 std::vector<int>& RH_iphi,
132 std::vector<double>& RH_ene,
135 RH_ieta.push_back(-9);
136 RH_iphi.push_back(-9);
137 RH_ene.push_back(-9.);
141 std::vector<int>& RH_ieta,
142 std::vector<int>& RH_iphi,
143 std::vector<double>& RH_ene,
146 RH_ieta.push_back(-9);
147 RH_iphi.push_back(-9);
148 RH_ene.push_back(-9.);
182 double energy = ((useRaw == 1) ?
hit->eraw() : ((useRaw == 2) ?
hit->eaux() :
hit->energy()));
188 double getEnergy(edm::PCaloHitContainer::const_iterator
hit,
int,
bool) {
190 double samplingWeight = 1.;
197 samplingWeight = 114.1;
199 samplingWeight = 167.3;
206 return samplingWeight *
hit->energy();
234 double energy = ((useRaw == 1) ?
hit->eraw() : ((useRaw == 2) ?
hit->eaux() :
hit->energy()));