CMS 3D CMS Logo

TrajSeedMatcher.cc
Go to the documentation of this file.
2 
7 
11 
14 
17 
19 
20 constexpr float TrajSeedMatcher::kElectronMass_;
21 
22 namespace {
23  auto makeMatchingCuts(std::vector<edm::ParameterSet> const& cutsPSets) {
24  std::vector<std::unique_ptr<TrajSeedMatcher::MatchingCuts> > matchingCuts;
25 
26  for (const auto& cutPSet : cutsPSets) {
27  int version = cutPSet.getParameter<int>("version");
28  switch (version) {
29  case 1:
30  matchingCuts.emplace_back(std::make_unique<TrajSeedMatcher::MatchingCutsV1>(cutPSet));
31  break;
32  case 2:
33  matchingCuts.emplace_back(std::make_unique<TrajSeedMatcher::MatchingCutsV2>(cutPSet));
34  break;
35  default:
36  throw cms::Exception("InvalidConfig") << " Error TrajSeedMatcher::TrajSeedMatcher pixel match cuts version "
37  << version << " not recognised" << std::endl;
38  }
39  }
40 
41  return matchingCuts;
42  }
43 
44  TrajSeedMatcher::SCHitMatch makeSCHitMatch(const GlobalPoint& vtxPos,
45  const TrajectoryStateOnSurface& trajState,
46  const TrackingRecHit& hit,
47  float et,
48  float eta,
49  float phi,
50  int charge,
51  int nrClus) {
52  EleRelPointPair pointPair(hit.globalPosition(), trajState.globalParameters().position(), vtxPos);
53  float dRZ = hit.geographicalId().subdetId() == PixelSubdetector::PixelBarrel ? pointPair.dZ() : pointPair.dPerp();
54  return {hit.geographicalId(), hit.globalPosition(), dRZ, pointPair.dPhi(), hit, et, eta, phi, charge, nrClus};
55  }
56 }; // namespace
57 
59  : magFieldToken{cc.esConsumes<MagneticField, IdealMagneticFieldRecord>()},
60  paramMagFieldToken{
61  cc.esConsumes<MagneticField, IdealMagneticFieldRecord>(pset.getParameter<edm::ESInputTag>("paramMagField"))},
62  navSchoolToken{
63  cc.esConsumes<NavigationSchool, NavigationSchoolRecord>(pset.getParameter<edm::ESInputTag>("navSchool"))},
64  detLayerGeomToken{
65  cc.esConsumes<DetLayerGeometry, RecoGeometryRecord>(pset.getParameter<edm::ESInputTag>("detLayerGeom"))},
66  useRecoVertex{pset.getParameter<bool>("useRecoVertex")},
67  enableHitSkipping{pset.getParameter<bool>("enableHitSkipping")},
68  requireExactMatchCount{pset.getParameter<bool>("requireExactMatchCount")},
69  useParamMagFieldIfDefined{pset.getParameter<bool>("useParamMagFieldIfDefined")},
70  minNrHits{pset.getParameter<std::vector<unsigned int> >("minNrHits")},
71  minNrHitsValidLayerBins{pset.getParameter<std::vector<int> >("minNrHitsValidLayerBins")},
72  matchingCuts{makeMatchingCuts(pset.getParameter<std::vector<edm::ParameterSet> >("matchingCuts"))} {
73  if (minNrHitsValidLayerBins.size() + 1 != minNrHits.size()) {
74  throw cms::Exception("InvalidConfig")
75  << " TrajSeedMatcher::TrajSeedMatcher minNrHitsValidLayerBins should be 1 less than minNrHits when its "
76  << minNrHitsValidLayerBins.size() << " vs " << minNrHits.size();
77  }
78 }
79 
81  edm::EventSetup const& iSetup,
83  : cfg_{cfg},
84  magField_{iSetup.getData(cfg_.magFieldToken)},
85  magFieldParam_{iSetup.getData(cfg_.paramMagFieldToken)},
86  measTkEvt_{measTkEvt},
87  navSchool_{iSetup.getData(cfg_.navSchoolToken)},
88  detLayerGeom_{iSetup.getData(cfg_.detLayerGeomToken)},
89  forwardPropagator_(alongMomentum, kElectronMass_, &magField_),
90  backwardPropagator_(oppositeToMomentum, kElectronMass_, &magField_) {}
91 
94  desc.add<bool>("useRecoVertex", false);
95  desc.add<bool>("enableHitSkipping", false);
96  desc.add<bool>("requireExactMatchCount", true);
97  desc.add<bool>("useParamMagFieldIfDefined", true);
98  desc.add<edm::ESInputTag>("paramMagField", edm::ESInputTag{"", "ParabolicMf"});
99  desc.add<edm::ESInputTag>("navSchool", edm::ESInputTag{"", "SimpleNavigationSchool"});
100  desc.add<edm::ESInputTag>("detLayerGeom", edm::ESInputTag{"", "hltESPGlobalDetLayerGeometry"});
101  desc.add<std::vector<int> >("minNrHitsValidLayerBins", {4});
102  desc.add<std::vector<unsigned int> >("minNrHits", {2, 3});
103 
105  auto cutDescCases = 1 >> (edm::ParameterDescription<double>("dPhiMax", 0.04, true) and
106  edm::ParameterDescription<double>("dRZMax", 0.09, true) and
107  edm::ParameterDescription<double>("dRZMaxLowEtThres", 20., true) and
108  edm::ParameterDescription<std::vector<double> >("dRZMaxLowEtEtaBins", {1., 1.5}, true) and
109  edm::ParameterDescription<std::vector<double> >("dRZMaxLowEt", {0.09, 0.15, 0.09}, true)) or
110  2 >> (edm::ParameterDescription<std::vector<double> >("dPhiMaxHighEt", {0.003}, true) and
111  edm::ParameterDescription<std::vector<double> >("dPhiMaxHighEtThres", {0.0}, true) and
112  edm::ParameterDescription<std::vector<double> >("dPhiMaxLowEtGrad", {0.0}, true) and
113  edm::ParameterDescription<std::vector<double> >("dRZMaxHighEt", {0.005}, true) and
114  edm::ParameterDescription<std::vector<double> >("dRZMaxHighEtThres", {30}, true) and
115  edm::ParameterDescription<std::vector<double> >("dRZMaxLowEtGrad", {-0.002}, true) and
116  edm::ParameterDescription<std::vector<double> >("etaBins", {}, true));
117  cutsDesc.ifValue(edm::ParameterDescription<int>("version", 1, true), std::move(cutDescCases));
118 
120  defaults.addParameter<double>("dPhiMax", 0.04);
121  defaults.addParameter<double>("dRZMax", 0.09);
122  defaults.addParameter<double>("dRZMaxLowEtThres", 0.09);
123  defaults.addParameter<std::vector<double> >("dRZMaxLowEtEtaBins", std::vector<double>{1., 1.5});
124  defaults.addParameter<std::vector<double> >("dRZMaxLowEt", std::vector<double>{0.09, 0.09, 0.09});
125  defaults.addParameter<int>("version", 1);
126  desc.addVPSet("matchingCuts", cutsDesc, std::vector<edm::ParameterSet>{defaults, defaults, defaults});
127  return desc;
128 }
129 
130 std::vector<TrajSeedMatcher::SeedWithInfo> TrajSeedMatcher::operator()(const TrajectorySeedCollection& seeds,
131  const GlobalPoint& candPos,
132  const GlobalPoint& vprim,
133  const float energy) {
134  clearCache();
135 
136  std::vector<SeedWithInfo> matchedSeeds;
137 
138  //these are super expensive functions
139  TrajectoryStateOnSurface scTrajStateOnSurfNeg = makeTrajStateOnSurface(candPos, vprim, energy, -1);
140  TrajectoryStateOnSurface scTrajStateOnSurfPos = makeTrajStateOnSurface(candPos, vprim, energy, 1);
141 
142  for (const auto& seed : seeds) {
143  std::vector<SCHitMatch> matchedHitsNeg = processSeed(seed, candPos, vprim, energy, scTrajStateOnSurfNeg);
144  std::vector<SCHitMatch> matchedHitsPos = processSeed(seed, candPos, vprim, energy, scTrajStateOnSurfPos);
145 
146  int nrValidLayersPos = 0;
147  int nrValidLayersNeg = 0;
148  if (matchedHitsNeg.size() >= 2) {
149  nrValidLayersNeg = getNrValidLayersAlongTraj(matchedHitsNeg[0], matchedHitsNeg[1], candPos, vprim, energy, -1);
150  }
151  if (matchedHitsPos.size() >= 2) {
152  nrValidLayersPos = getNrValidLayersAlongTraj(matchedHitsPos[0], matchedHitsPos[1], candPos, vprim, energy, +1);
153  }
154 
155  int nrValidLayers = std::max(nrValidLayersNeg, nrValidLayersPos);
156  size_t nrHitsRequired = getNrHitsRequired(nrValidLayers);
157  bool matchCountPasses;
159  // If the input seed collection is not cross-cleaned, an exact match is necessary to
160  // prevent redundant seeds.
161  matchCountPasses = matchedHitsNeg.size() == nrHitsRequired || matchedHitsPos.size() == nrHitsRequired;
162  } else {
163  matchCountPasses = matchedHitsNeg.size() >= nrHitsRequired || matchedHitsPos.size() >= nrHitsRequired;
164  }
165  if (matchCountPasses) {
166  matchedSeeds.push_back({seed, matchedHitsPos, matchedHitsNeg, nrValidLayers});
167  }
168  }
169  return matchedSeeds;
170 }
171 
172 std::vector<TrajSeedMatcher::SCHitMatch> TrajSeedMatcher::processSeed(const TrajectorySeed& seed,
173  const GlobalPoint& candPos,
174  const GlobalPoint& vprim,
175  const float energy,
176  const TrajectoryStateOnSurface& initialTrajState) {
177  //next try passing these variables in once...
178  const float candEta = candPos.eta();
179  const float candEt = energy * std::sin(candPos.theta());
180  const int charge = initialTrajState.charge();
181 
182  std::vector<SCHitMatch> matchedHits;
183  FreeTrajectoryState firstMatchFreeTraj;
184  GlobalPoint prevHitPos;
186  for (size_t hitNr = 0; hitNr < cfg_.matchingCuts.size() && hitNr < seed.nHits(); hitNr++) {
187  if (!cfg_.enableHitSkipping && hitNr > 0 && matchedHits.empty()) {
188  break;
189  }
190 
191  auto const& recHit = *(seed.recHits().first + hitNr);
192 
193  if (!recHit.isValid()) {
194  continue;
195  }
196 
197  const bool doFirstMatch = matchedHits.empty();
198 
199  auto const& trajState = doFirstMatch
200  ? getTrajStateFromVtx(recHit, initialTrajState, backwardPropagator_)
201  : getTrajStateFromPoint(recHit, firstMatchFreeTraj, prevHitPos, forwardPropagator_);
202  if (!trajState.isValid()) {
203  continue;
204  }
205 
206  auto const& vtxForMatchObject = doFirstMatch ? vprim : vertex;
207  auto match = makeSCHitMatch(vtxForMatchObject, trajState, recHit, candEt, candEta, candPos.phi(), charge, 1);
208 
209  if (passesMatchSel(match, matchedHits.size())) {
210  matchedHits.push_back(match);
211  if (doFirstMatch) {
212  //now we can figure out the z vertex
213  double zVertex = cfg_.useRecoVertex ? vprim.z() : getZVtxFromExtrapolation(vprim, match.hitPos, candPos);
214  vertex = GlobalPoint(vprim.x(), vprim.y(), zVertex);
215  firstMatchFreeTraj =
217  }
218  prevHitPos = match.hitPos;
219  }
220  }
221  return matchedHits;
222 }
223 
224 // compute the z vertex from the candidate position and the found pixel hit
226  const GlobalPoint& hitPos,
227  const GlobalPoint& candPos) {
228  auto sq = [](float x) { return x * x; };
229  auto calRDiff = [sq](const GlobalPoint& p1, const GlobalPoint& p2) {
230  return std::sqrt(sq(p2.x() - p1.x()) + sq(p2.y() - p1.y()));
231  };
232  const double r1Diff = calRDiff(primeVtxPos, hitPos);
233  const double r2Diff = calRDiff(hitPos, candPos);
234  return hitPos.z() - r1Diff * (candPos.z() - hitPos.z()) / r2Diff;
235 }
236 
238  const TrajectoryStateOnSurface& initialState,
240  auto& trajStateFromVtxCache =
242 
243  auto key = hit.det()->gdetIndex();
244  auto res = trajStateFromVtxCache.find(key);
245  if (res != trajStateFromVtxCache.end())
246  return res->second;
247  else { //doesnt exist, need to make it
248  //FIXME: check for efficiency
249  auto val = trajStateFromVtxCache.emplace(key, propagator.propagate(initialState, hit.det()->surface()));
250  return val.first->second;
251  }
252 }
253 
255  const FreeTrajectoryState& initialState,
256  const GlobalPoint& point,
258  auto& trajStateFromPointCache =
260 
261  auto key = std::make_pair(hit.det()->gdetIndex(), point);
262  auto res = trajStateFromPointCache.find(key);
263  if (res != trajStateFromPointCache.end())
264  return res->second;
265  else { //doesnt exist, need to make it
266  //FIXME: check for efficiency
267  auto val = trajStateFromPointCache.emplace(key, propagator.propagate(initialState, hit.det()->surface()));
268  return val.first->second;
269  }
270 }
271 
273  const GlobalPoint& vtx,
274  const float energy,
275  const int charge) const {
278  return TrajectoryStateOnSurface(freeTS, *bpb(freeTS.position(), freeTS.momentum()));
279 }
280 
286 }
287 
288 bool TrajSeedMatcher::passesMatchSel(const TrajSeedMatcher::SCHitMatch& hit, const size_t hitNr) const {
289  if (hitNr < cfg_.matchingCuts.size()) {
290  return (*cfg_.matchingCuts[hitNr])(hit);
291  } else {
292  throw cms::Exception("LogicError") << " Error, attempting to apply selection to hit " << hitNr
293  << " but only cuts for " << cfg_.matchingCuts.size() << " defined";
294  }
295 }
296 
298  const SCHitMatch& hit2,
299  const GlobalPoint& candPos,
300  const GlobalPoint& vprim,
301  const float energy,
302  const int charge) {
303  double zVertex = cfg_.useRecoVertex ? vprim.z() : getZVtxFromExtrapolation(vprim, hit1.hitPos, candPos);
304  GlobalPoint vertex(vprim.x(), vprim.y(), zVertex);
305 
306  auto firstMatchFreeTraj =
308  auto const& secondHitTraj = getTrajStateFromPoint(hit2.hit, firstMatchFreeTraj, hit1.hitPos, forwardPropagator_);
309  return getNrValidLayersAlongTraj(hit2.hit.geographicalId(), secondHitTraj);
310 }
311 
312 int TrajSeedMatcher::getNrValidLayersAlongTraj(const DetId& hitId, const TrajectoryStateOnSurface& hitTrajState) const {
313  const DetLayer* detLayer = detLayerGeom_.idToLayer(hitId);
314  if (detLayer == nullptr)
315  return 0;
316 
317  const FreeTrajectoryState& hitFreeState = *hitTrajState.freeState();
318  auto const inLayers = navSchool_.compatibleLayers(*detLayer, hitFreeState, oppositeToMomentum);
319  const auto outLayers = navSchool_.compatibleLayers(*detLayer, hitFreeState, alongMomentum);
320 
321  int nrValidLayers = 1; //because our current hit is also valid and wont be included in the count otherwise
322  int nrPixInLayers = 0;
323  int nrPixOutLayers = 0;
324  for (auto layer : inLayers) {
325  if (GeomDetEnumerators::isTrackerPixel(layer->subDetector())) {
326  nrPixInLayers++;
327  if (layerHasValidHits(*layer, hitTrajState, backwardPropagator_))
328  nrValidLayers++;
329  }
330  }
331  for (auto layer : outLayers) {
332  if (GeomDetEnumerators::isTrackerPixel(layer->subDetector())) {
333  nrPixOutLayers++;
334  if (layerHasValidHits(*layer, hitTrajState, forwardPropagator_))
335  nrValidLayers++;
336  }
337  }
338  return nrValidLayers;
339 }
340 
342  const TrajectoryStateOnSurface& hitSurState,
343  const Propagator& propToLayerFromState) const {
344  //FIXME: do not hardcode with werid magic numbers stolen from ancient tracking code
345  //its taken from https://cmssdt.cern.ch/dxr/CMSSW/source/RecoTracker/TrackProducer/interface/TrackProducerBase.icc#165
346  //which inspires this code
347  Chi2MeasurementEstimator estimator(30., -3.0, 0.5, 2.0, 0.5, 1.e12); // same as defauts....
348 
349  const std::vector<GeometricSearchDet::DetWithState>& detWithState =
350  layer.compatibleDets(hitSurState, propToLayerFromState, estimator);
351  if (detWithState.empty())
352  return false;
353  else {
354  DetId id = detWithState.front().first->geographicalId();
356  if (measDet.isActive())
357  return true;
358  else
359  return false;
360  }
361 }
362 
363 size_t TrajSeedMatcher::getNrHitsRequired(const int nrValidLayers) const {
364  for (size_t binNr = 0; binNr < cfg_.minNrHitsValidLayerBins.size(); binNr++) {
365  if (nrValidLayers < cfg_.minNrHitsValidLayerBins[binNr])
366  return cfg_.minNrHits[binNr];
367  }
368  return cfg_.minNrHits.back();
369 }
370 
372  const std::vector<SCHitMatch>& posCharge,
373  const std::vector<SCHitMatch>& negCharge,
374  int nrValidLayers)
375  : seed_(seed), nrValidLayers_(nrValidLayers) {
376  size_t nrHitsMax = std::max(posCharge.size(), negCharge.size());
377  for (size_t hitNr = 0; hitNr < nrHitsMax; hitNr++) {
378  DetId detIdPos = hitNr < posCharge.size() ? posCharge[hitNr].detId : DetId(0);
379  float dRZPos = hitNr < posCharge.size() ? posCharge[hitNr].dRZ : std::numeric_limits<float>::max();
380  float dPhiPos = hitNr < posCharge.size() ? posCharge[hitNr].dPhi : std::numeric_limits<float>::max();
381 
382  DetId detIdNeg = hitNr < negCharge.size() ? negCharge[hitNr].detId : DetId(0);
383  float dRZNeg = hitNr < negCharge.size() ? negCharge[hitNr].dRZ : std::numeric_limits<float>::max();
384  float dPhiNeg = hitNr < negCharge.size() ? negCharge[hitNr].dPhi : std::numeric_limits<float>::max();
385 
386  if (detIdPos != detIdNeg && (detIdPos.rawId() != 0 && detIdNeg.rawId() != 0)) {
387  cms::Exception("LogicError")
388  << " error in " << __FILE__ << ", " << __LINE__
389  << " hits to be combined have different detIDs, this should not be possible and nothing good will come of it";
390  }
391  DetId detId = detIdPos.rawId() != 0 ? detIdPos : detIdNeg;
393  }
394 }
395 
397  : dPhiMax_(pset.getParameter<double>("dPhiMax")),
398  dRZMax_(pset.getParameter<double>("dRZMax")),
399  dRZMaxLowEtThres_(pset.getParameter<double>("dRZMaxLowEtThres")),
400  dRZMaxLowEtEtaBins_(pset.getParameter<std::vector<double> >("dRZMaxLowEtEtaBins")),
401  dRZMaxLowEt_(pset.getParameter<std::vector<double> >("dRZMaxLowEt")) {
402  if (dRZMaxLowEtEtaBins_.size() + 1 != dRZMaxLowEt_.size()) {
403  throw cms::Exception("InvalidConfig") << " dRZMaxLowEtEtaBins should be 1 less than dRZMaxLowEt when its "
404  << dRZMaxLowEtEtaBins_.size() << " vs " << dRZMaxLowEt_.size();
405  }
406 }
407 
409  if (dPhiMax_ >= 0 && std::abs(scHitMatch.dPhi) > dPhiMax_)
410  return false;
411 
412  const float dRZMax = getDRZCutValue(scHitMatch.et, scHitMatch.eta);
413  if (dRZMax_ >= 0 && std::abs(scHitMatch.dRZ) > dRZMax)
414  return false;
415 
416  return true;
417 }
418 
419 float TrajSeedMatcher::MatchingCutsV1::getDRZCutValue(const float scEt, const float scEta) const {
420  if (scEt >= dRZMaxLowEtThres_)
421  return dRZMax_;
422  else {
423  const float absEta = std::abs(scEta);
424  for (size_t etaNr = 0; etaNr < dRZMaxLowEtEtaBins_.size(); etaNr++) {
425  if (absEta < dRZMaxLowEtEtaBins_[etaNr])
426  return dRZMaxLowEt_[etaNr];
427  }
428  return dRZMaxLowEt_.back();
429  }
430 }
431 
433  : dPhiHighEt_(pset.getParameter<std::vector<double> >("dPhiMaxHighEt")),
434  dPhiHighEtThres_(pset.getParameter<std::vector<double> >("dPhiMaxHighEtThres")),
435  dPhiLowEtGrad_(pset.getParameter<std::vector<double> >("dPhiMaxLowEtGrad")),
436  dRZHighEt_(pset.getParameter<std::vector<double> >("dRZMaxHighEt")),
437  dRZHighEtThres_(pset.getParameter<std::vector<double> >("dRZMaxHighEtThres")),
438  dRZLowEtGrad_(pset.getParameter<std::vector<double> >("dRZMaxLowEtGrad")),
439  etaBins_(pset.getParameter<std::vector<double> >("etaBins")) {
440  auto binSizeCheck = [](size_t sizeEtaBins, const std::vector<double>& vec, const std::string& name) {
441  if (vec.size() != sizeEtaBins + 1) {
442  throw cms::Exception("InvalidConfig")
443  << " when constructing TrajSeedMatcher::MatchingCutsV2 " << name << " has " << vec.size()
444  << " bins, it should be equal to #bins of etaBins+1" << sizeEtaBins + 1;
445  }
446  };
447  binSizeCheck(etaBins_.size(), dPhiHighEt_, "dPhiMaxHighEt");
448  binSizeCheck(etaBins_.size(), dPhiHighEtThres_, "dPhiMaxHighEtThres");
449  binSizeCheck(etaBins_.size(), dPhiLowEtGrad_, "dPhiMaxLowEtGrad");
450  binSizeCheck(etaBins_.size(), dRZHighEt_, "dRZMaxHighEt");
451  binSizeCheck(etaBins_.size(), dRZHighEtThres_, "dRZMaxHighEtThres");
452  binSizeCheck(etaBins_.size(), dRZLowEtGrad_, "dRZMaxLowEtGrad");
453 }
454 
456  size_t binNr = getBinNr(scHitMatch.eta);
457  float dPhiMax = getCutValue(scHitMatch.et, dPhiHighEt_[binNr], dPhiHighEtThres_[binNr], dPhiLowEtGrad_[binNr]);
458  if (dPhiMax >= 0 && std::abs(scHitMatch.dPhi) > dPhiMax)
459  return false;
460  float dRZMax = getCutValue(scHitMatch.et, dRZHighEt_[binNr], dRZHighEtThres_[binNr], dRZLowEtGrad_[binNr]);
461  if (dRZMax >= 0 && std::abs(scHitMatch.dRZ) > dRZMax)
462  return false;
463 
464  return true;
465 }
466 
467 //eta bins is exactly 1 smaller than the vectors which will be accessed by this bin nr
469  const float absEta = std::abs(eta);
470  for (size_t etaNr = 0; etaNr < etaBins_.size(); etaNr++) {
471  if (absEta < etaBins_[etaNr])
472  return etaNr;
473  }
474  return etaBins_.size();
475 }
HLTEgPhaseIITestSequence_cff.enableHitSkipping
enableHitSkipping
Definition: HLTEgPhaseIITestSequence_cff.py:444
ConfigurationDescriptions.h
TrajSeedMatcher::MatchingCutsV2::getBinNr
size_t getBinNr(float eta) const
Definition: TrajSeedMatcher.cc:468
Chi2MeasurementEstimator.h
TrajSeedMatcher::MatchInfo
Definition: TrajSeedMatcher.h:67
TrajSeedMatcher::getZVtxFromExtrapolation
static float getZVtxFromExtrapolation(const GlobalPoint &primeVtxPos, const GlobalPoint &hitPos, const GlobalPoint &candPos)
Definition: TrajSeedMatcher.cc:225
TrajSeedMatcher::layerHasValidHits
bool layerHasValidHits(const DetLayer &layer, const TrajectoryStateOnSurface &hitSurState, const Propagator &propToLayerFromState) const
Definition: TrajSeedMatcher.cc:341
NavigationSchoolRecord
Definition: NavigationSchoolRecord.h:12
TrajSeedMatcher::clearCache
void clearCache()
Definition: TrajSeedMatcher.cc:281
edm::ESInputTag
Definition: ESInputTag.h:87
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
PixelSubdetector.h
FreeTrajectoryState.h
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
TrajectorySeedCollection
std::vector< TrajectorySeed > TrajectorySeedCollection
Definition: TrajectorySeedCollection.h:6
Chi2MeasurementEstimator
Definition: Chi2MeasurementEstimator.h:15
MeasurementDetWithData::isActive
bool isActive() const
Definition: MeasurementDetWithData.h:67
TrajSeedMatcher::detLayerGeom_
DetLayerGeometry const & detLayerGeom_
Definition: TrajSeedMatcher.h:241
TrajSeedMatcher::passesMatchSel
bool passesMatchSel(const SCHitMatch &hit, const size_t hitNr) const
Definition: TrajSeedMatcher.cc:288
DetLayer
Definition: DetLayer.h:21
TrajSeedMatcher::trajStateFromVtxPosChargeCache_
std::unordered_map< int, TrajectoryStateOnSurface > trajStateFromVtxPosChargeCache_
Definition: TrajSeedMatcher.h:246
TrajSeedMatcher::MatchingCutsV2::dRZHighEtThres_
std::vector< double > dRZHighEtThres_
Definition: TrajSeedMatcher.h:142
GlobalTrajectoryParameters::position
GlobalPoint position() const
Definition: GlobalTrajectoryParameters.h:60
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
TrajSeedMatcher.h
TrajSeedMatcher::Configuration::requireExactMatchCount
const bool requireExactMatchCount
Definition: TrajSeedMatcher.h:157
PV3DBase::theta
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
pos
Definition: PixelAliasList.h:18
FreeTrajectoryState::charge
TrackCharge charge() const
Definition: FreeTrajectoryState.h:69
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
TrajSeedMatcher::SeedWithInfo::detId
DetId detId(size_t hitNr) const
Definition: TrajSeedMatcher.h:90
TrajectoryStateOnSurface::charge
TrackCharge charge() const
Definition: TrajectoryStateOnSurface.h:68
TrajSeedMatcher::SeedWithInfo::dPhiPos
float dPhiPos(size_t hitNr) const
Definition: TrajSeedMatcher.h:88
TrajSeedMatcher::Configuration::useRecoVertex
const bool useRecoVertex
Definition: TrajSeedMatcher.h:155
oppositeToMomentum
Definition: PropagationDirection.h:4
DetLayerGeometry::idToLayer
virtual const DetLayer * idToLayer(const DetId &detId) const
Definition: DetLayerGeometry.h:33
TrajSeedMatcher::MatchingCutsV2::etaBins_
std::vector< double > etaBins_
Definition: TrajSeedMatcher.h:143
TrajSeedMatcher::makePSetDescription
static edm::ParameterSetDescription makePSetDescription()
Definition: TrajSeedMatcher.cc:92
GeometricSearchDet::compatibleDets
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
Definition: GeometricSearchDet.cc:35
TrajSeedMatcher::getNrHitsRequired
size_t getNrHitsRequired(const int nrValidLayers) const
Definition: TrajSeedMatcher.cc:363
TrajSeedMatcher::backwardPropagator_
PropagatorWithMaterial backwardPropagator_
Definition: TrajSeedMatcher.h:244
TrajSeedMatcher::MatchingCutsV2::dPhiHighEtThres_
std::vector< double > dPhiHighEtThres_
Definition: TrajSeedMatcher.h:141
DDAxes::x
ElectronUtilities.h
TrajSeedMatcher::MatchingCutsV2::MatchingCutsV2
MatchingCutsV2(const edm::ParameterSet &pset)
Definition: TrajSeedMatcher.cc:432
TrajSeedMatcher::SCHitMatch::hit
const TrackingRecHit & hit
Definition: TrajSeedMatcher.h:59
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
TrajSeedMatcher::SeedWithInfo::dPhiNeg
float dPhiNeg(size_t hitNr) const
Definition: TrajSeedMatcher.h:89
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
TrajSeedMatcher::trajStateFromPointNegChargeCache_
IntGlobalPointPairUnorderedMap< TrajectoryStateOnSurface > trajStateFromPointNegChargeCache_
Definition: TrajSeedMatcher.h:250
TrajSeedMatcher::SCHitMatch::hitPos
const GlobalPoint hitPos
Definition: TrajSeedMatcher.h:56
HLT_FULL_cff.zVertex
zVertex
Definition: HLT_FULL_cff.py:109725
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
TrajSeedMatcher::getTrajStateFromVtx
const TrajectoryStateOnSurface & getTrajStateFromVtx(const TrackingRecHit &hit, const TrajectoryStateOnSurface &initialState, const PropagatorWithMaterial &propagator)
Definition: TrajSeedMatcher.cc:237
HLT_2018_cff.useRecoVertex
useRecoVertex
Definition: HLT_2018_cff.py:13862
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
TrajSeedMatcher::Configuration
Definition: TrajSeedMatcher.h:147
Propagator
Definition: Propagator.h:44
DetId
Definition: DetId.h:17
TrajSeedMatcher::measTkEvt_
MeasurementTrackerEvent const & measTkEvt_
Definition: TrajSeedMatcher.h:239
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
PropagatorWithMaterial
Definition: PropagatorWithMaterial.h:25
trackingTools::ftsFromVertexToPoint
FreeTrajectoryState ftsFromVertexToPoint(MagneticField const &magField, GlobalPoint const &xmeas, GlobalPoint const &xvert, float momentum, TrackCharge charge)
Definition: ftsFromVertexToPoint.cc:17
TrajectoryStateOnSurface::freeState
FreeTrajectoryState const * freeState(bool withErrors=true) const
Definition: TrajectoryStateOnSurface.h:58
TrajSeedMatcher::MatchingCutsV1::operator()
bool operator()(const SCHitMatch &scHitMatch) const override
Definition: TrajSeedMatcher.cc:408
PVValHelper::estimator
estimator
Definition: PVValidationHelpers.h:44
TrackCandidateProducer_cfi.propagator
propagator
Definition: TrackCandidateProducer_cfi.py:17
TrajSeedMatcher::SCHitMatch::dRZ
const float dRZ
Definition: TrajSeedMatcher.h:57
TrajSeedMatcher::SeedWithInfo::dRZNeg
float dRZNeg(size_t hitNr) const
Definition: TrajSeedMatcher.h:87
TrajSeedMatcher::cfg_
Configuration const & cfg_
Definition: TrajSeedMatcher.h:235
TrajSeedMatcher::MatchingCutsV2::dPhiLowEtGrad_
std::vector< double > dPhiLowEtGrad_
Definition: TrajSeedMatcher.h:141
PVValHelper::eta
Definition: PVValidationHelpers.h:69
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
TrajSeedMatcher::MatchingCutsV2::dPhiHighEt_
std::vector< double > dPhiHighEt_
Definition: TrajSeedMatcher.h:141
p2
double p2[4]
Definition: TauolaWrapper.h:90
TrajSeedMatcher::Configuration::matchingCuts
const std::vector< std::unique_ptr< MatchingCuts > > matchingCuts
Definition: TrajSeedMatcher.h:168
TrajSeedMatcher::TrajSeedMatcher
TrajSeedMatcher(Configuration const &cfg, edm::EventSetup const &iSetup, MeasurementTrackerEvent const &measTkEvt)
Definition: TrajSeedMatcher.cc:80
MeasurementTrackerEvent::idToDet
MeasurementDetWithData idToDet(const DetId &id) const
Previous MeasurementDetSystem interface.
Definition: MeasurementTrackerEvent.h:69
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
HLT_2018_cff.measTkEvt
measTkEvt
Definition: HLT_2018_cff.py:13898
TrajSeedMatcher::SCHitMatch::eta
const float eta
Definition: TrajSeedMatcher.h:61
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, GlobalTag >
ParameterSetDescription.h
TrajSeedMatcher::Configuration::minNrHits
const std::vector< unsigned int > minNrHits
Definition: TrajSeedMatcher.h:165
TrajectorySeed.h
TrajSeedMatcher::MatchingCutsV2::dRZHighEt_
std::vector< double > dRZHighEt_
Definition: TrajSeedMatcher.h:142
TrajSeedMatcher::trajStateFromPointPosChargeCache_
IntGlobalPointPairUnorderedMap< TrajectoryStateOnSurface > trajStateFromPointPosChargeCache_
Definition: TrajSeedMatcher.h:249
badGlobalMuonTaggersAOD_cff.vtx
vtx
Definition: badGlobalMuonTaggersAOD_cff.py:5
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
InitialStep_cff.seeds
seeds
Definition: InitialStep_cff.py:232
l1GtPatternGenerator_cfi.defaults
defaults
Definition: l1GtPatternGenerator_cfi.py:93
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
MeasurementTrackerEvent
Definition: MeasurementTrackerEvent.h:15
edm::ParameterSet
Definition: ParameterSet.h:36
TrajSeedMatcher::getNrValidLayersAlongTraj
int getNrValidLayersAlongTraj(const SCHitMatch &hit1, const SCHitMatch &hit2, const GlobalPoint &candPos, const GlobalPoint &vprim, const float energy, const int charge)
Definition: TrajSeedMatcher.cc:297
PVValHelper::phi
Definition: PVValidationHelpers.h:68
edm::ParameterSetDescription::addVPSet
ParameterDescriptionBase * addVPSet(U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
Definition: ParameterSetDescription.h:149
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
TrajSeedMatcher::MatchingCutsV1::getDRZCutValue
float getDRZCutValue(const float scEt, const float scEta) const
Definition: TrajSeedMatcher.cc:419
DetLayerGeometry
Definition: DetLayerGeometry.h:18
match
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
TrajSeedMatcher::MatchingCutsV1::dRZMaxLowEtEtaBins_
const std::vector< double > dRZMaxLowEtEtaBins_
Definition: TrajSeedMatcher.h:125
TrajSeedMatcher::Configuration::enableHitSkipping
const bool enableHitSkipping
Definition: TrajSeedMatcher.h:156
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
GeomDetEnumerators::isTrackerPixel
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:68
TrajSeedMatcher::SeedWithInfo::dRZPos
float dRZPos(size_t hitNr) const
Definition: TrajSeedMatcher.h:86
TrajSeedMatcher::kElectronMass_
static constexpr float kElectronMass_
Definition: TrajSeedMatcher.h:233
TrajSeedMatcher::getMagField
const MagneticField & getMagField(const GlobalPoint &point) const
Definition: TrajSeedMatcher.h:228
RecoGeometryRecord
Definition: RecoGeometryRecord.h:15
HLT_2018_cff.matchingCuts
matchingCuts
Definition: HLT_2018_cff.py:13864
p1
double p1[4]
Definition: TauolaWrapper.h:89
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
TrajSeedMatcher::SeedWithInfo::SeedWithInfo
SeedWithInfo(const TrajectorySeed &seed, const std::vector< SCHitMatch > &posCharge, const std::vector< SCHitMatch > &negCharge, int nrValidLayers)
Definition: TrajSeedMatcher.cc:371
edm::EventSetup
Definition: EventSetup.h:57
HLTEgPhaseIITestSequence_cff.useParamMagFieldIfDefined
useParamMagFieldIfDefined
Definition: HLTEgPhaseIITestSequence_cff.py:480
EleRelPointPair
Definition: ElectronUtilities.h:43
ftsFromVertexToPoint.h
cc
res
Definition: Electron.h:6
NavigationSchool::compatibleLayers
std::vector< const DetLayer * > compatibleLayers(const DetLayer &detLayer, Args &&... args) const
Returns all layers compatible.
Definition: NavigationSchool.h:41
looper.cfg
cfg
Definition: looper.py:297
TrajSeedMatcher::MatchingCutsV1::MatchingCutsV1
MatchingCutsV1(const edm::ParameterSet &pset)
Definition: TrajSeedMatcher.cc:396
TrackingRecHit
Definition: TrackingRecHit.h:21
TrajSeedMatcher::SCHitMatch::et
const float et
Definition: TrajSeedMatcher.h:60
TrajSeedMatcher::getTrajStateFromPoint
const TrajectoryStateOnSurface & getTrajStateFromPoint(const TrackingRecHit &hit, const FreeTrajectoryState &initialState, const GlobalPoint &point, const PropagatorWithMaterial &propagator)
Definition: TrajSeedMatcher.cc:254
TrajSeedMatcher::MatchingCutsV2::dRZLowEtGrad_
std::vector< double > dRZLowEtGrad_
Definition: TrajSeedMatcher.h:142
TrajSeedMatcher::Configuration::minNrHitsValidLayerBins
const std::vector< int > minNrHitsValidLayerBins
Definition: TrajSeedMatcher.h:166
heppy_batch.val
val
Definition: heppy_batch.py:351
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
HLT_2018_cff.minNrHits
minNrHits
Definition: HLT_2018_cff.py:13863
TrajSeedMatcher::Configuration::Configuration
Configuration(const edm::ParameterSet &pset, edm::ConsumesCollector &&cc)
Definition: TrajSeedMatcher.cc:58
MeasurementDetWithData
Definition: MeasurementDetWithData.h:6
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
L1TMuonDQMOffline_cfi.cutsPSets
cutsPSets
Definition: L1TMuonDQMOffline_cfi.py:31
TrajSeedMatcher::MatchingCutsV1::dRZMaxLowEt_
const std::vector< double > dRZMaxLowEt_
Definition: TrajSeedMatcher.h:126
TrajSeedMatcher::MatchingCutsV2::operator()
bool operator()(const SCHitMatch &scHitMatch) const override
Definition: TrajSeedMatcher.cc:455
TrajSeedMatcher::SCHitMatch
Definition: TrajSeedMatcher.h:54
TrajSeedMatcher::SCHitMatch::dPhi
const float dPhi
Definition: TrajSeedMatcher.h:58
PerpendicularBoundPlaneBuilder
Definition: PerpendicularBoundPlaneBuilder.h:11
TrajSeedMatcher::makeTrajStateOnSurface
TrajectoryStateOnSurface makeTrajStateOnSurface(const GlobalPoint &pos, const GlobalPoint &vtx, const float energy, const int charge) const
Definition: TrajSeedMatcher.cc:272
Exception
Definition: hltDiff.cc:246
TrajSeedMatcher::SeedWithInfo::matchInfo_
std::vector< MatchInfo > matchInfo_
Definition: TrajSeedMatcher.h:102
HLTEgPhaseIITestSequence_cff.requireExactMatchCount
requireExactMatchCount
Definition: HLTEgPhaseIITestSequence_cff.py:479
TrajectorySeed
Definition: TrajectorySeed.h:17
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
EventSetup.h
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
HLT_2018_cff.minNrHitsValidLayerBins
minNrHitsValidLayerBins
Definition: HLT_2018_cff.py:13892
PerpendicularBoundPlaneBuilder.h
ConsumesCollector.h
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TrajectoryStateOnSurface::globalParameters
const GlobalTrajectoryParameters & globalParameters() const
Definition: TrajectoryStateOnSurface.h:64
ParameterSet.h
SiStripFineDelayHit_cfi.MagneticField
MagneticField
Definition: SiStripFineDelayHit_cfi.py:7
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
HLTSiStripMonitoring_cff.NavigationSchool
NavigationSchool
Definition: HLTSiStripMonitoring_cff.py:225
crabWrapper.key
key
Definition: crabWrapper.py:19
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
CSCSegmentAlgorithmRU_cfi.dPhiMax
dPhiMax
Definition: CSCSegmentAlgorithmRU_cfi.py:10
edm::ParameterDescription
Definition: ParameterDescription.h:110
TrajSeedMatcher::operator()
std::vector< TrajSeedMatcher::SeedWithInfo > operator()(const TrajectorySeedCollection &seeds, const GlobalPoint &candPos, const GlobalPoint &vprim, const float energy)
Definition: TrajSeedMatcher.cc:130
TrajSeedMatcher::forwardPropagator_
PropagatorWithMaterial forwardPropagator_
Definition: TrajSeedMatcher.h:243
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
alongMomentum
Definition: PropagationDirection.h:4
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
TrajSeedMatcher::trajStateFromVtxNegChargeCache_
std::unordered_map< int, TrajectoryStateOnSurface > trajStateFromVtxNegChargeCache_
Definition: TrajSeedMatcher.h:247
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
SurveyInfoScenario_cff.seed
seed
Definition: SurveyInfoScenario_cff.py:295
hit
Definition: SiStripHitEffFromCalibTree.cc:88
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
TrajSeedMatcher::navSchool_
NavigationSchool const & navSchool_
Definition: TrajSeedMatcher.h:240
TrajSeedMatcher::processSeed
std::vector< SCHitMatch > processSeed(const TrajectorySeed &seed, const GlobalPoint &candPos, const GlobalPoint &vprim, const float energy, const TrajectoryStateOnSurface &initialTrajState)
Definition: TrajSeedMatcher.cc:172