1 #define Conv4HitsReco_cxx
27 Tq = -2. *
pPN + 2. *
m *
pn + signT * 2. *
q * sqrtEta2mm / sqrtPi2qq;
28 Tm = 2. *
nPN + 2. *
q *
pn + signT * 2. *
m * sqrtPi2qq / sqrtEta2mm;
32 double QM = vQminusM.Mag();
33 double pQM =
unitVp * vQminusM;
34 double nQM =
unitVn * vQminusM;
39 Oq = sqrtEta2mm * pQM / QM +
m *
pn +
pNV;
40 Om =
m * QM / sqrtEta2mm - signO * sqrtEta2mm * nQM / QM + nQM -
nNV -
m;
41 O0 = -signO * sqrtEta2mm * QM -
m * nQM - NVQM;
48 double nPM =
unitVn * vPminusM;
49 double pPM =
unitVp * vPminusM;
54 double gamma = m2 * nPM * nPM + NVPM * NVPM + 2. *
m * nPM * NVPM - vPminusM.Mag2() * (
_eta2 + m2);
61 ss <<
" m: " <<
m <<
" q01: " << std::setw(20) << q01 <<
" q02: " << std::setw(20) << q02 <<
"/n";
83 TVector3 v1 = V1.Unit();
84 TVector3 v2 = V2.Unit();
86 double v1v2 = v1 * v2;
87 return v2 * ((
p1 -
p2) * (v1v2 * v1 - v2) / (v1v2 * v1v2 - 1.)) +
p2;
104 LogDebug(
"Conv4HitsReco") <<
">>>>>>>> Conversion vertex computed via Plus pair\n"
105 << vtxViaPlus.x() <<
"," << vtxViaPlus.y() <<
"," << vtxViaPlus.z()
106 <<
">>>>>>>> Conversion vertex computed via Minus pair\n"
107 << vtxViaMinus.x() <<
"," << vtxViaMinus.y() <<
"," << vtxViaMinus.z();
109 return 0.5 * (vtxViaPlus + vtxViaMinus);
118 int isNotValidAfter = 0;
119 if (!isNotValidBefore) {
125 LogDebug(
"Conv4HitsReco") <<
">>>>>>>> quad result not valid for q: qMin= " <<
qMinLimit <<
" q= " <<
q
130 LogDebug(
"Conv4HitsReco") <<
">>>>>>>> quad result not valid for m: mMin= " <<
mMinLimit <<
" m= " <<
m
144 if (isNotValidBefore)
161 while (((edq >
err) || (
edm >
err)) && (
i < maxIte)) {
177 LogDebug(
"Conv4HitsReco") <<
">>>>>>>> Iteration " <<
i <<
" m: " <<
m <<
" q: " <<
q <<
" dm: " <<
dm
178 <<
" dq: " << dq <<
" edm: " <<
edm <<
" edq: " << edq <<
"\n";
187 TVector3 vVminusHit2Orthogonal = (
vV -
hit2).Orthogonal();
188 TVector3 medianPointHit2V = 0.5 * (
vV +
hit2);
193 TVector3 vVminusHit3Orthogonal = (
vV -
hit3).Orthogonal();
194 TVector3 medianPointHit3V = 0.5 * (
vV +
hit3);
229 LogDebug(
"Conv4HitsReco") <<
" >>>>>> Quad is invalid\n";
260 LogDebug(
"Conv4HitsReco") <<
" >>>>>> Starting values: q= " <<
q <<
" m= " <<
m <<
"\n";
266 LogDebug(
"Conv4HitsReco") <<
" ======================================= "
268 <<
" Photon Vertex: " <<
vV.x() <<
"," <<
vV.y() <<
"," <<
vV.z() <<
" Hit1: " <<
hit1.x()
269 <<
"," <<
hit1.y() <<
"," <<
hit1.z() <<
" Hit2: " <<
hit2.x() <<
"," <<
hit2.y() <<
","
271 <<
" Hit4: " <<
hit4.x() <<
"," <<
hit4.y() <<
"," <<
hit4.z() <<
" N: " <<
vN.x() <<
","
272 <<
vN.y() <<
"," <<
vN.z() <<
" P: " <<
vP.x() <<
"," <<
vP.y() <<
"," <<
vP.z()
273 <<
" P-N: " <<
vPminusN.x() <<
"," <<
vP.y() <<
"," <<
vP.z() <<
" n: " <<
unitVn.x() <<
","