1 #define Conv4HitsReco_cxx 32 Tq = -2.*
pPN+2.*m*
pn+signT*2.*q*sqrtEta2mm/sqrtPi2qq;
33 Tm = 2.*
nPN+2.*q*
pn+signT*2.*m*sqrtPi2qq/sqrtEta2mm;
37 double QM = vQminusM.Mag();
38 double pQM =
unitVp*vQminusM;
39 double nQM =
unitVn*vQminusM;
44 Oq = sqrtEta2mm*pQM/QM+m*
pn+
pNV;
45 Om = m*QM/sqrtEta2mm-signO*sqrtEta2mm*nQM/QM+nQM-
nNV-
m;
46 O0 = -signO*sqrtEta2mm*QM-m*nQM-NVQM;
54 double nPM = unitVn*vPminusM;
55 double pPM =
unitVp*vPminusM;
60 double gamma = m2*nPM*nPM+NVPM*NVPM+2.*m*nPM*NVPM-vPminusM.Mag2()*(
_eta2+m2);
62 double disc =
sqrt(beta*beta - alpha*gamma);
64 double q01 = (-beta+
disc)/alpha;
65 double q02 = (-beta-
disc)/alpha;
68 ss <<
" m: " << m <<
" q01: " << std::setw(20) << q01 <<
" q02: "<< std::setw(20) << q02 <<
"/n";
93 TVector3 v1 = V1.Unit();
94 TVector3 v2 = V2.Unit();
97 return v2*((p1 -
p2)*(v1v2*v1-v2)/(v1v2*v1v2-1.))+p2;
103 return 0.01*0.3*3.8*
sqrt(m*m+eta*eta);
126 LogDebug(
"Conv4HitsReco") <<
">>>>>>>> Conversion vertex computed via Plus pair\n" 127 << vtxViaPlus.x() <<
"," << vtxViaPlus.y() <<
"," << vtxViaPlus.z()
128 <<
">>>>>>>> Conversion vertex computed via Minus pair\n" 129 << vtxViaMinus.x() <<
"," << vtxViaMinus.y() <<
"," << vtxViaMinus.z();
131 return 0.5*(vtxViaPlus+vtxViaMinus);
142 int isNotValidAfter = 0;
143 if ( ! isNotValidBefore ){
150 LogDebug(
"Conv4HitsReco")<<
">>>>>>>> quad result not valid for q: qMin= " <<
qMinLimit <<
" q= " << q <<
" qMax= " <<
qMaxLimit <<
"\n";
155 LogDebug(
"Conv4HitsReco")<<
">>>>>>>> quad result not valid for m: mMin= " <<
mMinLimit <<
" m= " << m <<
" mMax= " <<
mMaxLimit <<
"\n";
169 if ( isNotValidBefore )
return 0;
172 if ( isNotValidAfter )
return -1*nits;
184 while ( ((edq > err) || (edm > err)) && (i < maxIte) ){
200 LogDebug(
"Conv4HitsReco")<<
">>>>>>>> Iteration " << i <<
" m: " << m <<
" q: " << q <<
" dm: " << dm <<
" dq: " << dq <<
" edm: " << edm <<
" edq: " << edq <<
"\n";
211 TVector3 vVminusHit2Orthogonal = (
vV-
hit2).Orthogonal();
212 TVector3 medianPointHit2V = 0.5*(
vV+
hit2);
217 TVector3 vVminusHit3Orthogonal = (
vV-
hit3).Orthogonal();
218 TVector3 medianPointHit3V = 0.5*(
vV+
hit3);
252 LogDebug(
"Conv4HitsReco")<<
" >>>>>> Quad is invalid\n";
285 LogDebug(
"Conv4HitsReco")<<
" >>>>>> Starting values: q= " << q <<
" m= " << m <<
"\n";
295 <<
" ======================================= " <<
"\n" 296 <<
" Photon Vertex: " 297 <<
vV.x() <<
"," <<
vV.y() <<
"," <<
vV.z()
307 <<
vN.x() <<
"," <<
vN.y() <<
"," <<
vN.z()
309 <<
vP.x() <<
"," <<
vP.y() <<
"," <<
vP.z()
316 <<
" eta: " <<
_eta <<
" pi: " <<
_pi <<
"\n";
TVector3 GetMinusCenter(double &)
int IsNotValidForPtLimit(double, double, double, double)
double GetPtMinusFromParam(double &)
double GetPtPlusFromParam(double &)
int GuessStartingValues(double &, double &)
double GetPtFromParamAndHitPair(double &, double &)
int IsNotValidForVtxPosition(double &)
TVector3 GetIntersection(TVector3 &, TVector3 &, TVector3 &, TVector3 &)
int maxNumberOfIterations
int mqFindByIteration(double &, double &)
void SetLinSystCoeff(double, double)
TVector3 GetConvVertexFromParams(double &, double &)
int ConversionCandidate(TVector3 &, double &, double &)
TVector3 GetPlusCenter(double &)
double iterationStopRelThreshold
std::string qFromM_print(double m)