13 const GlobalVector caloIntersectVector(caloPoint.
x(), caloPoint.
y(),
17 const GlobalVector rechitVector(rechitPoint.
x(), rechitPoint.
y(), rechitPoint.
z());
19 double dotprod_denominator = caloUnitVector.
dot(rechitUnitVector);
20 double dotprod_numerator = caloUnitVector.dot(caloIntersectVector);
21 double rechitdist = dotprod_numerator / dotprod_denominator;
22 const GlobalVector effectiveRechitVector = rechitdist * rechitUnitVector;
24 effectiveRechitVector.
x(), effectiveRechitVector.
y(), effectiveRechitVector.
z());
25 GlobalVector distance_vector = effectiveRechitPoint - caloPoint;
27 edm::LogVerbatim(
"IsoTrack") <<
"getDistInPlaneTrackDir: point " << caloPoint <<
" dirn " << caloVector
28 <<
" numerator " << dotprod_numerator <<
" denominator " << dotprod_denominator
29 <<
" distance " << distance_vector.
mag();
31 if (dotprod_denominator > 0. && dotprod_numerator > 0.) {
32 return distance_vector.mag();
45 double ce1 = cosh(
eta1);
46 double ce2 = cosh(
eta2);
50 double z =
cos(phi1 - phi2) / ce1 / ce2 + te1 * te2;
52 dR = fabs(Rec * ce1 *
sqrt(1. / z / z - 1.));
57 <<
", " << phi2 <<
" is " <<
dR;
71 double ce1 = cosh(
eta1);
72 double ce2 = cosh(
eta2);
76 double z =
cos(phi1 - phi2) / ce1 / ce2 + te1 * te2;
78 dR = fabs(Rec * ce1 *
sqrt(1. / z / z - 1.));
83 <<
", " << phi2 <<
" is " <<
dR;
88 std::vector<int>& RH_ieta,
89 std::vector<int>& RH_iphi,
90 std::vector<double>& RH_ene,
92 RH_ieta.push_back(
hit->
id().ieta());
93 RH_iphi.push_back(
hit->
id().iphi());
94 RH_ene.push_back(
hit->energy());
98 std::vector<int>& RH_ieta,
99 std::vector<int>& RH_iphi,
100 std::vector<double>& RH_ene,
103 RH_ieta.push_back(-9);
104 RH_iphi.push_back(-9);
105 RH_ene.push_back(-9.);
109 std::vector<int>& RH_ieta,
110 std::vector<int>& RH_iphi,
111 std::vector<double>& RH_ene,
114 RH_ieta.push_back(-9);
115 RH_iphi.push_back(-9);
116 RH_ene.push_back(-9.);
150 double energy = ((useRaw == 1) ?
hit->eraw() : ((useRaw == 2) ?
hit->eaux() :
hit->energy()));
156 double getEnergy(edm::PCaloHitContainer::const_iterator
hit,
int,
bool) {
158 double samplingWeight = 1.;
165 samplingWeight = 114.1;
167 samplingWeight = 167.3;
174 return samplingWeight *
hit->energy();
202 double energy = ((useRaw == 1) ?
hit->eraw() : ((useRaw == 2) ?
hit->eaux() :
hit->energy()));
Log< level::Info, true > LogVerbatim
static const double etaBEEcal
double getDistInCMatHcal(double eta1, double phi1, double eta2, double phi2, bool debug=false)
double getDistInPlaneTrackDir(const GlobalPoint &caloPoint, const GlobalVector &caloVector, const GlobalPoint &rechitPoint, bool debug=false)
void tanh(data_T data[CONFIG_T::n_in], res_T res[CONFIG_T::n_in])
static const double etaBEHcal
double getEnergy(HBHERecHitCollection::const_iterator hit, int useRaw=0, bool debug=false)
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
static const double zFrontHE
std::vector< T >::const_iterator const_iterator
static const double rFrontHB
static const double zFrontEE
double getDistInCMatEcal(double eta1, double phi1, double eta2, double phi2, bool debug=false)
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
static const double rFrontEB
Cos< T >::type cos(const T &t)
double getRawEnergy(HBHERecHitCollection::const_iterator hit, int useRaw=0)
void getEtaPhi(HBHERecHitCollection::const_iterator hit, std::vector< int > &RH_ieta, std::vector< int > &RH_iphi, std::vector< double > &RH_ene, bool debug=false)
GlobalPoint getGpos(const CaloGeometry *geo, HBHERecHitCollection::const_iterator hit, bool debug=false)
Vector3DBase unit() const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point