CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 &   
)
Conv4HitsReco::~Conv4HitsReco ( )

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 Gflash::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)
const double Z[kNumberCalorimeter]
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, visualization-live-secondInstance_cfg::m, maxVtxDistance, minusCenter, minusRadius, mMaxLimit, mMinLimit, mqFindByIteration(), plusCenter, plusRadius, ptLegMaxCut, ptLegMinCut, lumiQueryAPI::q, qMaxLimit, qMinLimit, unitVn, unitVp, vN, and vP.

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.

292  {
293 
294  LogDebug("Conv4HitsReco")
295  << " ======================================= " << "\n"
296  << " Photon Vertex: "
297  << vV
298  << " Hit1: "
299  << hit1
300  << " Hit2: "
301  << hit2
302  << " Hit3: "
303  << hit3
304  << " Hit4: "
305  << hit4
306  << " N: "
307  << vN
308  << " P: "
309  << vP
310  << " P-N: "
311  << vPminusN
312  << " n: "
313  << unitVn
314  << " p: "
315  << unitVp
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().

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
128  << ">>>>>>>> Conversion vertex computed via Minus pair\n"
129  << vtxViaMinus;
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().

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

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(), and IsNotValidForPtLimit().

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

Definition at line 107 of file Conv4HitsReco.cc.

References _eta, and GetPtFromParamAndHitPair().

Referenced by ConversionCandidate().

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

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(), and ConversionCandidate().

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 &)
double ptmin
Definition: HydjetWrapper.h:85
int Conv4HitsReco::IsNotValidForVtxPosition ( double &  maxDist)

Definition at line 238 of file Conv4HitsReco.cc.

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

Referenced by ConversionCandidate().

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 GetDm(), GetDq(), 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)
int i
Definition: DBlmapReader.cc:9
double GetDm()
double GetDq()
int maxNumberOfIterations
Definition: Conv4HitsReco.h:54
void SetLinSystCoeff(double, double)
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, visualization-live-secondInstance_cfg::m, pn, pNV, mathSSE::sqrt(), contentValuesCheck::ss, 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:48
TVector3 vPminusN
Definition: Conv4HitsReco.h:25
TVector3 unitVn
Definition: Conv4HitsReco.h:28
void Conv4HitsReco::Set ( double  )
void Conv4HitsReco::SetIterationStopRelThreshold ( double  val)
inline

Definition at line 78 of file Conv4HitsReco.h.

References iterationStopRelThreshold.

double iterationStopRelThreshold
Definition: Conv4HitsReco.h:53
void Conv4HitsReco::SetLinSystCoeff ( double  m,
double  q 
)

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

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:48
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 maxNumberOfIterations.

79 {maxNumberOfIterations = val;};
int maxNumberOfIterations
Definition: Conv4HitsReco.h:54
void Conv4HitsReco::SetMaxVtxDistance ( int  val)
inline

Definition at line 80 of file Conv4HitsReco.h.

References maxVtxDistance.

80 {maxVtxDistance = val;};
double maxVtxDistance
Definition: Conv4HitsReco.h:55
void Conv4HitsReco::SetPtLegMaxCut ( double  val)
inline

Definition at line 74 of file Conv4HitsReco.h.

References ptLegMaxCut.

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

Definition at line 73 of file Conv4HitsReco.h.

References ptLegMinCut.

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

Definition at line 75 of file Conv4HitsReco.h.

References ptPhotMaxCut.

75 {ptPhotMaxCut = val;};
double ptPhotMaxCut
Definition: Conv4HitsReco.h:58

Member Data Documentation

double Conv4HitsReco::_eta

Definition at line 37 of file Conv4HitsReco.h.

Referenced by ComputeMaxLimits(), Dump(), GetPtMinusFromParam(), and IsNotValidForPtLimit().

double Conv4HitsReco::_eta2

Definition at line 39 of file Conv4HitsReco.h.

Referenced by qFromM_print(), and SetLinSystCoeff().

double Conv4HitsReco::_pi

Definition at line 38 of file Conv4HitsReco.h.

Referenced by ComputeMaxLimits(), Dump(), GetPtPlusFromParam(), and IsNotValidForPtLimit().

double Conv4HitsReco::_pi2

Definition at line 40 of file Conv4HitsReco.h.

Referenced by SetLinSystCoeff().

TVector3 Conv4HitsReco::convVtx

Definition at line 49 of file Conv4HitsReco.h.

Referenced by ConversionCandidate(), and IsNotValidForVtxPosition().

TVector3 Conv4HitsReco::hit1

Definition at line 18 of file Conv4HitsReco.h.

Referenced by ConversionCandidate(), Dump(), and IsNotValidForVtxPosition().

TVector3 Conv4HitsReco::hit2

Definition at line 17 of file Conv4HitsReco.h.

Referenced by ComputeMaxLimits(), Dump(), and IsNotValidForVtxPosition().

TVector3 Conv4HitsReco::hit3

Definition at line 16 of file Conv4HitsReco.h.

Referenced by ComputeMaxLimits(), Dump(), and IsNotValidForVtxPosition().

TVector3 Conv4HitsReco::hit4

Definition at line 15 of file Conv4HitsReco.h.

Referenced by ConversionCandidate(), Dump(), and IsNotValidForVtxPosition().

double Conv4HitsReco::iterationStopRelThreshold

Definition at line 53 of file Conv4HitsReco.h.

Referenced by mqFindByIteration(), and SetIterationStopRelThreshold().

int Conv4HitsReco::maxNumberOfIterations

Definition at line 54 of file Conv4HitsReco.h.

Referenced by mqFindByIteration(), and SetMaxNumberOfIterations().

double Conv4HitsReco::maxVtxDistance

Definition at line 55 of file Conv4HitsReco.h.

Referenced by ConversionCandidate(), and SetMaxVtxDistance().

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

double Conv4HitsReco::nPN

Definition at line 32 of file Conv4HitsReco.h.

Referenced by SetLinSystCoeff().

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(), and SetLinSystCoeff().

double Conv4HitsReco::PN

Definition at line 33 of file Conv4HitsReco.h.

double Conv4HitsReco::PN2

Definition at line 34 of file Conv4HitsReco.h.

Referenced by SetLinSystCoeff().

double Conv4HitsReco::pNV

Definition at line 35 of file Conv4HitsReco.h.

Referenced by qFromM_print(), and SetLinSystCoeff().

double Conv4HitsReco::pPN

Definition at line 31 of file Conv4HitsReco.h.

Referenced by SetLinSystCoeff().

double Conv4HitsReco::ptLegMaxCut

Definition at line 57 of file Conv4HitsReco.h.

Referenced by ComputeMinLimits(), ConversionCandidate(), and SetPtLegMaxCut().

double Conv4HitsReco::ptLegMinCut

Definition at line 56 of file Conv4HitsReco.h.

Referenced by ComputeMaxLimits(), ConversionCandidate(), and SetPtLegMinCut().

double Conv4HitsReco::ptPhotMaxCut

Definition at line 58 of file Conv4HitsReco.h.

Referenced by SetPtPhotMaxCut().

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

TVector3 Conv4HitsReco::v3minus4

Definition at line 21 of file Conv4HitsReco.h.

Referenced by ComputeMinLimits().

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(), and SetLinSystCoeff().

TVector3 Conv4HitsReco::vP
TVector3 Conv4HitsReco::vPminusN

Definition at line 25 of file Conv4HitsReco.h.

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

TVector3 Conv4HitsReco::vPminusV

Definition at line 26 of file Conv4HitsReco.h.

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(), and Dump().