CMS 3D CMS Logo

IPProducer.h
Go to the documentation of this file.
1 #ifndef RecoBTag_IPProducer
2 #define RecoBTag_IPProducer
3 
4 // system include files
5 #include <cmath>
6 #include <memory>
7 #include <iostream>
8 #include <algorithm>
9 
10 #include "boost/bind.hpp"
11 
12 // user include files
22 
28 
32 
41 
45 
46 // system include files
47 #include <memory>
48 
49 // user include files
54 
56 using boost::bind;
57 
58 namespace IPProducerHelpers {
59  class FromJTA {
60  public:
63  iC.consumes<reco::JetTracksAssociationCollection>(iConfig.getParameter<edm::InputTag>("jetTracks"))) {}
64  reco::TrackRefVector tracks(const reco::JTATagInfo& it) { return it.tracks(); }
65  std::vector<reco::JTATagInfo> makeBaseVector(const edm::Event& iEvent) {
67  iEvent.getByToken(token_associator, jetTracksAssociation);
68  std::vector<reco::JTATagInfo> bases;
69  size_t i = 0;
70  for (reco::JetTracksAssociationCollection::const_iterator it = jetTracksAssociation->begin();
71  it != jetTracksAssociation->end();
72  it++, i++) {
73  edm::Ref<reco::JetTracksAssociationCollection> jtaRef(jetTracksAssociation, i);
74  bases.push_back(reco::JTATagInfo(jtaRef));
75  }
76  return bases;
77  }
78 
80  };
82  public:
84  : token_jets(iC.consumes<edm::View<reco::Jet> >(iConfig.getParameter<edm::InputTag>(jets))),
85  token_cands(iC.consumes<edm::View<reco::Candidate> >(iConfig.getParameter<edm::InputTag>("candidates"))),
86  maxDeltaR(iConfig.getParameter<double>("maxDeltaR")),
87  explicitJTA(iConfig.existsAs<bool>("explicitJTA") ? iConfig.getParameter<bool>("explicitJTA") : false) {}
88 
89  const std::vector<reco::CandidatePtr>& tracks(const reco::JetTagInfo& it) { return m_map[it.jet().key()]; }
90  std::vector<reco::JetTagInfo> makeBaseVector(const edm::Event& iEvent) {
92  iEvent.getByToken(token_jets, jets);
93  std::vector<reco::JetTagInfo> bases;
94 
96  iEvent.getByToken(token_cands, cands);
97  m_map.clear();
98  m_map.resize(jets->size());
99  double maxDeltaR2 = maxDeltaR * maxDeltaR;
100  size_t i = 0;
101  for (edm::View<reco::Jet>::const_iterator it = jets->begin(); it != jets->end(); it++, i++) {
103  bases.push_back(reco::JetTagInfo(jRef));
104  if (explicitJTA) {
105  for (size_t j = 0; j < it->numberOfDaughters(); ++j) {
106  if (it->daughterPtr(j)->bestTrack() != nullptr && it->daughterPtr(j)->charge() != 0) {
107  m_map[i].push_back(it->daughterPtr(j));
108  }
109  }
110  } else {
111  for (size_t j = 0; j < cands->size(); ++j) {
112  if ((*cands)[j].bestTrack() != nullptr && (*cands)[j].charge() != 0 && (*cands)[j].pt() > 0 &&
113  Geom::deltaR2((*cands)[j], (*jets)[i]) < maxDeltaR2) {
114  m_map[i].push_back(cands->ptrAt(j));
115  }
116  }
117  }
118  }
119  return bases;
120  }
121  std::vector<std::vector<reco::CandidatePtr> > m_map;
124  double maxDeltaR;
126  };
127 } // namespace IPProducerHelpers
128 template <class Container, class Base, class Helper>
130 public:
131  typedef std::vector<reco::IPTagInfo<Container, Base> > Product;
132 
133  explicit IPProducer(const edm::ParameterSet&);
134  ~IPProducer() override;
135  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
136 
137  void produce(edm::Event&, const edm::EventSetup&) override;
138 
139 private:
140  void checkEventSetup(const edm::EventSetup& iSetup);
141 
144 
148  std::unique_ptr<HistogramProbabilityEstimator> m_probabilityEstimator;
149  unsigned long long m_calibrationCacheId2D;
150  unsigned long long m_calibrationCacheId3D;
151  bool m_useDB;
152 
155  double m_cutMaxTIP;
156  double m_cutMinPt;
158  double m_cutMaxLIP;
162  Helper m_helper;
163 };
164 
165 // -*- C++ -*-
166 //
167 // Package: IPProducer
168 // Class: IPProducer
169 //
177 //
178 // Original Author: Andrea Rizzi
179 // Created: Thu Apr 6 09:56:23 CEST 2006
180 //
181 //
182 
183 //
184 // constructors and destructor
185 //
186 template <class Container, class Base, class Helper>
188  : m_config(iConfig), m_helper(iConfig, consumesCollector()) {
191 
192  token_primaryVertex = consumes<reco::VertexCollection>(m_config.getParameter<edm::InputTag>("primaryVertex"));
193 
194  m_computeProbabilities = m_config.getParameter<bool>("computeProbabilities");
195  m_computeGhostTrack = m_config.getParameter<bool>("computeGhostTrack");
196  m_ghostTrackPriorDeltaR = m_config.getParameter<double>("ghostTrackPriorDeltaR");
197  m_cutPixelHits = m_config.getParameter<int>("minimumNumberOfPixelHits");
198  m_cutTotalHits = m_config.getParameter<int>("minimumNumberOfHits");
199  m_cutMaxTIP = m_config.getParameter<double>("maximumTransverseImpactParameter");
200  m_cutMinPt = m_config.getParameter<double>("minimumTransverseMomentum");
201  m_cutMaxChiSquared = m_config.getParameter<double>("maximumChiSquared");
202  m_cutMaxLIP = m_config.getParameter<double>("maximumLongitudinalImpactParameter");
203  m_directionWithTracks = m_config.getParameter<bool>("jetDirectionUsingTracks");
204  m_directionWithGhostTrack = m_config.getParameter<bool>("jetDirectionUsingGhostTrack");
205  m_useTrackQuality = m_config.getParameter<bool>("useTrackQuality");
206 
208  produces<reco::TrackCollection>("ghostTracks");
209  produces<Product>();
210 }
211 
212 template <class Container, class Base, class Helper>
214 
215 //
216 // member functions
217 //
218 // ------------ method called to produce the data ------------
219 template <class Container, class Base, class Helper>
221  // Update probability estimator if event setup is changed
222  if (m_computeProbabilities)
223  checkEventSetup(iSetup);
224 
226  iEvent.getByToken(token_primaryVertex, primaryVertex);
227 
229  iSetup.get<TransientTrackRecord>().get("TransientTrackBuilder", builder);
230  // m_algo.setTransientTrackBuilder(builder.product());
231 
232  // output collections
233  auto result = std::make_unique<Product>();
234 
235  std::unique_ptr<reco::TrackCollection> ghostTracks;
236  reco::TrackRefProd ghostTrackRefProd;
237  if (m_computeGhostTrack) {
238  ghostTracks = std::make_unique<reco::TrackCollection>();
239  ghostTrackRefProd = iEvent.getRefBeforePut<reco::TrackCollection>("ghostTracks");
240  }
241 
242  // use first pv of the collection
244  const reco::Vertex* pv = &dummy;
246  if (!primaryVertex->empty()) {
247  pv = &*primaryVertex->begin();
248  // we always use the first vertex (at the moment)
250  } else { // create a dummy PV
252  e(0, 0) = 0.0015 * 0.0015;
253  e(1, 1) = 0.0015 * 0.0015;
254  e(2, 2) = 15. * 15.;
255  reco::Vertex::Point p(0, 0, 0);
256  dummy = reco::Vertex(p, e, 0, 0, 0);
257  }
258 
259  std::vector<Base> baseTagInfos = m_helper.makeBaseVector(iEvent);
260  for (typename std::vector<Base>::const_iterator it = baseTagInfos.begin(); it != baseTagInfos.end(); it++) {
261  Container tracks = m_helper.tracks(*it);
262  math::XYZVector jetMomentum = it->jet()->momentum();
263 
264  if (m_directionWithTracks) {
265  jetMomentum *= 0.5;
266  for (typename Container::const_iterator itTrack = tracks.begin(); itTrack != tracks.end(); ++itTrack)
267  if (reco::btag::toTrack(*itTrack)->numberOfValidHits() >= m_cutTotalHits) //minimal quality cuts
268  jetMomentum += (*itTrack)->momentum();
269  }
270 
272  std::vector<reco::TransientTrack> transientTracks;
273 
274  for (typename Container::const_iterator itTrack = tracks.begin(); itTrack != tracks.end(); ++itTrack) {
275  reco::TransientTrack transientTrack = builder->build(*itTrack);
276  const reco::Track& track = transientTrack.track(); //**itTrack;
277  /* cout << " pt " << track.pt() <<
278  " d0 " << fabs(track.d0()) <<
279  " #hit " << track.hitPattern().numberOfValidHits()<<
280  " ipZ " << fabs(track.dz()-pv->z())<<
281  " chi2 " << track.normalizedChi2()<<
282  " #pixel " << track.hitPattern().numberOfValidPixelHits()<< endl;
283 */
284  if (track.pt() > m_cutMinPt &&
285  track.hitPattern().numberOfValidHits() >= m_cutTotalHits && // min num tracker hits
286  track.hitPattern().numberOfValidPixelHits() >= m_cutPixelHits &&
287  track.normalizedChi2() < m_cutMaxChiSquared && std::abs(track.dxy(pv->position())) < m_cutMaxTIP &&
288  std::abs(track.dz(pv->position())) < m_cutMaxLIP) {
289  // std::cout << "selected" << std::endl;
290  selectedTracks.push_back(*itTrack);
291  transientTracks.push_back(transientTrack);
292  }
293  }
294  // std::cout <<"SIZE: " << transientTracks.size() << std::endl;
295  GlobalVector direction(jetMomentum.x(), jetMomentum.y(), jetMomentum.z());
296 
297  std::unique_ptr<reco::GhostTrack> ghostTrack;
298  reco::TrackRef ghostTrackRef;
299  if (m_computeGhostTrack) {
300  reco::GhostTrackFitter fitter;
301  GlobalPoint origin = RecoVertex::convertPos(pv->position());
303  ghostTrack.reset(
304  new reco::GhostTrack(fitter.fit(origin, error, direction, m_ghostTrackPriorDeltaR, transientTracks)));
305 
306  /*
307  if (std::sqrt(jetMomentum.Perp2()) > 30) {
308  double offset = ghostTrack->prediction().lambda(origin);
309  std::cout << "------------------ jet pt " << std::sqrt(jetMomentum.Perp2()) << std::endl;
310  const std::vector<GhostTrackState> *states = &ghostTrack->states();
311  for(std::vector<GhostTrackState>::const_iterator state = states->begin();
312  state != states->end(); ++state) {
313  double dist = state->lambda() - offset;
314  double err = state->lambdaError(ghostTrack->prediction(), error);
315  double ipSig = IPTools::signedImpactParameter3D(state->track(), direction, *pv).second.significance();
316  double axisDist = state->axisDistance(ghostTrack->prediction());
317  std::cout << state->track().impactPointState().freeState()->momentum().perp()
318  << ": " << dist << "/" << err << " [" << (dist / err) << "], ipsig = " << ipSig << ", dist = " << axisDist << ", w = " << state->weight() << std::endl;
319  }
320  }
321 */
322  ghostTrackRef = reco::TrackRef(ghostTrackRefProd, ghostTracks->size());
323  ghostTracks->push_back(*ghostTrack);
324 
325  if (m_directionWithGhostTrack) {
326  const reco::GhostTrackPrediction& pred = ghostTrack->prediction();
327  double lambda = pred.lambda(origin);
330  0,
331  0,
332  0);
333  pv = &dummy;
334  direction = pred.direction();
335  }
336  }
337 
338  std::vector<float> prob2D, prob3D;
339  std::vector<reco::btag::TrackIPData> ipData;
340 
341  for (unsigned int ind = 0; ind < transientTracks.size(); ind++) {
342  const reco::TransientTrack& transientTrack = transientTracks[ind];
343  const reco::Track& track = transientTrack.track();
344 
345  reco::btag::TrackIPData trackIP;
346  trackIP.ip3d = IPTools::signedImpactParameter3D(transientTrack, direction, *pv).second;
347  trackIP.ip2d = IPTools::signedTransverseImpactParameter(transientTrack, direction, *pv).second;
348 
349  TrajectoryStateOnSurface closest =
350  IPTools::closestApproachToJet(transientTrack.impactPointState(), *pv, direction, transientTrack.field());
351  if (closest.isValid())
352  trackIP.closestToJetAxis = closest.globalPosition();
353 
354  // TODO: cross check if it is the same using other methods
355  trackIP.distanceToJetAxis = IPTools::jetTrackDistance(transientTrack, direction, *pv).second;
356 
357  if (ghostTrack.get()) {
358  const std::vector<reco::GhostTrackState>& states = ghostTrack->states();
359  std::vector<reco::GhostTrackState>::const_iterator pos = std::find_if(
360  states.begin(),
361  states.end(),
362  bind(std::equal_to<reco::TransientTrack>(), bind(&reco::GhostTrackState::track, _1), transientTrack));
363 
364  if (pos != states.end() && pos->isValid()) {
365  VertexDistance3D dist;
366  const reco::GhostTrackPrediction& pred = ghostTrack->prediction();
367  GlobalPoint p1 = pos->tsos().globalPosition();
368  GlobalError e1 = pos->tsos().cartesianError().position();
369  GlobalPoint p2 = pred.position(pos->lambda());
370  GlobalError e2 = pred.positionError(pos->lambda());
371  trackIP.closestToGhostTrack = p1;
372  trackIP.distanceToGhostTrack = dist.distance(VertexState(p1, e1), VertexState(p2, e2));
373  trackIP.ghostTrackWeight = pos->weight();
374  } else {
375  trackIP.distanceToGhostTrack = Measurement1D(0., -1.);
376  trackIP.ghostTrackWeight = 0.;
377  }
378  } else {
379  trackIP.distanceToGhostTrack = Measurement1D(0., -1.);
380  trackIP.ghostTrackWeight = 1.;
381  }
382 
383  ipData.push_back(trackIP);
384 
385  if (m_computeProbabilities) {
386  //probability with 3D ip
387  std::pair<bool, double> probability = m_probabilityEstimator->probability(
388  m_useTrackQuality, 0, ipData.back().ip3d.significance(), track, *(it->jet()), *pv);
389  prob3D.push_back(probability.first ? probability.second : -1.);
390 
391  //probability with 2D ip
392  probability = m_probabilityEstimator->probability(
393  m_useTrackQuality, 1, ipData.back().ip2d.significance(), track, *(it->jet()), *pv);
394  prob2D.push_back(probability.first ? probability.second : -1.);
395  }
396  }
397 
398  result->push_back(
399  typename Product::value_type(ipData, prob2D, prob3D, selectedTracks, *it, pvRef, direction, ghostTrackRef));
400  }
401 
402  if (m_computeGhostTrack)
403  iEvent.put(std::move(ghostTracks), "ghostTracks");
404  iEvent.put(std::move(result));
405 }
406 
413 
414 template <class Container, class Base, class Helper>
418  unsigned long long cacheId2D = re2D.cacheIdentifier();
419  unsigned long long cacheId3D = re3D.cacheIdentifier();
420 
421  if (cacheId2D != m_calibrationCacheId2D || cacheId3D != m_calibrationCacheId3D) //Calibration changed
422  {
423  //iSetup.get<BTagTrackProbabilityRcd>().get(calib);
425  iSetup.get<BTagTrackProbability2DRcd>().get(calib2DHandle);
427  iSetup.get<BTagTrackProbability3DRcd>().get(calib3DHandle);
428 
429  const TrackProbabilityCalibration* ca2D = calib2DHandle.product();
430  const TrackProbabilityCalibration* ca3D = calib3DHandle.product();
431 
432  m_probabilityEstimator.reset(new HistogramProbabilityEstimator(ca3D, ca2D));
433  }
434  m_calibrationCacheId3D = cacheId3D;
435  m_calibrationCacheId2D = cacheId2D;
436 }
437 
438 // Specialized templates used to fill 'descriptions'
439 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
440 template <>
442  edm::ConfigurationDescriptions& descriptions) {
444  desc.add<double>("maximumTransverseImpactParameter", 0.2);
445  desc.add<int>("minimumNumberOfHits", 8);
446  desc.add<double>("minimumTransverseMomentum", 1.0);
447  desc.add<edm::InputTag>("primaryVertex", edm::InputTag("offlinePrimaryVertices"));
448  desc.add<double>("maximumLongitudinalImpactParameter", 17.0);
449  desc.add<bool>("computeGhostTrack", true);
450  desc.add<double>("ghostTrackPriorDeltaR", 0.03);
451  desc.add<edm::InputTag>("jetTracks", edm::InputTag("ak4JetTracksAssociatorAtVertexPF"));
452  desc.add<bool>("jetDirectionUsingGhostTrack", false);
453  desc.add<int>("minimumNumberOfPixelHits", 2);
454  desc.add<bool>("jetDirectionUsingTracks", false);
455  desc.add<bool>("computeProbabilities", true);
456  desc.add<bool>("useTrackQuality", false);
457  desc.add<double>("maximumChiSquared", 5.0);
458  descriptions.addDefault(desc);
459 }
460 
461 template <>
463  edm::ConfigurationDescriptions& descriptions) {
465  desc.add<double>("maximumTransverseImpactParameter", 0.2);
466  desc.add<int>("minimumNumberOfHits", 8);
467  desc.add<double>("minimumTransverseMomentum", 1.0);
468  desc.add<edm::InputTag>("primaryVertex", edm::InputTag("offlinePrimaryVertices"));
469  desc.add<double>("maximumLongitudinalImpactParameter", 17.0);
470  desc.add<bool>("computeGhostTrack", true);
471  desc.add<double>("maxDeltaR", 0.4);
472  desc.add<edm::InputTag>("candidates", edm::InputTag("particleFlow"));
473  desc.add<bool>("jetDirectionUsingGhostTrack", false);
474  desc.add<int>("minimumNumberOfPixelHits", 2);
475  desc.add<bool>("jetDirectionUsingTracks", false);
476  desc.add<bool>("computeProbabilities", true);
477  desc.add<bool>("useTrackQuality", false);
478  desc.add<edm::InputTag>("jets", edm::InputTag("ak4PFJetsCHS"));
479  desc.add<double>("ghostTrackPriorDeltaR", 0.03);
480  desc.add<double>("maximumChiSquared", 5.0);
481  desc.addOptional<bool>("explicitJTA", false);
482  descriptions.addDefault(desc);
483 }
484 
485 #endif
Vector3DBase
Definition: Vector3DBase.h:8
reco::JTATagInfo::tracks
TrackRefVector tracks(void) const override
returns a list of tracks associated to the jet
Definition: JTATagInfo.h:20
ConfigurationDescriptions.h
edm::RefProd< TrackCollection >
reco::btag::TrackIPData::distanceToJetAxis
Measurement1D distanceToJetAxis
Definition: IPTagInfo.h:33
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
GhostTrackPrediction.h
JetTracksAssociation.h
TrackProbabilityCalibration.h
JetTag.h
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
Measurement1D
Definition: Measurement1D.h:11
electrons_cff.bool
bool
Definition: electrons_cff.py:372
mps_fire.i
i
Definition: mps_fire.py:355
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
BTagTrackProbability3DRcd.h
edm::eventsetup::EventSetupRecord
Definition: EventSetupRecord.h:82
funct::false
false
Definition: Factorize.h:34
IPProducerHelpers
Definition: IPProducer.h:58
TrackProbabilityCalibration
Definition: TrackProbabilityCalibration.h:11
configurableAnalysis::Candidate
char Candidate[]
Definition: modules.cc:20
reco::GhostTrackPrediction::positionError
GlobalError positionError(double lambda=0.) const
Definition: GhostTrackPrediction.cc:131
ESHandle.h
IPProducer::m_cutPixelHits
int m_cutPixelHits
Definition: IPProducer.h:153
edm::RefToBase::key
size_t key() const
Definition: RefToBase.h:219
sistrip::View
View
Definition: ConstantsForView.h:26
reco::btag::toTrack
const reco::Track * toTrack(const reco::TrackBaseRef &t)
Definition: IPTagInfo.h:24
reco::GhostTrackState::track
const TransientTrack & track() const
Definition: GhostTrackState.cc:56
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm
HLT enums.
Definition: AlignableModifier.h:19
reco::Vertex::Error
math::Error< dimension >::type Error
covariance error matrix (3x3)
Definition: Vertex.h:44
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
GhostTrackFitter.h
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
VertexDistance3D::distance
Measurement1D distance(const GlobalPoint &vtx1Position, const GlobalError &vtx1PositionError, const GlobalPoint &vtx2Position, const GlobalError &vtx2PositionError) const override
Definition: VertexDistance3D.cc:17
pos
Definition: PixelAliasList.h:18
ConvertError.h
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
reco::btag::TrackIPData::closestToGhostTrack
GlobalPoint closestToGhostTrack
Definition: IPTagInfo.h:30
IPProducerHelpers::FromJTA
Definition: IPProducer.h:59
IPProducer::m_useDB
bool m_useDB
Definition: IPProducer.h:151
IPProducer::m_config
const edm::ParameterSet & m_config
Definition: IPProducer.h:142
IPProducer
Definition: IPProducer.h:129
EDProducer.h
IPTools::closestApproachToJet
TrajectoryStateOnSurface closestApproachToJet(const TrajectoryStateOnSurface &state, const reco::Vertex &vertex, const GlobalVector &aJetDirection, const MagneticField *field)
Definition: IPTools.cc:182
ConvertToFromReco.h
IPProducerHelpers::FromJTA::makeBaseVector
std::vector< reco::JTATagInfo > makeBaseVector(const edm::Event &iEvent)
Definition: IPProducer.h:65
IPProducer::m_directionWithTracks
bool m_directionWithTracks
Definition: IPProducer.h:159
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
VertexDistance3D.h
edm::RefVector< TrackCollection >
GhostTrackState.h
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
IPTools::signedTransverseImpactParameter
std::pair< bool, Measurement1D > signedTransverseImpactParameter(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:57
IPProducerHelpers::FromJetAndCands::maxDeltaR
double maxDeltaR
Definition: IPProducer.h:124
IPProducer::IPProducer
IPProducer(const edm::ParameterSet &)
Definition: IPProducer.h:187
edm::Handle
Definition: AssociativeIterator.h:50
IPProducerHelpers::FromJTA::FromJTA
FromJTA(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC)
Definition: IPProducer.h:61
relativeConstraints.error
error
Definition: relativeConstraints.py:53
edm::ParameterSetDescription::addOptional
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:105
reco::TrackBase::numberOfValidHits
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:751
reco::JetTagInfo::jet
edm::RefToBase< Jet > jet(void) const override
returns a polymorphic reference to the tagged jet
Definition: JetTagInfo.h:22
IPProducer::m_computeGhostTrack
bool m_computeGhostTrack
Definition: IPProducer.h:146
IPProducerHelpers::FromJTA::tracks
reco::TrackRefVector tracks(const reco::JTATagInfo &it)
Definition: IPProducer.h:64
reco::JetExtendedAssociation::Container
edm::AssociationVector< reco::JetRefBaseProd, Values > Container
Definition: JetExtendedAssociation.h:29
edm::Ref
Definition: AssociativeIterator.h:58
EventSetupRecord.h
IPProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: IPProducer.h:220
BeamMonitor_cff.primaryVertex
primaryVertex
hltOfflineBeamSpot for HLTMON
Definition: BeamMonitor_cff.py:7
IPProducerHelpers::FromJetAndCands::FromJetAndCands
FromJetAndCands(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC, const std::string &jets="jets")
Definition: IPProducer.h:83
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
MakerMacros.h
BTagTrackProbability3DRcd
Definition: BTagTrackProbability3DRcd.h:24
IPProducer::~IPProducer
~IPProducer() override
Definition: IPProducer.h:213
reco::GhostTrackPrediction::prediction
const Vector & prediction() const
Definition: GhostTrackPrediction.h:59
Track.h
reco::btag::TrackIPData::ghostTrackWeight
float ghostTrackWeight
Definition: IPTagInfo.h:35
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
Jet
Definition: Jet.py:1
IPTools::signedImpactParameter3D
std::pair< bool, Measurement1D > signedImpactParameter3D(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:81
IPProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::AssociationVector::begin
const_iterator begin() const
Definition: AssociationVector.h:108
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
IPProducerHelpers::FromJetAndCands::m_map
std::vector< std::vector< reco::CandidatePtr > > m_map
Definition: IPProducer.h:121
reco::JetTagInfo
Definition: JetTagInfo.h:9
TrackIPTagInfo.h
TransientTrackRecord
Definition: TransientTrackRecord.h:11
reco::Track
Definition: Track.h:27
edm::ESHandle< TransientTrackBuilder >
p2
double p2[4]
Definition: TauolaWrapper.h:90
HistogramProbabilityEstimator.h
reco::btag::TrackIPData::closestToJetAxis
GlobalPoint closestToJetAxis
Definition: IPTagInfo.h:29
IPProducerHelpers::FromJTA::token_associator
edm::EDGetTokenT< reco::JetTracksAssociationCollection > token_associator
Definition: IPProducer.h:79
VertexState.h
VertexDistance3D
Definition: VertexDistance3D.h:13
edm::AssociationVector::end
const_iterator end() const
Definition: AssociationVector.h:109
Point3DBase< float, GlobalTag >
ParameterSetDescription.h
EventSetupRecordImplementation.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
reco::TrackRef
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
IPTools::jetTrackDistance
std::pair< double, Measurement1D > jetTrackDistance(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:206
IPProducer::m_computeProbabilities
bool m_computeProbabilities
Definition: IPProducer.h:145
reco::GhostTrackFitter::fit
GhostTrack fit(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, double coneRadius, const std::vector< TransientTrack > &tracks) const
Definition: GhostTrackFitter.cc:30
reco::JetTracksAssociationCollection
JetTracksAssociation::Container JetTracksAssociationCollection
typedefs for backward compatibility
Definition: JetTracksAssociation.h:60
TransientTrackBuilder.h
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
IPProducerHelpers::FromJetAndCands::token_cands
edm::EDGetTokenT< edm::View< reco::Candidate > > token_cands
Definition: IPProducer.h:123
RecoVertex::convertError
reco::Vertex::Error convertError(const GlobalError &ge)
Definition: ConvertError.h:8
IPProducer::m_calibrationCacheId2D
unsigned long long m_calibrationCacheId2D
Definition: IPProducer.h:149
reco::GhostTrackPrediction::direction
const GlobalVector direction() const
Definition: GhostTrackPrediction.h:63
Event.h
reco::GhostTrackPrediction::position
GlobalPoint position(double lambda=0.) const
Definition: GhostTrackPrediction.h:67
StorageManager_cfg.e1
e1
Definition: StorageManager_cfg.py:16
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
IPProducerHelpers::FromJetAndCands::makeBaseVector
std::vector< reco::JetTagInfo > makeBaseVector(const edm::Event &iEvent)
Definition: IPProducer.h:90
IPProducer::m_cutMaxLIP
double m_cutMaxLIP
Definition: IPProducer.h:158
BTagTrackProbability2DRcd.h
reco::GhostTrack
Definition: GhostTrack.h:16
reco::TransientTrack::impactPointState
TrajectoryStateOnSurface impactPointState() const
Definition: TransientTrack.h:98
IPProducer::m_directionWithGhostTrack
bool m_directionWithGhostTrack
Definition: IPProducer.h:160
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::AssociationVector::const_iterator
transient_vector_type::const_iterator const_iterator
Definition: AssociationVector.h:106
edm::stream::EDProducer
Definition: EDProducer.h:38
p1
double p1[4]
Definition: TauolaWrapper.h:89
GlobalErrorBase< double, ErrorMatrixTag >
HistogramProbabilityEstimator
Definition: HistogramProbabilityEstimator.h:18
edm::EventSetup
Definition: EventSetup.h:57
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
IPProducer::m_cutMinPt
double m_cutMinPt
Definition: IPProducer.h:156
TransientTrackRecord.h
IPProducer::m_calibrationCacheId3D
unsigned long long m_calibrationCacheId3D
Definition: IPProducer.h:150
get
#define get
IPProducer::m_cutMaxChiSquared
double m_cutMaxChiSquared
Definition: IPProducer.h:157
IPProducerHelpers::FromJetAndCands::tracks
const std::vector< reco::CandidatePtr > & tracks(const reco::JetTagInfo &it)
Definition: IPProducer.h:89
IPProducerHelpers::FromJetAndCands::token_jets
edm::EDGetTokenT< edm::View< reco::Jet > > token_jets
Definition: IPProducer.h:122
reco::TransientTrack::field
const MagneticField * field() const
Definition: TransientTrack.h:110
reco::btag::TrackIPData::distanceToGhostTrack
Measurement1D distanceToGhostTrack
Definition: IPTagInfo.h:34
InputTag.h
reco::GhostTrackFitter
Definition: GhostTrackFitter.h:19
IPProducer::m_cutMaxTIP
double m_cutMaxTIP
Definition: IPProducer.h:155
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
reco::Vertex::Point
math::XYZPoint Point
point in the space
Definition: Vertex.h:40
eostools.move
def move(src, dest)
Definition: eostools.py:511
IPTools.h
HltBtagValidation_cff.Vertex
Vertex
Definition: HltBtagValidation_cff.py:32
reco::TransientTrack
Definition: TransientTrack.h:19
reco::TransientTrack::track
const Track & track() const
Definition: TransientTrack.h:117
HLTMuonOfflineAnalyzer_cfi.deltaR2
deltaR2
Definition: HLTMuonOfflineAnalyzer_cfi.py:105
Frameworkfwd.h
VertexState
Definition: VertexState.h:13
reco::JTATagInfo
Definition: JTATagInfo.h:10
IPProducer::m_helper
Helper m_helper
Definition: IPProducer.h:162
reco::btag::TrackIPData::ip2d
Measurement1D ip2d
Definition: IPTagInfo.h:31
HLT_2018_cff.cands
cands
Definition: HLT_2018_cff.py:13762
EventSetup.h
edm::RefToBase< reco::Jet >
reco::btag::TrackIPData::ip3d
Measurement1D ip3d
Definition: IPTagInfo.h:32
IPProducer::m_cutTotalHits
int m_cutTotalHits
Definition: IPProducer.h:154
edm::View::const_iterator
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
IPProducer::checkEventSetup
void checkEventSetup(const edm::EventSetup &iSetup)
Definition: IPProducer.h:415
GhostTrack.h
RecoVertex::convertPos
reco::Vertex::Point convertPos(const GlobalPoint &p)
Definition: ConvertToFromReco.h:7
TransientTrackBuilder::build
reco::TransientTrack build(const reco::Track *p) const
Definition: TransientTrackBuilder.cc:20
reco::GhostTrackPrediction
Definition: GhostTrackPrediction.h:21
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
IPProducer::Product
std::vector< reco::IPTagInfo< Container, Base > > Product
Definition: IPProducer.h:131
IPProducer::m_useTrackQuality
bool m_useTrackQuality
Definition: IPProducer.h:161
mps_fire.result
result
Definition: mps_fire.py:303
ConsumesCollector.h
Candidate.h
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
edm::eventsetup::EventSetupRecord::cacheIdentifier
unsigned long long cacheIdentifier() const
Definition: EventSetupRecord.h:185
View.h
ParameterSet.h
IPProducerHelpers::FromJetAndCands::explicitJTA
bool explicitJTA
Definition: IPProducer.h:125
dummy
Definition: DummySelector.h:38
EventSetupRecordKey.h
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
edm::Event
Definition: Event.h:73
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
JTATagInfo.h
IPProducer::m_probabilityEstimator
std::unique_ptr< HistogramProbabilityEstimator > m_probabilityEstimator
Definition: IPProducer.h:148
BTagTrackProbability2DRcd
Definition: BTagTrackProbability2DRcd.h:24
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
JetTagInfo.h
reco::Vertex
Definition: Vertex.h:35
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
IPProducer::token_primaryVertex
edm::EDGetTokenT< reco::VertexCollection > token_primaryVertex
Definition: IPProducer.h:143
IPProducerHelpers::FromJetAndCands
Definition: IPProducer.h:81
TrackCollections2monitor_cff.selectedTracks
selectedTracks
Definition: TrackCollections2monitor_cff.py:32
IPProducer::m_ghostTrackPriorDeltaR
double m_ghostTrackPriorDeltaR
Definition: IPProducer.h:147
reco::btag::TrackIPData
Definition: IPTagInfo.h:28
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
reco::GhostTrackPrediction::lambda
double lambda(const GlobalPoint &point) const
Definition: GhostTrackPrediction.h:65