CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
HitQuadrupletGeneratorFromLayerPairForPhotonConversion Class Reference

#include <HitQuadrupletGeneratorFromLayerPairForPhotonConversion.h>

Public Types

typedef SeedingLayerSetsHits::SeedingLayer Layer
 
typedef LayerHitMapCache LayerCacheType
 
typedef SeedingLayerSetsHits::SeedingLayerSet Layers
 

Public Member Functions

void bubbleSortVsR (int n, double *ax, double *ay, double *aey)
 
bool failCheckRZCompatibility (const RecHitsSortedInPhi::Hit &hit, const DetLayer &layer, const HitRZCompatibility *checkRZ, const TrackingRegion &region)
 
bool failCheckSegmentZCompatibility (double &rInn, double &zInnMin, double &zInnMax, double &rInt, double &zIntMin, double &zIntMax, double &rOut, double &zOutMin, double &zOutMax)
 
bool failCheckSlopeTest (const RecHitsSortedInPhi::Hit &ohit, const RecHitsSortedInPhi::Hit &nohit, const RecHitsSortedInPhi::Hit &ihit, const RecHitsSortedInPhi::Hit &nihit, const TrackingRegion &region)
 
double getEffectiveErrorOnZ (const RecHitsSortedInPhi::Hit &hit, const TrackingRegion &region)
 
double getSqrEffectiveErrorOnZ (const RecHitsSortedInPhi::Hit &hit, const TrackingRegion &region)
 
double getZAtR (double &rInn, double &zInn, double &r, double &rOut, double &zOut)
 
void hitPairs (const TrackingRegion &reg, OrderedHitPairs &prs, const Layers &layers, const edm::Event &ev, const edm::EventSetup &es)
 
 HitQuadrupletGeneratorFromLayerPairForPhotonConversion (unsigned int inner, unsigned int outer, LayerCacheType *layerCache, unsigned int max=0)
 
double verySimpleFit (int size, double *ax, double *ay, double *e2y, double &p0, double &e2p0, double &p1)
 
 ~HitQuadrupletGeneratorFromLayerPairForPhotonConversion ()
 

Private Attributes

std::stringstream * ss
 
const unsigned int theInnerLayer
 
LayerCacheTypetheLayerCache
 
const unsigned int theMaxElement
 
const unsigned int theOuterLayer
 

Detailed Description

Definition at line 13 of file HitQuadrupletGeneratorFromLayerPairForPhotonConversion.h.

Member Typedef Documentation

Constructor & Destructor Documentation

HitQuadrupletGeneratorFromLayerPairForPhotonConversion::HitQuadrupletGeneratorFromLayerPairForPhotonConversion ( unsigned int  inner,
unsigned int  outer,
LayerCacheType layerCache,
unsigned int  max = 0 
)
HitQuadrupletGeneratorFromLayerPairForPhotonConversion::~HitQuadrupletGeneratorFromLayerPairForPhotonConversion ( )
inline

Member Function Documentation

void HitQuadrupletGeneratorFromLayerPairForPhotonConversion::bubbleSortVsR ( int  n,
double *  ax,
double *  ay,
double *  aey 
)

Definition at line 371 of file HitQuadrupletGeneratorFromLayerPairForPhotonConversion.cc.

References mps_fire::i, and dqmiolumiharvest::j.

Referenced by failCheckSlopeTest(), and ~HitQuadrupletGeneratorFromLayerPairForPhotonConversion().

371  {
372  bool swapped = true;
373  int j = 0;
374  double tmpr, tmpz, tmpez;
375  while (swapped) {
376  swapped = false;
377  j++;
378  for (int i = 0; i < n - j; i++) {
379  if (ar[i] > ar[i + 1]) {
380  tmpr = ar[i];
381  ar[i] = ar[i + 1];
382  ar[i + 1] = tmpr;
383  tmpz = az[i];
384  az[i] = az[i + 1];
385  az[i + 1] = tmpz;
386  tmpez = aez[i];
387  aez[i] = aez[i + 1];
388  aez[i + 1] = tmpez;
389  swapped = true;
390  }
391  }
392  }
393 }
bool HitQuadrupletGeneratorFromLayerPairForPhotonConversion::failCheckRZCompatibility ( const RecHitsSortedInPhi::Hit hit,
const DetLayer layer,
const HitRZCompatibility checkRZ,
const TrackingRegion region 
)

Definition at line 215 of file HitQuadrupletGeneratorFromLayerPairForPhotonConversion.cc.

References Reference_intrackfit_cff::barrel, f, PixelRecoRange< T >::intersection(), DetLayer::location(), PixelRecoRange< T >::min(), nSigmaRZ, TrackingRegion::origin(), HitRZCompatibility::range(), sqr(), mathSSE::sqrt(), ss, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by hitPairs(), and ~HitQuadrupletGeneratorFromLayerPairForPhotonConversion().

218  {
219  if (!checkRZ) {
220 #ifdef mydebug_QSeed
221  (*ss) << "*******\nNo valid checkRZ\n*******" << std::endl;
222 #endif
223  return true;
224  }
225 
226  static const float nSigmaRZ = std::sqrt(12.f);
227  float r_reduced = std::sqrt(sqr(hit->globalPosition().x() - region.origin().x()) +
228  sqr(hit->globalPosition().y() - region.origin().y()));
229  Range allowed;
230  Range hitRZ;
231  if (layer.location() == barrel) {
232  allowed = checkRZ->range(r_reduced);
233  float zErr = nSigmaRZ * hit->errorGlobalZ();
234  hitRZ = Range(hit->globalPosition().z() - zErr, hit->globalPosition().z() + zErr);
235  } else {
236  allowed = checkRZ->range(hit->globalPosition().z());
237  float rErr = nSigmaRZ * hit->errorGlobalR();
238  hitRZ = Range(r_reduced - rErr, r_reduced + rErr);
239  }
240  Range crossRange = allowed.intersection(hitRZ);
241 
242 #ifdef mydebug_QSeed
243  (*ss) << "\n\t\t allowed Range " << allowed.min() << " \t, " << allowed.max() << "\n\t\t hitRz Range "
244  << hitRZ.min() << " \t, " << hitRZ.max() << "\n\t\t Cross Range " << crossRange.min() << " \t, "
245  << crossRange.max() << std::endl;
246  if (!crossRange.empty())
247  (*ss) << "\n\t\t !!!!ACCEPTED!!! \n\n";
248 #endif
249 
250  return crossRange.empty();
251 }
GlobalPoint const & origin() const
virtual Location location() const =0
Which part of the detector (barrel, endcap)
T y() const
Definition: PV3DBase.h:60
T min() const
virtual Range range(const float &rORz) const =0
T sqrt(T t)
Definition: SSEVec.h:19
double f[11][100]
PixelRecoRange< T > intersection(const PixelRecoRange< T > &r) const
T x() const
Definition: PV3DBase.h:59
bool HitQuadrupletGeneratorFromLayerPairForPhotonConversion::failCheckSegmentZCompatibility ( double &  rInn,
double &  zInnMin,
double &  zInnMax,
double &  rInt,
double &  zIntMin,
double &  zIntMax,
double &  rOut,
double &  zOutMin,
double &  zOutMax 
)

Definition at line 395 of file HitQuadrupletGeneratorFromLayerPairForPhotonConversion.cc.

References getZAtR().

Referenced by failCheckSlopeTest(), and ~HitQuadrupletGeneratorFromLayerPairForPhotonConversion().

403  {
404  //
405  // Check the compatibility in z of an INTermediate segment between an INNer segment and an OUTer segment;
406  // when true is returned zIntMin and zIntMax are replaced with allowed range values
407 
408  //Left side
409  double zLeft = getZAtR(rInn, zInnMin, rInt, rOut, zOutMin);
410  if (zIntMax < zLeft)
411  return true;
412  //Right side
413  double zRight = getZAtR(rInn, zInnMax, rInt, rOut, zOutMax);
414  if (zIntMin > zRight)
415  return true;
416  if (zIntMin < zLeft && zIntMax < zRight) {
417  zIntMax = zLeft;
418  return false;
419  }
420  if (zIntMin > zLeft && zIntMax > zRight) {
421  zIntMax = zRight;
422  return false;
423  }
424 
425  //Segment is fully contained
426  return false;
427 }
double getZAtR(double &rInn, double &zInn, double &r, double &rOut, double &zOut)
bool HitQuadrupletGeneratorFromLayerPairForPhotonConversion::failCheckSlopeTest ( const RecHitsSortedInPhi::Hit ohit,
const RecHitsSortedInPhi::Hit nohit,
const RecHitsSortedInPhi::Hit ihit,
const RecHitsSortedInPhi::Hit nihit,
const TrackingRegion region 
)

Definition at line 253 of file HitQuadrupletGeneratorFromLayerPairForPhotonConversion.cc.

References bubbleSortVsR(), failCheckSegmentZCompatibility(), getEffectiveErrorOnZ(), TrackingRegion::origin(), TrackingRegion::originZBound(), PV3DBase< T, PVType, FrameType >::perp(), alignCSCRings::r, z, and PV3DBase< T, PVType, FrameType >::z().

Referenced by hitPairs(), and ~HitQuadrupletGeneratorFromLayerPairForPhotonConversion().

257  {
258  double r[5], z[5], ez[5];
259  // double pr[2], pz[2], e2pz[2], mr[2], mz[2], e2mz[2];
260 
261  //
262  //Hits
263  r[0] = ohit->globalPosition().perp();
264  z[0] = ohit->globalPosition().z();
265  ez[0] = getEffectiveErrorOnZ(ohit, region);
266  //
267  r[1] = nohit->globalPosition().perp();
268  z[1] = nohit->globalPosition().z();
269  ez[1] = getEffectiveErrorOnZ(nohit, region);
270  //
271  r[2] = nihit->globalPosition().perp();
272  z[2] = nihit->globalPosition().z();
273  ez[2] = getEffectiveErrorOnZ(nihit, region);
274  //
275  r[3] = ihit->globalPosition().perp();
276  z[3] = ihit->globalPosition().z();
277  ez[3] = getEffectiveErrorOnZ(ihit, region);
278  //
279  //R (r) ordering of the 4 hit arrays
280  bubbleSortVsR(4, r, z, ez);
281  //
282  //Vertex
283  r[4] = region.origin().perp();
284  z[4] = region.origin().z();
285  double vError = region.originZBound();
286  if (vError > 15.)
287  vError = 1.;
288  ez[4] = 3. * vError;
289 
290  //
291  //Sequence of checks
292  //
293  //Inner segment == vertex
294  double rInn = r[4];
295  double zInnMin = z[4] - ez[4];
296  double zInnMax = z[4] + ez[4];
297  //
298  // Int == 2, Out == 3
299  double rOut = r[3];
300  double zOutMin = z[3] - ez[3];
301  double zOutMax = z[3] + ez[3];
302  double rInt = r[2];
303  double zIntMin = z[2] - ez[2];
304  double zIntMax = z[2] + ez[2];
305  if (failCheckSegmentZCompatibility(rInn, zInnMin, zInnMax, rInt, zIntMin, zIntMax, rOut, zOutMin, zOutMax))
306  return true;
307  //
308  // Int == 1, Out == 2 (with updated limits)
309  rOut = rInt;
310  zOutMin = zIntMin;
311  zOutMax = zIntMax;
312  rInt = r[1];
313  zIntMin = z[1] - ez[1];
314  zIntMax = z[1] + ez[1];
315  if (failCheckSegmentZCompatibility(rInn, zInnMin, zInnMax, rInt, zIntMin, zIntMax, rOut, zOutMin, zOutMax))
316  return true;
317  //
318  // Int == 0, Out == 1 (with updated limits)
319  rOut = rInt;
320  zOutMin = zIntMin;
321  zOutMax = zIntMax;
322  rInt = r[0];
323  zIntMin = z[0] - ez[0];
324  zIntMax = z[0] + ez[0];
325  if (failCheckSegmentZCompatibility(rInn, zInnMin, zInnMax, rInt, zIntMin, zIntMax, rOut, zOutMin, zOutMax))
326  return true;
327 
328  //
329  // Test is ok!!!
330  return false;
331 }
T perp() const
Definition: PV3DBase.h:69
GlobalPoint const & origin() const
T z() const
Definition: PV3DBase.h:61
bool failCheckSegmentZCompatibility(double &rInn, double &zInnMin, double &zInnMax, double &rInt, double &zIntMin, double &zIntMax, double &rOut, double &zOutMin, double &zOutMax)
float originZBound() const
bounds the particle vertex in the longitudinal plane
double getEffectiveErrorOnZ(const RecHitsSortedInPhi::Hit &hit, const TrackingRegion &region)
double HitQuadrupletGeneratorFromLayerPairForPhotonConversion::getEffectiveErrorOnZ ( const RecHitsSortedInPhi::Hit hit,
const TrackingRegion region 
)

Definition at line 350 of file HitQuadrupletGeneratorFromLayerPairForPhotonConversion.cc.

References TrackingRegion::origin(), PV3DBase< T, PVType, FrameType >::perp(), sqr(), mathSSE::sqrt(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by failCheckSlopeTest(), and ~HitQuadrupletGeneratorFromLayerPairForPhotonConversion().

351  {
352  //
353  //Fit-wise the effective error on Z is approximately the sum in quadrature of the error on Z
354  //and the error on R correctly projected by using hit-vertex direction
355  double sqrProjFactor =
356  sqr((hit->globalPosition().z() - region.origin().z()) / (hit->globalPosition().perp() - region.origin().perp()));
357  double effErr =
358  sqrt(hit->globalPositionError().czz() + sqrProjFactor * hit->globalPositionError().rerr(hit->globalPosition()));
359  if (effErr > 2.) {
360  effErr *= 1.8; //Single Side error is strip length * sqrt( 12.) = 3.46
361  //empirically found that the error on ss hits value it is already twice as large (two sigmas)!
362  //Multiply by sqrt(12.)/2.=1.73 to have effErr equal to the strip lenght (1.8 to allow for some margin)
363  //effErr*=2.5; //Used in some tests
364  } else {
365  effErr *= 2.; //Tight //Double side... allowing for 2 sigma variation
366  //effErr*=5.; //Loose //Double side... allowing for 2 sigma variation
367  }
368  return effErr;
369 }
T perp() const
Definition: PV3DBase.h:69
GlobalPoint const & origin() const
T sqrt(T t)
Definition: SSEVec.h:19
T z() const
Definition: PV3DBase.h:61
double HitQuadrupletGeneratorFromLayerPairForPhotonConversion::getSqrEffectiveErrorOnZ ( const RecHitsSortedInPhi::Hit hit,
const TrackingRegion region 
)

Definition at line 339 of file HitQuadrupletGeneratorFromLayerPairForPhotonConversion.cc.

References TrackingRegion::origin(), PV3DBase< T, PVType, FrameType >::perp(), sqr(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by ~HitQuadrupletGeneratorFromLayerPairForPhotonConversion().

340  {
341  //
342  //Fit-wise the effective error on Z is approximately the sum in quadrature of the error on Z
343  //and the error on R correctly projected by using hit-vertex direction
344 
345  double sqrProjFactor =
346  sqr((hit->globalPosition().z() - region.origin().z()) / (hit->globalPosition().perp() - region.origin().perp()));
347  return (hit->globalPositionError().czz() + sqrProjFactor * hit->globalPositionError().rerr(hit->globalPosition()));
348 }
T perp() const
Definition: PV3DBase.h:69
GlobalPoint const & origin() const
T z() const
Definition: PV3DBase.h:61
double HitQuadrupletGeneratorFromLayerPairForPhotonConversion::getZAtR ( double &  rInn,
double &  zInn,
double &  r,
double &  rOut,
double &  zOut 
)

Definition at line 429 of file HitQuadrupletGeneratorFromLayerPairForPhotonConversion.cc.

Referenced by failCheckSegmentZCompatibility(), and ~HitQuadrupletGeneratorFromLayerPairForPhotonConversion().

430  {
431  // z - zInn r - rInn r - rInn
432  // ----------- = ----------- ==> z = zInn + (zOut - zInn) * -----------
433  // zOut - zInn rOut - rInn rOut - rInn
434 
435  return zInn + (zOut - zInn) * (r - rInn) / (rOut - rInn);
436 }
void HitQuadrupletGeneratorFromLayerPairForPhotonConversion::hitPairs ( const TrackingRegion reg,
OrderedHitPairs prs,
const Layers layers,
const edm::Event ev,
const edm::EventSetup es 
)

Definition at line 42 of file HitQuadrupletGeneratorFromLayerPairForPhotonConversion.cc.

References RecHitsSortedInPhi::all(), PV3DBase< T, PVType, FrameType >::barePhi(), TrackingRegion::checkRZ(), gather_cfg::cout, reco::deltaPhi(), SeedingLayerSetsHits::SeedingLayer::detLayer(), RecHitsSortedInPhi::empty(), failCheckRZCompatibility(), failCheckSlopeTest(), RecHitsSortedInPhi::hits(), CommPDSkim_cfg::maxDeltaPhi, SeedingLayerSetsHits::SeedingLayer::name(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), HLT_2018_cff::region, OrderedHitPairs::size(), ss, theInnerLayer, theLayerCache, theMaxElement, theOuterLayer, and PV3DBase< T, PVType, FrameType >::z().

Referenced by ~HitQuadrupletGeneratorFromLayerPairForPhotonConversion().

46  {
47  ss->str("");
48 
49  typedef OrderedHitPair::InnerRecHit InnerHit;
50  typedef OrderedHitPair::OuterRecHit OuterHit;
52 
53  Layer innerLayerObj = layers[theInnerLayer];
54  Layer outerLayerObj = layers[theOuterLayer];
55 
56  size_t totCountP2 = 0, totCountP1 = 0, totCountM2 = 0, totCountM1 = 0, selCount = 0;
57 #ifdef mydebug_QSeed
58  (*ss) << "In " << innerLayerObj.name() << " Out " << theOuterLayer.name() << std::endl;
59 #endif
60 
61  /*get hit sorted in phi for each layer: NB: doesn't apply any region cut*/
62  const RecHitsSortedInPhi &innerHitsMap = theLayerCache(innerLayerObj, region, es);
63  if (innerHitsMap.empty())
64  return;
65 
66  const RecHitsSortedInPhi &outerHitsMap = theLayerCache(outerLayerObj, region, es);
67  if (outerHitsMap.empty())
68  return;
69  /*----------------*/
70 
71  /*This object will check the compatibility of the his in phi among the two layers. */
72  //InnerDeltaPhi deltaPhi(*innerLayerObj.detLayer(), region, es);
73 
74  vector<RecHitsSortedInPhi::Hit> innerHits;
75  // float outerPhimin, outerPhimax;
76  float innerPhimin, innerPhimax;
77  float maxDeltaPhi = 1.; //sguazz
78  //float maxDeltaPhi=1.;
79 
80  RecHitsSortedInPhi::Range outerHits = outerHitsMap.all();
81 
83  for (RecHitsSortedInPhi::HitIter oh = outerHits.first; oh != outerHits.second; ++oh) {
84  RecHitsSortedInPhi::Hit ohit = (*oh).hit();
85  GlobalPoint oPos = ohit->globalPosition();
86 
87  totCountP2++;
88  const HitRZCompatibility *checkRZ = region.checkRZ(outerLayerObj.detLayer(), ohit, es);
89  for (nextoh = oh + 1; nextoh != outerHits.second; ++nextoh) {
90  RecHitsSortedInPhi::Hit nohit = (*nextoh).hit();
91  GlobalPoint noPos = nohit->globalPosition();
92 
93 #ifdef mydebug_QSeed
94  (*ss) << "\toPos " << oPos << " r " << oPos.perp() << " phi " << oPos.phi() << " cotTheta "
95  << oPos.z() / oPos.perp() << std::endl;
96  (*ss) << "\tnoPos " << noPos << " r " << noPos.perp() << " phi " << noPos.phi() << " cotTheta "
97  << noPos.z() / noPos.perp() << std::endl;
98  (*ss) << "\tDeltaPhi " << reco::deltaPhi(noPos.barePhi(), oPos.barePhi()) << std::endl;
99 #endif
100 
101  if (fabs(reco::deltaPhi(noPos.barePhi(), oPos.barePhi())) > maxDeltaPhi)
102  break;
103 
104  totCountM2++;
105 
106  /*Check the compatibility of the ohit with the eta of the seeding track*/
107  if (failCheckRZCompatibility(nohit, *outerLayerObj.detLayer(), checkRZ, region))
108  continue;
109 
110  /*
111  //Do I need this? it uses a compatibility that probably I wouldn't
112  //Removing for the time being
113 
114  PixelRecoRange<float> phiRange = deltaPhi( oPos.perp(), oPos.phi(), oPos.z(), nSigmaPhi*(ohit->errorGlobalRPhi()));
115  if (phiRange.empty()) continue;
116  */
117 
118  /*Get only the inner hits compatible with the conversion region*/
119  innerPhimin = ohit->globalPosition().phi();
120  innerPhimax = nohit->globalPosition().phi();
121  // checkPhiRange(innerPhimin,innerPhimax);
122 
123  innerHits.clear();
124  innerHitsMap.hits(innerPhimin, innerPhimax, innerHits);
125 
126 #ifdef mydebug_QSeed
127  (*ss) << "\tiphimin, iphimax " << innerPhimin << " " << innerPhimax << std::endl;
128 #endif
129 
130  const HitRZCompatibility *checkRZb = region.checkRZ(innerLayerObj.detLayer(), ohit, es);
131  const HitRZCompatibility *checkRZc = region.checkRZ(innerLayerObj.detLayer(), nohit, es);
132 
133  /*Loop on inner hits*/
134  vector<RecHitsSortedInPhi::Hit>::const_iterator ieh = innerHits.end();
135  for (vector<RecHitsSortedInPhi::Hit>::const_iterator ih = innerHits.begin(); ih < ieh; ++ih) {
136  RecHitsSortedInPhi::Hit ihit = *ih;
137 
138 #ifdef mydebug_QSeed
139  GlobalPoint innPos = (*ih)->globalPosition();
140  (*ss) << "\toPos " << oPos << " r " << oPos.perp() << " phi " << oPos.phi() << " cotTheta "
141  << oPos.z() / oPos.perp() << std::endl;
142  (*ss) << "\tnoPos " << noPos << " r " << noPos.perp() << " phi " << noPos.phi() << " cotTheta "
143  << noPos.z() / noPos.perp() << std::endl;
144  (*ss) << "\tinnPos " << innPos << " r " << innPos.perp() << " phi " << innPos.phi() << " cotTheta "
145  << innPos.z() / innPos.perp() << std::endl;
146 #endif
147 
148  totCountP1++;
149 
150  /*Check the compatibility of the ihit with the two outer hits*/
151  if (failCheckRZCompatibility(ihit, *innerLayerObj.detLayer(), checkRZb, region) ||
152  failCheckRZCompatibility(ihit, *innerLayerObj.detLayer(), checkRZc, region))
153  continue;
154 
155  for (vector<RecHitsSortedInPhi::Hit>::const_iterator nextih = ih + 1; nextih != ieh; ++nextih) {
156  RecHitsSortedInPhi::Hit nihit = *nextih;
157 
158 #ifdef mydebug_QSeed
159  GlobalPoint ninnPos = (*nextih)->globalPosition();
160  (*ss) << "\toPos " << oPos << " r " << oPos.perp() << " phi " << oPos.phi() << " cotTheta "
161  << oPos.z() / oPos.perp() << std::endl;
162  (*ss) << "\tnoPos " << noPos << " r " << noPos.perp() << " phi " << noPos.phi() << " cotTheta "
163  << noPos.z() / noPos.perp() << std::endl;
164  (*ss) << "\tinnPos " << innPos << " r " << innPos.perp() << " phi " << innPos.phi() << " cotTheta "
165  << innPos.z() / innPos.perp() << std::endl;
166  (*ss) << "\tninnPos " << ninnPos << " r " << ninnPos.perp() << " phi " << ninnPos.phi() << " cotTheta "
167  << ninnPos.z() / ninnPos.perp() << std::endl;
168 #endif
169 
170  totCountM1++;
171 
172  /*Check the compatibility of the nihit with the two outer hits*/
173  if (failCheckRZCompatibility(nihit, *innerLayerObj.detLayer(), checkRZb, region) ||
174  failCheckRZCompatibility(nihit, *innerLayerObj.detLayer(), checkRZc, region))
175  continue;
176 
177  /*Sguazz modifica qui*/
178  if (failCheckSlopeTest(ohit, nohit, ihit, nihit, region))
179  continue;
180 
181  if (theMaxElement != 0 && result.size() >= theMaxElement) {
182  result.clear();
183  edm::LogError("TooManyQuads") << "number of Quad combinations exceed maximum, no quads produced";
184  delete checkRZ;
185  delete checkRZb;
186  delete checkRZc;
187 #ifdef mydebug_QSeed
188  (*ss) << "In " << innerLayerObj.name() << " Out " << outerLayerObj.name() << "\tP2 " << totCountP2
189  << "\tM2 " << totCountM2 << "\tP1 " << totCountP1 << "\tM1 " << totCountM1 << "\tsel " << selCount
190  << std::endl;
191  std::cout << (*ss).str();
192 #endif
193  return;
194  }
195  selCount++;
196  result.push_back(OrderedHitPair(ihit, ohit));
197  result.push_back(OrderedHitPair(nihit, nohit));
198  //#ifdef mydebug_QSeed
199  //(*ss) << "sizeOfresul " << result.size() << std::endl;
200  //#endif
201  }
202  }
203  delete checkRZb;
204  delete checkRZc;
205  }
206  delete checkRZ;
207  }
208 #ifdef mydebug_QSeed
209  (*ss) << "In " << innerLayerObj.name() << " Out " << outerLayerObj.name() << "\tP2 " << totCountP2 << "\tM2 "
210  << totCountM2 << "\tP1 " << totCountP1 << "\tM1 " << totCountM1 << "\tsel " << selCount << std::endl;
211  std::cout << (*ss).str();
212 #endif
213 }
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
std::vector< Hit > hits(float phiMin, float phiMax) const
T perp() const
Definition: PV3DBase.h:69
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
SeedingHitSet::ConstRecHitPointer InnerRecHit
Definition: OrderedHitPair.h:9
T barePhi() const
Definition: PV3DBase.h:65
std::vector< HitWithPhi >::const_iterator HitIter
std::pair< HitIter, HitIter > Range
T z() const
Definition: PV3DBase.h:61
bool failCheckSlopeTest(const RecHitsSortedInPhi::Hit &ohit, const RecHitsSortedInPhi::Hit &nohit, const RecHitsSortedInPhi::Hit &ihit, const RecHitsSortedInPhi::Hit &nihit, const TrackingRegion &region)
SeedingHitSet::ConstRecHitPointer Hit
BaseTrackerRecHit const * Hit
bool failCheckRZCompatibility(const RecHitsSortedInPhi::Hit &hit, const DetLayer &layer, const HitRZCompatibility *checkRZ, const TrackingRegion &region)
SeedingHitSet::ConstRecHitPointer OuterRecHit
Definition: OrderedHitPair.h:8
double HitQuadrupletGeneratorFromLayerPairForPhotonConversion::verySimpleFit ( int  size,
double *  ax,
double *  ay,
double *  e2y,
double &  p0,
double &  e2p0,
double &  p1 
)

Definition at line 333 of file HitQuadrupletGeneratorFromLayerPairForPhotonConversion.cc.

Referenced by ~HitQuadrupletGeneratorFromLayerPairForPhotonConversion().

334  {
335  //#include "verySimpleFit.icc"
336  return 0;
337 }

Member Data Documentation

std::stringstream* HitQuadrupletGeneratorFromLayerPairForPhotonConversion::ss
private
const unsigned int HitQuadrupletGeneratorFromLayerPairForPhotonConversion::theInnerLayer
private

Definition at line 61 of file HitQuadrupletGeneratorFromLayerPairForPhotonConversion.h.

Referenced by hitPairs().

LayerCacheType& HitQuadrupletGeneratorFromLayerPairForPhotonConversion::theLayerCache
private

Definition at line 59 of file HitQuadrupletGeneratorFromLayerPairForPhotonConversion.h.

Referenced by hitPairs().

const unsigned int HitQuadrupletGeneratorFromLayerPairForPhotonConversion::theMaxElement
private

Definition at line 62 of file HitQuadrupletGeneratorFromLayerPairForPhotonConversion.h.

Referenced by hitPairs().

const unsigned int HitQuadrupletGeneratorFromLayerPairForPhotonConversion::theOuterLayer
private

Definition at line 60 of file HitQuadrupletGeneratorFromLayerPairForPhotonConversion.h.

Referenced by hitPairs().