CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
MultiHitGeneratorFromChi2 Class Referencefinal

#include <MultiHitGeneratorFromChi2.h>

Inheritance diagram for MultiHitGeneratorFromChi2:
MultiHitGeneratorFromPairAndLayers

Public Member Functions

void hitSets (const TrackingRegion &region, OrderedMultiHits &result, const edm::EventSetup &es, const HitDoublets &doublets, const RecHitsSortedInPhi **thirdHitMap, const std::vector< const DetLayer * > &thirdLayerDetLayer, const int nThirdLayers, cacheHits &refittedHitStorage)
 
void hitSets (const TrackingRegion &region, OrderedMultiHits &trs, const edm::Event &ev, const edm::EventSetup &es, const HitDoublets &doublets, const std::vector< SeedingLayerSetsHits::SeedingLayer > &thirdLayers, LayerCacheType &layerCache, cacheHits &refittedHitStorage)
 
void hitSets (const TrackingRegion &region, OrderedMultiHits &trs, const edm::Event &ev, const edm::EventSetup &es, SeedingLayerSetsHits::SeedingLayerSet pairLayers, std::vector< SeedingLayerSetsHits::SeedingLayer > thirdLayers) override
 
void hitTriplets (const TrackingRegion &region, OrderedMultiHits &result, const edm::EventSetup &es, const HitDoublets &doublets, const RecHitsSortedInPhi **thirdHitMap, const std::vector< const DetLayer * > &thirdLayerDetLayer, const int nThirdLayers) override
 
void initES (const edm::EventSetup &es) override
 
 MultiHitGeneratorFromChi2 (const edm::ParameterSet &cfg)
 
 ~MultiHitGeneratorFromChi2 () override
 
- Public Member Functions inherited from MultiHitGeneratorFromPairAndLayers
void clear ()
 
void init (std::unique_ptr< HitPairGeneratorFromLayerPair > &&pairGenerator, LayerCacheType *layerCache)
 
 MultiHitGeneratorFromPairAndLayers (const edm::ParameterSet &pset)
 
const HitPairGeneratorFromLayerPairpairGenerator () const
 
virtual ~MultiHitGeneratorFromPairAndLayers ()
 

Static Public Member Functions

static void fillDescriptions (edm::ParameterSetDescription &desc)
 
static const char * fillDescriptionsLabel ()
 
- Static Public Member Functions inherited from MultiHitGeneratorFromPairAndLayers
static void fillDescriptions (edm::ParameterSetDescription &desc)
 

Private Types

using HitOwnPtr = mayown_ptr< BaseTrackerRecHit >
 
typedef CombinedMultiHitGenerator::LayerCacheType LayerCacheType
 

Private Member Functions

void refit2Hits (HitOwnPtr &hit0, HitOwnPtr &hit1, TrajectoryStateOnSurface &tsos0, TrajectoryStateOnSurface &tsos1, const TrackingRegion &region, float nomField, bool isDebug)
 

Private Attributes

const MagneticFieldbfield
 
TkTransientTrackingRecHitBuilder const * builder
 
std::string builderName_
 
std::vector< double > chi2_cuts
 
bool chi2VsPtCut
 
TkClonerImpl cloner
 
std::vector< int > detIdsToDebug
 
float dphi
 
float extraHitRPhitolerance
 
float extraHitRZtolerance
 
float extraPhiKDBox
 
float extraRKDBox
 
float extraZKDBox
 
const ClusterShapeHitFilterfilter
 
std::string filterName_
 
double fnSigmaRZ
 
double maxChi2
 
std::string mfName_
 
float nomField
 
double nSigmaPhi
 
double nSigmaRZ
 
std::vector< double > pt_interv
 
bool refitHits
 
UniformMagneticField ufield = 0.
 
bool useFixedPreFiltering
 
bool useSimpleMF_
 

Additional Inherited Members

- Public Types inherited from MultiHitGeneratorFromPairAndLayers
typedef LayerHitMapCache LayerCacheType
 
- Protected Types inherited from MultiHitGeneratorFromPairAndLayers
using cacheHitPointer = std::unique_ptr< BaseTrackerRecHit >
 
using cacheHits = std::vector< cacheHitPointer >
 
- Protected Attributes inherited from MultiHitGeneratorFromPairAndLayers
cacheHits cache
 
LayerCacheTypetheLayerCache
 
const unsigned int theMaxElement
 
std::unique_ptr< HitPairGeneratorFromLayerPairthePairGenerator
 

Detailed Description

Definition at line 29 of file MultiHitGeneratorFromChi2.h.

Member Typedef Documentation

◆ HitOwnPtr

Definition at line 76 of file MultiHitGeneratorFromChi2.h.

◆ LayerCacheType

Definition at line 30 of file MultiHitGeneratorFromChi2.h.

Constructor & Destructor Documentation

◆ MultiHitGeneratorFromChi2()

MultiHitGeneratorFromChi2::MultiHitGeneratorFromChi2 ( const edm::ParameterSet cfg)

Definition at line 54 of file MultiHitGeneratorFromChi2.cc.

56  useFixedPreFiltering(cfg.getParameter<bool>("useFixedPreFiltering")),
58  cfg.getParameter<double>("extraHitRZtolerance")), //extra window in ThirdHitRZPrediction range
59  extraHitRPhitolerance(cfg.getParameter<double>(
60  "extraHitRPhitolerance")), //extra window in ThirdHitPredictionFromCircle range (divide by R to get phi)
62  cfg.getParameter<double>("extraZKDBox")), //extra windown in Z when building the KDTree box (used in barrel)
64  cfg.getParameter<double>("extraRKDBox")), //extra windown in R when building the KDTree box (used in endcap)
65  extraPhiKDBox(cfg.getParameter<double>("extraPhiKDBox")), //extra windown in Phi when building the KDTree box
66  fnSigmaRZ(cfg.getParameter<double>(
67  "fnSigmaRZ")), //this multiplies the max hit error on the layer when building the KDTree box
68  chi2VsPtCut(cfg.getParameter<bool>("chi2VsPtCut")),
69  maxChi2(cfg.getParameter<double>("maxChi2")),
70  refitHits(cfg.getParameter<bool>("refitHits")),
71  filterName_(cfg.getParameter<std::string>("ClusterShapeHitFilterName")),
72  builderName_(cfg.existsAs<std::string>("TTRHBuilder") ? cfg.getParameter<std::string>("TTRHBuilder")
73  : std::string("WithTrackAngle")),
74  useSimpleMF_(false),
75  mfName_("") {
77  dphi = cfg.getParameter<double>("phiPreFiltering");
78  if (chi2VsPtCut) {
79  pt_interv = cfg.getParameter<std::vector<double> >("pt_interv");
80  chi2_cuts = cfg.getParameter<std::vector<double> >("chi2_cuts");
81  }
82 #ifdef EDM_ML_DEBUG
83  detIdsToDebug = cfg.getParameter<std::vector<int> >("detIdsToDebug");
84  //if (detIdsToDebug.size()<3) //fixme
85 #else
86  detIdsToDebug.push_back(0);
87  detIdsToDebug.push_back(0);
88  detIdsToDebug.push_back(0);
89 #endif
90  // 2014/02/11 mia:
91  // we should get rid of the boolean parameter useSimpleMF,
92  // and use only a string magneticField [instead of SimpleMagneticField]
93  // or better an edm::ESInputTag (at the moment HLT does not handle ESInputTag)
94  if (cfg.exists("SimpleMagneticField")) {
95  useSimpleMF_ = true;
96  mfName_ = cfg.getParameter<std::string>("SimpleMagneticField");
97  }
98  filter = nullptr;
99  bfield = nullptr;
100  nomField = -1.;
101 }

References bfield, looper::cfg, chi2_cuts, chi2VsPtCut, detIdsToDebug, dphi, filter, mfName_, nomField, pt_interv, AlCaHLTBitMon_QueryRunRegistry::string, useFixedPreFiltering, and useSimpleMF_.

◆ ~MultiHitGeneratorFromChi2()

MultiHitGeneratorFromChi2::~MultiHitGeneratorFromChi2 ( )
override

Definition at line 103 of file MultiHitGeneratorFromChi2.cc.

103 {}

Member Function Documentation

◆ fillDescriptions()

void MultiHitGeneratorFromChi2::fillDescriptions ( edm::ParameterSetDescription desc)
static

Definition at line 105 of file MultiHitGeneratorFromChi2.cc.

105  {
107 
108  // fixed phi filtering
109  desc.add<bool>("useFixedPreFiltering", false);
110  desc.add<double>("phiPreFiltering", 0.3);
111 
112  // box properties
113  desc.add<double>("extraHitRPhitolerance", 0);
114  desc.add<double>("extraHitRZtolerance", 0);
115  desc.add<double>("extraZKDBox", 0.2);
116  desc.add<double>("extraRKDBox", 0.2);
117  desc.add<double>("extraPhiKDBox", 0.005);
118  desc.add<double>("fnSigmaRZ", 2.0);
119 
120  // refit&filter hits
121  desc.add<bool>("refitHits", true);
122  desc.add<std::string>("ClusterShapeHitFilterName", "ClusterShapeHitFilter");
123  desc.add<std::string>("TTRHBuilder", "WithTrackAngle");
124 
125  // chi2 cuts
126  desc.add<double>("maxChi2", 5.0);
127  desc.add<bool>("chi2VsPtCut", true);
128  desc.add<std::vector<double> >("pt_interv", std::vector<double>{{0.4, 0.7, 1.0, 2.0}});
129  desc.add<std::vector<double> >("chi2_cuts", std::vector<double>{{3.0, 4.0, 5.0, 5.0}});
130 
131  // debugging
132  desc.add<std::vector<int> >("detIdsToDebug", std::vector<int>{{0, 0, 0}});
133 }

References edm::ParameterSetDescription::add(), MultiHitGeneratorFromPairAndLayers::fillDescriptions(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by MultiHitFromChi2EDProducer::fillDescriptions().

◆ fillDescriptionsLabel()

static const char* MultiHitGeneratorFromChi2::fillDescriptionsLabel ( )
inlinestatic

Definition at line 38 of file MultiHitGeneratorFromChi2.h.

38 { return "multiHitFromChi2"; }

Referenced by MultiHitFromChi2EDProducer::fillDescriptions().

◆ hitSets() [1/3]

void MultiHitGeneratorFromChi2::hitSets ( const TrackingRegion region,
OrderedMultiHits result,
const edm::EventSetup es,
const HitDoublets doublets,
const RecHitsSortedInPhi **  thirdHitMap,
const std::vector< const DetLayer * > &  thirdLayerDetLayer,
const int  nThirdLayers,
cacheHits refittedHitStorage 
)

Definition at line 219 of file MultiHitGeneratorFromChi2.cc.

226  {
227 #ifdef EDM_ML_DEBUG
228  unsigned int debug_Id0 = detIdsToDebug[0];
229  unsigned int debug_Id1 = detIdsToDebug[1];
230  unsigned int debug_Id2 = detIdsToDebug[2];
231 #endif
232 
233  std::array<bool, 3> bl;
234  bl[0] = doublets.innerLayer().isBarrel;
235  bl[1] = doublets.outerLayer().isBarrel;
236 
237  //gc: these are all the layers compatible with the layer pairs (as defined in the config file)
238 
239  //gc: initialize a KDTree per each 3rd layer
240  std::vector<KDTreeNodeInfo<RecHitsSortedInPhi::HitIter, 2> > layerTree; // re-used throughout
241  std::vector<RecHitsSortedInPhi::HitIter> foundNodes; // re-used thoughout
242  foundNodes.reserve(100);
244  declareDynArray(LayerRZPredictions, nThirdLayers, mapPred);
245  float rzError[nThirdLayers]; //save maximum errors
246 
247  const float maxDelphi = region.ptMin() < 0.3f ? float(M_PI) / 4.f : float(M_PI) / 8.f; // FIXME move to config??
248  const float maxphi = M_PI + maxDelphi, minphi = -maxphi; // increase to cater for any range
249  const float safePhi = M_PI - maxDelphi; // sideband
250 
251  //gc: loop over each layer
252  for (int il = 0; il < nThirdLayers; il++) {
253  LogTrace("MultiHitGeneratorFromChi2")
254  << "considering third layer: with hits: " << thirdHitMap[il]->all().second - thirdHitMap[il]->all().first;
255  const DetLayer* layer = thirdLayerDetLayer[il];
256  LayerRZPredictions& predRZ = mapPred[il];
257  predRZ.line.initLayer(layer);
258  predRZ.line.initTolerance(extraHitRZtolerance);
259 
260  //gc: now we take all hits in the layer and fill the KDTree
261  auto const& layer3 = *thirdHitMap[il]; // Get iterators
262  layerTree.clear();
263  float minz = 999999.0f, maxz = -minz; // Initialise to extreme values in case no hits
264  float maxErr = 0.0f;
265  if (!layer3.empty()) {
266  minz = layer3.v[0];
267  maxz = minz; //In case there's only one hit on the layer
268  for (auto i = 0U; i < layer3.size(); ++i) {
269  auto hi = layer3.theHits.begin() + i;
270  auto angle = layer3.phi(i);
271  auto myz = layer3.v[i];
272 #ifdef EDM_ML_DEBUG
273  IfLogTrace(hi->hit()->rawId() == debug_Id2, "MultiHitGeneratorFromChi2")
274  << "filling KDTree with hit in id=" << debug_Id2 << " with pos: " << hi->hit()->globalPosition()
275  << " phi=" << hi->hit()->globalPosition().phi() << " z=" << hi->hit()->globalPosition().z()
276  << " r=" << hi->hit()->globalPosition().perp();
277 #endif
278  //use (phi,r) for endcaps rather than (phi,z)
279  if (myz < minz) {
280  minz = myz;
281  } else {
282  if (myz > maxz) {
283  maxz = myz;
284  }
285  }
286  auto myerr = layer3.dv[i];
287  if (myerr > maxErr) {
288  maxErr = myerr;
289  }
290  layerTree.push_back(KDTreeNodeInfo<RecHitsSortedInPhi::HitIter, 2>(hi, angle, myz)); // save it
291  // populate side-bands
292  if (angle > safePhi)
293  layerTree.push_back(
295  else if (angle < -safePhi)
296  layerTree.push_back(
298  }
299  }
300  KDTreeBox phiZ(minphi, maxphi, minz - 0.01f, maxz + 0.01f); // declare our bounds
301  //add fudge factors in case only one hit and also for floating-point inaccuracy
302  hitTree[il].build(layerTree, phiZ); // make KDtree
303  rzError[il] = maxErr; //save error
304  }
305  //gc: now we have initialized the KDTrees and we are out of the layer loop
306 
307  //gc: this sets the minPt of the triplet
308  auto curv = PixelRecoUtilities::curvature(1. / region.ptMin(), es);
309 
310  LogTrace("MultiHitGeneratorFromChi2") << "doublet size=" << doublets.size() << std::endl;
311 
312  //fixme add pixels
313  auto filterHit = [&](TrackingRecHit const* hit, GlobalVector const& dir) -> bool {
314  auto hh = reinterpret_cast<BaseTrackerRecHit const*>(hit);
315  if ( //hh->geographicalId().subdetId() > 2
316  hh->geographicalId().subdetId() == SiStripDetId::TIB || hh->geographicalId().subdetId() == SiStripDetId::TID
317  //|| hh->geographicalId().subdetId()==SiStripDetId::TOB
318  //|| hh->geographicalId().subdetId()==SiStripDetId::TEC
319  ) {
320  // carefull " for matched and projected local of tsos != local for individual clusters...
321  if (hh->isMatched()) {
322  const SiStripMatchedRecHit2D* matchedHit = reinterpret_cast<const SiStripMatchedRecHit2D*>(hh);
323  if (filter->isCompatible(DetId(matchedHit->monoId()), matchedHit->monoCluster(), dir) == 0 ||
324  filter->isCompatible(DetId(matchedHit->stereoId()), matchedHit->stereoCluster(), dir) == 0)
325  return false;
326  } else if (hh->isProjected()) {
327  const ProjectedSiStripRecHit2D* precHit = reinterpret_cast<const ProjectedSiStripRecHit2D*>(hh);
328  if (filter->isCompatible(precHit->originalHit(), dir) == 0)
329  return false; //FIXME??
330  } else if (hh->isSingle()) {
331  const SiStripRecHit2D* recHit = reinterpret_cast<const SiStripRecHit2D*>(hh);
332  if (filter->isCompatible(*recHit, dir) == 0)
333  return false;
334  }
335  }
336  return true;
337  };
338 
339  //gc: now we loop over all pairs
340  for (std::size_t ip = 0; ip != doublets.size(); ip++) {
341  int foundTripletsFromPair = 0;
342  bool usePair = false;
343  cacheHitPointer bestH2;
345 
348 
349  HitOwnPtr hit0(*oriHit0);
350  HitOwnPtr hit1(*oriHit1);
353 
354 #ifdef EDM_ML_DEBUG
355  bool debugPair = oriHit0->rawId() == debug_Id0 && oriHit1->rawId() == debug_Id1;
356 #endif
357  IfLogTrace(debugPair, "MultiHitGeneratorFromChi2") << endl
358  << endl
359  << "found new pair with ids " << oriHit0->rawId() << " "
360  << oriHit1->rawId() << " with pos: " << gp0 << " " << gp1;
361 
362  if (refitHits) {
363  TrajectoryStateOnSurface tsos0, tsos1;
364  assert(!hit0.isOwn());
365  assert(!hit1.isOwn());
366 #ifdef EDM_ML_DEBUG
367  refit2Hits(hit0, hit1, tsos0, tsos1, region, nomField, debugPair);
368 #else
369  refit2Hits(hit0, hit1, tsos0, tsos1, region, nomField, false);
370 #endif
371 
372  bool passFilterHit0 = filterHit(hit0->hit(), tsos0.globalMomentum());
373  IfLogTrace(debugPair && !passFilterHit0, "MultiHitGeneratorFromChi2") << "hit0 did not pass cluster shape filter";
374  if (!passFilterHit0)
375  continue;
376  bool passFilterHit1 = filterHit(hit1->hit(), tsos1.globalMomentum());
377  IfLogTrace(debugPair && !passFilterHit1, "MultiHitGeneratorFromChi2") << "hit1 did not pass cluster shape filter";
378  if (!passFilterHit1)
379  continue;
380  // refit hits
381  hit0.reset((SeedingHitSet::RecHitPointer)(cloner(*hit0, tsos0)));
382  hit1.reset((SeedingHitSet::RecHitPointer)(cloner(*hit1, tsos1)));
383 
384 #ifdef EDM_ML_DEBUG
385  IfLogTrace(debugPair, "MultiHitGeneratorFromChi2")
386  << "charge=" << tsos0.charge() << std::endl
387  << "state1 pt=" << tsos0.globalMomentum().perp() << " eta=" << tsos0.globalMomentum().eta()
388  << " phi=" << tsos0.globalMomentum().phi() << std::endl
389  << "state2 pt=" << tsos1.globalMomentum().perp() << " eta=" << tsos1.globalMomentum().eta()
390  << " phi=" << tsos1.globalMomentum().phi() << std::endl
391  << "positions after refitting: " << hit0->globalPosition() << " " << hit1->globalPosition();
392 #endif
393  } else {
394  // not refit clone anyhow
395  hit0.reset((BaseTrackerRecHit*)hit0->clone());
396  hit1.reset((BaseTrackerRecHit*)hit1->clone());
397  }
398 
399  assert(hit0.isOwn());
400  assert(hit1.isOwn());
401 
402  //gc: create the RZ line for the pair
403  SimpleLineRZ line(PixelRecoPointRZ(gp0.perp(), gp0.z()), PixelRecoPointRZ(gp1.perp(), gp1.z()));
404  ThirdHitPredictionFromCircle predictionRPhi(gp0, gp1, extraHitRPhitolerance);
405 
406  auto toPos = std::signbit(gp1.z() - gp0.z());
407 
408  //gc: this is the curvature of the two hits assuming the region
409  Range pairCurvature = predictionRPhi.curvature(region.originRBound());
410  //gc: intersect not only returns a bool but may change pairCurvature to intersection with curv
411  if (!intersect(pairCurvature, Range(-curv, curv))) {
412  IfLogTrace(debugPair, "MultiHitGeneratorFromChi2")
413  << "curvature cut: curv=" << curv << " gc=(" << pairCurvature.first << ", " << pairCurvature.second << ")";
414  continue;
415  }
416 
417  std::array<GlobalPoint, 3> gp;
418  std::array<GlobalError, 3> ge;
419  gp[0] = hit0->globalPosition();
420  ge[0] = hit0->globalPositionError();
421  gp[1] = hit1->globalPosition();
422  ge[1] = hit1->globalPositionError();
423 
424  //gc: loop over all third layers compatible with the pair
425  for (int il = 0; (il < nThirdLayers) & (!usePair); il++) {
426  IfLogTrace(debugPair, "MultiHitGeneratorFromChi2")
427  << "cosider layer:"
428  << " for this pair. Location: " << thirdLayerDetLayer[il]->location();
429 
430  if (hitTree[il].empty()) {
431  IfLogTrace(debugPair, "MultiHitGeneratorFromChi2") << "empty hitTree";
432  continue; // Don't bother if no hits
433  }
434 
435  cacheHitPointer bestL2;
436  float chi2FromThisLayer = std::numeric_limits<float>::max();
437 
438  const DetLayer* layer = thirdLayerDetLayer[il];
439  // bool barrelLayer = layer->location() == GeomDetEnumerators::barrel;
440  auto const& layer3 = *thirdHitMap[il];
441  bool barrelLayer = layer3.isBarrel;
442  bl[2] = layer3.isBarrel;
443 
444  if ((!barrelLayer) & (toPos != std::signbit(layer->position().z())))
445  continue;
446 
447  LayerRZPredictions& predRZ = mapPred[il];
448  predRZ.line.initPropagator(&line);
449 
450  //gc: this takes the z at R-thick/2 and R+thick/2 according to
451  // the line from the two points and the adds the extra tolerance
452  Range rzRange = predRZ.line();
453 
454  if (rzRange.first >= rzRange.second) {
455  IfLogTrace(debugPair, "MultiHitGeneratorFromChi2") << "rzRange empty";
456  continue;
457  }
458  //gc: check that rzRange is compatible with detector bounds
459  // note that intersect may change rzRange to intersection with bounds
460  if (!intersect(rzRange, predRZ.line.detSize())) { // theDetSize = Range(-maxZ, maxZ);
461  IfLogTrace(debugPair, "MultiHitGeneratorFromChi2") << "rzRange and detector do not intersect";
462  continue;
463  }
464  Range radius = barrelLayer ? predRZ.line.detRange() : rzRange;
465 
466  //gc: define the phi range of the hits
467  Range phiRange;
468  if (useFixedPreFiltering) {
469  //gc: in this case it takes as range the phi of the outer
470  // hit +/- the phiPreFiltering value from cfg
471  float phi0 = oriHit0->globalPosition().phi();
472  phiRange = Range(phi0 - dphi, phi0 + dphi);
473  } else {
474  //gc: predictionRPhi uses the cosine rule to find the phi of the 3rd point at radius, assuming the pairCurvature range [-c,+c]
475  if (pairCurvature.first < 0. && pairCurvature.second < 0.) {
476  radius.swap();
477  } else if (pairCurvature.first >= 0. && pairCurvature.second >= 0.) {
478  ;
479  } else {
480  radius.first = radius.second;
481  }
482  auto phi12 = predictionRPhi.phi(pairCurvature.first, radius.first);
483  auto phi22 = predictionRPhi.phi(pairCurvature.second, radius.second);
484  phi12 = normalizedPhi(phi12);
485  phi22 = proxim(phi22, phi12);
486  phiRange = Range(phi12, phi22);
487  phiRange.sort();
488  }
489 
490  float prmin = phiRange.min(), prmax = phiRange.max();
491 
492  if (prmax - prmin > maxDelphi) {
493  auto prm = phiRange.mean();
494  prmin = prm - 0.5f * maxDelphi;
495  prmax = prm + 0.5f * maxDelphi;
496  }
497 
498  //gc: this is the place where hits in the compatible region are put in the foundNodes
500  foundNodes.clear(); // Now recover hits in bounding box...
501 
502  IfLogTrace(debugPair, "MultiHitGeneratorFromChi2") << "defining kd tree box";
503 
504  if (barrelLayer) {
505  KDTreeBox phiZ(prmin - extraPhiKDBox,
506  prmax + extraPhiKDBox,
507  float(rzRange.min() - fnSigmaRZ * rzError[il] - extraZKDBox),
508  float(rzRange.max() + fnSigmaRZ * rzError[il] + extraZKDBox));
509  hitTree[il].search(phiZ, foundNodes);
510 
511  IfLogTrace(debugPair, "MultiHitGeneratorFromChi2")
512  << "kd tree box bounds, phi: " << prmin - extraPhiKDBox << "," << prmax + extraPhiKDBox
513  << " z: " << rzRange.min() - fnSigmaRZ * rzError[il] - extraZKDBox << ","
514  << rzRange.max() + fnSigmaRZ * rzError[il] + extraZKDBox << " rzRange: " << rzRange.min() << ","
515  << rzRange.max();
516 
517  } else {
518  KDTreeBox phiR(prmin - extraPhiKDBox,
519  prmax + extraPhiKDBox,
520  float(rzRange.min() - fnSigmaRZ * rzError[il] - extraRKDBox),
521  float(rzRange.max() + fnSigmaRZ * rzError[il] + extraRKDBox));
522  hitTree[il].search(phiR, foundNodes);
523 
524  IfLogTrace(debugPair, "MultiHitGeneratorFromChi2")
525  << "kd tree box bounds, phi: " << prmin - extraPhiKDBox << "," << prmax + extraPhiKDBox
526  << " r: " << rzRange.min() - fnSigmaRZ * rzError[il] - extraRKDBox << ","
527  << rzRange.max() + fnSigmaRZ * rzError[il] + extraRKDBox << " rzRange: " << rzRange.min() << ","
528  << rzRange.max();
529  }
530 
531  IfLogTrace(debugPair, "MultiHitGeneratorFromChi2") << "kd tree box size: " << foundNodes.size();
532 
533  //gc: now we loop over the hits in the box for this layer
534  for (std::vector<RecHitsSortedInPhi::HitIter>::iterator ih = foundNodes.begin();
535  ih != foundNodes.end() && !usePair;
536  ++ih) {
537  IfLogTrace(debugPair, "MultiHitGeneratorFromChi2") << endl << "triplet candidate";
538 
539  const RecHitsSortedInPhi::HitIter KDdata = *ih;
540 
541  auto oriHit2 = KDdata->hit();
542  auto kk = KDdata - layer3.theHits.begin();
543  cacheHitPointer hit2;
544  auto gp2 = layer3.gp(kk);
545  if (refitHits) { //fixme
546 
547  //fitting all 3 hits takes too much time... do it quickly only for 3rd hit
548  GlobalVector initMomentum(gp2 - gp1);
549  initMomentum /= initMomentum.perp(); //set pT=1
550 
551  //fixme add pixels
552  bool passFilterHit2 = filterHit(oriHit2->hit(), initMomentum);
553  if (!passFilterHit2)
554  continue;
555  TrajectoryStateOnSurface state(GlobalTrajectoryParameters(gp2, initMomentum, 1, &ufield),
556  *oriHit2->surface());
557  hit2.reset((SeedingHitSet::RecHitPointer)(cloner(*oriHit2, state)));
558 
559  } else {
560  // not refit clone anyhow
561  hit2.reset((BaseTrackerRecHit*)oriHit2->clone());
562  }
563 
564  //gc: add the chi2 cut
565  gp[2] = hit2->globalPosition();
566  ge[2] = hit2->globalPositionError();
567  RZLine rzLine(gp, ge, bl);
568  float chi2 = rzLine.chi2();
569 
570 #ifdef EDM_ML_DEBUG
571  bool debugTriplet = debugPair && hit2->rawId() == debug_Id2;
572 #endif
573  IfLogTrace(debugTriplet, "MultiHitGeneratorFromChi2")
574  << endl
575  << "triplet candidate in debug id" << std::endl
576  << "hit in id=" << hit2->rawId() << " (from KDTree) with pos: " << KDdata->hit()->globalPosition()
577  << " refitted: " << hit2->globalPosition() << " chi2: " << chi2;
578  // should fix nan
579  if ((chi2 > maxChi2) | edm::isNotFinite(chi2))
580  continue;
581 
582  if (chi2VsPtCut) {
583  FastCircle theCircle(gp[2], gp[1], gp[0]);
584  float tesla0 = 0.1f * nomField;
585  float rho = theCircle.rho();
586  float cm2GeV = 0.01f * 0.3f * tesla0;
587  float pt = cm2GeV * rho;
588  IfLogTrace(debugTriplet, "MultiHitGeneratorFromChi2") << "triplet pT=" << pt;
589  if (pt < region.ptMin())
590  continue;
591 
592  if (chi2_cuts.size() == 4) {
593  if ((pt > pt_interv[0] && pt <= pt_interv[1] && chi2 > chi2_cuts[0]) ||
594  (pt > pt_interv[1] && pt <= pt_interv[2] && chi2 > chi2_cuts[1]) ||
595  (pt > pt_interv[2] && pt <= pt_interv[3] && chi2 > chi2_cuts[2]) ||
596  (pt > pt_interv[3] && chi2 > chi2_cuts[3]))
597  continue;
598  }
599 
600  // apparently this takes too much time...
601  // if (chi2_cuts.size()>1) {
602  // int ncuts = chi2_cuts.size();
603  // if ( pt<=pt_interv[0] && chi2 > chi2_cuts[0] ) continue;
604  // bool pass = true;
605  // for (int icut=1; icut<ncuts-1; icut++){
606  // if ( pt>pt_interv[icut-1] && pt<=pt_interv[icut] && chi2 > chi2_cuts[icut] ) pass=false;
607  // }
608  // if (!pass) continue;
609  // if ( pt>pt_interv[ncuts-2] && chi2 > chi2_cuts[ncuts-1] ) continue;
610  // if (hit0->rawId()==debug_Id0 && hit1->rawId()==debug_Id1 && hit2->rawId()==debug_Id2) {
611  // LogTrace("MultiHitGeneratorFromChi2") << "triplet passed chi2 vs pt cut" << std::endl;
612  // }
613  // }
614  }
615 
616  if (theMaxElement != 0 && result.size() >= theMaxElement) {
617  result.clear();
618  edm::LogError("TooManyTriplets") << " number of triples exceed maximum. no triplets produced.";
619  return;
620  }
621  IfLogTrace(debugPair, "MultiHitGeneratorFromChi2") << "triplet made";
622  //result.push_back(SeedingHitSet(hit0, hit1, hit2));
623  /* no refit so keep only hit2
624  assert(tripletFromThisLayer.empty());
625  assert(hit0.isOwn()); assert(hit1.isOwn());assert(hit2.isOwn());
626  tripletFromThisLayer.emplace_back(std::move(hit0));
627  tripletFromThisLayer.emplace_back(std::move(hit1));
628  tripletFromThisLayer.emplace_back(std::move(hit2));
629  assert(hit0.isEmpty()); assert(hit1.isEmpty());assert(hit2.isEmpty());
630  */
631  bestL2 = std::move(hit2);
632  chi2FromThisLayer = chi2;
633  foundTripletsFromPair++;
634  if (foundTripletsFromPair >= 2) {
635  usePair = true;
636  IfLogTrace(debugPair, "MultiHitGeneratorFromChi2") << "using pair";
637  break;
638  }
639  } //loop over hits in KDTree
640 
641  if (usePair)
642  break;
643  else {
644  //if there is one triplet in more than one layer, try picking the one with best chi2
645  if (chi2FromThisLayer < minChi2) {
646  bestH2 = std::move(bestL2);
647  minChi2 = chi2FromThisLayer;
648  }
649  /*
650  else {
651  if (!bestH2 && foundTripletsFromPair>0)
652  LogTrace("MultiHitGeneratorFromChi2") << "what?? " << minChi2 << ' ' << chi2FromThisLayer;
653  }
654  */
655  }
656 
657  } //loop over layers
658 
659  if (foundTripletsFromPair == 0)
660  continue;
661 
662  //push back only (max) once per pair
663  IfLogTrace(debugPair, "MultiHitGeneratorFromChi2") << "Done seed #" << result.size();
664  if (usePair)
665  result.push_back(SeedingHitSet(oriHit0, oriHit1));
666  else {
667  assert(1 == foundTripletsFromPair);
668  assert(bestH2);
669  result.emplace_back(&*hit0, &*hit1, &*bestH2);
670  assert(hit0.isOwn());
671  assert(hit1.isOwn());
672  refittedHitStorage.emplace_back(const_cast<BaseTrackerRecHit*>(hit0.release()));
673  refittedHitStorage.emplace_back(const_cast<BaseTrackerRecHit*>(hit1.release()));
674  refittedHitStorage.emplace_back(std::move(bestH2));
675  assert(hit0.empty());
676  assert(hit1.empty());
677  assert(!bestH2);
678  }
679  // LogTrace("MultiHitGeneratorFromChi2") << (usePair ? "pair " : "triplet ") << minChi2 <<' ' << refittedHitStorage.size();
680 
681  } //loop over pairs
682  LogTrace("MultiHitGeneratorFromChi2") << "triplet size=" << result.size();
683  // std::cout << "MultiHitGeneratorFromChi2 " << "triplet size=" << result.size() << std::endl;
684 }

References RecHitsSortedInPhi::all(), angle(), cms::cuda::assert(), TrajectoryStateOnSurface::charge(), hltPixelTracks_cff::chi2, RZLine::chi2(), chi2_cuts, chi2VsPtCut, cloner, ThirdHitPredictionFromCircle::curvature(), PixelRecoUtilities::curvature(), declareDynArray, detIdsToDebug, DeadROC_duringRun::dir, HLT_2018_cff::doublets, dphi, relativeConstraints::empty, mayown_ptr< T, N >::empty(), PV3DBase< T, PVType, FrameType >::eta(), extraHitRPhitolerance, extraHitRZtolerance, extraPhiKDBox, extraRKDBox, extraZKDBox, f, filter, dqmMemoryStats::float, fnSigmaRZ, TrajectoryStateOnSurface::globalMomentum(), runTauDisplay::gp, mps_fire::i, IfLogTrace, HitDoublets::inner, RecHitsSortedInPhi::isBarrel, ClusterShapeHitFilter::isCompatible(), edm::isNotFinite(), mayown_ptr< T, N >::isOwn(), GetRecoTauVFromDQM_MC_cff::kk, mps_splice::line, LogTrace, M_PI, SiStripPI::max, maxChi2, SiStripMatchedRecHit2D::monoCluster(), SiStripMatchedRecHit2D::monoId(), eostools::move(), nomField, normalizedPhi(), ProjectedSiStripRecHit2D::originalHit(), HitDoublets::outer, PV3DBase< T, PVType, FrameType >::perp(), ThirdHitPredictionFromCircle::phi(), PV3DBase< T, PVType, FrameType >::phi(), GeometricSearchDet::position(), proxim(), DiDispStaMuonMonitor_cfi::pt, pt_interv, CosmicsPD_Skims::radius, rpcPointValidation_cfi::recHit, refit2Hits(), refitHits, HLT_2018_cff::region, mayown_ptr< T, N >::release(), ProxyBase11< T >::reset(), mayown_ptr< T, N >::reset(), mps_fire::result, rho, FastCircle::rho(), SiStripMatchedRecHit2D::stereoCluster(), SiStripMatchedRecHit2D::stereoId(), MultiHitGeneratorFromPairAndLayers::theMaxElement, SiStripDetId::TIB, SiStripDetId::TID, Geom::twoPi(), mitigatedMETSequence_cff::U, ufield, useFixedPreFiltering, RecHitsSortedInPhi::v, and PV3DBase< T, PVType, FrameType >::z().

◆ hitSets() [2/3]

void MultiHitGeneratorFromChi2::hitSets ( const TrackingRegion region,
OrderedMultiHits trs,
const edm::Event ev,
const edm::EventSetup es,
const HitDoublets doublets,
const std::vector< SeedingLayerSetsHits::SeedingLayer > &  thirdLayers,
LayerCacheType layerCache,
cacheHits refittedHitStorage 
)

Definition at line 190 of file MultiHitGeneratorFromChi2.cc.

197  {
198  int size = thirdLayers.size();
199  const RecHitsSortedInPhi* thirdHitMap[size];
200  vector<const DetLayer*> thirdLayerDetLayer(size, nullptr);
201  for (int il = 0; il < size; ++il) {
202  thirdHitMap[il] = &layerCache(thirdLayers[il], region, es);
203 
204  thirdLayerDetLayer[il] = thirdLayers[il].detLayer();
205  }
206  hitSets(region, result, es, doublets, thirdHitMap, thirdLayerDetLayer, size, refittedHitStorage);
207 }

References HLT_2018_cff::doublets, hitSets(), HLT_2018_cff::region, mps_fire::result, and findQualityFiles::size.

◆ hitSets() [3/3]

void MultiHitGeneratorFromChi2::hitSets ( const TrackingRegion region,
OrderedMultiHits trs,
const edm::Event ev,
const edm::EventSetup es,
SeedingLayerSetsHits::SeedingLayerSet  pairLayers,
std::vector< SeedingLayerSetsHits::SeedingLayer thirdLayers 
)
overridevirtual

Implements MultiHitGeneratorFromPairAndLayers.

Definition at line 169 of file MultiHitGeneratorFromChi2.cc.

174  {
175  LogDebug("MultiHitGeneratorFromChi2") << "pair: " << thePairGenerator->innerLayer(pairLayers).name() << "+"
176  << thePairGenerator->outerLayer(pairLayers).name()
177  << " 3rd lay size: " << thirdLayers.size();
178 
179  auto const& doublets = thePairGenerator->doublets(region, ev, es, pairLayers);
180  LogTrace("MultiHitGeneratorFromChi2") << "";
181  if (doublets.empty()) {
182  // LogDebug("MultiHitGeneratorFromChi2") << "empy pairs";
183  return;
184  }
185 
187  hitSets(region, result, ev, es, doublets, thirdLayers, *theLayerCache, cache);
188 }

References cms::cuda::assert(), MultiHitGeneratorFromPairAndLayers::cache, HLT_2018_cff::doublets, ev, LogDebug, LogTrace, HLT_2018_cff::region, mps_fire::result, MultiHitGeneratorFromPairAndLayers::theLayerCache, and MultiHitGeneratorFromPairAndLayers::thePairGenerator.

Referenced by hitSets(), hitTriplets(), and MultiHitFromChi2EDProducer::produce().

◆ hitTriplets()

void MultiHitGeneratorFromChi2::hitTriplets ( const TrackingRegion region,
OrderedMultiHits result,
const edm::EventSetup es,
const HitDoublets doublets,
const RecHitsSortedInPhi **  thirdHitMap,
const std::vector< const DetLayer * > &  thirdLayerDetLayer,
const int  nThirdLayers 
)
overridevirtual

Implements MultiHitGeneratorFromPairAndLayers.

Definition at line 209 of file MultiHitGeneratorFromChi2.cc.

215  {
216  hitSets(region, result, es, doublets, thirdHitMap, thirdLayerDetLayer, nThirdLayers, cache);
217 }

References MultiHitGeneratorFromPairAndLayers::cache, HLT_2018_cff::doublets, hitSets(), HLT_2018_cff::region, and mps_fire::result.

◆ initES()

void MultiHitGeneratorFromChi2::initES ( const edm::EventSetup es)
overridevirtual

Implements MultiHitGeneratorFromPairAndLayers.

Definition at line 135 of file MultiHitGeneratorFromChi2.cc.

135  {
137  if (useSimpleMF_)
138  es.get<IdealMagneticFieldRecord>().get(mfName_, bfield_h);
139  else
140  es.get<IdealMagneticFieldRecord>().get(bfield_h);
141  bfield = bfield_h.product();
143  ufield.set(nomField); // more than enough (never actually used)
144 
145  if (refitHits) {
147  es.get<CkfComponentsRecord>().get(filterName_, filterHandle_);
148  filter = filterHandle_.product();
149 
151  es.get<TransientRecHitRecord>().get(builderName_, builderH);
152  builder = (TkTransientTrackingRecHitBuilder const*)(builderH.product());
153  cloner = (*builder).cloner();
154  }
155 }

References bfield, builder, builderName_, cloner, filter, filterName_, edm::EventSetup::get(), get, mfName_, nomField, MagneticField::nominalValue(), edm::ESHandle< T >::product(), refitHits, UniformMagneticField::set(), ufield, and useSimpleMF_.

Referenced by MultiHitFromChi2EDProducer::produce().

◆ refit2Hits()

void MultiHitGeneratorFromChi2::refit2Hits ( HitOwnPtr hit0,
HitOwnPtr hit1,
TrajectoryStateOnSurface tsos0,
TrajectoryStateOnSurface tsos1,
const TrackingRegion region,
float  nomField,
bool  isDebug 
)
private

Definition at line 686 of file MultiHitGeneratorFromChi2.cc.

692  {
693  //these need to be sorted in R
694  const GlobalPoint& gp0 = region.origin();
695  GlobalPoint gp1 = hit1->globalPosition();
696  GlobalPoint gp2 = hit2->globalPosition();
697 
698  IfLogTrace(isDebug, "MultiHitGeneratorFromChi2")
699  << "positions before refitting: " << hit1->globalPosition() << " " << hit2->globalPosition();
700 
701  FastCircle theCircle(gp2, gp1, gp0);
702  GlobalPoint cc(theCircle.x0(), theCircle.y0(), 0);
703  float tesla0 = 0.1f * nomField;
704  float rho = theCircle.rho();
705  float cm2GeV = 0.01f * 0.3f * tesla0;
706  float pt = cm2GeV * rho;
707 
708  GlobalVector vec20 = gp2 - gp0;
709  //if (isDebug) { cout << "vec20.eta=" << vec20.eta() << endl; }
710 
711  GlobalVector p0(gp0.y() - cc.y(), -gp0.x() + cc.x(), 0.);
712  p0 = p0 * pt / p0.perp();
713  GlobalVector p1(gp1.y() - cc.y(), -gp1.x() + cc.x(), 0.);
714  p1 = p1 * pt / p1.perp();
715  GlobalVector p2(gp2.y() - cc.y(), -gp2.x() + cc.x(), 0.);
716  p2 = p2 * pt / p2.perp();
717 
718  //check sign according to scalar product
719  if ((p0.x() * (gp1.x() - gp0.x()) + p0.y() * (gp1.y() - gp0.y())) < 0) {
720  p0 *= -1.;
721  p1 *= -1.;
722  p2 *= -1.;
723  }
724 
725  //now set z component
726  auto zv = vec20.z() / vec20.perp();
727  p0 = GlobalVector(p0.x(), p0.y(), p0.perp() * zv);
728  p1 = GlobalVector(p1.x(), p1.y(), p1.perp() * zv);
729  p2 = GlobalVector(p2.x(), p2.y(), p2.perp() * zv);
730 
731  //get charge from vectorial product
732  TrackCharge q = 1;
733  if ((gp1 - cc).x() * p1.y() - (gp1 - cc).y() * p1.x() > 0)
734  q = -q;
735 
736  TrajectoryStateOnSurface(GlobalTrajectoryParameters(gp1, p1, q, &ufield), *hit1->surface()).swap(state1);
737  // hit1.reset((SeedingHitSet::RecHitPointer)(cloner(*hit1,state1)));
738 
739  TrajectoryStateOnSurface(GlobalTrajectoryParameters(gp2, p2, q, &ufield), *hit2->surface()).swap(state2);
740  // hit2.reset((SeedingHitSet::RecHitPointer)(cloner(*hit2,state2)));
741 }

References IfLogTrace, nomField, p1, p2, PV3DBase< T, PVType, FrameType >::perp(), DiDispStaMuonMonitor_cfi::pt, data-class-funcs::q, HLT_2018_cff::region, rho, FastCircle::rho(), edm::swap(), ufield, PV3DBase< T, PVType, FrameType >::x(), FastCircle::x0(), y, PV3DBase< T, PVType, FrameType >::y(), FastCircle::y0(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by hitSets().

Member Data Documentation

◆ bfield

const MagneticField* MultiHitGeneratorFromChi2::bfield
private

Definition at line 106 of file MultiHitGeneratorFromChi2.h.

Referenced by initES(), and MultiHitGeneratorFromChi2().

◆ builder

TkTransientTrackingRecHitBuilder const* MultiHitGeneratorFromChi2::builder
private

Definition at line 96 of file MultiHitGeneratorFromChi2.h.

Referenced by initES().

◆ builderName_

std::string MultiHitGeneratorFromChi2::builderName_
private

Definition at line 116 of file MultiHitGeneratorFromChi2.h.

Referenced by initES().

◆ chi2_cuts

std::vector<double> MultiHitGeneratorFromChi2::chi2_cuts
private

Definition at line 113 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), and MultiHitGeneratorFromChi2().

◆ chi2VsPtCut

bool MultiHitGeneratorFromChi2::chi2VsPtCut
private

Definition at line 110 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), and MultiHitGeneratorFromChi2().

◆ cloner

TkClonerImpl MultiHitGeneratorFromChi2::cloner
private

Definition at line 97 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), and initES().

◆ detIdsToDebug

std::vector<int> MultiHitGeneratorFromChi2::detIdsToDebug
private

Definition at line 121 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), and MultiHitGeneratorFromChi2().

◆ dphi

float MultiHitGeneratorFromChi2::dphi
private

Definition at line 105 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), and MultiHitGeneratorFromChi2().

◆ extraHitRPhitolerance

float MultiHitGeneratorFromChi2::extraHitRPhitolerance
private

Definition at line 101 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets().

◆ extraHitRZtolerance

float MultiHitGeneratorFromChi2::extraHitRZtolerance
private

Definition at line 100 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets().

◆ extraPhiKDBox

float MultiHitGeneratorFromChi2::extraPhiKDBox
private

Definition at line 104 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets().

◆ extraRKDBox

float MultiHitGeneratorFromChi2::extraRKDBox
private

Definition at line 103 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets().

◆ extraZKDBox

float MultiHitGeneratorFromChi2::extraZKDBox
private

Definition at line 102 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets().

◆ filter

const ClusterShapeHitFilter* MultiHitGeneratorFromChi2::filter
private

Definition at line 95 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), initES(), and MultiHitGeneratorFromChi2().

◆ filterName_

std::string MultiHitGeneratorFromChi2::filterName_
private

Definition at line 115 of file MultiHitGeneratorFromChi2.h.

Referenced by initES().

◆ fnSigmaRZ

double MultiHitGeneratorFromChi2::fnSigmaRZ
private

Definition at line 109 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets().

◆ maxChi2

double MultiHitGeneratorFromChi2::maxChi2
private

Definition at line 111 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets().

◆ mfName_

std::string MultiHitGeneratorFromChi2::mfName_
private

Definition at line 119 of file MultiHitGeneratorFromChi2.h.

Referenced by initES(), and MultiHitGeneratorFromChi2().

◆ nomField

float MultiHitGeneratorFromChi2::nomField
private

◆ nSigmaPhi

double MultiHitGeneratorFromChi2::nSigmaPhi
private

Definition at line 109 of file MultiHitGeneratorFromChi2.h.

◆ nSigmaRZ

double MultiHitGeneratorFromChi2::nSigmaRZ
private

Definition at line 109 of file MultiHitGeneratorFromChi2.h.

◆ pt_interv

std::vector<double> MultiHitGeneratorFromChi2::pt_interv
private

Definition at line 112 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), and MultiHitGeneratorFromChi2().

◆ refitHits

bool MultiHitGeneratorFromChi2::refitHits
private

Definition at line 114 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), and initES().

◆ ufield

UniformMagneticField MultiHitGeneratorFromChi2::ufield = 0.
private

Definition at line 107 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), initES(), and refit2Hits().

◆ useFixedPreFiltering

bool MultiHitGeneratorFromChi2::useFixedPreFiltering
private

Definition at line 99 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), and MultiHitGeneratorFromChi2().

◆ useSimpleMF_

bool MultiHitGeneratorFromChi2::useSimpleMF_
private

Definition at line 118 of file MultiHitGeneratorFromChi2.h.

Referenced by initES(), and MultiHitGeneratorFromChi2().

Vector3DBase
Definition: Vector3DBase.h:8
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
MultiHitGeneratorFromChi2::mfName_
std::string mfName_
Definition: MultiHitGeneratorFromChi2.h:119
Hit
Definition: SiPixelLorentzAngle.h:57
MultiHitGeneratorFromPairAndLayers::theMaxElement
const unsigned int theMaxElement
Definition: MultiHitGeneratorFromPairAndLayers.h:63
SiStripMatchedRecHit2D::monoId
unsigned int monoId() const
Definition: SiStripMatchedRecHit2D.h:29
DDAxes::y
mps_fire.i
i
Definition: mps_fire.py:355
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
TrackCharge
int TrackCharge
Definition: TrackCharge.h:4
RecHitsSortedInPhi::all
Range all() const
Definition: RecHitsSortedInPhi.h:84
MultiHitGeneratorFromChi2::extraPhiKDBox
float extraPhiKDBox
Definition: MultiHitGeneratorFromChi2.h:104
SiStripMatchedRecHit2D::stereoCluster
SiStripCluster const & stereoCluster() const
Definition: SiStripMatchedRecHit2D.h:40
DetLayer
Definition: DetLayer.h:21
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
SeedingHitSet
Definition: SeedingHitSet.h:6
edm::isNotFinite
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9
HitDoublets::outer
Definition: RecHitsSortedInPhi.h:126
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
MultiHitGeneratorFromPairAndLayers::cacheHitPointer
std::unique_ptr< BaseTrackerRecHit > cacheHitPointer
Definition: MultiHitGeneratorFromPairAndLayers.h:57
edm::swap
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:117
SeedingHitSet::ConstRecHitPointer
BaseTrackerRecHit const * ConstRecHitPointer
Definition: SeedingHitSet.h:10
MultiHitGeneratorFromChi2::chi2VsPtCut
bool chi2VsPtCut
Definition: MultiHitGeneratorFromChi2.h:110
TransientRecHitRecord
Definition: TransientRecHitRecord.h:14
data-class-funcs.q
q
Definition: data-class-funcs.py:169
TrajectoryStateOnSurface::charge
TrackCharge charge() const
Definition: TrajectoryStateOnSurface.h:68
ProxyBase11::reset
void reset()
Definition: ProxyBase11.h:49
cms::cuda::assert
assert(be >=bs)
proxim
constexpr T proxim(T b, T a)
Definition: normalizedPhi.h:14
SiStripRecHit2D
Definition: SiStripRecHit2D.h:7
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
MultiHitGeneratorFromChi2::cloner
TkClonerImpl cloner
Definition: MultiHitGeneratorFromChi2.h:97
GeometricSearchDet::position
virtual const Surface::PositionType & position() const
Returns position of the surface.
Definition: GeometricSearchDet.h:31
PixelRecoUtilities::curvature
T curvature(T InversePt, const edm::EventSetup &iSetup)
Definition: PixelRecoUtilities.h:42
MultiHitGeneratorFromChi2::builderName_
std::string builderName_
Definition: MultiHitGeneratorFromChi2.h:116
MultiHitGeneratorFromChi2::detIdsToDebug
std::vector< int > detIdsToDebug
Definition: MultiHitGeneratorFromChi2.h:121
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
ProjectedSiStripRecHit2D
Definition: ProjectedSiStripRecHit2D.h:8
MultiHitGeneratorFromChi2::ufield
UniformMagneticField ufield
Definition: MultiHitGeneratorFromChi2.h:107
TkTransientTrackingRecHitBuilder
Definition: TkTransientTrackingRecHitBuilder.h:15
cc
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
DetId
Definition: DetId.h:17
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
HLT_2018_cff.doublets
doublets
Definition: HLT_2018_cff.py:8544
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
MultiHitGeneratorFromChi2::nomField
float nomField
Definition: MultiHitGeneratorFromChi2.h:108
CkfComponentsRecord
Definition: CkfComponentsRecord.h:22
BaseTrackerRecHit
Definition: BaseTrackerRecHit.h:15
MultiHitGeneratorFromPairAndLayers::MultiHitGeneratorFromPairAndLayers
MultiHitGeneratorFromPairAndLayers(const edm::ParameterSet &pset)
Definition: MultiHitGeneratorFromPairAndLayers.cc:6
edm::ESHandle< MagneticField >
p2
double p2[4]
Definition: TauolaWrapper.h:90
MagneticField::nominalValue
int nominalValue() const
The nominal field value for this map in kGauss.
Definition: MagneticField.h:49
normalizedPhi
constexpr T normalizedPhi(T phi)
Definition: normalizedPhi.h:8
KDTreeBox
Definition: KDTreeLinkerAlgo.h:14
declareDynArray
#define declareDynArray(T, n, x)
Definition: DynArray.h:91
ProjectedSiStripRecHit2D::originalHit
SiStripRecHit2D originalHit() const
Definition: ProjectedSiStripRecHit2D.h:56
ClusterShapeHitFilter::isCompatible
bool isCompatible(const SiPixelRecHit &recHit, const LocalVector &ldir, const SiPixelClusterShapeCache &clusterShapeCache, PixelData const *pd=nullptr) const
Definition: ClusterShapeHitFilter.cc:283
KDTreeLinkerAlgo
Definition: KDTreeLinkerAlgo.h:102
Geom::twoPi
constexpr double twoPi()
Definition: Pi.h:32
UniformMagneticField::set
void set(GlobalVector value)
Definition: UniformMagneticField.h:20
GetRecoTauVFromDQM_MC_cff.kk
kk
Definition: GetRecoTauVFromDQM_MC_cff.py:84
IfLogTrace
#define IfLogTrace(cond, cat)
Definition: MessageLogger.h:699
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
RecHitsSortedInPhi::Hit
BaseTrackerRecHit const * Hit
Definition: RecHitsSortedInPhi.h:19
Point3DBase< float, GlobalTag >
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
MultiHitGeneratorFromChi2::useSimpleMF_
bool useSimpleMF_
Definition: MultiHitGeneratorFromChi2.h:118
DDAxes::rho
MultiHitGeneratorFromChi2::pt_interv
std::vector< double > pt_interv
Definition: MultiHitGeneratorFromChi2.h:112
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MultiHitGeneratorFromChi2::filterName_
std::string filterName_
Definition: MultiHitGeneratorFromChi2.h:115
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
RecHitsSortedInPhi
Definition: RecHitsSortedInPhi.h:17
MultiHitGeneratorFromChi2::dphi
float dphi
Definition: MultiHitGeneratorFromChi2.h:105
SiStripMatchedRecHit2D::stereoId
unsigned int stereoId() const
Definition: SiStripMatchedRecHit2D.h:28
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::LogError
Definition: MessageLogger.h:183
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
RecHitsSortedInPhi::isBarrel
bool isBarrel
Definition: RecHitsSortedInPhi.h:98
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:50
MultiHitGeneratorFromChi2::maxChi2
double maxChi2
Definition: MultiHitGeneratorFromChi2.h:111
p1
double p1[4]
Definition: TauolaWrapper.h:89
MultiHitGeneratorFromChi2::extraZKDBox
float extraZKDBox
Definition: MultiHitGeneratorFromChi2.h:102
KDTreeNodeInfo
Definition: KDTreeLinkerAlgo.h:34
FastCircle
Definition: FastCircle.h:33
MultiHitGeneratorFromChi2::extraHitRPhitolerance
float extraHitRPhitolerance
Definition: MultiHitGeneratorFromChi2.h:101
get
#define get
MultiHitGeneratorFromChi2::filter
const ClusterShapeHitFilter * filter
Definition: MultiHitGeneratorFromChi2.h:95
PixelRecoPointRZ
Definition: PixelRecoPointRZ.h:6
looper.cfg
cfg
Definition: looper.py:297
TrackingRecHit
Definition: TrackingRecHit.h:21
SiStripDetId::TID
static constexpr auto TID
Definition: SiStripDetId.h:38
SimpleLineRZ
Definition: PixelRecoLineRZ.h:63
MultiHitGeneratorFromChi2::extraRKDBox
float extraRKDBox
Definition: MultiHitGeneratorFromChi2.h:103
hi
Definition: HiEvtPlaneList.h:38
RZLine
Definition: RZLine.h:12
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition: TrajectoryStateOnSurface.h:66
eostools.move
def move(src, dest)
Definition: eostools.py:511
MultiHitGeneratorFromChi2::hitSets
void hitSets(const TrackingRegion &region, OrderedMultiHits &trs, const edm::Event &ev, const edm::EventSetup &es, SeedingLayerSetsHits::SeedingLayerSet pairLayers, std::vector< SeedingLayerSetsHits::SeedingLayer > thirdLayers) override
Definition: MultiHitGeneratorFromChi2.cc:169
MultiHitGeneratorFromChi2::bfield
const MagneticField * bfield
Definition: MultiHitGeneratorFromChi2.h:106
Range
PixelRecoRange< float > Range
Definition: MultiHitGeneratorFromChi2.cc:46
SiStripMatchedRecHit2D
Definition: SiStripMatchedRecHit2D.h:8
SiStripMatchedRecHit2D::monoCluster
SiStripCluster const & monoCluster() const
Definition: SiStripMatchedRecHit2D.h:41
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
HitDoublets::inner
Definition: RecHitsSortedInPhi.h:126
CosmicsPD_Skims.radius
radius
Definition: CosmicsPD_Skims.py:135
HLT_2018_cff.region
region
Definition: HLT_2018_cff.py:81479
SiStripDetId::TIB
static constexpr auto TIB
Definition: SiStripDetId.h:37
angle
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
MultiHitGeneratorFromChi2::builder
TkTransientTrackingRecHitBuilder const * builder
Definition: MultiHitGeneratorFromChi2.h:96
MultiHitGeneratorFromChi2::HitOwnPtr
mayown_ptr< BaseTrackerRecHit > HitOwnPtr
Definition: MultiHitGeneratorFromChi2.h:76
minChi2
Definition: JetCombinatorics.h:265
MultiHitGeneratorFromChi2::chi2_cuts
std::vector< double > chi2_cuts
Definition: MultiHitGeneratorFromChi2.h:113
MultiHitGeneratorFromPairAndLayers::cache
cacheHits cache
Definition: MultiHitGeneratorFromPairAndLayers.h:59
MultiHitGeneratorFromChi2::refitHits
bool refitHits
Definition: MultiHitGeneratorFromChi2.h:114
mps_fire.result
result
Definition: mps_fire.py:303
RecHitsSortedInPhi::HitIter
std::vector< HitWithPhi >::const_iterator HitIter
Definition: RecHitsSortedInPhi.h:38
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
MultiHitGeneratorFromChi2::refit2Hits
void refit2Hits(HitOwnPtr &hit0, HitOwnPtr &hit1, TrajectoryStateOnSurface &tsos0, TrajectoryStateOnSurface &tsos1, const TrackingRegion &region, float nomField, bool isDebug)
Definition: MultiHitGeneratorFromChi2.cc:686
ThirdHitPredictionFromCircle
Definition: ThirdHitPredictionFromCircle.h:10
MultiHitGeneratorFromPairAndLayers::theLayerCache
LayerCacheType * theLayerCache
Definition: MultiHitGeneratorFromPairAndLayers.h:62
mps_splice.line
line
Definition: mps_splice.py:76
MultiHitGeneratorFromChi2::useFixedPreFiltering
bool useFixedPreFiltering
Definition: MultiHitGeneratorFromChi2.h:99
MultiHitGeneratorFromPairAndLayers::thePairGenerator
std::unique_ptr< HitPairGeneratorFromLayerPair > thePairGenerator
Definition: MultiHitGeneratorFromPairAndLayers.h:61
MultiHitGeneratorFromChi2::extraHitRZtolerance
float extraHitRZtolerance
Definition: MultiHitGeneratorFromChi2.h:100
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
MultiHitGeneratorFromPairAndLayers::fillDescriptions
static void fillDescriptions(edm::ParameterSetDescription &desc)
Definition: MultiHitGeneratorFromPairAndLayers.cc:11
hit
Definition: SiStripHitEffFromCalibTree.cc:88
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
MultiHitGeneratorFromChi2::fnSigmaRZ
double fnSigmaRZ
Definition: MultiHitGeneratorFromChi2.h:109
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
RecHitsSortedInPhi::v
std::vector< float > v
Definition: RecHitsSortedInPhi.h:107