CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
TrackExtenderWithMTDT< TrackCollection > Class Template Reference
Inheritance diagram for TrackExtenderWithMTDT< TrackCollection >:
edm::stream::EDProducer<>

Public Types

typedef edm::View< TrackTypeInputCollection
 
typedef TrackCollection::value_type TrackType
 
- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Public Member Functions

reco::Track buildTrack (const reco::Track &, const Trajectory &, const Trajectory &, const reco::BeamSpot &, const MagneticField *field, const Propagator *prop, bool hasMTD, float &pathLength, float &tmtdOut, float &sigmatmtdOut) const
 
reco::TrackExtra buildTrackExtra (const Trajectory &trajectory) const
 
RefitDirection::GeometricalDirection checkRecHitsOrdering (TransientTrackingRecHit::ConstRecHitContainer const &recHits) const
 
string dumpLayer (const DetLayer *layer) const
 
void fillMatchingHits (const DetLayer *, const TrajectoryStateOnSurface &, const Trajectory &, const MTDTrackingDetSetVector &, const Propagator *, const reco::BeamSpot &, const double &, const bool, TransientTrackingRecHit::ConstRecHitContainer &, MTDHitMatchingInfo &) const
 
template<class H , class T >
void fillValueMap (edm::Event &iEvent, const H &handle, const std::vector< T > &vec, const edm::EDPutToken &token) const
 
void produce (edm::Event &ev, const edm::EventSetup &es) final
 
 TrackExtenderWithMTDT (const ParameterSet &pset)
 
TransientTrackingRecHit::ConstRecHitContainer tryBTLLayers (const TrackType &, const Trajectory &traj, const MTDTrackingDetSetVector &, const MTDDetLayerGeometry *, const MagneticField *field, const Propagator *prop, const reco::BeamSpot &bs, const double vtxTime, const bool matchVertex, MTDHitMatchingInfo &bestHit) const
 
TransientTrackingRecHit::ConstRecHitContainer tryETLLayers (const TrackType &, const Trajectory &traj, const MTDTrackingDetSetVector &, const MTDDetLayerGeometry *, const MagneticField *field, const Propagator *prop, const reco::BeamSpot &bs, const double vtxTime, const bool matchVertex, MTDHitMatchingInfo &bestHit) const
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

edm::EDPutToken assocOrigTrkToken
 
edm::EDPutToken betaOrigTrkToken
 
const float bsTimeSpread_
 
edm::EDGetTokenT< reco::BeamSpotbsToken_
 
const float btlChi2Cut_
 
edm::EDPutToken btlMatchChi2Token
 
edm::EDPutToken btlMatchTimeChi2Token
 
const float btlTimeChi2Cut_
 
edm::ESHandle< TransientTrackBuilderbuilder
 
const float dzCut_
 
const float estMaxChi2_
 
const float estMaxNSigma_
 
const float etlChi2Cut_
 
edm::EDPutToken etlMatchChi2Token
 
edm::EDPutToken etlMatchTimeChi2Token
 
const float etlTimeChi2Cut_
 
edm::EDGetTokenT< GlobalPointgenVtxPositionToken_
 
edm::EDGetTokenT< float > genVtxTimeToken_
 
edm::ESHandle< GlobalTrackingGeometrygtg
 
edm::ESHandle< TransientTrackingRecHitBuilderhitbuilder
 
edm::EDGetTokenT< MTDTrackingDetSetVectorhitsToken_
 
const std::string mtdRecHitBuilder_
 
edm::EDPutToken pathLengthOrigTrkToken
 
edm::EDPutToken pathLengthToken
 
edm::EDPutToken pOrigTrkToken
 
edm::ESHandle< Propagatorprop
 
const std::string propagator_
 
edm::EDPutToken sigmat0OrigTrkToken
 
edm::EDPutToken sigmatmtdOrigTrkToken
 
edm::EDPutToken sigmatmtdToken
 
edm::EDPutToken t0OrigTrkToken
 
std::unique_ptr< MeasurementEstimatortheEstimator
 
std::unique_ptr< TrackTransformertheTransformer
 
edm::EDPutToken tmtdOrigTrkToken
 
edm::EDPutToken tmtdToken
 
edm::EDGetTokenT< InputCollectiontracksToken_
 
const std::string transientTrackBuilder_
 
const bool updateExtra_
 
const bool updatePattern_
 
const bool updateTraj_
 
const bool useSimVertex_
 
const bool useVertex_
 
edm::EDGetTokenT< VertexCollectionvtxToken_
 

Detailed Description

template<class TrackCollection>
class TrackExtenderWithMTDT< TrackCollection >

Definition at line 212 of file TrackExtenderWithMTD.cc.

Member Typedef Documentation

◆ InputCollection

template<class TrackCollection >
typedef edm::View<TrackType> TrackExtenderWithMTDT< TrackCollection >::InputCollection

Definition at line 215 of file TrackExtenderWithMTD.cc.

◆ TrackType

template<class TrackCollection >
typedef TrackCollection::value_type TrackExtenderWithMTDT< TrackCollection >::TrackType

Definition at line 214 of file TrackExtenderWithMTD.cc.

Constructor & Destructor Documentation

◆ TrackExtenderWithMTDT()

template<class TrackCollection >
TrackExtenderWithMTDT< TrackCollection >::TrackExtenderWithMTDT ( const ParameterSet pset)

Definition at line 338 of file TrackExtenderWithMTD.cc.

339  : tracksToken_(consumes<InputCollection>(iConfig.getParameter<edm::InputTag>("tracksSrc"))),
340  hitsToken_(consumes<MTDTrackingDetSetVector>(iConfig.getParameter<edm::InputTag>("hitsSrc"))),
341  bsToken_(consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("beamSpotSrc"))),
342  updateTraj_(iConfig.getParameter<bool>("updateTrackTrajectory")),
343  updateExtra_(iConfig.getParameter<bool>("updateTrackExtra")),
344  updatePattern_(iConfig.getParameter<bool>("updateTrackHitPattern")),
345  mtdRecHitBuilder_(iConfig.getParameter<std::string>("MTDRecHitBuilder")),
346  propagator_(iConfig.getParameter<std::string>("Propagator")),
347  transientTrackBuilder_(iConfig.getParameter<std::string>("TransientTrackBuilder")),
348  estMaxChi2_(iConfig.getParameter<double>("estimatorMaxChi2")),
349  estMaxNSigma_(iConfig.getParameter<double>("estimatorMaxNSigma")),
350  btlChi2Cut_(iConfig.getParameter<double>("btlChi2Cut")),
351  btlTimeChi2Cut_(iConfig.getParameter<double>("btlTimeChi2Cut")),
352  etlChi2Cut_(iConfig.getParameter<double>("etlChi2Cut")),
353  etlTimeChi2Cut_(iConfig.getParameter<double>("etlTimeChi2Cut")),
354  useVertex_(iConfig.getParameter<bool>("useVertex")),
355  useSimVertex_(iConfig.getParameter<bool>("useSimVertex")),
356  dzCut_(iConfig.getParameter<double>("dZCut")),
357  bsTimeSpread_(iConfig.getParameter<double>("bsTimeSpread")) {
358  if (useVertex_) {
359  if (useSimVertex_) {
360  genVtxPositionToken_ = consumes<GlobalPoint>(iConfig.getParameter<edm::InputTag>("genVtxPositionSrc"));
361  genVtxTimeToken_ = consumes<float>(iConfig.getParameter<edm::InputTag>("genVtxTimeSrc"));
362  } else
363  vtxToken_ = consumes<VertexCollection>(iConfig.getParameter<edm::InputTag>("vtxSrc"));
364  }
365 
366  theEstimator = std::make_unique<Chi2MeasurementEstimator>(estMaxChi2_, estMaxNSigma_);
367  theTransformer = std::make_unique<TrackTransformer>(iConfig.getParameterSet("TrackTransformer"));
368 
369  btlMatchChi2Token = produces<edm::ValueMap<float>>("btlMatchChi2");
370  etlMatchChi2Token = produces<edm::ValueMap<float>>("etlMatchChi2");
371  btlMatchTimeChi2Token = produces<edm::ValueMap<float>>("btlMatchTimeChi2");
372  etlMatchTimeChi2Token = produces<edm::ValueMap<float>>("etlMatchTimeChi2");
373  pathLengthToken = produces<edm::ValueMap<float>>("pathLength");
374  tmtdToken = produces<edm::ValueMap<float>>("tmtd");
375  sigmatmtdToken = produces<edm::ValueMap<float>>("sigmatmtd");
376  pOrigTrkToken = produces<edm::ValueMap<float>>("generalTrackp");
377  betaOrigTrkToken = produces<edm::ValueMap<float>>("generalTrackBeta");
378  t0OrigTrkToken = produces<edm::ValueMap<float>>("generalTrackt0");
379  sigmat0OrigTrkToken = produces<edm::ValueMap<float>>("generalTracksigmat0");
380  pathLengthOrigTrkToken = produces<edm::ValueMap<float>>("generalTrackPathLength");
381  tmtdOrigTrkToken = produces<edm::ValueMap<float>>("generalTracktmtd");
382  sigmatmtdOrigTrkToken = produces<edm::ValueMap<float>>("generalTracksigmatmtd");
383  assocOrigTrkToken = produces<edm::ValueMap<int>>("generalTrackassoc");
384 
385  produces<edm::OwnVector<TrackingRecHit>>();
386  produces<reco::TrackExtraCollection>();
387  produces<TrackCollection>();
388 }

References TrackExtenderWithMTDT< TrackCollection >::assocOrigTrkToken, TrackExtenderWithMTDT< TrackCollection >::betaOrigTrkToken, TrackExtenderWithMTDT< TrackCollection >::btlMatchChi2Token, TrackExtenderWithMTDT< TrackCollection >::btlMatchTimeChi2Token, TrackExtenderWithMTDT< TrackCollection >::estMaxChi2_, TrackExtenderWithMTDT< TrackCollection >::estMaxNSigma_, TrackExtenderWithMTDT< TrackCollection >::etlMatchChi2Token, TrackExtenderWithMTDT< TrackCollection >::etlMatchTimeChi2Token, TrackExtenderWithMTDT< TrackCollection >::genVtxPositionToken_, TrackExtenderWithMTDT< TrackCollection >::genVtxTimeToken_, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), TrackExtenderWithMTDT< TrackCollection >::pathLengthOrigTrkToken, TrackExtenderWithMTDT< TrackCollection >::pathLengthToken, TrackExtenderWithMTDT< TrackCollection >::pOrigTrkToken, TrackExtenderWithMTDT< TrackCollection >::sigmat0OrigTrkToken, TrackExtenderWithMTDT< TrackCollection >::sigmatmtdOrigTrkToken, TrackExtenderWithMTDT< TrackCollection >::sigmatmtdToken, TrackExtenderWithMTDT< TrackCollection >::t0OrigTrkToken, TrackExtenderWithMTDT< TrackCollection >::theEstimator, TrackExtenderWithMTDT< TrackCollection >::theTransformer, TrackExtenderWithMTDT< TrackCollection >::tmtdOrigTrkToken, TrackExtenderWithMTDT< TrackCollection >::tmtdToken, TrackExtenderWithMTDT< TrackCollection >::useSimVertex_, TrackExtenderWithMTDT< TrackCollection >::useVertex_, and TrackExtenderWithMTDT< TrackCollection >::vtxToken_.

Member Function Documentation

◆ buildTrack()

template<class TrackCollection >
reco::Track TrackExtenderWithMTDT< TrackCollection >::buildTrack ( const reco::Track orig,
const Trajectory traj,
const Trajectory trajWithMtd,
const reco::BeamSpot bs,
const MagneticField field,
const Propagator prop,
bool  hasMTD,
float &  pathLength,
float &  tmtdOut,
float &  sigmatmtdOut 
) const

Definition at line 934 of file TrackExtenderWithMTD.cc.

943  {
945  bool tsbcl_status = getTrajectoryStateClosestToBeamLine(traj, bs, thePropagator, tscbl);
946 
947  if (!tsbcl_status)
948  return reco::Track();
949 
951  math::XYZPoint pos(v.x(), v.y(), v.z());
953  math::XYZVector mom(p.x(), p.y(), p.z());
954 
955  int ndof = traj.ndof();
956 
957  double t0 = 0.;
958  double covt0t0 = -1.;
959  pathLengthOut = -1.f; // if there is no MTD flag the pathlength with -1
960  tmtdOut = 0.f;
961  sigmatmtdOut = -1.f;
962  double betaOut = 0.;
963  double covbetabeta = -1.;
964 
965  //compute path length for time backpropagation, using first MTD hit for the momentum
966  if (hasMTD) {
967  double pathlength;
968  bool validpropagation = trackPathLength(trajWithMtd, bs, thePropagator, pathlength);
969  double thit = 0.;
970  double thiterror = -1.;
971  bool validmtd = false;
972 
973  //need to better handle the cases with >1 hit in MTD
974  for (auto const& hit : trajWithMtd.measurements()) {
975  bool ismtd = hit.recHit()->geographicalId().det() == DetId::Forward &&
976  ForwardSubdetector(hit.recHit()->geographicalId().subdetId()) == FastTime;
977  if (ismtd) {
978  const MTDTrackingRecHit* mtdhit = static_cast<const MTDTrackingRecHit*>(hit.recHit()->hit());
979  thit = mtdhit->time();
980  thiterror = mtdhit->timeError();
981  validmtd = true;
982  break;
983  }
984  }
985 
986  if (validmtd && validpropagation) {
987  //here add the PID uncertainty for later use in the 1st step of 4D vtx reconstruction
988  TrackTofPidInfo tofInfo = computeTrackTofPidInfo(p.mag2(), pathlength, thit, thiterror, 0., 0., true);
989  pathLengthOut = pathlength; // set path length if we've got a timing hit
990  tmtdOut = thit;
991  sigmatmtdOut = thiterror;
992  t0 = tofInfo.dt;
993  covt0t0 = tofInfo.dterror * tofInfo.dterror;
994  betaOut = tofInfo.beta_pi;
995  covbetabeta = tofInfo.betaerror * tofInfo.betaerror;
996  }
997  }
998 
999  return reco::Track(traj.chiSquared(),
1000  int(ndof),
1001  pos,
1002  mom,
1003  tscbl.trackStateAtPCA().charge(),
1005  orig.algo(),
1007  t0,
1008  betaOut,
1009  covt0t0,
1010  covbetabeta);
1011 }

References reco::TrackBase::algo(), cms::cuda::bs, FreeTrajectoryState::charge(), Trajectory::chiSquared(), FreeTrajectoryState::curvilinearError(), FastTime, DetId::Forward, createfilelist::int, Trajectory::measurements(), FreeTrajectoryState::momentum(), ndof, Trajectory::ndof(), AlCaHLTBitMon_ParallelJobs::p, FreeTrajectoryState::position(), FrontierCondition_GT_autoExpress_cfi::t0, MTDTrackingRecHit::time(), MTDTrackingRecHit::timeError(), TrajectoryStateClosestToBeamLine::trackStateAtPCA(), reco::TrackBase::undefQuality, and findQualityFiles::v.

◆ buildTrackExtra()

template<class TrackCollection >
reco::TrackExtra TrackExtenderWithMTDT< TrackCollection >::buildTrackExtra ( const Trajectory trajectory) const

Definition at line 1014 of file TrackExtenderWithMTD.cc.

1014  {
1015  static const string metname = "TrackExtenderWithMTD";
1016 
1017  const Trajectory::RecHitContainer transRecHits = trajectory.recHits();
1018 
1019  // put the collection of TrackingRecHit in the event
1020 
1021  // sets the outermost and innermost TSOSs
1022  // ToDo: validation for track states with MTD
1023  TrajectoryStateOnSurface outerTSOS;
1024  TrajectoryStateOnSurface innerTSOS;
1025  unsigned int innerId = 0, outerId = 0;
1027  DetId outerDetId;
1028 
1029  if (trajectory.direction() == alongMomentum) {
1030  LogTrace(metname) << "alongMomentum";
1031  outerTSOS = trajectory.lastMeasurement().updatedState();
1032  innerTSOS = trajectory.firstMeasurement().updatedState();
1033  outerId = trajectory.lastMeasurement().recHit()->geographicalId().rawId();
1034  innerId = trajectory.firstMeasurement().recHit()->geographicalId().rawId();
1035  outerRecHit = trajectory.lastMeasurement().recHit();
1036  outerDetId = trajectory.lastMeasurement().recHit()->geographicalId();
1037  } else if (trajectory.direction() == oppositeToMomentum) {
1038  LogTrace(metname) << "oppositeToMomentum";
1039  outerTSOS = trajectory.firstMeasurement().updatedState();
1040  innerTSOS = trajectory.lastMeasurement().updatedState();
1041  outerId = trajectory.firstMeasurement().recHit()->geographicalId().rawId();
1042  innerId = trajectory.lastMeasurement().recHit()->geographicalId().rawId();
1043  outerRecHit = trajectory.firstMeasurement().recHit();
1044  outerDetId = trajectory.firstMeasurement().recHit()->geographicalId();
1045  } else
1046  LogError(metname) << "Wrong propagation direction!";
1047 
1048  const GeomDet* outerDet = gtg->idToDet(outerDetId);
1049  GlobalPoint outerTSOSPos = outerTSOS.globalParameters().position();
1050  bool inside = outerDet->surface().bounds().inside(outerDet->toLocal(outerTSOSPos));
1051 
1052  GlobalPoint hitPos =
1053  (outerRecHit->isValid()) ? outerRecHit->globalPosition() : outerTSOS.globalParameters().position();
1054 
1055  if (!inside) {
1056  LogTrace(metname) << "The Global Muon outerMostMeasurementState is not compatible with the recHit detector!"
1057  << " Setting outerMost postition to recHit position if recHit isValid: "
1058  << outerRecHit->isValid();
1059  LogTrace(metname) << "From " << outerTSOSPos << " to " << hitPos;
1060  }
1061 
1062  //build the TrackExtra
1063  GlobalPoint v = (inside) ? outerTSOSPos : hitPos;
1064  GlobalVector p = outerTSOS.globalParameters().momentum();
1065  math::XYZPoint outpos(v.x(), v.y(), v.z());
1066  math::XYZVector outmom(p.x(), p.y(), p.z());
1067 
1068  v = innerTSOS.globalParameters().position();
1069  p = innerTSOS.globalParameters().momentum();
1070  math::XYZPoint inpos(v.x(), v.y(), v.z());
1071  math::XYZVector inmom(p.x(), p.y(), p.z());
1072 
1073  reco::TrackExtra trackExtra(outpos,
1074  outmom,
1075  true,
1076  inpos,
1077  inmom,
1078  true,
1079  outerTSOS.curvilinearError(),
1080  outerId,
1081  innerTSOS.curvilinearError(),
1082  innerId,
1083  trajectory.direction(),
1084  trajectory.seedRef());
1085 
1086  return trackExtra;
1087 }

References alongMomentum, Surface::bounds(), TrajectoryStateOnSurface::curvilinearError(), Trajectory::direction(), Trajectory::firstMeasurement(), TrajectoryStateOnSurface::globalParameters(), Bounds::inside(), Trajectory::lastMeasurement(), LogTrace, metname, GlobalTrajectoryParameters::momentum(), oppositeToMomentum, AlCaHLTBitMon_ParallelJobs::p, GlobalTrajectoryParameters::position(), TrajectoryMeasurement::recHit(), Trajectory::recHits(), Trajectory::seedRef(), GeomDet::surface(), GeomDet::toLocal(), TrajectoryMeasurement::updatedState(), and findQualityFiles::v.

◆ checkRecHitsOrdering()

template<class TrackCollection >
RefitDirection::GeometricalDirection TrackExtenderWithMTDT< TrackCollection >::checkRecHitsOrdering ( TransientTrackingRecHit::ConstRecHitContainer const &  recHits) const
inline

Definition at line 259 of file TrackExtenderWithMTD.cc.

260  {
261  if (!recHits.empty()) {
262  GlobalPoint first = gtg->idToDet(recHits.front()->geographicalId())->position();
263  GlobalPoint last = gtg->idToDet(recHits.back()->geographicalId())->position();
264 
265  // maybe perp2?
266  auto rFirst = first.mag2();
267  auto rLast = last.mag2();
268  if (rFirst < rLast)
270  if (rFirst > rLast)
272  }
273  LogDebug("TrackExtenderWithMTD") << "Impossible to determine the rechits order" << endl;
275  }

References dqmdumpme::first, RefitDirection::insideOut, dqmdumpme::last, LogDebug, RefitDirection::outsideIn, position, FastTrackerRecHitMaskProducer_cfi::recHits, and RefitDirection::undetermined.

◆ dumpLayer()

template<class TrackCollection >
string TrackExtenderWithMTDT< TrackCollection >::dumpLayer ( const DetLayer layer) const

Definition at line 1090 of file TrackExtenderWithMTD.cc.

1090  {
1091  stringstream output;
1092 
1093  const BoundSurface* sur = nullptr;
1094  const BoundCylinder* bc = nullptr;
1095  const BoundDisk* bd = nullptr;
1096 
1097  sur = &(layer->surface());
1098  if ((bc = dynamic_cast<const BoundCylinder*>(sur))) {
1099  output << " Cylinder of radius: " << bc->radius() << endl;
1100  } else if ((bd = dynamic_cast<const BoundDisk*>(sur))) {
1101  output << " Disk at: " << bd->position().z() << endl;
1102  }
1103  return output.str();
1104 }

References convertSQLitetoXML_cfg::output, and GeometricSearchDet::surface().

◆ fillDescriptions()

template<class TrackCollection >
void TrackExtenderWithMTDT< TrackCollection >::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 391 of file TrackExtenderWithMTD.cc.

391  {
392  edm::ParameterSetDescription desc, transDesc;
393  desc.add<edm::InputTag>("tracksSrc", edm::InputTag("generalTracks"));
394  desc.add<edm::InputTag>("hitsSrc", edm::InputTag("mtdTrackingRecHits"));
395  desc.add<edm::InputTag>("beamSpotSrc", edm::InputTag("offlineBeamSpot"));
396  desc.add<edm::InputTag>("genVtxPositionSrc", edm::InputTag("genParticles:xyz0"));
397  desc.add<edm::InputTag>("genVtxTimeSrc", edm::InputTag("genParticles:t0"));
398  desc.add<edm::InputTag>("vtxSrc", edm::InputTag("offlinePrimaryVertices4D"));
399  desc.add<bool>("updateTrackTrajectory", true);
400  desc.add<bool>("updateTrackExtra", true);
401  desc.add<bool>("updateTrackHitPattern", true);
402  desc.add<std::string>("TransientTrackBuilder", "TransientTrackBuilder");
403  desc.add<std::string>("MTDRecHitBuilder", "MTDRecHitBuilder");
404  desc.add<std::string>("Propagator", "PropagatorWithMaterialForMTD");
406  false,
407  "KFFitterForRefitInsideOut",
408  "KFSmootherForRefitInsideOut",
409  "PropagatorWithMaterialForMTD",
410  "alongMomentum",
411  true,
412  "WithTrackAngle",
413  "MuonRecHitBuilder",
414  "MTDRecHitBuilder");
415  desc.add<edm::ParameterSetDescription>("TrackTransformer", transDesc);
416  desc.add<double>("estimatorMaxChi2", 500.);
417  desc.add<double>("estimatorMaxNSigma", 10.);
418  desc.add<double>("btlChi2Cut", 50.);
419  desc.add<double>("btlTimeChi2Cut", 10.);
420  desc.add<double>("etlChi2Cut", 50.);
421  desc.add<double>("etlTimeChi2Cut", 10.);
422  desc.add<bool>("useVertex", false);
423  desc.add<bool>("useSimVertex", false);
424  desc.add<double>("dZCut", 0.1);
425  desc.add<double>("bsTimeSpread", 0.2);
426  descriptions.add("trackExtenderWithMTDBase", desc);
427 }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), TrackTransformer::fillPSetDescription(), HLT_2018_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ fillMatchingHits()

template<class TrackCollection >
void TrackExtenderWithMTDT< TrackCollection >::fillMatchingHits ( const DetLayer ilay,
const TrajectoryStateOnSurface tsos,
const Trajectory traj,
const MTDTrackingDetSetVector hits,
const Propagator prop,
const reco::BeamSpot bs,
const double &  vtxTime,
const bool  matchVertex,
TransientTrackingRecHit::ConstRecHitContainer output,
MTDHitMatchingInfo &  bestHit 
) const

Definition at line 871 of file TrackExtenderWithMTD.cc.

880  {
881  std::set<MTDHitMatchingInfo> hitsInLayer;
882  bool hitMatched = false;
883 
884  using namespace std::placeholders;
885  auto find_hits = std::bind(find_hits_in_dets,
886  hits,
887  traj,
888  ilay,
889  tsos,
890  _1,
891  bs,
893  prop,
894  std::ref(theEstimator),
895  _2,
896  std::ref(hitsInLayer));
897 
898  if (useVertex_ && matchVertex)
899  find_hits(vtxTime, true);
900  else
901  find_hits(0, false);
902 
903  //just take the first hit because the hits are sorted on their matching quality
904  if (!hitsInLayer.empty()) {
905  //check hits to pass minimum quality matching requirements
906  if (hitsInLayer.begin()->estChi2 < etlChi2Cut_ && hitsInLayer.begin()->timeChi2 < etlTimeChi2Cut_) {
907  hitMatched = true;
908  output.push_back(hitbuilder->build(hitsInLayer.begin()->hit));
909  if (*(hitsInLayer.begin()) < bestHit)
910  bestHit = *(hitsInLayer.begin());
911  }
912  }
913 
914  if (useVertex_ && matchVertex && !hitMatched) {
915  //try a second search with beamspot hypothesis
916  hitsInLayer.clear();
917  find_hits(0, false);
918  if (!hitsInLayer.empty()) {
919  if (hitsInLayer.begin()->timeChi2 < etlTimeChi2Cut_) {
920  if (hitsInLayer.begin()->estChi2 < etlChi2Cut_) {
921  hitMatched = true;
922  output.push_back(hitbuilder->build(hitsInLayer.begin()->hit));
923  if ((*hitsInLayer.begin()) < bestHit)
924  bestHit = *(hitsInLayer.begin());
925  }
926  }
927  }
928  }
929 }

References cms::cuda::bs, hfClusterShapes_cfi::hits, and convertSQLitetoXML_cfg::output.

◆ fillValueMap()

template<class TrackCollection >
template<class H , class T >
void TrackExtenderWithMTDT< TrackCollection >::fillValueMap ( edm::Event iEvent,
const H &  handle,
const std::vector< T > &  vec,
const edm::EDPutToken token 
) const

Definition at line 431 of file TrackExtenderWithMTD.cc.

434  {
435  auto out = std::make_unique<edm::ValueMap<T>>();
437  filler.insert(handle, vec.begin(), vec.end());
438  filler.fill();
439  iEvent.put(token, std::move(out));
440 }

References trigObjTnPSource_cfi::filler, patZpeak::handle, iEvent, eostools::move(), MillePedeFileConverter_cfg::out, and unpackBuffers-CaloStage2::token.

◆ produce()

template<class TrackCollection >
void TrackExtenderWithMTDT< TrackCollection >::produce ( edm::Event ev,
const edm::EventSetup es 
)
final

setup the track extras

Definition at line 443 of file TrackExtenderWithMTD.cc.

443  {
444  //this produces pieces of the track extra
445  Traj2TrackHits t2t;
446 
447  theTransformer->setServices(es);
448 
449  TrackingRecHitRefProd hitsRefProd = ev.getRefBeforePut<TrackingRecHitCollection>();
450  reco::TrackExtraRefProd extrasRefProd = ev.getRefBeforePut<reco::TrackExtraCollection>();
451 
453 
455  es.get<MTDRecoGeometryRecord>().get(geo);
456 
459 
462 
465 
467  es.get<TrackerTopologyRcd>().get(httopo);
468  const TrackerTopology& ttopo = *httopo;
469 
470  auto output = std::make_unique<TrackCollection>();
471  auto extras = std::make_unique<reco::TrackExtraCollection>();
472  auto outhits = std::make_unique<edm::OwnVector<TrackingRecHit>>();
473 
474  std::vector<float> btlMatchChi2;
475  std::vector<float> etlMatchChi2;
476  std::vector<float> btlMatchTimeChi2;
477  std::vector<float> etlMatchTimeChi2;
478  std::vector<float> pathLengthsRaw;
479  std::vector<float> tmtdRaw;
480  std::vector<float> sigmatmtdRaw;
481  std::vector<float> pOrigTrkRaw;
482  std::vector<float> betaOrigTrkRaw;
483  std::vector<float> t0OrigTrkRaw;
484  std::vector<float> sigmat0OrigTrkRaw;
485  std::vector<float> pathLengthsOrigTrkRaw;
486  std::vector<float> tmtdOrigTrkRaw;
487  std::vector<float> sigmatmtdOrigTrkRaw;
488  std::vector<int> assocOrigTrkRaw;
489 
491  ev.getByToken(tracksToken_, tracksH);
492  const auto& tracks = *tracksH;
493 
495  ev.getByToken(hitsToken_, hitsH);
496  const auto& hits = *hitsH;
497 
499  ev.getByToken(bsToken_, bsH);
500  const auto& bs = *bsH;
501 
502  const Vertex* pv = nullptr;
503  if (useVertex_ && !useSimVertex_) {
505  ev.getByToken(vtxToken_, vtxH);
506  if (!vtxH.product()->empty())
507  pv = &(vtxH.product()->at(0));
508  }
509 
510  std::unique_ptr<math::XYZTLorentzVectorF> genPV(nullptr);
511  if (useVertex_ && useSimVertex_) {
512  const auto& genVtxPositionHandle = ev.getHandle(genVtxPositionToken_);
513  const auto& genVtxTimeHandle = ev.getHandle(genVtxTimeToken_);
514  genPV = std::make_unique<math::XYZTLorentzVectorF>(
515  genVtxPositionHandle->x(), genVtxPositionHandle->y(), genVtxPositionHandle->z(), *(genVtxTimeHandle));
516  }
517 
518  double vtxTime = 0.;
519  if (useVertex_) {
520  if (useSimVertex_ && genPV) {
521  vtxTime = genPV->t();
522  } else if (pv)
523  vtxTime = pv->t(); //already in ns
524  }
525 
526  std::vector<unsigned> track_indices;
527  unsigned itrack = 0;
528 
529  for (const auto& track : tracks) {
530  double trackVtxTime = 0.;
531  if (useVertex_) {
532  double dz;
533  if (useSimVertex_)
534  dz = std::abs(track.dz(math::XYZPoint(*genPV)));
535  else
536  dz = std::abs(track.dz(pv->position()));
537 
538  if (dz < dzCut_)
539  trackVtxTime = vtxTime;
540  }
541 
542  reco::TransientTrack ttrack(track, magfield.product(), gtg);
543  const auto& trajs = theTransformer->transform(track);
544  auto thits = theTransformer->getTransientRecHits(ttrack);
546  MTDHitMatchingInfo mBTL, mETL;
547  if (!trajs.empty()) {
548  const auto& btlhits = tryBTLLayers(track,
549  trajs.front(),
550  hits,
551  geo.product(),
552  magfield.product(),
553  prop.product(),
554  bs,
555  trackVtxTime,
556  trackVtxTime != 0.,
557  mBTL);
558  mtdthits.insert(mtdthits.end(), btlhits.begin(), btlhits.end());
559 
560  // in the future this should include an intermediate refit before propagating to the ETL
561  // for now it is ok
562  const auto& etlhits = tryETLLayers(track,
563  trajs.front(),
564  hits,
565  geo.product(),
566  magfield.product(),
567  prop.product(),
568  bs,
569  trackVtxTime,
570  trackVtxTime != 0.,
571  mETL);
572  mtdthits.insert(mtdthits.end(), etlhits.begin(), etlhits.end());
573  }
574 
575  auto ordering = checkRecHitsOrdering(thits);
577  thits.insert(thits.end(), mtdthits.begin(), mtdthits.end());
578  } else {
579  std::reverse(mtdthits.begin(), mtdthits.end());
580  mtdthits.insert(mtdthits.end(), thits.begin(), thits.end());
581  thits.swap(mtdthits);
582  }
583 
584  const auto& trajwithmtd = theTransformer->transform(ttrack, thits);
585  float pMap = 0.f, betaMap = 0.f, t0Map = 0.f, sigmat0Map = -1.f, pathLengthMap = -1.f, tmtdMap = 0.f,
586  sigmatmtdMap = -1.f;
587  int iMap = -1;
588 
589  for (const auto& trj : trajwithmtd) {
590  const auto& thetrj = (updateTraj_ ? trj : trajs.front());
591  float pathLength = 0.f, tmtd = 0.f, sigmatmtd = -1.f;
593  thetrj,
594  trj,
595  bs,
596  magfield.product(),
597  prop.product(),
598  !trajwithmtd.empty() && !mtdthits.empty(),
599  pathLength,
600  tmtd,
601  sigmatmtd);
602  if (result.ndof() >= 0) {
604  reco::TrackExtra::TrajParams trajParams;
606  size_t hitsstart = outhits->size();
607  if (updatePattern_) {
608  t2t(trj, *outhits, trajParams, chi2s); // this fills the output hit collection
609  } else {
610  t2t(thetrj, *outhits, trajParams, chi2s);
611  }
612  size_t hitsend = outhits->size();
613  extras->push_back(buildTrackExtra(trj)); // always push back the fully built extra, update by setting in track
614  extras->back().setHits(hitsRefProd, hitsstart, hitsend - hitsstart);
615  extras->back().setTrajParams(trajParams, chi2s);
616  //create the track
617  output->push_back(result);
618  btlMatchChi2.push_back(mBTL.hit ? mBTL.estChi2 : -1);
619  etlMatchChi2.push_back(mETL.hit ? mETL.estChi2 : -1);
620  btlMatchTimeChi2.push_back(mBTL.hit ? mBTL.timeChi2 : -1);
621  etlMatchTimeChi2.push_back(mETL.hit ? mETL.timeChi2 : -1);
622  pathLengthsRaw.push_back(pathLength);
623  tmtdRaw.push_back(tmtd);
624  sigmatmtdRaw.push_back(sigmatmtd);
625  pathLengthMap = pathLength;
626  tmtdMap = tmtd;
627  sigmatmtdMap = sigmatmtd;
628  auto& backtrack = output->back();
629  iMap = output->size() - 1;
630  pMap = backtrack.p();
631  betaMap = backtrack.beta();
632  t0Map = backtrack.t0();
633  sigmat0Map = std::copysign(std::sqrt(std::abs(backtrack.covt0t0())), backtrack.covt0t0());
634  reco::TrackExtraRef extraRef(extrasRefProd, extras->size() - 1);
635  backtrack.setExtra((updateExtra_ ? extraRef : track.extra()));
636  for (unsigned ihit = hitsstart; ihit < hitsend; ++ihit) {
637  backtrack.appendHitPattern((*outhits)[ihit], ttopo);
638  }
639  } else {
640  LogTrace("TrackExtenderWithMTD") << "Error in the MTD track refitting. This should not happen";
641  }
642  }
643 
644  pOrigTrkRaw.push_back(pMap);
645  betaOrigTrkRaw.push_back(betaMap);
646  t0OrigTrkRaw.push_back(t0Map);
647  sigmat0OrigTrkRaw.push_back(sigmat0Map);
648  pathLengthsOrigTrkRaw.push_back(pathLengthMap);
649  tmtdOrigTrkRaw.push_back(tmtdMap);
650  sigmatmtdOrigTrkRaw.push_back(sigmatmtdMap);
651  assocOrigTrkRaw.push_back(iMap);
652  ++itrack;
653  }
654 
655  auto outTrksHandle = ev.put(std::move(output));
656  ev.put(std::move(extras));
657  ev.put(std::move(outhits));
658 
659  fillValueMap(ev, outTrksHandle, btlMatchChi2, btlMatchChi2Token);
660  fillValueMap(ev, outTrksHandle, etlMatchChi2, etlMatchChi2Token);
661  fillValueMap(ev, outTrksHandle, btlMatchTimeChi2, btlMatchTimeChi2Token);
662  fillValueMap(ev, outTrksHandle, etlMatchTimeChi2, etlMatchTimeChi2Token);
663  fillValueMap(ev, outTrksHandle, pathLengthsRaw, pathLengthToken);
664  fillValueMap(ev, outTrksHandle, tmtdRaw, tmtdToken);
665  fillValueMap(ev, outTrksHandle, sigmatmtdRaw, sigmatmtdToken);
666  fillValueMap(ev, tracksH, pOrigTrkRaw, pOrigTrkToken);
667  fillValueMap(ev, tracksH, betaOrigTrkRaw, betaOrigTrkToken);
668  fillValueMap(ev, tracksH, t0OrigTrkRaw, t0OrigTrkToken);
669  fillValueMap(ev, tracksH, sigmat0OrigTrkRaw, sigmat0OrigTrkToken);
670  fillValueMap(ev, tracksH, pathLengthsOrigTrkRaw, pathLengthOrigTrkToken);
671  fillValueMap(ev, tracksH, tmtdOrigTrkRaw, tmtdOrigTrkToken);
672  fillValueMap(ev, tracksH, sigmatmtdOrigTrkRaw, sigmatmtdOrigTrkToken);
673  fillValueMap(ev, tracksH, assocOrigTrkRaw, assocOrigTrkToken);
674 }

References funct::abs(), cms::cuda::bs, PVValHelper::dz, ev, edm::EventSetup::get(), get, hfClusterShapes_cfi::hits, RefitDirection::insideOut, LogTrace, volumeBasedMagneticField_160812_cfi::magfield, eostools::move(), config::ordering, convertSQLitetoXML_cfg::output, edm::Handle< T >::product(), edm::ESHandle< T >::product(), MetAnalyzer::pv(), mps_fire::result, groupFilesInBlocks::reverse, mathSSE::sqrt(), HLT_2018_cff::track, and PDWG_EXOHSCP_cff::tracks.

◆ tryBTLLayers()

template<class TrackCollection >
TransientTrackingRecHit::ConstRecHitContainer TrackExtenderWithMTDT< TrackCollection >::tryBTLLayers ( const TrackType track,
const Trajectory traj,
const MTDTrackingDetSetVector hits,
const MTDDetLayerGeometry geo,
const MagneticField field,
const Propagator prop,
const reco::BeamSpot bs,
const double  vtxTime,
const bool  matchVertex,
MTDHitMatchingInfo &  bestHit 
) const

Definition at line 814 of file TrackExtenderWithMTD.cc.

824  {
825  const vector<const DetLayer*>& layers = geo->allBTLLayers();
826 
827  auto tTrack = builder->build(track);
828  // get the outermost trajectory point on the track
829  TrajectoryStateOnSurface tsos = tTrack.outermostMeasurementState();
830 
832  bestHit = MTDHitMatchingInfo();
833  for (const DetLayer* ilay : layers)
834  fillMatchingHits(ilay, tsos, traj, hits, prop, bs, vtxTime, matchVertex, output, bestHit);
835  return output;
836 }

References MTDDetLayerGeometry::allBTLLayers(), cms::cuda::bs, hfClusterShapes_cfi::hits, hgcalTopologyTester_cfi::layers, convertSQLitetoXML_cfg::output, and HLT_2018_cff::track.

◆ tryETLLayers()

template<class TrackCollection >
TransientTrackingRecHit::ConstRecHitContainer TrackExtenderWithMTDT< TrackCollection >::tryETLLayers ( const TrackType track,
const Trajectory traj,
const MTDTrackingDetSetVector hits,
const MTDDetLayerGeometry geo,
const MagneticField field,
const Propagator prop,
const reco::BeamSpot bs,
const double  vtxTime,
const bool  matchVertex,
MTDHitMatchingInfo &  bestHit 
) const

Definition at line 839 of file TrackExtenderWithMTD.cc.

849  {
850  const vector<const DetLayer*>& layers = geo->allETLLayers();
851 
852  auto tTrack = builder->build(track);
853  // get the outermost trajectory point on the track
854  TrajectoryStateOnSurface tsos = tTrack.outermostMeasurementState();
855 
857  bestHit = MTDHitMatchingInfo();
858  for (const DetLayer* ilay : layers) {
859  const BoundDisk& disk = static_cast<const MTDRingForwardDoubleLayer*>(ilay)->specificSurface();
860  const double diskZ = disk.position().z();
861 
862  if (tsos.globalPosition().z() * diskZ < 0)
863  continue; // only propagate to the disk that's on the same side
864 
865  fillMatchingHits(ilay, tsos, traj, hits, prop, bs, vtxTime, matchVertex, output, bestHit);
866  }
867  return output;
868 }

References MTDDetLayerGeometry::allETLLayers(), cms::cuda::bs, TrajectoryStateOnSurface::globalPosition(), hfClusterShapes_cfi::hits, hgcalTopologyTester_cfi::layers, convertSQLitetoXML_cfg::output, HLT_2018_cff::track, and PV3DBase< T, PVType, FrameType >::z().

Member Data Documentation

◆ assocOrigTrkToken

template<class TrackCollection >
edm::EDPutToken TrackExtenderWithMTDT< TrackCollection >::assocOrigTrkToken
private

◆ betaOrigTrkToken

template<class TrackCollection >
edm::EDPutToken TrackExtenderWithMTDT< TrackCollection >::betaOrigTrkToken
private

◆ bsTimeSpread_

template<class TrackCollection >
const float TrackExtenderWithMTDT< TrackCollection >::bsTimeSpread_
private

Definition at line 334 of file TrackExtenderWithMTD.cc.

◆ bsToken_

template<class TrackCollection >
edm::EDGetTokenT<reco::BeamSpot> TrackExtenderWithMTDT< TrackCollection >::bsToken_
private

Definition at line 310 of file TrackExtenderWithMTD.cc.

◆ btlChi2Cut_

template<class TrackCollection >
const float TrackExtenderWithMTDT< TrackCollection >::btlChi2Cut_
private

Definition at line 326 of file TrackExtenderWithMTD.cc.

◆ btlMatchChi2Token

template<class TrackCollection >
edm::EDPutToken TrackExtenderWithMTDT< TrackCollection >::btlMatchChi2Token
private

◆ btlMatchTimeChi2Token

template<class TrackCollection >
edm::EDPutToken TrackExtenderWithMTDT< TrackCollection >::btlMatchTimeChi2Token
private

◆ btlTimeChi2Cut_

template<class TrackCollection >
const float TrackExtenderWithMTDT< TrackCollection >::btlTimeChi2Cut_
private

Definition at line 327 of file TrackExtenderWithMTD.cc.

◆ builder

template<class TrackCollection >
edm::ESHandle<TransientTrackBuilder> TrackExtenderWithMTDT< TrackCollection >::builder
private

Definition at line 319 of file TrackExtenderWithMTD.cc.

◆ dzCut_

template<class TrackCollection >
const float TrackExtenderWithMTDT< TrackCollection >::dzCut_
private

Definition at line 333 of file TrackExtenderWithMTD.cc.

◆ estMaxChi2_

template<class TrackCollection >
const float TrackExtenderWithMTDT< TrackCollection >::estMaxChi2_
private

◆ estMaxNSigma_

template<class TrackCollection >
const float TrackExtenderWithMTDT< TrackCollection >::estMaxNSigma_
private

◆ etlChi2Cut_

template<class TrackCollection >
const float TrackExtenderWithMTDT< TrackCollection >::etlChi2Cut_
private

Definition at line 328 of file TrackExtenderWithMTD.cc.

◆ etlMatchChi2Token

template<class TrackCollection >
edm::EDPutToken TrackExtenderWithMTDT< TrackCollection >::etlMatchChi2Token
private

◆ etlMatchTimeChi2Token

template<class TrackCollection >
edm::EDPutToken TrackExtenderWithMTDT< TrackCollection >::etlMatchTimeChi2Token
private

◆ etlTimeChi2Cut_

template<class TrackCollection >
const float TrackExtenderWithMTDT< TrackCollection >::etlTimeChi2Cut_
private

Definition at line 329 of file TrackExtenderWithMTD.cc.

◆ genVtxPositionToken_

template<class TrackCollection >
edm::EDGetTokenT<GlobalPoint> TrackExtenderWithMTDT< TrackCollection >::genVtxPositionToken_
private

◆ genVtxTimeToken_

template<class TrackCollection >
edm::EDGetTokenT<float> TrackExtenderWithMTDT< TrackCollection >::genVtxTimeToken_
private

◆ gtg

template<class TrackCollection >
edm::ESHandle<GlobalTrackingGeometry> TrackExtenderWithMTDT< TrackCollection >::gtg
private

Definition at line 321 of file TrackExtenderWithMTD.cc.

◆ hitbuilder

template<class TrackCollection >
edm::ESHandle<TransientTrackingRecHitBuilder> TrackExtenderWithMTDT< TrackCollection >::hitbuilder
private

Definition at line 320 of file TrackExtenderWithMTD.cc.

◆ hitsToken_

template<class TrackCollection >
edm::EDGetTokenT<MTDTrackingDetSetVector> TrackExtenderWithMTDT< TrackCollection >::hitsToken_
private

Definition at line 309 of file TrackExtenderWithMTD.cc.

◆ mtdRecHitBuilder_

template<class TrackCollection >
const std::string TrackExtenderWithMTDT< TrackCollection >::mtdRecHitBuilder_
private

Definition at line 316 of file TrackExtenderWithMTD.cc.

◆ pathLengthOrigTrkToken

template<class TrackCollection >
edm::EDPutToken TrackExtenderWithMTDT< TrackCollection >::pathLengthOrigTrkToken
private

◆ pathLengthToken

template<class TrackCollection >
edm::EDPutToken TrackExtenderWithMTDT< TrackCollection >::pathLengthToken
private

◆ pOrigTrkToken

template<class TrackCollection >
edm::EDPutToken TrackExtenderWithMTDT< TrackCollection >::pOrigTrkToken
private

◆ prop

template<class TrackCollection >
edm::ESHandle<Propagator> TrackExtenderWithMTDT< TrackCollection >::prop
private

Definition at line 322 of file TrackExtenderWithMTD.cc.

◆ propagator_

template<class TrackCollection >
const std::string TrackExtenderWithMTDT< TrackCollection >::propagator_
private

Definition at line 316 of file TrackExtenderWithMTD.cc.

◆ sigmat0OrigTrkToken

template<class TrackCollection >
edm::EDPutToken TrackExtenderWithMTDT< TrackCollection >::sigmat0OrigTrkToken
private

◆ sigmatmtdOrigTrkToken

template<class TrackCollection >
edm::EDPutToken TrackExtenderWithMTDT< TrackCollection >::sigmatmtdOrigTrkToken
private

◆ sigmatmtdToken

template<class TrackCollection >
edm::EDPutToken TrackExtenderWithMTDT< TrackCollection >::sigmatmtdToken
private

◆ t0OrigTrkToken

template<class TrackCollection >
edm::EDPutToken TrackExtenderWithMTDT< TrackCollection >::t0OrigTrkToken
private

◆ theEstimator

template<class TrackCollection >
std::unique_ptr<MeasurementEstimator> TrackExtenderWithMTDT< TrackCollection >::theEstimator
private

◆ theTransformer

template<class TrackCollection >
std::unique_ptr<TrackTransformer> TrackExtenderWithMTDT< TrackCollection >::theTransformer
private

◆ tmtdOrigTrkToken

template<class TrackCollection >
edm::EDPutToken TrackExtenderWithMTDT< TrackCollection >::tmtdOrigTrkToken
private

◆ tmtdToken

template<class TrackCollection >
edm::EDPutToken TrackExtenderWithMTDT< TrackCollection >::tmtdToken
private

◆ tracksToken_

template<class TrackCollection >
edm::EDGetTokenT<InputCollection> TrackExtenderWithMTDT< TrackCollection >::tracksToken_
private

Definition at line 308 of file TrackExtenderWithMTD.cc.

◆ transientTrackBuilder_

template<class TrackCollection >
const std::string TrackExtenderWithMTDT< TrackCollection >::transientTrackBuilder_
private

Definition at line 316 of file TrackExtenderWithMTD.cc.

◆ updateExtra_

template<class TrackCollection >
const bool TrackExtenderWithMTDT< TrackCollection >::updateExtra_
private

Definition at line 315 of file TrackExtenderWithMTD.cc.

◆ updatePattern_

template<class TrackCollection >
const bool TrackExtenderWithMTDT< TrackCollection >::updatePattern_
private

Definition at line 315 of file TrackExtenderWithMTD.cc.

◆ updateTraj_

template<class TrackCollection >
const bool TrackExtenderWithMTDT< TrackCollection >::updateTraj_
private

Definition at line 315 of file TrackExtenderWithMTD.cc.

◆ useSimVertex_

template<class TrackCollection >
const bool TrackExtenderWithMTDT< TrackCollection >::useSimVertex_
private

◆ useVertex_

template<class TrackCollection >
const bool TrackExtenderWithMTDT< TrackCollection >::useVertex_
private

◆ vtxToken_

template<class TrackCollection >
edm::EDGetTokenT<VertexCollection> TrackExtenderWithMTDT< TrackCollection >::vtxToken_
private
Vector3DBase
Definition: Vector3DBase.h:8
edm::RefProd< TrackingRecHitCollection >
TrackExtenderWithMTDT::etlMatchChi2Token
edm::EDPutToken etlMatchChi2Token
Definition: TrackExtenderWithMTD.cc:293
TrackExtenderWithMTDT::theEstimator
std::unique_ptr< MeasurementEstimator > theEstimator
Definition: TrackExtenderWithMTD.cc:317
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
TrajectoryStateClosestToBeamLine
Definition: TrajectoryStateClosestToBeamLine.h:15
TrackExtenderWithMTDT::tryBTLLayers
TransientTrackingRecHit::ConstRecHitContainer tryBTLLayers(const TrackType &, const Trajectory &traj, const MTDTrackingDetSetVector &, const MTDDetLayerGeometry *, const MagneticField *field, const Propagator *prop, const reco::BeamSpot &bs, const double vtxTime, const bool matchVertex, MTDHitMatchingInfo &bestHit) const
Definition: TrackExtenderWithMTD.cc:814
TrackExtenderWithMTDT::genVtxTimeToken_
edm::EDGetTokenT< float > genVtxTimeToken_
Definition: TrackExtenderWithMTD.cc:312
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
TrackExtenderWithMTDT::etlTimeChi2Cut_
const float etlTimeChi2Cut_
Definition: TrackExtenderWithMTD.cc:329
GeomDet
Definition: GeomDet.h:27
edm::Handle::product
T const * product() const
Definition: Handle.h:70
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
DetLayer
Definition: DetLayer.h:21
Trajectory::seedRef
edm::RefToBase< TrajectorySeed > seedRef(void) const
Definition: Trajectory.h:303
Trajectory::chiSquared
float chiSquared() const
Definition: Trajectory.h:241
GlobalTrajectoryParameters::position
GlobalPoint position() const
Definition: GlobalTrajectoryParameters.h:60
Trajectory::direction
PropagationDirection const & direction() const
Definition: Trajectory.cc:133
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
TrackExtenderWithMTDT::useSimVertex_
const bool useSimVertex_
Definition: TrackExtenderWithMTD.cc:332
patZpeak.handle
handle
Definition: patZpeak.py:23
ForwardSubdetector
ForwardSubdetector
Definition: ForwardSubdetector.h:4
TrackerTopology
Definition: TrackerTopology.h:16
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
reco::TrackBase::undefQuality
Definition: TrackBase.h:151
deep_tau::DeepTauBase::BasicDiscriminator
BasicDiscriminator
Definition: DeepTauBase.h:115
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
TrackExtenderWithMTDT::estMaxChi2_
const float estMaxChi2_
Definition: TrackExtenderWithMTD.cc:324
pos
Definition: PixelAliasList.h:18
TrackExtenderWithMTDT::btlMatchTimeChi2Token
edm::EDPutToken btlMatchTimeChi2Token
Definition: TrackExtenderWithMTD.cc:294
FreeTrajectoryState::charge
TrackCharge charge() const
Definition: FreeTrajectoryState.h:69
TrackExtenderWithMTDT::updateExtra_
const bool updateExtra_
Definition: TrackExtenderWithMTD.cc:315
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
TransientRecHitRecord
Definition: TransientRecHitRecord.h:14
TrackExtenderWithMTDT::sigmatmtdToken
edm::EDPutToken sigmatmtdToken
Definition: TrackExtenderWithMTD.cc:298
oppositeToMomentum
Definition: PropagationDirection.h:4
GlobalTrackingGeometryRecord
Definition: GlobalTrackingGeometryRecord.h:17
Surface
Definition: Surface.h:36
TrackExtenderWithMTDT::tmtdOrigTrkToken
edm::EDPutToken tmtdOrigTrkToken
Definition: TrackExtenderWithMTD.cc:304
TrajectoryMeasurement::updatedState
TrajectoryStateOnSurface const & updatedState() const
Definition: TrajectoryMeasurement.h:184
TrackExtenderWithMTDT::btlMatchChi2Token
edm::EDPutToken btlMatchChi2Token
Definition: TrackExtenderWithMTD.cc:292
TrackExtenderWithMTDT::updatePattern_
const bool updatePattern_
Definition: TrackExtenderWithMTD.cc:315
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
findQualityFiles.v
v
Definition: findQualityFiles.py:179
TransientTrackingRecHitBuilder::build
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
TrackExtenderWithMTDT::genVtxPositionToken_
edm::EDGetTokenT< GlobalPoint > genVtxPositionToken_
Definition: TrackExtenderWithMTD.cc:311
edm::Handle
Definition: AssociativeIterator.h:50
TrackExtenderWithMTDT::pathLengthToken
edm::EDPutToken pathLengthToken
Definition: TrackExtenderWithMTD.cc:296
dqmdumpme.first
first
Definition: dqmdumpme.py:55
BoundDisk
TrackExtenderWithMTDT::bsTimeSpread_
const float bsTimeSpread_
Definition: TrackExtenderWithMTD.cc:334
TrackExtenderWithMTDT::buildTrack
reco::Track buildTrack(const reco::Track &, const Trajectory &, const Trajectory &, const reco::BeamSpot &, const MagneticField *field, const Propagator *prop, bool hasMTD, float &pathLength, float &tmtdOut, float &sigmatmtdOut) const
Definition: TrackExtenderWithMTD.cc:934
groupFilesInBlocks.reverse
reverse
Definition: groupFilesInBlocks.py:131
edm::Ref< TrackExtraCollection >
TrackExtenderWithMTDT::updateTraj_
const bool updateTraj_
Definition: TrackExtenderWithMTD.cc:315
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
ndof
Definition: HIMultiTrackSelector.h:49
TrackExtenderWithMTDT::buildTrackExtra
reco::TrackExtra buildTrackExtra(const Trajectory &trajectory) const
Definition: TrackExtenderWithMTD.cc:1014
TrackExtenderWithMTDT::estMaxNSigma_
const float estMaxNSigma_
Definition: TrackExtenderWithMTD.cc:325
TrackExtenderWithMTDT::useVertex_
const bool useVertex_
Definition: TrackExtenderWithMTD.cc:331
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
DetId
Definition: DetId.h:17
reco::TrackExtra
Definition: TrackExtra.h:26
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
cms::cuda::bs
bs
Definition: HistoContainer.h:127
dqmdumpme.last
last
Definition: dqmdumpme.py:56
TrackExtenderWithMTDT::vtxToken_
edm::EDGetTokenT< VertexCollection > vtxToken_
Definition: TrackExtenderWithMTD.cc:313
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
config.ordering
ordering
Definition: config.py:7
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
TrackExtenderWithMTDT::t0OrigTrkToken
edm::EDPutToken t0OrigTrkToken
Definition: TrackExtenderWithMTD.cc:301
FrontierCondition_GT_autoExpress_cfi.t0
t0
Definition: FrontierCondition_GT_autoExpress_cfi.py:148
Bounds::inside
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
TrackExtenderWithMTDT::builder
edm::ESHandle< TransientTrackBuilder > builder
Definition: TrackExtenderWithMTD.cc:319
TrackExtenderWithMTDT::fillMatchingHits
void fillMatchingHits(const DetLayer *, const TrajectoryStateOnSurface &, const Trajectory &, const MTDTrackingDetSetVector &, const Propagator *, const reco::BeamSpot &, const double &, const bool, TransientTrackingRecHit::ConstRecHitContainer &, MTDHitMatchingInfo &) const
Definition: TrackExtenderWithMTD.cc:871
FreeTrajectoryState::curvilinearError
const CurvilinearTrajectoryError & curvilinearError() const
Definition: FreeTrajectoryState.h:89
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
Surface::bounds
const Bounds & bounds() const
Definition: Surface.h:87
TransientTrackRecord
Definition: TransientTrackRecord.h:11
reco::Track
Definition: Track.h:27
edm::ESHandle< MTDDetLayerGeometry >
reco::TrackExtraCollection
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
Definition: TrackExtraFwd.h:10
TrackExtenderWithMTDT::fillValueMap
void fillValueMap(edm::Event &iEvent, const H &handle, const std::vector< T > &vec, const edm::EDPutToken &token) const
Definition: TrackExtenderWithMTD.cc:431
Point3DBase< float, GlobalTag >
TrackExtenderWithMTDT::assocOrigTrkToken
edm::EDPutToken assocOrigTrkToken
Definition: TrackExtenderWithMTD.cc:306
GeomDet::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
TrackExtenderWithMTDT::bsToken_
edm::EDGetTokenT< reco::BeamSpot > bsToken_
Definition: TrackExtenderWithMTD.cc:310
MTDTrackingRecHit::timeError
float timeError() const
Definition: MTDTrackingRecHit.h:28
GlobalTrajectoryParameters::momentum
GlobalVector momentum() const
Definition: GlobalTrajectoryParameters.h:65
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
RefitDirection::undetermined
Definition: RefitDirection.h:15
TrackExtenderWithMTDT::propagator_
const std::string propagator_
Definition: TrackExtenderWithMTD.cc:316
TrackExtenderWithMTDT::gtg
edm::ESHandle< GlobalTrackingGeometry > gtg
Definition: TrackExtenderWithMTD.cc:321
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
Trajectory::ndof
int ndof(bool bon=true) const
Definition: Trajectory.cc:97
TrackExtenderWithMTDT::theTransformer
std::unique_ptr< TrackTransformer > theTransformer
Definition: TrackExtenderWithMTD.cc:318
edm::LogError
Definition: MessageLogger.h:183
Trajectory::RecHitContainer
ConstRecHitContainer RecHitContainer
Definition: Trajectory.h:42
TrackExtenderWithMTDT::sigmatmtdOrigTrkToken
edm::EDPutToken sigmatmtdOrigTrkToken
Definition: TrackExtenderWithMTD.cc:305
TrackingRecHit::ConstRecHitContainer
std::vector< ConstRecHitPointer > ConstRecHitContainer
Definition: TrackingRecHit.h:32
TrackExtenderWithMTDT::tryETLLayers
TransientTrackingRecHit::ConstRecHitContainer tryETLLayers(const TrackType &, const Trajectory &traj, const MTDTrackingDetSetVector &, const MTDDetLayerGeometry *, const MagneticField *field, const Propagator *prop, const reco::BeamSpot &bs, const double vtxTime, const bool matchVertex, MTDHitMatchingInfo &bestHit) const
Definition: TrackExtenderWithMTD.cc:839
TrackExtenderWithMTDT::hitsToken_
edm::EDGetTokenT< MTDTrackingDetSetVector > hitsToken_
Definition: TrackExtenderWithMTD.cc:309
Trajectory::lastMeasurement
TrajectoryMeasurement const & lastMeasurement() const
Definition: Trajectory.h:150
trigObjTnPSource_cfi.filler
filler
Definition: trigObjTnPSource_cfi.py:21
Traj2TrackHits
Definition: Traj2TrackHits.h:16
TrackExtenderWithMTDT::mtdRecHitBuilder_
const std::string mtdRecHitBuilder_
Definition: TrackExtenderWithMTD.cc:316
FastTime
Definition: ForwardSubdetector.h:6
TrackExtenderWithMTDT::tracksToken_
edm::EDGetTokenT< InputCollection > tracksToken_
Definition: TrackExtenderWithMTD.cc:308
MTDTrackingRecHit
A 2D TrackerRecHit with time and time error information.
Definition: MTDTrackingRecHit.h:10
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
TrackExtenderWithMTDT::sigmat0OrigTrkToken
edm::EDPutToken sigmat0OrigTrkToken
Definition: TrackExtenderWithMTD.cc:302
createfilelist.int
int
Definition: createfilelist.py:10
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
iEvent
int iEvent
Definition: GenABIO.cc:224
TrackExtenderWithMTDT::betaOrigTrkToken
edm::EDPutToken betaOrigTrkToken
Definition: TrackExtenderWithMTD.cc:300
TrackExtenderWithMTDT::hitbuilder
edm::ESHandle< TransientTrackingRecHitBuilder > hitbuilder
Definition: TrackExtenderWithMTD.cc:320
get
#define get
MTDDetLayerGeometry::allBTLLayers
const std::vector< const DetLayer * > & allBTLLayers() const
return the BTL DetLayers (barrel), inside-out
Definition: MTDDetLayerGeometry.cc:70
MTDTrackingRecHit::time
float time() const
Definition: MTDTrackingRecHit.h:27
MTDRecoGeometryRecord
Definition: MTDRecoGeometryRecord.h:17
TrackTransformer::fillPSetDescription
static void fillPSetDescription(edm::ParameterSetDescription &descriptions, bool DoPredictionsOnly=false, const std::string &Fitter="KFFitterForRefitInsideOut", const std::string &Smoother="KFSmootherForRefitInsideOut", const std::string &Propagator="SmartPropagatorAnyRK", const std::string &RefitDirection="alongMomentum", bool RefitRPCHits=true, const std::string &TrackerRecHitBuilder="WithTrackAngle", const std::string &MuonRecHitBuilder="MuonRecHitBuilder", const std::string &MTDRecHitBuilder="MTDRecHitBuilder")
fillDescriptions
Definition: TrackTransformer.cc:45
Trajectory::measurements
DataContainer const & measurements() const
Definition: Trajectory.h:178
reco::TrackBase::algo
TrackAlgorithm algo() const
Definition: TrackBase.h:532
TrajectoryMeasurement::recHit
ConstRecHitPointer const & recHit() const
Definition: TrajectoryMeasurement.h:190
Trajectory::recHits
ConstRecHitContainer recHits() const
Definition: Trajectory.h:186
eostools.move
def move(src, dest)
Definition: eostools.py:511
TrackExtenderWithMTDT::transientTrackBuilder_
const std::string transientTrackBuilder_
Definition: TrackExtenderWithMTD.cc:316
Trajectory::firstMeasurement
TrajectoryMeasurement const & firstMeasurement() const
Definition: Trajectory.h:166
reco::TransientTrack
Definition: TransientTrack.h:19
TrackExtenderWithMTDT::pathLengthOrigTrkToken
edm::EDPutToken pathLengthOrigTrkToken
Definition: TrackExtenderWithMTD.cc:303
reco::TrackExtraBase::Chi2sFive
std::vector< unsigned char > Chi2sFive
Definition: TrackExtraBase.h:25
TrajectoryMeasurement::ConstRecHitPointer
TrackingRecHit::ConstRecHitPointer ConstRecHitPointer
Definition: TrajectoryMeasurement.h:28
PVValHelper::dz
Definition: PVValidationHelpers.h:50
TrackExtenderWithMTDT::checkRecHitsOrdering
RefitDirection::GeometricalDirection checkRecHitsOrdering(TransientTrackingRecHit::ConstRecHitContainer const &recHits) const
Definition: TrackExtenderWithMTD.cc:259
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
TrajectoryStateOnSurface::curvilinearError
const CurvilinearTrajectoryError & curvilinearError() const
Definition: TrajectoryStateOnSurface.h:72
TrackExtenderWithMTDT::pOrigTrkToken
edm::EDPutToken pOrigTrkToken
Definition: TrackExtenderWithMTD.cc:299
GlobalTrackingGeometry::idToDet
const GeomDet * idToDet(DetId) const override
Definition: GlobalTrackingGeometry.cc:44
RefitDirection::insideOut
Definition: RefitDirection.h:15
GeometricSearchDet::surface
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
BoundCylinder
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
TransientTrackBuilder::build
reco::TransientTrack build(const reco::Track *p) const
Definition: TransientTrackBuilder.cc:20
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
MTDDetLayerGeometry::allETLLayers
const std::vector< const DetLayer * > & allETLLayers() const
return the ETL DetLayers (endcap), -Z to +Z
Definition: MTDDetLayerGeometry.cc:72
mps_fire.result
result
Definition: mps_fire.py:303
TrackExtenderWithMTDT::etlMatchTimeChi2Token
edm::EDPutToken etlMatchTimeChi2Token
Definition: TrackExtenderWithMTD.cc:295
edm::helper::Filler
Definition: ValueMap.h:22
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
TrajectoryStateOnSurface::globalParameters
const GlobalTrajectoryParameters & globalParameters() const
Definition: TrajectoryStateOnSurface.h:64
TrackExtenderWithMTDT::btlChi2Cut_
const float btlChi2Cut_
Definition: TrackExtenderWithMTD.cc:326
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
TrackExtenderWithMTDT::dzCut_
const float dzCut_
Definition: TrackExtenderWithMTD.cc:333
TrajectoryStateClosestToBeamLine::trackStateAtPCA
FTS const & trackStateAtPCA() const
Definition: TrajectoryStateClosestToBeamLine.h:32
DetId::Forward
Definition: DetId.h:30
TrackExtenderWithMTDT::btlTimeChi2Cut_
const float btlTimeChi2Cut_
Definition: TrackExtenderWithMTD.cc:327
volumeBasedMagneticField_160812_cfi.magfield
magfield
Definition: volumeBasedMagneticField_160812_cfi.py:11
TrackExtenderWithMTDT::prop
edm::ESHandle< Propagator > prop
Definition: TrackExtenderWithMTD.cc:322
RefitDirection::outsideIn
Definition: RefitDirection.h:15
reco::TrackExtraBase::TrajParams
std::vector< LocalTrajectoryParameters > TrajParams
Definition: TrackExtraBase.h:24
edm::InputTag
Definition: InputTag.h:15
alongMomentum
Definition: PropagationDirection.h:4
hgcalTopologyTester_cfi.layers
layers
Definition: hgcalTopologyTester_cfi.py:8
TrackExtenderWithMTDT::etlChi2Cut_
const float etlChi2Cut_
Definition: TrackExtenderWithMTD.cc:328
reco::Vertex
Definition: Vertex.h:35
TrackExtenderWithMTDT::tmtdToken
edm::EDPutToken tmtdToken
Definition: TrackExtenderWithMTD.cc:297
hit
Definition: SiStripHitEffFromCalibTree.cc:88
edm::OwnVector< TrackingRecHit >
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:43
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316
TrackingComponentsRecord
Definition: TrackingComponentsRecord.h:12