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 185 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().

185  {
186  // Q max limit
187  TVector3 vVminusHit2Orthogonal = (vV - hit2).Orthogonal();
188  TVector3 medianPointHit2V = 0.5 * (vV + hit2);
189  vQMaxLimit = GetIntersection(vVminusHit2Orthogonal, medianPointHit2V, unitVp, vP);
190  qMaxLimit = (vQMaxLimit - vP).Mag();
191 
192  // M max limit
193  TVector3 vVminusHit3Orthogonal = (vV - hit3).Orthogonal();
194  TVector3 medianPointHit3V = 0.5 * (vV + hit3);
195  vMMaxLimit = GetIntersection(vVminusHit3Orthogonal, medianPointHit3V, unitVn, vN);
196  mMaxLimit = (vMMaxLimit - vN).Mag();
197 
198  LogDebug("Conv4HitsReco") << " >>>>>> Limits: qMax= " << qMaxLimit << " ==>pt "
199  << GetPtFromParamAndHitPair(qMaxLimit, _pi) << " mMax= " << mMaxLimit << " ==>pt "
201 
202  return IsNotValidForPtLimit(mMaxLimit, qMaxLimit, ptLegMinCut, 100000.); //Max limit not applied here
203 }
#define LogDebug(id)
int IsNotValidForPtLimit(double, double, double, double)
TVector3 unitVp
Definition: Conv4HitsReco.h:28
TVector3 vMMaxLimit
Definition: Conv4HitsReco.h:40
TVector3 hit3
Definition: Conv4HitsReco.h:15
double mMaxLimit
Definition: Conv4HitsReco.h:43
double GetPtFromParamAndHitPair(double &, double &)
double qMaxLimit
Definition: Conv4HitsReco.h:42
TVector3 hit2
Definition: Conv4HitsReco.h:16
TVector3 GetIntersection(TVector3 &, TVector3 &, TVector3 &, TVector3 &)
TVector3 vQMaxLimit
Definition: Conv4HitsReco.h:41
double ptLegMinCut
Definition: Conv4HitsReco.h:55
TVector3 unitVn
Definition: Conv4HitsReco.h:27
int Conv4HitsReco::ComputeMinLimits ( )

Definition at line 224 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().

224  {
225  //Evaluate if quad is valid and compute min limits
226  if (((vV - vQMaxLimit).Cross(vMMaxLimit - vQMaxLimit)).Z() > 0.) {
227  //
228  //Quad is invalid
229  LogDebug("Conv4HitsReco") << " >>>>>> Quad is invalid\n";
230  return 1;
231  } else {
232  //
233  // Compute q and m Min limits
234  TVector3 vQMinLimit = GetIntersection(v1minus2, vMMaxLimit, unitVp, vP);
235  qMinLimit = (vQMinLimit - vP) * unitVp;
236  TVector3 vMMinLimit = GetIntersection(v3minus4, vQMaxLimit, unitVn, vN);
237  mMinLimit = (vMMinLimit - vN) * unitVn;
238  if (mMinLimit > mMaxLimit || qMinLimit > qMaxLimit) {
239  LogDebug("Conv4HitsReco") << " >>>>>> Quad is invalid. qMin= " << qMinLimit << " mMin= " << mMinLimit << "\n";
240  return 2;
241  }
242  if (IsNotValidForPtLimit(mMinLimit, qMinLimit, -1000., ptLegMaxCut)) { //Min limit not applied here
243  return 2;
244  }
245 
246  LogDebug("Conv4HitsReco") << " >>>>>> Quad is valid. qMin= " << qMinLimit << " mMin= " << mMinLimit << "\n";
247  return 0;
248  }
249 }
#define LogDebug(id)
int IsNotValidForPtLimit(double, double, double, double)
TVector3 unitVp
Definition: Conv4HitsReco.h:28
TVector3 vMMaxLimit
Definition: Conv4HitsReco.h:40
double ptLegMaxCut
Definition: Conv4HitsReco.h:56
double mMaxLimit
Definition: Conv4HitsReco.h:43
double qMaxLimit
Definition: Conv4HitsReco.h:42
TVector3 GetIntersection(TVector3 &, TVector3 &, TVector3 &, TVector3 &)
TVector3 vQMaxLimit
Definition: Conv4HitsReco.h:41
double mMinLimit
Definition: Conv4HitsReco.h:45
TVector3 v1minus2
Definition: Conv4HitsReco.h:21
TVector3 unitVn
Definition: Conv4HitsReco.h:27
double qMinLimit
Definition: Conv4HitsReco.h:44
TVector3 v3minus4
Definition: Conv4HitsReco.h:20
int Conv4HitsReco::ConversionCandidate ( TVector3 &  vtx,
double &  ptplus,
double &  ptminus 
)

Definition at line 112 of file Conv4HitsReco.cc.

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

Referenced by SetMaxVtxDistance().

112  {
113  double m;
114  double q;
115  int nits = 0;
116 
117  int isNotValidBefore = ComputeMaxLimits() + ComputeMinLimits();
118  int isNotValidAfter = 0;
119  if (!isNotValidBefore) {
120  GuessStartingValues(m, q);
121  nits = mqFindByIteration(m, q);
122 
123  if (q > qMaxLimit || q < qMinLimit) {
124  isNotValidAfter = 1;
125  LogDebug("Conv4HitsReco") << ">>>>>>>> quad result not valid for q: qMin= " << qMinLimit << " q= " << q
126  << " qMax= " << qMaxLimit << "\n";
127  }
128  if (m > mMaxLimit || m < mMinLimit) {
129  isNotValidAfter = 1;
130  LogDebug("Conv4HitsReco") << ">>>>>>>> quad result not valid for m: mMin= " << mMinLimit << " m= " << m
131  << " mMax= " << mMaxLimit << "\n";
132  }
133 
134  ptminus = GetPtMinusFromParam(m);
135  ptplus = GetPtPlusFromParam(q);
136  minusCenter = vN + m * unitVn;
137  minusRadius = (hit4 - minusCenter).Mag();
138  plusCenter = vP + q * unitVp;
139  plusRadius = (hit1 - plusCenter).Mag();
141  vtx = convVtx;
142  }
143 
144  if (isNotValidBefore)
145  return 0;
147  return -1000;
149  return -2000;
150  if (isNotValidAfter)
151  return -1 * nits;
152  return nits;
153 }
#define LogDebug(id)
int IsNotValidForPtLimit(double, double, double, double)
double minusRadius
Definition: Conv4HitsReco.h:50
TVector3 unitVp
Definition: Conv4HitsReco.h:28
double ptLegMaxCut
Definition: Conv4HitsReco.h:56
double GetPtMinusFromParam(double &)
double mMaxLimit
Definition: Conv4HitsReco.h:43
double GetPtPlusFromParam(double &)
int GuessStartingValues(double &, double &)
int ComputeMinLimits()
double qMaxLimit
Definition: Conv4HitsReco.h:42
int IsNotValidForVtxPosition(double &)
double plusRadius
Definition: Conv4HitsReco.h:49
TVector3 hit4
Definition: Conv4HitsReco.h:14
TVector3 hit1
Definition: Conv4HitsReco.h:17
int mqFindByIteration(double &, double &)
TVector3 minusCenter
Definition: Conv4HitsReco.h:47
int ComputeMaxLimits()
TVector3 convVtx
Definition: Conv4HitsReco.h:48
double mMinLimit
Definition: Conv4HitsReco.h:45
double ptLegMinCut
Definition: Conv4HitsReco.h:55
TVector3 GetConvVertexFromParams(double &, double &)
TVector3 plusCenter
Definition: Conv4HitsReco.h:46
TVector3 unitVn
Definition: Conv4HitsReco.h:27
double qMinLimit
Definition: Conv4HitsReco.h:44
double maxVtxDistance
Definition: Conv4HitsReco.h:54
void Conv4HitsReco::Dump ( void  )

Definition at line 265 of file Conv4HitsReco.cc.

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

Referenced by SetMaxVtxDistance().

265  {
266  LogDebug("Conv4HitsReco") << " ======================================= "
267  << "\n"
268  << " Photon Vertex: " << vV.x() << "," << vV.y() << "," << vV.z() << " Hit1: " << hit1.x()
269  << "," << hit1.y() << "," << hit1.z() << " Hit2: " << hit2.x() << "," << hit2.y() << ","
270  << hit2.z() << " Hit3: " << hit3.x() << "," << hit3.y() << "," << hit3.z()
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() << ","
274  << unitVn.y() << "," << unitVn.z() << " p: " << unitVp.x() << "," << unitVp.y() << ","
275  << unitVp.z() << " eta: " << _eta << " pi: " << _pi << "\n";
276 }
#define LogDebug(id)
TVector3 unitVp
Definition: Conv4HitsReco.h:28
TVector3 hit3
Definition: Conv4HitsReco.h:15
TVector3 hit2
Definition: Conv4HitsReco.h:16
TVector3 hit4
Definition: Conv4HitsReco.h:14
TVector3 hit1
Definition: Conv4HitsReco.h:17
TVector3 vPminusN
Definition: Conv4HitsReco.h:24
TVector3 unitVn
Definition: Conv4HitsReco.h:27
TVector3 Conv4HitsReco::GetConvVertexFromParams ( double &  m,
double &  q 
)

Definition at line 98 of file Conv4HitsReco.cc.

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

Referenced by ConversionCandidate(), and SetMaxVtxDistance().

98  {
99  TVector3 unitVQminusM = (plusCenter - minusCenter).Unit();
100  TVector3 vtxViaPlus = vP + q * unitVp - plusRadius * unitVQminusM;
101  TVector3 vtxViaMinus = vN + m * unitVn + minusRadius * unitVQminusM;
102 
103  // return 0.5*(vN+m*unitVn+m*unitVQminusM+vP+q*unitVp-q*unitVQminusM);
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();
108 
109  return 0.5 * (vtxViaPlus + vtxViaMinus);
110 }
#define LogDebug(id)
double minusRadius
Definition: Conv4HitsReco.h:50
TVector3 unitVp
Definition: Conv4HitsReco.h:28
double plusRadius
Definition: Conv4HitsReco.h:49
TVector3 minusCenter
Definition: Conv4HitsReco.h:47
TVector3 plusCenter
Definition: Conv4HitsReco.h:46
TVector3 unitVn
Definition: Conv4HitsReco.h:27
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  return (Tq * O0 - T0 * Oq) / (Tq * Om - Tm * Oq); //dm
12 }
Definition: Tm.h:13
double Conv4HitsReco::GetDq ( )

Definition at line 14 of file Conv4HitsReco.cc.

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

Referenced by mqFindByIteration(), and SetMaxVtxDistance().

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

Definition at line 82 of file Conv4HitsReco.cc.

References p2.

Referenced by ComputeMaxLimits(), and ComputeMinLimits().

82  {
83  TVector3 v1 = V1.Unit();
84  TVector3 v2 = V2.Unit();
85 
86  double v1v2 = v1 * v2;
87  return v2 * ((p1 - p2) * (v1v2 * v1 - v2) / (v1v2 * v1v2 - 1.)) + p2;
88 }
double p2[4]
Definition: TauolaWrapper.h:90
double p1[4]
Definition: TauolaWrapper.h:89
TVector3 Conv4HitsReco::GetMinusCenter ( double &  radius)

Definition at line 75 of file Conv4HitsReco.cc.

References minusCenter, and minusRadius.

75  {
77  return minusCenter;
78 }
double minusRadius
Definition: Conv4HitsReco.h:50
TVector3 minusCenter
Definition: Conv4HitsReco.h:47
TVector3 Conv4HitsReco::GetPlusCenter ( double &  radius)

Definition at line 70 of file Conv4HitsReco.cc.

References plusCenter, and plusRadius.

70  {
72  return plusCenter;
73 }
double plusRadius
Definition: Conv4HitsReco.h:49
TVector3 plusCenter
Definition: Conv4HitsReco.h:46
double Conv4HitsReco::GetPtFromParamAndHitPair ( double &  m,
double &  eta 
)
double Conv4HitsReco::GetPtMinusFromParam ( double &  m)
double Conv4HitsReco::GetPtPlusFromParam ( double &  q)

Definition at line 96 of file Conv4HitsReco.cc.

References _pi, and GetPtFromParamAndHitPair().

Referenced by ConversionCandidate(), and SetMaxVtxDistance().

96 { return GetPtFromParamAndHitPair(q, _pi); }
double GetPtFromParamAndHitPair(double &, double &)
int Conv4HitsReco::GuessStartingValues ( double &  m,
double &  q 
)

Definition at line 251 of file Conv4HitsReco.cc.

References LogDebug, mMaxLimit, and qMaxLimit.

Referenced by ConversionCandidate().

251  {
252  /*
253  m = 0.5*(mMinLimit+mMaxLimit);
254  q = 0.5*(qMinLimit+qMaxLimit);
255  */
256 
257  m = mMaxLimit;
258  q = qMaxLimit;
259 
260  LogDebug("Conv4HitsReco") << " >>>>>> Starting values: q= " << q << " m= " << m << "\n";
261 
262  return 0;
263 }
#define LogDebug(id)
double mMaxLimit
Definition: Conv4HitsReco.h:43
double qMaxLimit
Definition: Conv4HitsReco.h:42
int Conv4HitsReco::IsNotValidForPtLimit ( double  m,
double  q,
double  ptmin,
double  ptmax 
)

Definition at line 205 of file Conv4HitsReco.cc.

References _eta, _pi, and GetPtFromParamAndHitPair().

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

205  {
207  return 1;
209  return 1;
211  return 1;
213  return 1;
214  return 0;
215 }
double GetPtFromParamAndHitPair(double &, double &)
double ptmin
Definition: HydjetWrapper.h:84
int Conv4HitsReco::IsNotValidForVtxPosition ( double &  maxDist)

Definition at line 217 of file Conv4HitsReco.cc.

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

Referenced by ConversionCandidate(), and SetMaxVtxDistance().

217  {
218  TVector3 hitAve = 0.25 * (hit1 + hit2 + hit3 + hit4);
219  if ((convVtx - hitAve).Mag() > maxDist)
220  return 1;
221  return 0;
222 }
TVector3 hit3
Definition: Conv4HitsReco.h:15
TVector3 hit2
Definition: Conv4HitsReco.h:16
TVector3 hit4
Definition: Conv4HitsReco.h:14
TVector3 hit1
Definition: Conv4HitsReco.h:17
TVector3 convVtx
Definition: Conv4HitsReco.h:48
int Conv4HitsReco::mqFindByIteration ( double &  m,
double &  q 
)

Definition at line 155 of file Conv4HitsReco.cc.

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

Referenced by ConversionCandidate().

155  {
156  int maxIte = maxNumberOfIterations;
158  double edm = 1.;
159  double edq = 1.;
160  int i = 0;
161  while (((edq > err) || (edm > err)) && (i < maxIte)) {
162  SetLinSystCoeff(m, q);
163  double dm = GetDm();
164  double dq = GetDq();
165  /*
166  while( m+dm > mMaxLimit || m+dm < mMinLimit || q+dq > qMaxLimit || q+dq < qMinLimit ){
167 
168  LogDebug("Conv4HitsReco")<<">>>>>>>> Going outside limits, reducing increments \n";
169  dm=dm/2.;
170  dq=dq/2.;
171  }
172  */
173  m += dm;
174  q += dq;
175  edm = fabs(dm / m);
176  edq = fabs(dq / q);
177  LogDebug("Conv4HitsReco") << ">>>>>>>> Iteration " << i << " m: " << m << " q: " << q << " dm: " << dm
178  << " dq: " << dq << " edm: " << edm << " edq: " << edq << "\n";
179  i++;
180  }
181 
182  return i;
183 }
#define LogDebug(id)
double GetDm()
double GetDq()
int maxNumberOfIterations
Definition: Conv4HitsReco.h:53
void SetLinSystCoeff(double, double)
HLT enums.
double iterationStopRelThreshold
Definition: Conv4HitsReco.h:52
double Conv4HitsReco::qFromM ( double  m)

Definition at line 65 of file Conv4HitsReco.cc.

References LogDebug, and qFromM_print().

65  {
66  LogDebug("Conv4HitsReco") << qFromM_print(m);
67  return 0.;
68 }
#define LogDebug(id)
std::string qFromM_print(double m)
std::string Conv4HitsReco::qFromM_print ( double  m)

Definition at line 44 of file Conv4HitsReco.cc.

References _eta2, zMuMuMuonUserData::alpha, zMuMuMuonUserData::beta, TtSemiLepEvtBuilder_cfi::disc, CustomPhysics_cfi::gamma, visualization-live-secondInstance_cfg::m, pn, pNV, mathSSE::sqrt(), contentValuesCheck::ss, unitVn, unitVp, vNminusV, and vPminusN.

Referenced by qFromM().

44  {
45  std::stringstream ss;
46  TVector3 vPminusM = vPminusN - m * unitVn;
47  double m2 = m * m;
48  double nPM = unitVn * vPminusM;
49  double pPM = unitVp * vPminusM;
50  double NVPM = vNminusV * vPminusM;
51 
52  double alpha = (m * pn + pNV) * (m * pn + pNV) - _eta2 - m2;
53  double beta = m2 * pn * nPM + m * pn * NVPM + m * nPM * pNV - pPM * (_eta2 + m2) + pNV * NVPM;
54  double gamma = m2 * nPM * nPM + NVPM * NVPM + 2. * m * nPM * NVPM - vPminusM.Mag2() * (_eta2 + m2);
55 
56  double disc = sqrt(beta * beta - alpha * gamma);
57 
58  double q01 = (-beta + disc) / alpha;
59  double q02 = (-beta - disc) / alpha;
60 
61  ss << " m: " << m << " q01: " << std::setw(20) << q01 << " q02: " << std::setw(20) << q02 << "/n";
62  return ss.str();
63 }
TVector3 unitVp
Definition: Conv4HitsReco.h:28
TVector3 vNminusV
Definition: Conv4HitsReco.h:26
T sqrt(T t)
Definition: SSEVec.h:19
TVector3 vPminusN
Definition: Conv4HitsReco.h:24
alpha
zGenParticlesMatch = cms.InputTag(""),
TVector3 unitVn
Definition: Conv4HitsReco.h:27
void Conv4HitsReco::Set ( double  )

Referenced by SetPtPhotMaxCut().

void Conv4HitsReco::SetIterationStopRelThreshold ( double  val)
inline

Definition at line 77 of file Conv4HitsReco.h.

References heppy_batch::val.

Referenced by SetMaxVtxDistance().

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

Definition at line 18 of file Conv4HitsReco.cc.

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

Referenced by mqFindByIteration(), and SetPtPhotMaxCut().

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

Definition at line 78 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 73 of file Conv4HitsReco.h.

References heppy_batch::val.

Referenced by SetMaxVtxDistance().

73 { ptLegMaxCut = val; };
double ptLegMaxCut
Definition: Conv4HitsReco.h:56
void Conv4HitsReco::SetPtLegMinCut ( double  val)
inline

Definition at line 72 of file Conv4HitsReco.h.

References heppy_batch::val.

Referenced by SetMaxVtxDistance().

72 { ptLegMinCut = val; };
double ptLegMinCut
Definition: Conv4HitsReco.h:55
void Conv4HitsReco::SetPtPhotMaxCut ( double  val)
inline

Definition at line 74 of file Conv4HitsReco.h.

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

Referenced by SetMaxVtxDistance().

74 { ptPhotMaxCut = val; };
double ptPhotMaxCut
Definition: Conv4HitsReco.h:57

Member Data Documentation

double Conv4HitsReco::_eta
double Conv4HitsReco::_eta2

Definition at line 38 of file Conv4HitsReco.h.

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

double Conv4HitsReco::_pi
double Conv4HitsReco::_pi2

Definition at line 39 of file Conv4HitsReco.h.

Referenced by SetLinSystCoeff(), and SetMaxVtxDistance().

TVector3 Conv4HitsReco::convVtx

Definition at line 48 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 52 of file Conv4HitsReco.h.

Referenced by mqFindByIteration().

int Conv4HitsReco::maxNumberOfIterations

Definition at line 53 of file Conv4HitsReco.h.

Referenced by mqFindByIteration().

double Conv4HitsReco::maxVtxDistance

Definition at line 54 of file Conv4HitsReco.h.

Referenced by ConversionCandidate().

TVector3 Conv4HitsReco::minusCenter

Definition at line 47 of file Conv4HitsReco.h.

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

double Conv4HitsReco::minusRadius

Definition at line 50 of file Conv4HitsReco.h.

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

double Conv4HitsReco::mMaxLimit
double Conv4HitsReco::mMinLimit

Definition at line 45 of file Conv4HitsReco.h.

Referenced by ComputeMinLimits(), and ConversionCandidate().

double Conv4HitsReco::nNV

Definition at line 35 of file Conv4HitsReco.h.

Referenced by SetLinSystCoeff(), and SetMaxVtxDistance().

double Conv4HitsReco::nPN

Definition at line 31 of file Conv4HitsReco.h.

Referenced by SetLinSystCoeff(), and SetMaxVtxDistance().

double Conv4HitsReco::O0

Definition at line 64 of file Conv4HitsReco.h.

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

double Conv4HitsReco::Om

Definition at line 64 of file Conv4HitsReco.h.

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

double Conv4HitsReco::Oq

Definition at line 64 of file Conv4HitsReco.h.

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

TVector3 Conv4HitsReco::plusCenter

Definition at line 46 of file Conv4HitsReco.h.

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

double Conv4HitsReco::plusRadius

Definition at line 49 of file Conv4HitsReco.h.

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

double Conv4HitsReco::pn

Definition at line 29 of file Conv4HitsReco.h.

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

double Conv4HitsReco::PN

Definition at line 32 of file Conv4HitsReco.h.

Referenced by SetMaxVtxDistance().

double Conv4HitsReco::PN2

Definition at line 33 of file Conv4HitsReco.h.

Referenced by SetLinSystCoeff(), and SetMaxVtxDistance().

double Conv4HitsReco::pNV

Definition at line 34 of file Conv4HitsReco.h.

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

double Conv4HitsReco::pPN

Definition at line 30 of file Conv4HitsReco.h.

Referenced by SetLinSystCoeff(), and SetMaxVtxDistance().

double Conv4HitsReco::ptLegMaxCut

Definition at line 56 of file Conv4HitsReco.h.

Referenced by ComputeMinLimits(), and ConversionCandidate().

double Conv4HitsReco::ptLegMinCut

Definition at line 55 of file Conv4HitsReco.h.

Referenced by ComputeMaxLimits(), and ConversionCandidate().

double Conv4HitsReco::ptPhotMaxCut

Definition at line 57 of file Conv4HitsReco.h.

double Conv4HitsReco::qMaxLimit
double Conv4HitsReco::qMinLimit

Definition at line 44 of file Conv4HitsReco.h.

Referenced by ComputeMinLimits(), and ConversionCandidate().

double Conv4HitsReco::T0

Definition at line 63 of file Conv4HitsReco.h.

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

double Conv4HitsReco::Tm

Definition at line 63 of file Conv4HitsReco.h.

double Conv4HitsReco::Tq

Definition at line 63 of file Conv4HitsReco.h.

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

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

Definition at line 21 of file Conv4HitsReco.h.

Referenced by ComputeMinLimits(), and SetMaxVtxDistance().

TVector3 Conv4HitsReco::v3minus4

Definition at line 20 of file Conv4HitsReco.h.

Referenced by ComputeMinLimits(), and SetMaxVtxDistance().

TVector3 Conv4HitsReco::vMMaxLimit

Definition at line 40 of file Conv4HitsReco.h.

Referenced by ComputeMaxLimits(), and ComputeMinLimits().

TVector3 Conv4HitsReco::vN
TVector3 Conv4HitsReco::vNminusV

Definition at line 26 of file Conv4HitsReco.h.

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

TVector3 Conv4HitsReco::vP
TVector3 Conv4HitsReco::vPminusN

Definition at line 24 of file Conv4HitsReco.h.

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

TVector3 Conv4HitsReco::vPminusV

Definition at line 25 of file Conv4HitsReco.h.

Referenced by SetMaxVtxDistance().

TVector3 Conv4HitsReco::vQMaxLimit

Definition at line 41 of file Conv4HitsReco.h.

Referenced by ComputeMaxLimits(), and ComputeMinLimits().

TVector3 Conv4HitsReco::vV

Definition at line 13 of file Conv4HitsReco.h.

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