CMS 3D CMS Logo

AnalyticalTrackSelector.cc
Go to the documentation of this file.
1 
11 #include <utility>
12 #include <vector>
13 #include <memory>
14 #include <algorithm>
15 #include <map>
20 
31 
32 #include "MultiTrackSelector.h"
33 
34 using namespace reco;
35 
37 private:
38 public:
42  ~AnalyticalTrackSelector() override;
43 
44 private:
47  void run(edm::Event& evt, const edm::EventSetup& es) const override;
48 
54  double minEta_;
55  double maxEta_;
56 
59 };
60 
62 
64 #include <Math/DistFunc.h>
65 #include "TMath.h"
66 
68  //Spoof the pset for each track selector!
69  //Size is always 1!!!
70  qualityToSet_.reserve(1);
71  vtxNumber_.reserve(1);
72  vertexCut_.reserve(1);
73  res_par_.reserve(1);
74  chi2n_par_.reserve(1);
75  chi2n_no1Dmod_par_.reserve(1);
76  d0_par1_.reserve(1);
77  dz_par1_.reserve(1);
78  d0_par2_.reserve(1);
79  dz_par2_.reserve(1);
80  applyAdaptedPVCuts_.reserve(1);
81  max_d0_.reserve(1);
82  max_z0_.reserve(1);
83  nSigmaZ_.reserve(1);
84  min_layers_.reserve(1);
85  min_3Dlayers_.reserve(1);
86  max_lostLayers_.reserve(1);
87  min_hits_bypass_.reserve(1);
88  applyAbsCutsIfNoPV_.reserve(1);
89  max_d0NoPV_.reserve(1);
90  max_z0NoPV_.reserve(1);
91  preFilter_.reserve(1);
92  max_relpterr_.reserve(1);
93  min_nhits_.reserve(1);
94  max_minMissHitOutOrIn_.reserve(1);
95  max_lostHitFraction_.reserve(1);
96  min_eta_.reserve(1);
97  max_eta_.reserve(1);
98  forest_.reserve(1);
99  mvaType_.reserve(1);
100  useMVA_.reserve(1);
101 
102  produces<edm::ValueMap<float>>("MVAVals");
103  //foward compatibility
104  produces<MVACollection>("MVAValues");
105  useAnyMVA_ = false;
106  forest_[0] = nullptr;
107  if (cfg.exists("useAnyMVA"))
108  useAnyMVA_ = cfg.getParameter<bool>("useAnyMVA");
109 
110  src_ = consumes<reco::TrackCollection>(cfg.getParameter<edm::InputTag>("src"));
111  hSrc_ = consumes<TrackingRecHitCollection>(cfg.getParameter<edm::InputTag>("src"));
112  beamspot_ = consumes<reco::BeamSpot>(cfg.getParameter<edm::InputTag>("beamspot"));
113  useVertices_ = cfg.getParameter<bool>("useVertices");
114  useVtxError_ = cfg.getParameter<bool>("useVtxError");
115  if (useVertices_)
116  vertices_ = consumes<reco::VertexCollection>(cfg.getParameter<edm::InputTag>("vertices"));
117  copyExtras_ = cfg.getUntrackedParameter<bool>("copyExtras", false);
118  copyTrajectories_ = cfg.getUntrackedParameter<bool>("copyTrajectories", false);
119  if (copyTrajectories_) {
120  srcTraj_ = consumes<std::vector<Trajectory>>(cfg.getParameter<edm::InputTag>("src"));
121  srcTass_ = consumes<TrajTrackAssociationCollection>(cfg.getParameter<edm::InputTag>("src"));
122  }
123 
124  qualityToSet_.push_back(TrackBase::undefQuality);
125  // parameters for vertex selection
126  vtxNumber_.push_back(useVertices_ ? cfg.getParameter<int32_t>("vtxNumber") : 0);
127  vertexCut_.push_back(useVertices_ ? cfg.getParameter<std::string>("vertexCut") : "");
128  // parameters for adapted optimal cuts on chi2 and primary vertex compatibility
129  res_par_.push_back(cfg.getParameter<std::vector<double>>("res_par"));
130  chi2n_par_.push_back(cfg.getParameter<double>("chi2n_par"));
131  chi2n_no1Dmod_par_.push_back(cfg.getParameter<double>("chi2n_no1Dmod_par"));
132  d0_par1_.push_back(cfg.getParameter<std::vector<double>>("d0_par1"));
133  dz_par1_.push_back(cfg.getParameter<std::vector<double>>("dz_par1"));
134  d0_par2_.push_back(cfg.getParameter<std::vector<double>>("d0_par2"));
135  dz_par2_.push_back(cfg.getParameter<std::vector<double>>("dz_par2"));
136 
137  // Boolean indicating if adapted primary vertex compatibility cuts are to be applied.
138  applyAdaptedPVCuts_.push_back(cfg.getParameter<bool>("applyAdaptedPVCuts"));
139  // Impact parameter absolute cuts.
140  max_d0_.push_back(cfg.getParameter<double>("max_d0"));
141  max_z0_.push_back(cfg.getParameter<double>("max_z0"));
142  nSigmaZ_.push_back(cfg.getParameter<double>("nSigmaZ"));
143  // Cuts on numbers of layers with hits/3D hits/lost hits.
144  min_layers_.push_back(cfg.getParameter<uint32_t>("minNumberLayers"));
145  min_3Dlayers_.push_back(cfg.getParameter<uint32_t>("minNumber3DLayers"));
146  max_lostLayers_.push_back(cfg.getParameter<uint32_t>("maxNumberLostLayers"));
147  min_hits_bypass_.push_back(cfg.getParameter<uint32_t>("minHitsToBypassChecks"));
148  max_relpterr_.push_back(cfg.getParameter<double>("max_relpterr"));
149  min_nhits_.push_back(cfg.getParameter<uint32_t>("min_nhits"));
150  max_minMissHitOutOrIn_.push_back(
151  cfg.existsAs<int32_t>("max_minMissHitOutOrIn") ? cfg.getParameter<int32_t>("max_minMissHitOutOrIn") : 99);
152  max_lostHitFraction_.push_back(
153  cfg.existsAs<double>("max_lostHitFraction") ? cfg.getParameter<double>("max_lostHitFraction") : 1.0);
154  min_eta_.push_back(cfg.getParameter<double>("min_eta"));
155  max_eta_.push_back(cfg.getParameter<double>("max_eta"));
156 
157  // Flag to apply absolute cuts if no PV passes the selection
158  applyAbsCutsIfNoPV_.push_back(cfg.getParameter<bool>("applyAbsCutsIfNoPV"));
159  keepAllTracks_.push_back(cfg.exists("keepAllTracks") ? cfg.getParameter<bool>("keepAllTracks") : false);
160 
161  setQualityBit_.push_back(false);
162  std::string qualityStr = cfg.getParameter<std::string>("qualityBit");
163 
164  if (d0_par1_[0].size() != 2 || dz_par1_[0].size() != 2 || d0_par2_[0].size() != 2 || dz_par2_[0].size() != 2) {
165  edm::LogError("MisConfiguration") << "vector of size less then 2";
166  throw;
167  }
168 
169  if (cfg.exists("qualityBit")) {
170  std::string qualityStr = cfg.getParameter<std::string>("qualityBit");
171  if (!qualityStr.empty()) {
172  setQualityBit_[0] = true;
173  qualityToSet_[0] = TrackBase::qualityByName(cfg.getParameter<std::string>("qualityBit"));
174  }
175  }
176 
177  if (keepAllTracks_[0] && !setQualityBit_[0])
178  throw cms::Exception("Configuration")
179  << "If you set 'keepAllTracks' to true, you must specify which qualityBit to set.\n";
180  if (setQualityBit_[0] && (qualityToSet_[0] == TrackBase::undefQuality))
181  throw cms::Exception("Configuration")
182  << "You can't set the quality bit " << cfg.getParameter<std::string>("qualityBit")
183  << " as it is 'undefQuality' or unknown.\n";
184  if (applyAbsCutsIfNoPV_[0]) {
185  max_d0NoPV_.push_back(cfg.getParameter<double>("max_d0NoPV"));
186  max_z0NoPV_.push_back(cfg.getParameter<double>("max_z0NoPV"));
187  } else { //dummy values
188  max_d0NoPV_.push_back(0.);
189  max_z0NoPV_.push_back(0.);
190  }
191 
192  if (useAnyMVA_) {
193  bool thisMVA = false;
194  if (cfg.exists("useMVA"))
195  thisMVA = cfg.getParameter<bool>("useMVA");
196  useMVA_.push_back(thisMVA);
197  if (thisMVA) {
198  double minVal = -1;
199  if (cfg.exists("minMVA"))
200  minVal = cfg.getParameter<double>("minMVA");
201  min_MVA_.push_back(minVal);
202  mvaType_.push_back(cfg.exists("mvaType") ? cfg.getParameter<std::string>("mvaType") : "Detached");
203  forestLabel_.push_back(cfg.exists("GBRForestLabel") ? cfg.getParameter<std::string>("GBRForestLabel")
204  : "MVASelectorIter0");
205  useMVAonly_.push_back(cfg.exists("useMVAonly") ? cfg.getParameter<bool>("useMVAonly") : false);
206  } else {
207  min_MVA_.push_back(-9999.0);
208  useMVAonly_.push_back(false);
209  mvaType_.push_back("Detached");
210  forestLabel_.push_back("MVASelectorIter0");
211  }
212  } else {
213  useMVA_.push_back(false);
214  useMVAonly_.push_back(false);
215  min_MVA_.push_back(-9999.0);
216  mvaType_.push_back("Detached");
217  forestLabel_.push_back("MVASelectorIter0");
218  }
219 
220  std::string alias(cfg.getParameter<std::string>("@module_label"));
221  produces<reco::TrackCollection>().setBranchAlias(alias + "Tracks");
222  if (copyExtras_) {
223  produces<reco::TrackExtraCollection>().setBranchAlias(alias + "TrackExtras");
224  produces<TrackingRecHitCollection>().setBranchAlias(alias + "RecHits");
225  }
226  if (copyTrajectories_) {
227  produces<std::vector<Trajectory>>().setBranchAlias(alias + "Trajectories");
228  produces<TrajTrackAssociationCollection>().setBranchAlias(alias + "TrajectoryTrackAssociations");
229  }
230 }
231 
233 
235  // storage....
236  std::unique_ptr<reco::TrackCollection> selTracks_;
237  std::unique_ptr<reco::TrackExtraCollection> selTrackExtras_;
238  std::unique_ptr<TrackingRecHitCollection> selHits_;
239  std::unique_ptr<std::vector<Trajectory>> selTrajs_;
240  std::unique_ptr<std::vector<const Trajectory*>> selTrajPtrs_;
241  std::unique_ptr<TrajTrackAssociationCollection> selTTAss_;
242  reco::TrackRefProd rTracks_;
243  reco::TrackExtraRefProd rTrackExtras_;
244  TrackingRecHitRefProd rHits_;
245  edm::RefProd<std::vector<Trajectory>> rTrajectories_;
246  std::vector<reco::TrackRef> trackRefs_;
247 
248  using namespace std;
249  using namespace edm;
250  using namespace reco;
251 
252  Handle<TrackCollection> hSrcTrack;
256 
257  // looking for the beam spot
259  evt.getByToken(beamspot_, hBsp);
260  reco::BeamSpot vertexBeamSpot;
261  vertexBeamSpot = *hBsp;
262 
263  // Select good primary vertices for use in subsequent track selection
264  const reco::VertexCollection dummyVtx;
265  const reco::VertexCollection* vtxPtr = &dummyVtx;
266  std::vector<Point> points;
267  std::vector<float> vterr, vzerr;
268  if (useVertices_) {
269  vtxPtr = &evt.get(vertices_);
270  selectVertices(0, *vtxPtr, points, vterr, vzerr);
271  // Debug
272  LogDebug("SelectVertex") << points.size() << " good pixel vertices";
273  }
274 
275  // Get tracks
276  evt.getByToken(src_, hSrcTrack);
277  // get hits in track..
279  evt.getByToken(hSrc_, hSrcHits);
280  const TrackingRecHitCollection& srcHits(*hSrcHits);
281 
282  selTracks_ = std::make_unique<TrackCollection>();
283  rTracks_ = evt.getRefBeforePut<TrackCollection>();
284  if (copyExtras_) {
285  selTrackExtras_ = std::make_unique<TrackExtraCollection>();
286  selHits_ = std::make_unique<TrackingRecHitCollection>();
288  rTrackExtras_ = evt.getRefBeforePut<TrackExtraCollection>();
289  }
290 
291  if (copyTrajectories_)
292  trackRefs_.resize(hSrcTrack->size());
293 
294  std::vector<float> mvaVals_(hSrcTrack->size(), -99.f);
295  processMVA(evt, es, vertexBeamSpot, *vtxPtr, 0, mvaVals_, true);
296 
297  // Loop over tracks
298  size_t current = 0;
299  for (TrackCollection::const_iterator it = hSrcTrack->begin(), ed = hSrcTrack->end(); it != ed; ++it, ++current) {
300  const Track& trk = *it;
301  // Check if this track passes cuts
302 
303  LogTrace("TrackSelection") << "ready to check track with pt=" << trk.pt();
304 
305  float mvaVal = 0;
306  if (useAnyMVA_)
307  mvaVal = mvaVals_[current];
308  bool ok = select(0, vertexBeamSpot, srcHits, trk, points, vterr, vzerr, mvaVal);
309  if (!ok) {
310  LogTrace("TrackSelection") << "track with pt=" << trk.pt() << " NOT selected";
311 
312  if (copyTrajectories_)
313  trackRefs_[current] = reco::TrackRef();
314  if (!keepAllTracks_[0])
315  continue;
316  }
317  LogTrace("TrackSelection") << "track with pt=" << trk.pt() << " selected";
318  selTracks_->push_back(Track(trk)); // clone and store
319  if (ok && setQualityBit_[0]) {
320  selTracks_->back().setQuality(qualityToSet_[0]);
321  if (qualityToSet_[0] == TrackBase::tight) {
322  selTracks_->back().setQuality(TrackBase::loose);
323  } else if (qualityToSet_[0] == TrackBase::highPurity) {
324  selTracks_->back().setQuality(TrackBase::loose);
325  selTracks_->back().setQuality(TrackBase::tight);
326  }
327  if (!points.empty()) {
328  if (qualityToSet_[0] == TrackBase::loose) {
329  selTracks_->back().setQuality(TrackBase::looseSetWithPV);
330  } else if (qualityToSet_[0] == TrackBase::highPurity) {
331  selTracks_->back().setQuality(TrackBase::looseSetWithPV);
332  selTracks_->back().setQuality(TrackBase::highPuritySetWithPV);
333  }
334  }
335  }
336  if (copyExtras_) {
337  // TrackExtras
338  selTrackExtras_->push_back(TrackExtra(trk.outerPosition(),
339  trk.outerMomentum(),
340  trk.outerOk(),
341  trk.innerPosition(),
342  trk.innerMomentum(),
343  trk.innerOk(),
344  trk.outerStateCovariance(),
345  trk.outerDetId(),
346  trk.innerStateCovariance(),
347  trk.innerDetId(),
348  trk.seedDirection(),
349  trk.seedRef()));
350  selTracks_->back().setExtra(TrackExtraRef(rTrackExtras_, selTrackExtras_->size() - 1));
351  TrackExtra& tx = selTrackExtras_->back();
352  tx.setResiduals(trk.residuals());
353  // TrackingRecHits
354  auto const firstHitIndex = selHits_->size();
355  for (trackingRecHit_iterator hit = trk.recHitsBegin(); hit != trk.recHitsEnd(); ++hit) {
356  selHits_->push_back((*hit)->clone());
357  }
358  tx.setHits(rHits_, firstHitIndex, selHits_->size() - firstHitIndex);
359  tx.setTrajParams(trk.extra()->trajParams(), trk.extra()->chi2sX5());
360  }
361  if (copyTrajectories_) {
362  trackRefs_[current] = TrackRef(rTracks_, selTracks_->size() - 1);
363  }
364  }
365  if (copyTrajectories_) {
368  evt.getByToken(srcTass_, hTTAss);
369  evt.getByToken(srcTraj_, hTraj);
370  selTrajs_ = std::make_unique<std::vector<Trajectory>>();
371  rTrajectories_ = evt.getRefBeforePut<vector<Trajectory>>();
372  selTTAss_ = std::make_unique<TrajTrackAssociationCollection>(rTrajectories_, rTracks_);
373  for (size_t i = 0, n = hTraj->size(); i < n; ++i) {
374  Ref<vector<Trajectory>> trajRef(hTraj, i);
376  if (match != hTTAss->end()) {
377  const Ref<TrackCollection>& trkRef = match->val;
378  short oldKey = static_cast<short>(trkRef.key());
379  if (trackRefs_[oldKey].isNonnull()) {
380  selTrajs_->push_back(Trajectory(*trajRef));
381  selTTAss_->insert(Ref<vector<Trajectory>>(rTrajectories_, selTrajs_->size() - 1), trackRefs_[oldKey]);
382  }
383  }
384  }
385  }
386 
387  evt.put(std::move(selTracks_));
388  if (copyExtras_) {
389  evt.put(std::move(selTrackExtras_));
390  evt.put(std::move(selHits_));
391  }
392  if (copyTrajectories_) {
393  evt.put(std::move(selTrajs_));
394  evt.put(std::move(selTTAss_));
395  }
396 }
397 
400 
reco::Track::outerPosition
const math::XYZPoint & outerPosition() const
position of the outermost hit
Definition: Track.h:62
reco::Track::outerMomentum
const math::XYZVector & outerMomentum() const
momentum vector at the outermost hit position
Definition: Track.h:65
edm::RefProd< TrackCollection >
TrackExtra.h
MultiTrackSelector::d0_par1_
std::vector< std::vector< double > > d0_par1_
Definition: MultiTrackSelector.h:107
MultiTrackSelector::max_eta_
std::vector< double > max_eta_
Definition: MultiTrackSelector.h:133
reco::Track::outerStateCovariance
CovarianceMatrix outerStateCovariance() const
outermost trajectory state curvilinear errors
Definition: Track.h:68
edm::Event::getRefBeforePut
RefProd< PROD > getRefBeforePut()
Definition: Event.h:158
reco::Track::outerDetId
unsigned int outerDetId() const
DetId of the detector on which surface the outermost state is located.
Definition: Track.h:79
MultiTrackSelector::select
bool select(unsigned tsNum, const reco::BeamSpot &vertexBeamSpot, const TrackingRecHitCollection &recHits, const reco::Track &tk, const std::vector< Point > &points, std::vector< float > &vterr, std::vector< float > &vzerr, double mvaVal) const
return class, or -1 if rejected
Definition: MultiTrackSelector.cc:330
edm::AssociationMap::find
const_iterator find(const key_type &k) const
find element with specified reference key
Definition: AssociationMap.h:173
mps_fire.i
i
Definition: mps_fire.py:428
MessageLogger.h
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
MultiTrackSelector::max_relpterr_
std::vector< double > max_relpterr_
Definition: MultiTrackSelector.h:126
MultiTrackSelector::vtxNumber_
std::vector< int32_t > vtxNumber_
vertex cuts
Definition: MultiTrackSelector.h:99
EDProducer.h
MultiTrackSelector::min_nhits_
std::vector< uint32_t > min_nhits_
Definition: MultiTrackSelector.h:127
MultiTrackSelector::processMVA
void processMVA(edm::Event &evt, const edm::EventSetup &es, const reco::BeamSpot &beamspot, const reco::VertexCollection &vertices, int selIndex, std::vector< float > &mvaVals_, bool writeIt=false) const
Definition: MultiTrackSelector.cc:527
reco::Track::recHitsBegin
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:88
HLT_FULL_cff.points
points
Definition: HLT_FULL_cff.py:21455
MultiTrackSelector::chi2n_no1Dmod_par_
std::vector< double > chi2n_no1Dmod_par_
Definition: MultiTrackSelector.h:106
AnalyticalTrackSelector::copyTrajectories_
bool copyTrajectories_
copy also trajectories and trajectory->track associations
Definition: AnalyticalTrackSelector.cc:52
AnalyticalTrackSelector::minEta_
double minEta_
eta restrictions
Definition: AnalyticalTrackSelector.cc:54
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm
HLT enums.
Definition: AlignableModifier.h:19
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
AnalyticalTrackSelector::srcTraj_
edm::EDGetTokenT< std::vector< Trajectory > > srcTraj_
Definition: AnalyticalTrackSelector.cc:57
AnalyticalTrackSelector::srcTass_
edm::EDGetTokenT< TrajTrackAssociationCollection > srcTass_
Definition: AnalyticalTrackSelector.cc:58
MultiTrackSelector::max_z0NoPV_
std::vector< double > max_z0NoPV_
Definition: MultiTrackSelector.h:137
MultiTrackSelector::forestLabel_
std::vector< std::string > forestLabel_
Definition: MultiTrackSelector.h:153
MultiTrackSelector
Definition: MultiTrackSelector.h:35
AnalyticalTrackSelector
Definition: AnalyticalTrackSelector.cc:36
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
MultiTrackSelector::min_hits_bypass_
std::vector< uint32_t > min_hits_bypass_
Definition: MultiTrackSelector.h:123
reco::Track::outerOk
bool outerOk() const
return true if the outermost hit is valid
Definition: Track.h:50
MultiTrackSelector::useAnyMVA_
bool useAnyMVA_
Definition: MultiTrackSelector.h:91
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
edm::Handle
Definition: AssociativeIterator.h:50
MultiTrackSelector::applyAbsCutsIfNoPV_
std::vector< bool > applyAbsCutsIfNoPV_
Definition: MultiTrackSelector.h:138
reco::Track::extra
const TrackExtraRef & extra() const
reference to "extra" object
Definition: Track.h:139
edm::Ref
Definition: AssociativeIterator.h:58
reco::Track::innerStateCovariance
CovarianceMatrix innerStateCovariance() const
innermost trajectory state curvilinear errors
Definition: Track.h:71
reco::Track::innerOk
bool innerOk() const
return true if the innermost hit is valid
Definition: Track.h:53
AnalyticalTrackSelector::maxEta_
double maxEta_
Definition: AnalyticalTrackSelector.cc:55
reco::TrackBase::pt
double pt() const
track transverse momentum
Definition: TrackBase.h:637
MultiTrackSelector::mvaType_
std::vector< std::string > mvaType_
Definition: MultiTrackSelector.h:152
reco::TrackExtra
Definition: TrackExtra.h:26
edm::AssociationMap::end
const_iterator end() const
last iterator over the map (read only)
Definition: AssociationMap.h:171
MakerMacros.h
MultiTrackSelector::dz_par2_
std::vector< std::vector< double > > dz_par2_
Definition: MultiTrackSelector.h:110
reco::Track::innerMomentum
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
Definition: Track.h:59
MultiTrackSelector::max_minMissHitOutOrIn_
std::vector< int32_t > max_minMissHitOutOrIn_
Definition: MultiTrackSelector.h:129
Track.h
TrackFwd.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
BeamSpot.h
MultiTrackSelector::useVertices_
bool useVertices_
Definition: MultiTrackSelector.h:89
MultiTrackSelector::chi2n_par_
std::vector< double > chi2n_par_
Definition: MultiTrackSelector.h:105
reco::Track::recHitsEnd
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
Definition: Track.h:91
reco::BeamSpot
Definition: BeamSpot.h:21
reco::Track
Definition: Track.h:27
MultiTrackSelector::selectVertices
void selectVertices(unsigned int tsNum, const reco::VertexCollection &vtxs, std::vector< Point > &points, std::vector< float > &vterr, std::vector< float > &vzerr) const
Definition: MultiTrackSelector.cc:502
MultiTrackSelector::vertices_
edm::EDGetTokenT< reco::VertexCollection > vertices_
Definition: MultiTrackSelector.h:92
reco::TrackExtraCollection
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
Definition: TrackExtraFwd.h:10
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:531
MultiTrackSelector::src_
edm::EDGetTokenT< reco::TrackCollection > src_
source collection label
Definition: MultiTrackSelector.h:86
TrajTrackAssociation.h
dso_hidden
#define dso_hidden
Definition: Visibility.h:12
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
reco::TrackRef
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Vertex.h
reco::TrackExtraBase::setTrajParams
void setTrajParams(TrajParams tmps, Chi2sFive chi2s)
Definition: TrackExtraBase.h:36
MultiTrackSelector::min_eta_
std::vector< double > min_eta_
Definition: MultiTrackSelector.h:132
reco::TrackExtra::setResiduals
void setResiduals(const TrackResiduals &r)
set the residuals
Definition: TrackExtra.h:132
MultiTrackSelector::d0_par2_
std::vector< std::vector< double > > d0_par2_
Definition: MultiTrackSelector.h:109
edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > >::const_iterator
friend struct const_iterator
Definition: AssociationMap.h:274
MultiTrackSelector::max_d0NoPV_
std::vector< double > max_d0NoPV_
Definition: MultiTrackSelector.h:136
reco::Track::seedDirection
const PropagationDirection & seedDirection() const
direction of how the hits were sorted in the original seed
Definition: Track.h:148
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
edm::ParameterSet
Definition: ParameterSet.h:47
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
Event.h
AnalyticalTrackSelector::AnalyticalTrackSelector
AnalyticalTrackSelector(const edm::ParameterSet &cfg)
constructor
Definition: AnalyticalTrackSelector.cc:67
match
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
reco::TrackExtraRef
edm::Ref< TrackExtraCollection > TrackExtraRef
persistent reference to a TrackExtra
Definition: TrackExtraFwd.h:16
MultiTrackSelector::useMVA_
std::vector< bool > useMVA_
Definition: MultiTrackSelector.h:147
MultiTrackSelector::dz_par1_
std::vector< std::vector< double > > dz_par1_
Definition: MultiTrackSelector.h:108
reco::Track::innerPosition
const math::XYZPoint & innerPosition() const
position of the innermost hit
Definition: Track.h:56
ModuleDef.h
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
reco::Track::innerDetId
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
Definition: Track.h:82
MultiTrackSelector::min_layers_
std::vector< uint32_t > min_layers_
Cuts on numbers of layers with hits/3D hits/lost hits.
Definition: MultiTrackSelector.h:120
MultiTrackSelector::applyAdaptedPVCuts_
std::vector< bool > applyAdaptedPVCuts_
Definition: MultiTrackSelector.h:112
edm::EventSetup
Definition: EventSetup.h:57
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
MultiTrackSelector.h
AnalyticalTrackSelector::~AnalyticalTrackSelector
~AnalyticalTrackSelector() override
destructor
Definition: AnalyticalTrackSelector.cc:232
InputTag.h
reco::TrackExtraBase::setHits
void setHits(TrackingRecHitRefProd const &prod, unsigned firstH, unsigned int nH)
Definition: TrackExtraBase.h:30
looper.cfg
cfg
Definition: looper.py:297
SiStripRecHit1D.h
ValueMap.h
MultiTrackSelector::keepAllTracks_
std::vector< bool > keepAllTracks_
Definition: MultiTrackSelector.h:140
VertexFwd.h
Trajectory.h
MultiTrackSelector::useVtxError_
bool useVtxError_
Definition: MultiTrackSelector.h:90
MultiTrackSelector::preFilter_
std::vector< unsigned int > preFilter_
Definition: MultiTrackSelector.h:143
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
StringCutObjectSelector.h
MultiTrackSelector::min_3Dlayers_
std::vector< uint32_t > min_3Dlayers_
Definition: MultiTrackSelector.h:121
reco::Track::seedRef
const edm::RefToBase< TrajectorySeed > & seedRef() const
Definition: Track.h:155
Trajectory
Definition: Trajectory.h:38
SiStripOfflineCRack_cfg.alias
alias
Definition: SiStripOfflineCRack_cfg.py:128
Exception
Definition: hltDiff.cc:246
AnalyticalTrackSelector::run
void run(edm::Event &evt, const edm::EventSetup &es) const override
process one event
Definition: AnalyticalTrackSelector.cc:234
MultiTrackSelector::qualityToSet_
std::vector< reco::TrackBase::TrackQuality > qualityToSet_
Definition: MultiTrackSelector.h:96
reco::Track::residuals
const TrackResiduals & residuals() const
get the residuals
Definition: Track.h:158
MultiTrackSelector::hSrc_
edm::EDGetTokenT< TrackingRecHitCollection > hSrc_
Definition: MultiTrackSelector.h:87
muons_cff.highPurity
highPurity
Definition: muons_cff.py:136
MultiTrackSelector::nSigmaZ_
std::vector< double > nSigmaZ_
Definition: MultiTrackSelector.h:117
MultiTrackSelector::max_lostLayers_
std::vector< uint32_t > max_lostLayers_
Definition: MultiTrackSelector.h:122
MultiTrackSelector::max_d0_
std::vector< double > max_d0_
Impact parameter absolute cuts.
Definition: MultiTrackSelector.h:115
edm::Ref::key
key_type key() const
Accessor for product key.
Definition: Ref.h:250
MultiTrackSelector::max_lostHitFraction_
std::vector< int32_t > max_lostHitFraction_
Definition: MultiTrackSelector.h:130
MultiTrackSelector::beamspot_
edm::EDGetTokenT< reco::BeamSpot > beamspot_
Definition: MultiTrackSelector.h:88
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
ParameterSet.h
edm::Event
Definition: Event.h:73
MultiTrackSelector::forest_
std::vector< GBRForest * > forest_
Definition: MultiTrackSelector.h:154
edm::OwnVector::size
size_type size() const
Definition: OwnVector.h:300
MultiTrackSelector::vertexCut_
std::vector< StringCutObjectSelector< reco::Vertex > > vertexCut_
Definition: MultiTrackSelector.h:101
edm::Event::get
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition: Event.h:338
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
AnalyticalTrackSelector::copyExtras_
bool copyExtras_
copy only the tracks, not extras and rechits (for AOD)
Definition: AnalyticalTrackSelector.cc:50
AnalyticalTrackSelector::Point
math::XYZPoint Point
Definition: AnalyticalTrackSelector.cc:45
hit
Definition: SiStripHitEffFromCalibTree.cc:88
edm::OwnVector< TrackingRecHit >
MultiTrackSelector::max_z0_
std::vector< double > max_z0_
Definition: MultiTrackSelector.h:116
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
MultiTrackSelector::useMVAonly_
std::vector< bool > useMVAonly_
Definition: MultiTrackSelector.h:148
MultiTrackSelector::setQualityBit_
std::vector< bool > setQualityBit_
do I have to set a quality bit?
Definition: MultiTrackSelector.h:95
MultiTrackSelector::min_MVA_
std::vector< double > min_MVA_
Definition: MultiTrackSelector.h:150
MultiTrackSelector::res_par_
std::vector< std::vector< double > > res_par_
Definition: MultiTrackSelector.h:104