CMS 3D CMS Logo

GlobalTrajectoryBuilderBase.cc
Go to the documentation of this file.
1 
21 
22 //---------------
23 // C++ Headers --
24 //---------------
25 
26 #include <iostream>
27 #include <algorithm>
28 #include <limits>
29 
30 //-------------------------------
31 // Collaborating Class Headers --
32 //-------------------------------
33 
37 
42 
44 
49 
54 
61 
66 
69 
72 
73 //----------------
74 // Constructors --
75 //----------------
79  : theLayerMeasurements(nullptr),
80  theTrackTransformer(nullptr),
81  theRegionBuilder(nullptr),
82  theService(service),
83  theGlbRefitter(nullptr) {
84  theCategory =
85  par.getUntrackedParameter<std::string>("Category", "Muon|RecoMuon|GlobalMuon|GlobalTrajectoryBuilderBase");
86 
87  edm::ParameterSet trackMatcherPSet = par.getParameter<edm::ParameterSet>("GlobalMuonTrackMatcher");
88  theTrackMatcher = new GlobalMuonTrackMatcher(trackMatcherPSet, theService);
89 
90  theTrackerPropagatorName = par.getParameter<std::string>("TrackerPropagator");
91 
92  edm::ParameterSet trackTransformerPSet = par.getParameter<edm::ParameterSet>("TrackTransformer");
93  theTrackTransformer = new TrackTransformer(trackTransformerPSet, iC);
94 
95  edm::ParameterSet regionBuilderPSet = par.getParameter<edm::ParameterSet>("MuonTrackingRegionBuilder");
96 
97  theRegionBuilder = new MuonTrackingRegionBuilder(regionBuilderPSet, iC);
98 
99  // TrackRefitter parameters
100  edm::ParameterSet refitterParameters = par.getParameter<edm::ParameterSet>("GlbRefitterParameters");
101  theGlbRefitter = new GlobalMuonRefitter(refitterParameters, theService, iC);
102 
103  theMuonHitsOption = refitterParameters.getParameter<int>("MuonHitsOption");
104  theRefitFlag = refitterParameters.getParameter<bool>("RefitFlag");
105 
107  iC.esConsumes(edm::ESInputTag("", par.getParameter<std::string>("TrackerRecHitBuilder")));
108  theMuonRecHitBuilderToken = iC.esConsumes(edm::ESInputTag("", par.getParameter<std::string>("MuonRecHitBuilder")));
109  theTopoToken = iC.esConsumes();
110 
111  theRPCInTheFit = par.getParameter<bool>("RefitRPCHits");
112 
113  theTECxScale = par.getParameter<double>("ScaleTECxFactor");
114  theTECyScale = par.getParameter<double>("ScaleTECyFactor");
115  thePtCut = par.getParameter<double>("PtCut");
116  thePCut = par.getParameter<double>("PCut");
117 }
118 
119 //--------------
120 // Destructor --
121 //--------------
123  if (theTrackMatcher)
124  delete theTrackMatcher;
125  if (theRegionBuilder)
126  delete theRegionBuilder;
128  delete theTrackTransformer;
129  if (theGlbRefitter)
130  delete theGlbRefitter;
131 }
132 
133 //
134 // set Event
135 //
137  theEvent = &event;
138 
141 
144 
147 
148  //Retrieve tracker topology from geometry
150 }
151 
152 //
153 // build a combined tracker-muon trajectory
154 //
156  MuonCandidate::CandidateContainer& tkTrajs) const {
157  LogTrace(theCategory) << " Begin Build" << std::endl;
158 
159  // tracker trajectory should be built and refit before this point
160  if (tkTrajs.empty())
161  return CandidateContainer();
162 
163  // add muon hits and refit/smooth trajectories
164  CandidateContainer refittedResult;
165  ConstRecHitContainer muonRecHits = getTransientRecHits(*(staCand.second));
166 
167  // check order of muon measurements
168  if ((muonRecHits.size() > 1) &&
169  (muonRecHits.front()->globalPosition().mag() > muonRecHits.back()->globalPosition().mag())) {
170  LogTrace(theCategory) << " reverse order: ";
171  }
172 
173  for (auto&& it : tkTrajs) {
174  // cut on tracks with low momenta
175  LogTrace(theCategory) << " Track p and pT " << it->trackerTrack()->p() << " " << it->trackerTrack()->pt();
176  if (it->trackerTrack()->p() < thePCut || it->trackerTrack()->pt() < thePtCut)
177  continue;
178 
179  // If true we will run theGlbRefitter->refit from all hits
180  if (theRefitFlag) {
181  ConstRecHitContainer trackerRecHits;
182  if (it->trackerTrack().isNonnull()) {
183  trackerRecHits = getTransientRecHits(*it->trackerTrack());
184  } else {
185  LogDebug(theCategory) << " NEED HITS FROM TRAJ";
186  }
187 
188  // ToDo: Do we need the following ?:
189  // check for single TEC RecHits in trajectories in the overalp region
190  if (std::abs(it->trackerTrack()->eta()) > 0.95 && std::abs(it->trackerTrack()->eta()) < 1.15 &&
191  it->trackerTrack()->pt() < 60) {
192  if (theTECxScale < 0 || theTECyScale < 0)
193  trackerRecHits = selectTrackerHits(trackerRecHits);
194  else
195  fixTEC(trackerRecHits, theTECxScale, theTECyScale);
196  }
197 
198  RefitDirection recHitDir = checkRecHitsOrdering(trackerRecHits);
199  if (recHitDir == outToIn)
200  reverse(trackerRecHits.begin(), trackerRecHits.end());
201 
202  reco::TransientTrack tTT(it->trackerTrack(), &*theService->magneticField(), theService->trackingGeometry());
203  TrajectoryStateOnSurface innerTsos = tTT.innermostMeasurementState();
204 
206  if (it->trackerTrack()->seedRef().isAvailable())
207  tmpSeed = it->trackerTrack()->seedRef();
208 
209  if (!innerTsos.isValid()) {
210  LogTrace(theCategory) << " inner Trajectory State is invalid. ";
211  continue;
212  }
213 
214  innerTsos.rescaleError(100.);
215 
216  TC refitted0, refitted1;
217  std::unique_ptr<Trajectory> tkTrajectory;
218 
219  // tracker only track
220  if (!(it->trackerTrajectory() && it->trackerTrajectory()->isValid())) {
221  refitted0 = theTrackTransformer->transform(it->trackerTrack());
222  if (!refitted0.empty())
223  tkTrajectory = std::make_unique<Trajectory>(*(refitted0.begin()));
224  else
225  edm::LogWarning(theCategory) << " Failed to load tracker track trajectory";
226  } else
227  tkTrajectory = it->releaseTrackerTrajectory();
228  if (tkTrajectory)
229  tkTrajectory->setSeedRef(tmpSeed);
230 
231  // full track with all muon hits using theGlbRefitter
232  ConstRecHitContainer allRecHits = trackerRecHits;
233  allRecHits.insert(allRecHits.end(), muonRecHits.begin(), muonRecHits.end());
234  refitted1 = theGlbRefitter->refit(*it->trackerTrack(), tTT, allRecHits, theMuonHitsOption, theTopo);
235  LogTrace(theCategory) << " This track-sta refitted to " << refitted1.size() << " trajectories";
236 
237  std::unique_ptr<Trajectory> glbTrajectory1;
238  if (!refitted1.empty())
239  glbTrajectory1 = std::make_unique<Trajectory>(*(refitted1.begin()));
240  else
241  LogDebug(theCategory) << " Failed to load global track trajectory 1";
242  if (glbTrajectory1)
243  glbTrajectory1->setSeedRef(tmpSeed);
244 
245  if (glbTrajectory1 && tkTrajectory) {
246  refittedResult.emplace_back(std::make_unique<MuonCandidate>(
247  std::move(glbTrajectory1), it->muonTrack(), it->trackerTrack(), std::move(tkTrajectory)));
248  }
249  } else {
251  if (it->trackerTrack()->seedRef().isAvailable())
252  tmpSeed = it->trackerTrack()->seedRef();
253 
254  TC refitted0;
255  std::unique_ptr<Trajectory> tkTrajectory;
256  if (!(it->trackerTrajectory() && it->trackerTrajectory()->isValid())) {
257  refitted0 = theTrackTransformer->transform(it->trackerTrack());
258  if (!refitted0.empty()) {
259  tkTrajectory = std::make_unique<Trajectory>(*(refitted0.begin()));
260  } else
261  edm::LogWarning(theCategory) << " Failed to load tracker track trajectory";
262  } else
263  tkTrajectory = it->releaseTrackerTrajectory();
264  std::unique_ptr<Trajectory> cpy;
265  if (tkTrajectory) {
266  tkTrajectory->setSeedRef(tmpSeed);
267  cpy = std::make_unique<Trajectory>(*tkTrajectory);
268  }
269  // Creating MuonCandidate using only the tracker trajectory:
270  refittedResult.emplace_back(std::make_unique<MuonCandidate>(
271  std::move(tkTrajectory), it->muonTrack(), it->trackerTrack(), std::move(cpy)));
272  }
273  }
274 
275  // choose the best global fit for this Standalone Muon based on the track probability
276  CandidateContainer selectedResult;
277  std::unique_ptr<MuonCandidate> tmpCand;
279 
280  for (auto&& cand : refittedResult) {
281  double prob = trackProbability(*cand->trajectory());
282  LogTrace(theCategory) << " refitted-track-sta with pT " << cand->trackerTrack()->pt() << " has probability "
283  << prob;
284 
285  if (prob < minProb or not tmpCand) {
286  minProb = prob;
287  tmpCand = std::move(cand);
288  }
289  }
290 
291  if (tmpCand)
292  selectedResult.push_back(std::move(tmpCand));
293 
294  refittedResult.clear();
295 
296  return selectedResult;
297 }
298 
299 //
300 // select tracker tracks within a region of interest
301 //
302 std::vector<GlobalTrajectoryBuilderBase::TrackCand> GlobalTrajectoryBuilderBase::chooseRegionalTrackerTracks(
303  const TrackCand& staCand, const std::vector<TrackCand>& tkTs) {
304  // define eta-phi region
305  RectangularEtaPhiTrackingRegion regionOfInterest = defineRegionOfInterest(staCand.second);
306 
307  // get region's etaRange and phiMargin
308  //UNUSED: PixelRecoRange<float> etaRange = regionOfInterest.etaRange();
309  //UNUSED: TkTrackingRegionsMargin<float> phiMargin = regionOfInterest.phiMargin();
310 
311  std::vector<TrackCand> result;
312 
313  double deltaR_max = 1.0;
314 
315  for (auto&& is : tkTs) {
316  double deltaR_tmp = deltaR(static_cast<double>(regionOfInterest.direction().eta()),
317  static_cast<double>(regionOfInterest.direction().phi()),
318  is.second->eta(),
319  is.second->phi());
320 
321  // for each trackCand in region, add trajectory and add to result
322  //if ( inEtaRange && inPhiRange ) {
323  if (deltaR_tmp < deltaR_max) {
324  TrackCand tmpCand = TrackCand(is);
325  result.push_back(tmpCand);
326  }
327  }
328 
329  return result;
330 }
331 
332 //
333 // define a region of interest within the tracker
334 //
336  const reco::TrackRef& staTrack) const {
337  std::unique_ptr<RectangularEtaPhiTrackingRegion> region1 = theRegionBuilder->region(staTrack);
338 
339  TkTrackingRegionsMargin<float> etaMargin(std::abs(region1->etaRange().min() - region1->etaRange().mean()),
340  std::abs(region1->etaRange().max() - region1->etaRange().mean()));
341 
342  RectangularEtaPhiTrackingRegion region2(region1->direction(),
343  region1->origin(),
344  region1->ptMin(),
345  region1->originRBound(),
346  region1->originZBound(),
347  etaMargin,
348  region1->phiMargin());
349 
350  return region2;
351 }
352 
353 //
354 // calculate the tail probability (-ln(P)) of a fit
355 //
357  if (track.ndof() > 0 && track.chiSquared() > 0) {
358  return -LnChiSquaredProbability(track.chiSquared(), track.ndof());
359  } else {
360  return 0.0;
361  }
362 }
363 
364 //
365 // print RecHits
366 //
368  LogTrace(theCategory) << "Used RecHits: " << hits.size();
369  for (auto&& ir : hits) {
370  if (!ir->isValid()) {
371  LogTrace(theCategory) << "invalid RecHit";
372  continue;
373  }
374 
375  const GlobalPoint& pos = ir->globalPosition();
376 
377  LogTrace(theCategory) << "r = " << sqrt(pos.x() * pos.x() + pos.y() * pos.y()) << " z = " << pos.z()
378  << " dimension = " << ir->dimension() << " " << ir->det()->geographicalId().det() << " "
379  << ir->det()->subDetector();
380  }
381 }
382 
383 //
384 // check order of RechIts on a trajectory
385 //
388  if (!recHits.empty()) {
389  ConstRecHitContainer::const_iterator frontHit = recHits.begin();
390  ConstRecHitContainer::const_iterator backHit = recHits.end() - 1;
391  while (!(*frontHit)->isValid() && frontHit != backHit) {
392  frontHit++;
393  }
394  while (!(*backHit)->isValid() && backHit != frontHit) {
395  backHit--;
396  }
397 
398  double rFirst = (*frontHit)->globalPosition().mag();
399  double rLast = (*backHit)->globalPosition().mag();
400 
401  if (rFirst < rLast)
402  return inToOut;
403  else if (rFirst > rLast)
404  return outToIn;
405  else {
406  edm::LogError(theCategory) << "Impossible to determine the rechits order" << std::endl;
407  return undetermined;
408  }
409  } else {
410  edm::LogError(theCategory) << "Impossible to determine the rechits order" << std::endl;
411  return undetermined;
412  }
413 }
414 
415 //
416 // select trajectories with only a single TEC hit
417 //
419  const ConstRecHitContainer& all) const {
420  int nTEC(0);
421 
423  for (auto&& i : all) {
424  if (!i->isValid())
425  continue;
426  if (i->det()->geographicalId().det() == DetId::Tracker &&
427  i->det()->geographicalId().subdetId() == StripSubdetector::TEC) {
428  nTEC++;
429  } else {
430  hits.push_back(i);
431  }
432  if (nTEC > 1)
433  return all;
434  }
435 
436  return hits;
437 }
438 
439 //
440 // rescale errors of outermost TEC RecHit
441 //
442 void GlobalTrajectoryBuilderBase::fixTEC(ConstRecHitContainer& all, double scl_x, double scl_y) const {
443  int nTEC(0);
444  ConstRecHitContainer::iterator lone_tec;
445 
446  for (ConstRecHitContainer::iterator i = all.begin(); i != all.end(); i++) {
447  if (!(*i)->isValid())
448  continue;
449 
450  if ((*i)->det()->geographicalId().det() == DetId::Tracker &&
451  (*i)->det()->geographicalId().subdetId() == StripSubdetector::TEC) {
452  lone_tec = i;
453  nTEC++;
454 
455  if ((i + 1) != all.end() && (*(i + 1))->isValid() &&
456  (*(i + 1))->det()->geographicalId().det() == DetId::Tracker &&
457  (*(i + 1))->det()->geographicalId().subdetId() == StripSubdetector::TEC) {
458  nTEC++;
459  break;
460  }
461  }
462 
463  if (nTEC > 1)
464  break;
465  }
466 
467  int hitDet = (*lone_tec)->hit()->geographicalId().det();
468  int hitSubDet = (*lone_tec)->hit()->geographicalId().subdetId();
469  if (nTEC == 1 && (*lone_tec)->hit()->isValid() && hitDet == DetId::Tracker && hitSubDet == StripSubdetector::TEC) {
470  // rescale the TEC rechit error matrix in its rotated frame
471  const SiStripRecHit2D* strip = dynamic_cast<const SiStripRecHit2D*>((*lone_tec)->hit());
472  if (strip && strip->det()) {
473  LocalPoint pos = strip->localPosition();
474  if ((*lone_tec)->detUnit()) {
475  const StripTopology* topology = dynamic_cast<const StripTopology*>(&(*lone_tec)->detUnit()->topology());
476  if (topology) {
477  // rescale the local error along/perp the strip by a factor
478  float angle = topology->stripAngle(topology->strip((*lone_tec)->hit()->localPosition()));
479  LocalError error = strip->localPositionError();
480  LocalError rotError = error.rotate(angle);
481  LocalError scaledError(rotError.xx() * scl_x * scl_x, 0, rotError.yy() * scl_y * scl_y);
482  error = scaledError.rotate(-angle);
487  SiStripRecHit2D* st = new SiStripRecHit2D(pos, error, *strip->det(), strip->cluster());
488  *lone_tec = MuonTransientTrackingRecHit::build((*lone_tec)->det(), st);
489  }
490  }
491  }
492  }
493 }
494 
496 //
497 // get transient RecHits
498 //
500  const reco::Track& track) const {
502 
505 
506  auto tkbuilder = static_cast<TkTransientTrackingRecHitBuilder const*>(theTrackerRecHitBuilder);
507  auto hitCloner = tkbuilder->cloner();
508  for (trackingRecHit_iterator hit = track.recHitsBegin(); hit != track.recHitsEnd(); ++hit) {
509  if ((*hit)->isValid()) {
510  DetId recoid = (*hit)->geographicalId();
511  if (recoid.det() == DetId::Tracker) {
512  if (!(*hit)->hasPositionAndError()) {
513  TrajectoryStateOnSurface predTsos =
515  ->propagate(currTsos, theService->trackingGeometry()->idToDet(recoid)->surface());
516 
517  if (!predTsos.isValid()) {
518  edm::LogError("MissingTransientHit")
519  << "Could not get a tsos on the hit surface. We will miss a tracking hit.";
520  continue;
521  }
522  currTsos = predTsos;
523  auto h = (**hit).cloneForFit(*tkbuilder->geometry()->idToDet((**hit).geographicalId()));
524  result.emplace_back(hitCloner.makeShared(h, predTsos));
525  } else {
526  result.push_back((*hit)->cloneSH());
527  }
528  } else if (recoid.det() == DetId::Muon) {
529  if ((*hit)->geographicalId().subdetId() == 3 && !theRPCInTheFit) {
530  LogDebug(theCategory) << "RPC Rec Hit discarded";
531  continue;
532  }
533  result.push_back(theMuonRecHitBuilder->build(&**hit));
534  }
535  }
536  }
537 
538  return result;
539 }
GlobalTrajectoryBuilderBase::RefitDirection
RefitDirection
Definition: GlobalTrajectoryBuilderBase.h:70
GlobalMuonRefitter_cff.GlobalMuonRefitter
GlobalMuonRefitter
Definition: GlobalMuonRefitter_cff.py:3
GlobalTrajectoryBuilderBase::chooseRegionalTrackerTracks
std::vector< TrackCand > chooseRegionalTrackerTracks(const TrackCand &, const std::vector< TrackCand > &)
choose tracker tracks within region of interest
Definition: GlobalTrajectoryBuilderBase.cc:302
service
Definition: service.py:1
GlobalTrajectoryBuilderBase::theTopoToken
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > theTopoToken
Definition: GlobalTrajectoryBuilderBase.h:165
GlobalTrajectoryBuilderBase::thePtCut
float thePtCut
Definition: GlobalTrajectoryBuilderBase.h:144
TkTrackingRegionsMargin.h
mps_fire.i
i
Definition: mps_fire.py:428
GlobalMuonRefitter.h
edm::ESInputTag
Definition: ESInputTag.h:87
GlobalTrajectoryBuilderBase.h
GlobalTrajectoryBuilderBase::theService
const MuonServiceProxy * theService
Definition: GlobalTrajectoryBuilderBase.h:152
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
MessageLogger.h
RectangularEtaPhiTrackingRegion
Definition: RectangularEtaPhiTrackingRegion.h:25
TrackExtraFwd.h
GlobalTrajectoryBuilderBase::theEvent
const edm::Event * theEvent
Definition: GlobalTrajectoryBuilderBase.h:160
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
GlobalTrajectoryBuilderBase::theTrackerPropagatorName
std::string theTrackerPropagatorName
Definition: GlobalTrajectoryBuilderBase.h:159
GlobalTrajectoryBuilderBase::theMuonRecHitBuilderToken
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theMuonRecHitBuilderToken
Definition: GlobalTrajectoryBuilderBase.h:163
TrackTransformer::setServices
void setServices(const edm::EventSetup &) override
set the services needed by the TrackTransformer
Definition: TrackTransformer.cc:79
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
GlobalMuonTrackMatcher.h
TransientRecHitRecord.h
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
GlobalTrajectoryBuilderBase::ConstRecHitContainer
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
Definition: GlobalTrajectoryBuilderBase.h:45
pos
Definition: PixelAliasList.h:18
GlobalTrajectoryBuilderBase::GlobalTrajectoryBuilderBase
GlobalTrajectoryBuilderBase(const edm::ParameterSet &, const MuonServiceProxy *, edm::ConsumesCollector &)
constructor with Parameter Set and MuonServiceProxy
Definition: GlobalTrajectoryBuilderBase.cc:76
TrackTransformer::transform
std::vector< Trajectory > transform(const reco::Track &) const override
Convert a reco::Track into Trajectory.
Definition: TrackTransformer.cc:182
MuonTrackingRegionBuilder::region
std::unique_ptr< RectangularEtaPhiTrackingRegion > region(const reco::TrackRef &) const
Define tracking region.
Definition: MuonTrackingRegionBuilder.cc:117
ChiSquaredProbability.h
SiStripRecHit2D
Definition: SiStripRecHit2D.h:7
TrajectoryMeasurement.h
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
StripTopology.h
MuonTransientTrackingRecHit.h
MuonTrackingRegionBuilder.h
TransientTrack.h
TransientTrackingRecHitBuilder::build
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
GlobalTrajectoryBuilderBase::TC
std::vector< Trajectory > TC
Definition: GlobalTrajectoryBuilderBase.h:52
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
GlobalTrajectoryBuilderBase::build
MuonTrajectoryBuilder::CandidateContainer build(const TrackCand &, MuonTrajectoryBuilder::CandidateContainer &) const
build combined trajectory from sta Track and tracker RecHits
Definition: GlobalTrajectoryBuilderBase.cc:155
relativeConstraints.error
error
Definition: relativeConstraints.py:53
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
python.cmstools.all
def all(container)
workaround iterator generators for ROOT classes
Definition: cmstools.py:25
MuonTrajectoryBuilder::CandidateContainer
MuonCandidate::CandidateContainer CandidateContainer
Definition: MuonTrajectoryBuilder.h:24
CSCDetId.h
TkTransientTrackingRecHitBuilder.h
groupFilesInBlocks.reverse
reverse
Definition: groupFilesInBlocks.py:131
edm::Ref< TrackCollection >
GlobalTrajectoryBuilderBase::theTECxScale
float theTECxScale
Definition: GlobalTrajectoryBuilderBase.h:157
MuonTrackingRegionBuilder::setEvent
virtual void setEvent(const edm::Event &)
Pass the Event to the algo at each event.
Definition: MuonTrackingRegionBuilder.cc:124
DetId
Definition: DetId.h:17
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
TrackerTopology.h
GlobalTrajectoryBuilderBase::theRefitFlag
bool theRefitFlag
Definition: GlobalTrajectoryBuilderBase.h:155
TrackerTopologyRcd.h
Track.h
GlobalTrajectoryBuilderBase::inToOut
Definition: GlobalTrajectoryBuilderBase.h:70
GlobalTrajectoryBuilderBase::theMuonRecHitBuilder
const TransientTrackingRecHitBuilder * theMuonRecHitBuilder
Definition: GlobalTrajectoryBuilderBase.h:164
LocalError::xx
float xx() const
Definition: LocalError.h:22
LnChiSquaredProbability
float LnChiSquaredProbability(double chiSquared, double nrDOF)
Definition: ChiSquaredProbability.cc:17
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
reco::Track
Definition: Track.h:27
h
GlobalTrajectoryBuilderBase::theTrackerRecHitBuilder
const TransientTrackingRecHitBuilder * theTrackerRecHitBuilder
Definition: GlobalTrajectoryBuilderBase.h:162
GlobalTrajectoryBuilderBase::defineRegionOfInterest
RectangularEtaPhiTrackingRegion defineRegionOfInterest(const reco::TrackRef &) const
define region of interest with tracker
Definition: GlobalTrajectoryBuilderBase.cc:335
Point3DBase< float, GlobalTag >
DTChamberId.h
StripTopology::strip
virtual float strip(const LocalPoint &) const =0
GlobalTrajectoryBuilderBase::theTrackMatcher
GlobalMuonTrackMatcher * theTrackMatcher
Definition: GlobalTrajectoryBuilderBase.h:148
PbPb_ZMuSkimMuonDPG_cff.deltaR
deltaR
Definition: PbPb_ZMuSkimMuonDPG_cff.py:63
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
HLT_FULL_cff.TrackTransformer
TrackTransformer
Definition: HLT_FULL_cff.py:9725
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
RPCDetId.h
GlobalTrajectoryBuilderBase::fixTEC
void fixTEC(ConstRecHitContainer &all, double scl_x, double scl_y) const
rescale errors of outermost TEC RecHit
Definition: GlobalTrajectoryBuilderBase.cc:442
MuonServiceProxy::eventSetup
const edm::EventSetup & eventSetup() const
Definition: MuonServiceProxy.h:76
GlobalTrajectoryBuilderBase::theTECyScale
float theTECyScale
Definition: GlobalTrajectoryBuilderBase.h:158
GlobalTrajectoryBuilderBase::setEvent
void setEvent(const edm::Event &) override
pass the Event to the algo at each event
Definition: GlobalTrajectoryBuilderBase.cc:136
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
DetId::Tracker
Definition: DetId.h:25
GlobalTrajectoryBuilderBase::theGlbRefitter
GlobalMuonRefitter * theGlbRefitter
Definition: GlobalTrajectoryBuilderBase.h:153
Event.h
TrackingRecHit::ConstRecHitContainer
std::vector< ConstRecHitPointer > ConstRecHitContainer
Definition: TrackingRecHit.h:32
deltaR.h
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
MuonCandidate.h
GlobalTrajectoryBuilderBase::~GlobalTrajectoryBuilderBase
~GlobalTrajectoryBuilderBase() override
destructor
Definition: GlobalTrajectoryBuilderBase.cc:122
LocalError
Definition: LocalError.h:12
GlobalTrajectoryBuilderBase::trackProbability
double trackProbability(const Trajectory &) const
calculate chi2 probability (-ln(P))
Definition: GlobalTrajectoryBuilderBase.cc:356
MuonTransientTrackingRecHit::build
static RecHitPointer build(const GeomDet *geom, const TrackingRecHit *rh)
FIXME virtual ConstMuonRecHitContainer specificTransientHits() const;.
Definition: MuonTransientTrackingRecHit.h:71
edmPickEvents.event
event
Definition: edmPickEvents.py:273
GlobalTrajectoryBuilderBase::outToIn
Definition: GlobalTrajectoryBuilderBase.h:70
MuonCandidate::CandidateContainer
std::vector< std::unique_ptr< MuonCandidate > > CandidateContainer
Definition: MuonCandidate.h:18
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
cand
Definition: decayParser.h:32
GlobalTrajectoryBuilderBase::theCategory
std::string theCategory
Definition: GlobalTrajectoryBuilderBase.h:143
TrackingRegion::direction
GlobalVector const & direction() const
the direction around which region is constructed
Definition: TrackingRegion.h:65
MuonServiceProxy::propagator
edm::ESHandle< Propagator > propagator(std::string propagatorName) const
get the propagator
Definition: MuonServiceProxy.cc:177
StripTopology::stripAngle
virtual float stripAngle(float strip) const =0
RefitDirection
Definition: RefitDirection.h:13
conversionTrackMerger_cfi.minProb
minProb
Definition: conversionTrackMerger_cfi.py:10
TkTrackingRegionsMargin< float >
Propagator::propagate
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
GlobalMuonRefitter::setServices
void setServices(const edm::EventSetup &)
set the services needed by the TrackTransformer
Definition: GlobalMuonRefitter.cc:163
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GlobalTrajectoryBuilderBase::theMuonHitsOption
int theMuonHitsOption
Definition: GlobalTrajectoryBuilderBase.h:156
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
HLT_FULL_cff.GlobalMuonTrackMatcher
GlobalMuonTrackMatcher
Definition: HLT_FULL_cff.py:9674
GlobalTrajectoryBuilderBase::checkRecHitsOrdering
RefitDirection checkRecHitsOrdering(const ConstRecHitContainer &) const
This does nothing now.
Definition: GlobalTrajectoryBuilderBase.cc:386
eostools.move
def move(src, dest)
Definition: eostools.py:511
GlobalMuonRefitter::setEvent
virtual void setEvent(const edm::Event &)
pass the Event to the algo at each event
Definition: GlobalMuonRefitter.cc:153
reco::TransientTrack
Definition: TransientTrack.h:19
StripSubdetector::TEC
static constexpr auto TEC
Definition: StripSubdetector.h:19
GlobalTrajectoryBuilderBase::getTransientRecHits
TransientTrackingRecHit::ConstRecHitContainer getTransientRecHits(const reco::Track &) const
get transient RecHits of a Track
Definition: GlobalTrajectoryBuilderBase.cc:499
DetId.h
Trajectory
Definition: Trajectory.h:38
MuonTransientTrackingRecHitBuilder.h
MuonServiceProxy::trackingGeometry
edm::ESHandle< GlobalTrackingGeometry > trackingGeometry() const
get the tracking geometry
Definition: MuonServiceProxy.h:59
TrackingComponentsRecord.h
GlobalTrackingGeometry::idToDet
const GeomDet * idToDet(DetId) const override
Definition: GlobalTrackingGeometry.cc:44
MuonServiceProxy.h
GlobalTrajectoryBuilderBase::thePCut
float thePCut
Definition: GlobalTrajectoryBuilderBase.h:145
angle
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
MuonServiceProxy::magneticField
edm::ESHandle< MagneticField > magneticField() const
get the magnetic field
Definition: MuonServiceProxy.h:56
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
GlobalTrajectoryBuilderBase::theTrackTransformer
TrackTransformer * theTrackTransformer
Definition: GlobalTrajectoryBuilderBase.h:150
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::RefToBase< TrajectorySeed >
MuonTrajectoryBuilder::TrackCand
std::pair< const Trajectory *, reco::TrackRef > TrackCand
Definition: MuonTrajectoryBuilder.h:25
TrajectoryStateTransform.h
GlobalTrajectoryBuilderBase::undetermined
Definition: GlobalTrajectoryBuilderBase.h:70
mps_fire.result
result
Definition: mps_fire.py:311
GlobalTrajectoryBuilderBase::theRegionBuilder
MuonTrackingRegionBuilder * theRegionBuilder
Definition: GlobalTrajectoryBuilderBase.h:151
DetId::Muon
Definition: DetId.h:26
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
ParameterSet.h
MuonServiceProxy
Definition: MuonServiceProxy.h:38
GlobalTrajectoryBuilderBase::printHits
void printHits(const ConstRecHitContainer &) const
print all RecHits of a trajectory
Definition: GlobalTrajectoryBuilderBase.cc:367
HLT_FULL_cff.MuonTrackingRegionBuilder
MuonTrackingRegionBuilder
Definition: HLT_FULL_cff.py:9697
RecHitLessByDet.h
trajectoryStateTransform::innerStateOnSurface
TrajectoryStateOnSurface innerStateOnSurface(const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field, bool withErr=true)
Definition: TrajectoryStateTransform.cc:110
event
Definition: event.py:1
GlobalMuonRefitter::refit
std::vector< Trajectory > refit(const reco::Track &globalTrack, const int theMuonHitsOption, const TrackerTopology *tTopo) const
build combined trajectory from sta Track and tracker RecHits
Definition: GlobalMuonRefitter.cc:180
edm::Event
Definition: Event.h:73
SiStripRecHit2D.h
StripTopology
Definition: StripTopology.h:11
TtFullHadEvtBuilder_cfi.prob
prob
Definition: TtFullHadEvtBuilder_cfi.py:33
LocalError::yy
float yy() const
Definition: LocalError.h:24
GlobalTrajectoryBuilderBase::theTrackerRecHitBuilderToken
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theTrackerRecHitBuilderToken
Definition: GlobalTrajectoryBuilderBase.h:161
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
GlobalTrajectoryBuilderBase::selectTrackerHits
ConstRecHitContainer selectTrackerHits(const ConstRecHitContainer &) const
select tracker hits; exclude some tracker hits in the global trajectory
Definition: GlobalTrajectoryBuilderBase.cc:418
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
PixelRecoRange.h
hit
Definition: SiStripHitEffFromCalibTree.cc:88
GlobalTrajectoryBuilderBase::theRPCInTheFit
bool theRPCInTheFit
Definition: GlobalTrajectoryBuilderBase.h:154
GlobalTrajectoryBuilderBase::theTopo
const TrackerTopology * theTopo
Definition: GlobalTrajectoryBuilderBase.h:166