CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
Conv4HitsReco Class Reference

#include <Conv4HitsReco.h>

Public Member Functions

int ComputeMaxLimits ()
 
int ComputeMinLimits ()
 
 Conv4HitsReco (TVector3 &, TVector3 &, TVector3 &, TVector3 &, TVector3 &)
 
int ConversionCandidate (TVector3 &, double &, double &)
 
void Dump ()
 
TVector3 GetConvVertexFromParams (double &, double &)
 
double GetDm ()
 
double GetDq ()
 
TVector3 GetIntersection (TVector3 &, TVector3 &, TVector3 &, TVector3 &)
 
TVector3 GetMinusCenter (double &)
 
TVector3 GetPlusCenter (double &)
 
double GetPtFromParamAndHitPair (double &, double &)
 
double GetPtMinusFromParam (double &)
 
double GetPtPlusFromParam (double &)
 
int GuessStartingValues (double &, double &)
 
int IsNotValidForPtLimit (double, double, double, double)
 
int IsNotValidForVtxPosition (double &)
 
int mqFindByIteration (double &, double &)
 
double qFromM (double)
 
std::string qFromM_print (double m)
 
void Set (double)
 
void SetIterationStopRelThreshold (double val)
 
void SetLinSystCoeff (double, double)
 
void SetMaxNumberOfIterations (int val)
 
void SetMaxVtxDistance (int val)
 
void SetPtLegMaxCut (double val)
 
void SetPtLegMinCut (double val)
 
void SetPtPhotMaxCut (double val)
 
 ~Conv4HitsReco ()
 

Public Attributes

double _eta
 
double _eta2
 
double _pi
 
double _pi2
 
TVector3 convVtx
 
TVector3 hit1
 
TVector3 hit2
 
TVector3 hit3
 
TVector3 hit4
 
double iterationStopRelThreshold
 
int maxNumberOfIterations
 
double maxVtxDistance
 
TVector3 minusCenter
 
double minusRadius
 
double mMaxLimit
 
double mMinLimit
 
double nNV
 
double nPN
 
double O0
 
double Om
 
double Oq
 
TVector3 plusCenter
 
double plusRadius
 
double pn
 
double PN
 
double PN2
 
double pNV
 
double pPN
 
double ptLegMaxCut
 
double ptLegMinCut
 
double ptPhotMaxCut
 
double qMaxLimit
 
double qMinLimit
 
double T0
 
double Tm
 
double Tq
 
TVector3 unitVn
 
TVector3 unitVp
 
TVector3 v1minus2
 
TVector3 v3minus4
 
TVector3 vMMaxLimit
 
TVector3 vN
 
TVector3 vNminusV
 
TVector3 vP
 
TVector3 vPminusN
 
TVector3 vPminusV
 
TVector3 vQMaxLimit
 
TVector3 vV
 

Detailed Description

Definition at line 10 of file Conv4HitsReco.h.

Constructor & Destructor Documentation

Conv4HitsReco::Conv4HitsReco ( TVector3 &  ,
TVector3 &  ,
TVector3 &  ,
TVector3 &  ,
TVector3 &   
)

Referenced by SetMaxVtxDistance().

Conv4HitsReco::~Conv4HitsReco ( )

Referenced by SetMaxVtxDistance().

Member Function Documentation

int Conv4HitsReco::ComputeMaxLimits ( )

Definition at line 208 of file Conv4HitsReco.cc.

References _eta, _pi, GetIntersection(), GetPtFromParamAndHitPair(), hit2, hit3, IsNotValidForPtLimit(), LogDebug, mMaxLimit, ptLegMinCut, qMaxLimit, unitVn, unitVp, vMMaxLimit, vN, vP, vQMaxLimit, and vV.

Referenced by ConversionCandidate().

208  {
209 
210  // Q max limit
211  TVector3 vVminusHit2Orthogonal = (vV-hit2).Orthogonal();
212  TVector3 medianPointHit2V = 0.5*(vV+hit2);
213  vQMaxLimit = GetIntersection(vVminusHit2Orthogonal, medianPointHit2V, unitVp, vP);
214  qMaxLimit = (vQMaxLimit-vP).Mag();
215 
216  // M max limit
217  TVector3 vVminusHit3Orthogonal = (vV-hit3).Orthogonal();
218  TVector3 medianPointHit3V = 0.5*(vV+hit3);
219  vMMaxLimit = GetIntersection(vVminusHit3Orthogonal, medianPointHit3V, unitVn, vN);
220  mMaxLimit = (vMMaxLimit-vN).Mag();
221 
222  LogDebug("Conv4HitsReco")<< " >>>>>> Limits: qMax= " << qMaxLimit << " ==>pt " << GetPtFromParamAndHitPair(qMaxLimit, _pi) << " mMax= " << mMaxLimit << " ==>pt " <<GetPtFromParamAndHitPair(mMaxLimit, _eta) << "\n";
223 
224  return IsNotValidForPtLimit(mMaxLimit, qMaxLimit, ptLegMinCut, 100000.); //Max limit not applied here
225 
226 }
#define LogDebug(id)
int IsNotValidForPtLimit(double, double, double, double)
TVector3 unitVp
Definition: Conv4HitsReco.h:29
TVector3 vMMaxLimit
Definition: Conv4HitsReco.h:41
TVector3 hit3
Definition: Conv4HitsReco.h:16
double mMaxLimit
Definition: Conv4HitsReco.h:44
double GetPtFromParamAndHitPair(double &, double &)
double qMaxLimit
Definition: Conv4HitsReco.h:43
TVector3 hit2
Definition: Conv4HitsReco.h:17
TVector3 GetIntersection(TVector3 &, TVector3 &, TVector3 &, TVector3 &)
TVector3 vQMaxLimit
Definition: Conv4HitsReco.h:42
double ptLegMinCut
Definition: Conv4HitsReco.h:56
TVector3 unitVn
Definition: Conv4HitsReco.h:28
int Conv4HitsReco::ComputeMinLimits ( )

Definition at line 246 of file Conv4HitsReco.cc.

References GetIntersection(), IsNotValidForPtLimit(), LogDebug, mMaxLimit, mMinLimit, ptLegMaxCut, qMaxLimit, qMinLimit, unitVn, unitVp, v1minus2, v3minus4, vMMaxLimit, vN, vP, vQMaxLimit, vV, and DOFs::Z.

Referenced by ConversionCandidate().

246  {
247 
248  //Evaluate if quad is valid and compute min limits
249  if ( ((vV-vQMaxLimit).Cross(vMMaxLimit-vQMaxLimit)).Z() > 0. ){
250  //
251  //Quad is invalid
252  LogDebug("Conv4HitsReco")<< " >>>>>> Quad is invalid\n";
253  return 1;
254  } else {
255  //
256  // Compute q and m Min limits
257  TVector3 vQMinLimit = GetIntersection(v1minus2, vMMaxLimit, unitVp, vP);
258  qMinLimit = (vQMinLimit-vP)*unitVp;
259  TVector3 vMMinLimit = GetIntersection(v3minus4, vQMaxLimit, unitVn, vN);
260  mMinLimit = (vMMinLimit-vN)*unitVn;
261  if ( mMinLimit > mMaxLimit || qMinLimit > qMaxLimit ){
262  LogDebug("Conv4HitsReco")<< " >>>>>> Quad is invalid. qMin= " << qMinLimit << " mMin= " << mMinLimit << "\n";
263  return 2;
264  }
265  if ( IsNotValidForPtLimit(mMinLimit, qMinLimit, -1000., ptLegMaxCut) ){ //Min limit not applied here
266  return 2;
267  }
268 
269  LogDebug("Conv4HitsReco")<< " >>>>>> Quad is valid. qMin= " << qMinLimit << " mMin= " << mMinLimit << "\n";
270  return 0;
271  }
272 
273 }
#define LogDebug(id)
int IsNotValidForPtLimit(double, double, double, double)
TVector3 unitVp
Definition: Conv4HitsReco.h:29
TVector3 vMMaxLimit
Definition: Conv4HitsReco.h:41
double ptLegMaxCut
Definition: Conv4HitsReco.h:57
double mMaxLimit
Definition: Conv4HitsReco.h:44
double qMaxLimit
Definition: Conv4HitsReco.h:43
TVector3 GetIntersection(TVector3 &, TVector3 &, TVector3 &, TVector3 &)
TVector3 vQMaxLimit
Definition: Conv4HitsReco.h:42
double mMinLimit
Definition: Conv4HitsReco.h:46
TVector3 v1minus2
Definition: Conv4HitsReco.h:22
TVector3 unitVn
Definition: Conv4HitsReco.h:28
double qMinLimit
Definition: Conv4HitsReco.h:45
TVector3 v3minus4
Definition: Conv4HitsReco.h:21
int Conv4HitsReco::ConversionCandidate ( TVector3 &  vtx,
double &  ptplus,
double &  ptminus 
)

Definition at line 135 of file Conv4HitsReco.cc.

References ComputeMaxLimits(), ComputeMinLimits(), convVtx, GetConvVertexFromParams(), GetPtMinusFromParam(), GetPtPlusFromParam(), GuessStartingValues(), hit1, hit4, IsNotValidForPtLimit(), IsNotValidForVtxPosition(), LogDebug, funct::m, maxVtxDistance, minusCenter, minusRadius, mMaxLimit, mMinLimit, mqFindByIteration(), plusCenter, plusRadius, ptLegMaxCut, ptLegMinCut, lumiQueryAPI::q, qMaxLimit, qMinLimit, unitVn, unitVp, vN, and vP.

Referenced by SetMaxVtxDistance().

135  {
136 
137  double m;
138  double q;
139  int nits = 0;
140 
141  int isNotValidBefore = ComputeMaxLimits()+ComputeMinLimits();
142  int isNotValidAfter = 0;
143  if ( ! isNotValidBefore ){
144 
145  GuessStartingValues(m, q);
146  nits = mqFindByIteration(m, q);
147 
148  if ( q > qMaxLimit || q < qMinLimit ) {
149  isNotValidAfter = 1;
150  LogDebug("Conv4HitsReco")<< ">>>>>>>> quad result not valid for q: qMin= " << qMinLimit << " q= " << q << " qMax= " << qMaxLimit << "\n";
151 
152  }
153  if ( m > mMaxLimit || m < mMinLimit ) {
154  isNotValidAfter = 1;
155  LogDebug("Conv4HitsReco")<<">>>>>>>> quad result not valid for m: mMin= " << mMinLimit << " m= " << m << " mMax= " << mMaxLimit << "\n";
156  }
157 
158  ptminus = GetPtMinusFromParam(m);
159  ptplus = GetPtPlusFromParam(q);
160  minusCenter = vN+m*unitVn;
161  minusRadius = (hit4-minusCenter).Mag();
162  plusCenter = vP+q*unitVp;
163  plusRadius = (hit1-plusCenter).Mag();
165  vtx = convVtx;
166 
167  }
168 
169  if ( isNotValidBefore ) return 0;
170  if ( IsNotValidForPtLimit(m, q, ptLegMinCut, ptLegMaxCut) ) return -1000;
171  if ( IsNotValidForVtxPosition(maxVtxDistance) ) return -2000;
172  if ( isNotValidAfter ) return -1*nits;
173  return nits;
174 
175 }
#define LogDebug(id)
int IsNotValidForPtLimit(double, double, double, double)
double minusRadius
Definition: Conv4HitsReco.h:51
TVector3 unitVp
Definition: Conv4HitsReco.h:29
double ptLegMaxCut
Definition: Conv4HitsReco.h:57
double GetPtMinusFromParam(double &)
double mMaxLimit
Definition: Conv4HitsReco.h:44
double GetPtPlusFromParam(double &)
int GuessStartingValues(double &, double &)
int ComputeMinLimits()
double qMaxLimit
Definition: Conv4HitsReco.h:43
int IsNotValidForVtxPosition(double &)
double plusRadius
Definition: Conv4HitsReco.h:50
TVector3 hit4
Definition: Conv4HitsReco.h:15
TVector3 hit1
Definition: Conv4HitsReco.h:18
int mqFindByIteration(double &, double &)
TVector3 minusCenter
Definition: Conv4HitsReco.h:48
int ComputeMaxLimits()
TVector3 convVtx
Definition: Conv4HitsReco.h:49
double mMinLimit
Definition: Conv4HitsReco.h:46
double ptLegMinCut
Definition: Conv4HitsReco.h:56
TVector3 GetConvVertexFromParams(double &, double &)
TVector3 plusCenter
Definition: Conv4HitsReco.h:47
TVector3 unitVn
Definition: Conv4HitsReco.h:28
double qMinLimit
Definition: Conv4HitsReco.h:45
double maxVtxDistance
Definition: Conv4HitsReco.h:55
void Conv4HitsReco::Dump ( void  )

Definition at line 292 of file Conv4HitsReco.cc.

References _eta, _pi, hit1, hit2, hit3, hit4, LogDebug, unitVn, unitVp, vN, vP, vPminusN, and vV.

Referenced by SetMaxVtxDistance().

292  {
293 
294  LogDebug("Conv4HitsReco")
295  << " ======================================= " << "\n"
296  << " Photon Vertex: "
297  << vV.x() << "," << vV.y() << "," << vV.z()
298  << " Hit1: "
299  << hit1.x() << "," << hit1.y() << "," << hit1.z()
300  << " Hit2: "
301  << hit2.x() << "," << hit2.y() << "," << hit2.z()
302  << " Hit3: "
303  << hit3.x() << "," << hit3.y() << "," << hit3.z()
304  << " Hit4: "
305  << hit4.x() << "," << hit4.y() << "," << hit4.z()
306  << " N: "
307  << vN.x() << "," << vN.y() << "," << vN.z()
308  << " P: "
309  << vP.x() << "," << vP.y() << "," << vP.z()
310  << " P-N: "
311  << vPminusN.x() << "," << vP.y() << "," << vP.z()
312  << " n: "
313  << unitVn.x() << "," << unitVn.y() << "," << unitVn.z()
314  << " p: "
315  << unitVp.x() << "," << unitVp.y() << "," << unitVp.z()
316  << " eta: " << _eta << " pi: " << _pi << "\n";
317 
318 }
#define LogDebug(id)
TVector3 unitVp
Definition: Conv4HitsReco.h:29
TVector3 hit3
Definition: Conv4HitsReco.h:16
TVector3 hit2
Definition: Conv4HitsReco.h:17
TVector3 hit4
Definition: Conv4HitsReco.h:15
TVector3 hit1
Definition: Conv4HitsReco.h:18
TVector3 vPminusN
Definition: Conv4HitsReco.h:25
TVector3 unitVn
Definition: Conv4HitsReco.h:28
TVector3 Conv4HitsReco::GetConvVertexFromParams ( double &  m,
double &  q 
)

Definition at line 119 of file Conv4HitsReco.cc.

References LogDebug, minusCenter, minusRadius, plusCenter, plusRadius, unitVn, unitVp, vN, and vP.

Referenced by ConversionCandidate(), and SetMaxVtxDistance().

119  {
120 
121  TVector3 unitVQminusM = (plusCenter-minusCenter).Unit();
122  TVector3 vtxViaPlus = vP+q*unitVp-plusRadius*unitVQminusM;
123  TVector3 vtxViaMinus = vN+m*unitVn+minusRadius*unitVQminusM;
124 
125  // return 0.5*(vN+m*unitVn+m*unitVQminusM+vP+q*unitVp-q*unitVQminusM);
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();
130 
131  return 0.5*(vtxViaPlus+vtxViaMinus);
132 
133 }
#define LogDebug(id)
double minusRadius
Definition: Conv4HitsReco.h:51
TVector3 unitVp
Definition: Conv4HitsReco.h:29
double plusRadius
Definition: Conv4HitsReco.h:50
TVector3 minusCenter
Definition: Conv4HitsReco.h:48
TVector3 plusCenter
Definition: Conv4HitsReco.h:47
TVector3 unitVn
Definition: Conv4HitsReco.h:28
double Conv4HitsReco::GetDm ( )

Definition at line 10 of file Conv4HitsReco.cc.

References O0, Om, Oq, T0, and Tq.

Referenced by mqFindByIteration(), and SetMaxVtxDistance().

10  {
11 
12  return (Tq*O0-T0*Oq)/(Tq*Om-Tm*Oq); //dm
13 
14 }
Definition: Tm.h:13
double Conv4HitsReco::GetDq ( )

Definition at line 16 of file Conv4HitsReco.cc.

References O0, Om, Oq, T0, and Tq.

Referenced by mqFindByIteration(), and SetMaxVtxDistance().

16  {
17 
18  return (Tm*O0-T0*Om)/(Tm*Oq-Tq*Om); //dq
19 
20 }
Definition: Tm.h:13
TVector3 Conv4HitsReco::GetIntersection ( TVector3 &  V1,
TVector3 &  p1,
TVector3 &  V2,
TVector3 &  p2 
)

Definition at line 91 of file Conv4HitsReco.cc.

References p2.

Referenced by ComputeMaxLimits(), and ComputeMinLimits().

91  {
92 
93  TVector3 v1 = V1.Unit();
94  TVector3 v2 = V2.Unit();
95 
96  double v1v2=v1*v2;
97  return v2*((p1 - p2)*(v1v2*v1-v2)/(v1v2*v1v2-1.))+p2;
98 
99 }
double p2[4]
Definition: TauolaWrapper.h:90
double p1[4]
Definition: TauolaWrapper.h:89
TVector3 Conv4HitsReco::GetMinusCenter ( double &  radius)

Definition at line 84 of file Conv4HitsReco.cc.

References minusCenter, and minusRadius.

84  {
86  return minusCenter;
87 }
double minusRadius
Definition: Conv4HitsReco.h:51
TVector3 minusCenter
Definition: Conv4HitsReco.h:48
TVector3 Conv4HitsReco::GetPlusCenter ( double &  radius)

Definition at line 79 of file Conv4HitsReco.cc.

References plusCenter, and plusRadius.

79  {
81  return plusCenter;
82 }
double plusRadius
Definition: Conv4HitsReco.h:50
TVector3 plusCenter
Definition: Conv4HitsReco.h:47
double Conv4HitsReco::GetPtFromParamAndHitPair ( double &  m,
double &  eta 
)

Definition at line 101 of file Conv4HitsReco.cc.

References mathSSE::sqrt().

Referenced by ComputeMaxLimits(), GetPtMinusFromParam(), GetPtPlusFromParam(), IsNotValidForPtLimit(), and SetMaxVtxDistance().

101  {
102 
103  return 0.01*0.3*3.8*sqrt(m*m+eta*eta);
104 
105 }
T sqrt(T t)
Definition: SSEVec.h:18
double Conv4HitsReco::GetPtMinusFromParam ( double &  m)

Definition at line 107 of file Conv4HitsReco.cc.

References _eta, and GetPtFromParamAndHitPair().

Referenced by ConversionCandidate(), and SetMaxVtxDistance().

107  {
108 
110 
111 }
double GetPtFromParamAndHitPair(double &, double &)
double Conv4HitsReco::GetPtPlusFromParam ( double &  q)

Definition at line 113 of file Conv4HitsReco.cc.

References _pi, and GetPtFromParamAndHitPair().

Referenced by ConversionCandidate(), and SetMaxVtxDistance().

113  {
114 
115  return GetPtFromParamAndHitPair(q, _pi);
116 
117 }
double GetPtFromParamAndHitPair(double &, double &)
int Conv4HitsReco::GuessStartingValues ( double &  m,
double &  q 
)

Definition at line 275 of file Conv4HitsReco.cc.

References LogDebug, mMaxLimit, and qMaxLimit.

Referenced by ConversionCandidate().

275  {
276 
277  /*
278  m = 0.5*(mMinLimit+mMaxLimit);
279  q = 0.5*(qMinLimit+qMaxLimit);
280  */
281 
282  m = mMaxLimit;
283  q = qMaxLimit;
284 
285  LogDebug("Conv4HitsReco")<< " >>>>>> Starting values: q= " << q << " m= " << m << "\n";
286 
287  return 0;
288 
289 }
#define LogDebug(id)
double mMaxLimit
Definition: Conv4HitsReco.h:44
double qMaxLimit
Definition: Conv4HitsReco.h:43
int Conv4HitsReco::IsNotValidForPtLimit ( double  m,
double  q,
double  ptmin,
double  ptmax 
)

Definition at line 228 of file Conv4HitsReco.cc.

References _eta, _pi, and GetPtFromParamAndHitPair().

Referenced by ComputeMaxLimits(), ComputeMinLimits(), ConversionCandidate(), and SetMaxVtxDistance().

228  {
229 
230  if ( GetPtFromParamAndHitPair(q, _pi) < ptmin ) return 1;
231  if ( GetPtFromParamAndHitPair(m, _eta) < ptmin ) return 1;
232  if ( GetPtFromParamAndHitPair(q, _pi) > ptmax ) return 1;
233  if ( GetPtFromParamAndHitPair(m, _eta) > ptmax ) return 1;
234  return 0;
235 
236 }
double GetPtFromParamAndHitPair(double &, double &)
int Conv4HitsReco::IsNotValidForVtxPosition ( double &  maxDist)

Definition at line 238 of file Conv4HitsReco.cc.

References convVtx, hit1, hit2, hit3, hit4, and TtFullHadJetPartonMatch_cfi::maxDist.

Referenced by ConversionCandidate(), and SetMaxVtxDistance().

238  {
239 
240  TVector3 hitAve = 0.25*(hit1+hit2+hit3+hit4);
241  if ( (convVtx-hitAve).Mag() > maxDist ) return 1;
242  return 0;
243 
244 }
TVector3 hit3
Definition: Conv4HitsReco.h:16
TVector3 hit2
Definition: Conv4HitsReco.h:17
TVector3 hit4
Definition: Conv4HitsReco.h:15
TVector3 hit1
Definition: Conv4HitsReco.h:18
TVector3 convVtx
Definition: Conv4HitsReco.h:49
int Conv4HitsReco::mqFindByIteration ( double &  m,
double &  q 
)

Definition at line 177 of file Conv4HitsReco.cc.

References symbols::dm, GetDm(), GetDq(), mps_fire::i, iterationStopRelThreshold, LogDebug, maxNumberOfIterations, and SetLinSystCoeff().

Referenced by ConversionCandidate().

177  {
178 
179  int maxIte = maxNumberOfIterations;
180  double err = iterationStopRelThreshold;
181  double edm = 1.;
182  double edq = 1.;
183  int i = 0;
184  while ( ((edq > err) || (edm > err)) && (i < maxIte) ){
186  double dm = GetDm();
187  double dq = GetDq();
188  /*
189  while( m+dm > mMaxLimit || m+dm < mMinLimit || q+dq > qMaxLimit || q+dq < qMinLimit ){
190 
191  LogDebug("Conv4HitsReco")<<">>>>>>>> Going outside limits, reducing increments \n";
192  dm=dm/2.;
193  dq=dq/2.;
194  }
195  */
196  m+=dm;
197  q+=dq;
198  edm = fabs(dm/m);
199  edq = fabs(dq/q);
200  LogDebug("Conv4HitsReco")<< ">>>>>>>> Iteration " << i << " m: " << m << " q: " << q << " dm: " << dm << " dq: " << dq << " edm: " << edm << " edq: " << edq << "\n";
201  i++;
202  }
203 
204  return i;
205 
206 }
#define LogDebug(id)
double GetDm()
double GetDq()
int maxNumberOfIterations
Definition: Conv4HitsReco.h:54
void SetLinSystCoeff(double, double)
HLT enums.
double iterationStopRelThreshold
Definition: Conv4HitsReco.h:53
double Conv4HitsReco::qFromM ( double  m)

Definition at line 72 of file Conv4HitsReco.cc.

References LogDebug, and qFromM_print().

72  {
73 
74  LogDebug("Conv4HitsReco")<<qFromM_print(m);
75  return 0.;
76 
77 }
#define LogDebug(id)
std::string qFromM_print(double m)
std::string Conv4HitsReco::qFromM_print ( double  m)

Definition at line 50 of file Conv4HitsReco.cc.

References _eta2, alpha, beta, TtSemiLepEvtBuilder_cfi::disc, CustomPhysics_cfi::gamma, funct::m, pn, pNV, mathSSE::sqrt(), unitVn, unitVp, vNminusV, and vPminusN.

Referenced by qFromM().

50  {
51  std::stringstream ss;
52  TVector3 vPminusM = vPminusN - m*unitVn;
53  double m2 = m*m;
54  double nPM = unitVn*vPminusM;
55  double pPM = unitVp*vPminusM;
56  double NVPM = vNminusV*vPminusM;
57 
58  double alpha = (m*pn+pNV)*(m*pn+pNV)-_eta2-m2;
59  double beta = m2*pn*nPM+m*pn*NVPM+m*nPM*pNV-pPM*(_eta2+m2)+pNV*NVPM;
60  double gamma = m2*nPM*nPM+NVPM*NVPM+2.*m*nPM*NVPM-vPminusM.Mag2()*(_eta2+m2);
61 
62  double disc = sqrt(beta*beta - alpha*gamma);
63 
64  double q01 = (-beta+disc)/alpha;
65  double q02 = (-beta-disc)/alpha;
66 
67 
68  ss << " m: " << m << " q01: " << std::setw(20) << q01 << " q02: "<< std::setw(20) << q02 << "/n";
69  return ss.str();
70 }
const double beta
float alpha
Definition: AMPTWrapper.h:95
TVector3 unitVp
Definition: Conv4HitsReco.h:29
TVector3 vNminusV
Definition: Conv4HitsReco.h:27
T sqrt(T t)
Definition: SSEVec.h:18
TVector3 vPminusN
Definition: Conv4HitsReco.h:25
TVector3 unitVn
Definition: Conv4HitsReco.h:28
void Conv4HitsReco::Set ( double  )

Referenced by SetPtPhotMaxCut().

void Conv4HitsReco::SetIterationStopRelThreshold ( double  val)
inline

Definition at line 78 of file Conv4HitsReco.h.

References heppy_batch::val.

Referenced by SetMaxVtxDistance().

void Conv4HitsReco::SetLinSystCoeff ( double  m,
double  q 
)

Definition at line 22 of file Conv4HitsReco.cc.

References _eta2, _pi2, funct::m, nNV, nPN, O0, Om, Oq, pn, PN2, pNV, pPN, mathSSE::sqrt(), T0, Tq, unitVn, unitVp, vNminusV, and vPminusN.

Referenced by mqFindByIteration(), and SetPtPhotMaxCut().

22  {
23 
24  // dq*Tq + dm*Tm = T0 // Tangent condition
25  // dq*Oq + dm*Om = O0 // Orthogonality condition
26 
27  double sqrtEta2mm = sqrt(_eta2+m*m);
28  double sqrtPi2qq = sqrt(_pi2+q*q);
29 
30  double signT = 1.;
31 
32  Tq = -2.*pPN+2.*m*pn+signT*2.*q*sqrtEta2mm/sqrtPi2qq;
33  Tm = 2.*nPN+2.*q*pn+signT*2.*m*sqrtPi2qq/sqrtEta2mm;
34  T0 = PN2-_eta2-_pi2-2.*q*m*pn+2.*q*pPN-2.*m*nPN-signT*2.*sqrtEta2mm*sqrtPi2qq;
35 
36  TVector3 vQminusM = q*unitVp - m*unitVn + vPminusN;
37  double QM = vQminusM.Mag();
38  double pQM = unitVp*vQminusM;
39  double nQM = unitVn*vQminusM;
40  double NVQM = vNminusV*vQminusM;
41 
42  double signO = 1.;
43 
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;
47 
48 }
TVector3 unitVp
Definition: Conv4HitsReco.h:29
TVector3 vNminusV
Definition: Conv4HitsReco.h:27
T sqrt(T t)
Definition: SSEVec.h:18
TVector3 vPminusN
Definition: Conv4HitsReco.h:25
TVector3 unitVn
Definition: Conv4HitsReco.h:28
Definition: Tm.h:13
void Conv4HitsReco::SetMaxNumberOfIterations ( int  val)
inline

Definition at line 79 of file Conv4HitsReco.h.

References heppy_batch::val.

Referenced by SetMaxVtxDistance().

void Conv4HitsReco::SetMaxVtxDistance ( int  val)
inline
void Conv4HitsReco::SetPtLegMaxCut ( double  val)
inline

Definition at line 74 of file Conv4HitsReco.h.

References heppy_batch::val.

Referenced by SetMaxVtxDistance().

void Conv4HitsReco::SetPtLegMinCut ( double  val)
inline

Definition at line 73 of file Conv4HitsReco.h.

References heppy_batch::val.

Referenced by SetMaxVtxDistance().

void Conv4HitsReco::SetPtPhotMaxCut ( double  val)
inline

Definition at line 75 of file Conv4HitsReco.h.

References Set(), SetLinSystCoeff(), and heppy_batch::val.

Referenced by SetMaxVtxDistance().

Member Data Documentation

double Conv4HitsReco::_eta
double Conv4HitsReco::_eta2

Definition at line 39 of file Conv4HitsReco.h.

Referenced by qFromM_print(), SetLinSystCoeff(), and SetMaxVtxDistance().

double Conv4HitsReco::_pi
double Conv4HitsReco::_pi2

Definition at line 40 of file Conv4HitsReco.h.

Referenced by SetLinSystCoeff(), and SetMaxVtxDistance().

TVector3 Conv4HitsReco::convVtx

Definition at line 49 of file Conv4HitsReco.h.

Referenced by ConversionCandidate(), and IsNotValidForVtxPosition().

TVector3 Conv4HitsReco::hit1
TVector3 Conv4HitsReco::hit2
TVector3 Conv4HitsReco::hit3
TVector3 Conv4HitsReco::hit4
double Conv4HitsReco::iterationStopRelThreshold

Definition at line 53 of file Conv4HitsReco.h.

Referenced by mqFindByIteration().

int Conv4HitsReco::maxNumberOfIterations

Definition at line 54 of file Conv4HitsReco.h.

Referenced by mqFindByIteration().

double Conv4HitsReco::maxVtxDistance

Definition at line 55 of file Conv4HitsReco.h.

Referenced by ConversionCandidate().

TVector3 Conv4HitsReco::minusCenter

Definition at line 48 of file Conv4HitsReco.h.

Referenced by ConversionCandidate(), GetConvVertexFromParams(), and GetMinusCenter().

double Conv4HitsReco::minusRadius

Definition at line 51 of file Conv4HitsReco.h.

Referenced by ConversionCandidate(), GetConvVertexFromParams(), and GetMinusCenter().

double Conv4HitsReco::mMaxLimit
double Conv4HitsReco::mMinLimit

Definition at line 46 of file Conv4HitsReco.h.

Referenced by ComputeMinLimits(), and ConversionCandidate().

double Conv4HitsReco::nNV

Definition at line 36 of file Conv4HitsReco.h.

Referenced by SetLinSystCoeff(), and SetMaxVtxDistance().

double Conv4HitsReco::nPN

Definition at line 32 of file Conv4HitsReco.h.

Referenced by SetLinSystCoeff(), and SetMaxVtxDistance().

double Conv4HitsReco::O0

Definition at line 65 of file Conv4HitsReco.h.

Referenced by GetDm(), GetDq(), and SetLinSystCoeff().

double Conv4HitsReco::Om

Definition at line 65 of file Conv4HitsReco.h.

Referenced by GetDm(), GetDq(), and SetLinSystCoeff().

double Conv4HitsReco::Oq

Definition at line 65 of file Conv4HitsReco.h.

Referenced by GetDm(), GetDq(), and SetLinSystCoeff().

TVector3 Conv4HitsReco::plusCenter

Definition at line 47 of file Conv4HitsReco.h.

Referenced by ConversionCandidate(), GetConvVertexFromParams(), and GetPlusCenter().

double Conv4HitsReco::plusRadius

Definition at line 50 of file Conv4HitsReco.h.

Referenced by ConversionCandidate(), GetConvVertexFromParams(), and GetPlusCenter().

double Conv4HitsReco::pn

Definition at line 30 of file Conv4HitsReco.h.

Referenced by qFromM_print(), SetLinSystCoeff(), and SetMaxVtxDistance().

double Conv4HitsReco::PN

Definition at line 33 of file Conv4HitsReco.h.

Referenced by SetMaxVtxDistance().

double Conv4HitsReco::PN2

Definition at line 34 of file Conv4HitsReco.h.

Referenced by SetLinSystCoeff(), and SetMaxVtxDistance().

double Conv4HitsReco::pNV

Definition at line 35 of file Conv4HitsReco.h.

Referenced by qFromM_print(), SetLinSystCoeff(), and SetMaxVtxDistance().

double Conv4HitsReco::pPN

Definition at line 31 of file Conv4HitsReco.h.

Referenced by SetLinSystCoeff(), and SetMaxVtxDistance().

double Conv4HitsReco::ptLegMaxCut

Definition at line 57 of file Conv4HitsReco.h.

Referenced by ComputeMinLimits(), and ConversionCandidate().

double Conv4HitsReco::ptLegMinCut

Definition at line 56 of file Conv4HitsReco.h.

Referenced by ComputeMaxLimits(), and ConversionCandidate().

double Conv4HitsReco::ptPhotMaxCut

Definition at line 58 of file Conv4HitsReco.h.

double Conv4HitsReco::qMaxLimit
double Conv4HitsReco::qMinLimit

Definition at line 45 of file Conv4HitsReco.h.

Referenced by ComputeMinLimits(), and ConversionCandidate().

double Conv4HitsReco::T0

Definition at line 64 of file Conv4HitsReco.h.

Referenced by GetDm(), GetDq(), and SetLinSystCoeff().

double Conv4HitsReco::Tm

Definition at line 64 of file Conv4HitsReco.h.

double Conv4HitsReco::Tq

Definition at line 64 of file Conv4HitsReco.h.

Referenced by GetDm(), GetDq(), and SetLinSystCoeff().

TVector3 Conv4HitsReco::unitVn
TVector3 Conv4HitsReco::unitVp
TVector3 Conv4HitsReco::v1minus2

Definition at line 22 of file Conv4HitsReco.h.

Referenced by ComputeMinLimits(), and SetMaxVtxDistance().

TVector3 Conv4HitsReco::v3minus4

Definition at line 21 of file Conv4HitsReco.h.

Referenced by ComputeMinLimits(), and SetMaxVtxDistance().

TVector3 Conv4HitsReco::vMMaxLimit

Definition at line 41 of file Conv4HitsReco.h.

Referenced by ComputeMaxLimits(), and ComputeMinLimits().

TVector3 Conv4HitsReco::vN
TVector3 Conv4HitsReco::vNminusV

Definition at line 27 of file Conv4HitsReco.h.

Referenced by qFromM_print(), SetLinSystCoeff(), and SetMaxVtxDistance().

TVector3 Conv4HitsReco::vP
TVector3 Conv4HitsReco::vPminusN

Definition at line 25 of file Conv4HitsReco.h.

Referenced by Dump(), qFromM_print(), SetLinSystCoeff(), and SetMaxVtxDistance().

TVector3 Conv4HitsReco::vPminusV

Definition at line 26 of file Conv4HitsReco.h.

Referenced by SetMaxVtxDistance().

TVector3 Conv4HitsReco::vQMaxLimit

Definition at line 42 of file Conv4HitsReco.h.

Referenced by ComputeMaxLimits(), and ComputeMinLimits().

TVector3 Conv4HitsReco::vV

Definition at line 14 of file Conv4HitsReco.h.

Referenced by ComputeMaxLimits(), ComputeMinLimits(), Dump(), and SetMaxVtxDistance().