CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes
CalibrationTrackSelector Class Reference

#include <CalibrationTrackSelector.h>

Classes

struct  ComparePt
 compare two tracks in pt (used by theNHighestPtTracks) More...
 

Public Types

typedef std::vector< const reco::Track * > Tracks
 

Public Member Functions

 CalibrationTrackSelector (const edm::ParameterSet &cfg)
 constructor More...
 
Tracks select (const Tracks &tracks, const edm::Event &evt) const
 select tracks More...
 
 ~CalibrationTrackSelector ()
 destructor More...
 

Private Member Functions

Tracks basicCuts (const Tracks &tracks, const edm::Event &evt) const
 apply basic cuts on pt,eta,phi,nhit More...
 
bool detailedHitsCheck (const reco::Track *track, const edm::Event &evt) const
 checking hit requirements beyond simple number of valid hits More...
 
bool isHit2D (const TrackingRecHit &hit) const
 
bool isIsolated (const TrackingRecHit *therechit, const edm::Event &evt) const
 
bool isOkCharge (const TrackingRecHit *therechit) const
 
Tracks theNHighestPtTracks (const Tracks &tracks) const
 filter the n highest pt tracks More...
 

Private Attributes

const bool applyBasicCuts_
 
const bool applyIsolation_
 
const bool applyMultiplicityFilter_
 
const bool applyNHighestPt_
 
const bool chargeCheck_
 
const double chi2nMax_
 
const double etaMax_
 
const double etaMin_
 
const edm::InputTag matchedrecHitsTag_
 
const int maxMultiplicity_
 
const double minHitChargeStrip_
 
const double minHitIsolation_
 
const int minHitsinBPIX_
 
const int minHitsinFPIX_
 
const int minHitsinTEC_
 
const int minHitsinTIB_
 
const int minHitsinTID_
 
const int minHitsinTOB_
 
const int minMultiplicity_
 
const bool multiplicityOnInput_
 
const int nHighestPt_
 
const double nHitMax_
 
const unsigned int nHitMin2D_
 
const double nHitMin_
 
const double phiMax_
 
const double phiMin_
 
ComparePt ptComparator
 
const double ptMax_
 
const double ptMin_
 
const edm::InputTag rphirecHitsTag_
 
const int seedOnlyFromAbove_
 

Detailed Description

Definition at line 15 of file CalibrationTrackSelector.h.

Member Typedef Documentation

typedef std::vector<const reco::Track *> CalibrationTrackSelector::Tracks

Definition at line 17 of file CalibrationTrackSelector.h.

Constructor & Destructor Documentation

CalibrationTrackSelector::CalibrationTrackSelector ( const edm::ParameterSet cfg)

constructor

Definition at line 25 of file CalibrationTrackSelector.cc.

References applyBasicCuts_, applyIsolation_, applyMultiplicityFilter_, applyNHighestPt_, chargeCheck_, chi2nMax_, etaMax_, etaMin_, maxMultiplicity_, minHitChargeStrip_, minHitIsolation_, minHitsinBPIX_, minHitsinFPIX_, minHitsinTEC_, minHitsinTIB_, minHitsinTID_, minHitsinTOB_, minMultiplicity_, multiplicityOnInput_, nHighestPt_, nHitMax_, nHitMin2D_, nHitMin_, phiMax_, phiMin_, ptMax_, and ptMin_.

26  : applyBasicCuts_(cfg.getParameter<bool>("applyBasicCuts")),
27  applyNHighestPt_(cfg.getParameter<bool>("applyNHighestPt")),
28  applyMultiplicityFilter_(cfg.getParameter<bool>("applyMultiplicityFilter")),
29  seedOnlyFromAbove_(cfg.getParameter<int>("seedOnlyFrom")),
30  applyIsolation_(cfg.getParameter<bool>("applyIsolationCut")),
31  chargeCheck_(cfg.getParameter<bool>("applyChargeCheck")),
32  nHighestPt_(cfg.getParameter<int>("nHighestPt")),
33  minMultiplicity_(cfg.getParameter<int>("minMultiplicity")),
34  maxMultiplicity_(cfg.getParameter<int>("maxMultiplicity")),
35  multiplicityOnInput_(cfg.getParameter<bool>("multiplicityOnInput")),
36  ptMin_(cfg.getParameter<double>("ptMin")),
37  ptMax_(cfg.getParameter<double>("ptMax")),
38  etaMin_(cfg.getParameter<double>("etaMin")),
39  etaMax_(cfg.getParameter<double>("etaMax")),
40  phiMin_(cfg.getParameter<double>("phiMin")),
41  phiMax_(cfg.getParameter<double>("phiMax")),
42  nHitMin_(cfg.getParameter<double>("nHitMin")),
43  nHitMax_(cfg.getParameter<double>("nHitMax")),
44  chi2nMax_(cfg.getParameter<double>("chi2nMax")),
45  minHitChargeStrip_(cfg.getParameter<double>("minHitChargeStrip")),
46  minHitIsolation_(cfg.getParameter<double>("minHitIsolation")),
47  rphirecHitsTag_(cfg.getParameter<edm::InputTag>("rphirecHits")),
48  matchedrecHitsTag_(cfg.getParameter<edm::InputTag>("matchedrecHits")),
49  nHitMin2D_(cfg.getParameter<unsigned int>("nHitMin2D")),
50  // Ugly to use the same getParameter 6 times, but this allows const cut
51  // variables...
52  minHitsinTIB_(cfg.getParameter<edm::ParameterSet>("minHitsPerSubDet").getParameter<int>("inTIB")),
53  minHitsinTOB_(cfg.getParameter<edm::ParameterSet>("minHitsPerSubDet").getParameter<int>("inTOB")),
54  minHitsinTID_(cfg.getParameter<edm::ParameterSet>("minHitsPerSubDet").getParameter<int>("inTID")),
55  minHitsinTEC_(cfg.getParameter<edm::ParameterSet>("minHitsPerSubDet").getParameter<int>("inTEC")),
56  minHitsinBPIX_(cfg.getParameter<edm::ParameterSet>("minHitsPerSubDet").getParameter<int>("inBPIX")),
57  minHitsinFPIX_(cfg.getParameter<edm::ParameterSet>("minHitsPerSubDet").getParameter<int>("inFPIX")) {
58  if (applyBasicCuts_)
59  edm::LogInfo("CalibrationTrackSelector")
60  << "applying basic track cuts ..."
61  << "\nptmin,ptmax: " << ptMin_ << "," << ptMax_ << "\netamin,etamax: " << etaMin_ << "," << etaMax_
62  << "\nphimin,phimax: " << phiMin_ << "," << phiMax_ << "\nnhitmin,nhitmax: " << nHitMin_ << "," << nHitMax_
63  << "\nnhitmin2D: " << nHitMin2D_ << "\nchi2nmax: " << chi2nMax_;
64 
65  if (applyNHighestPt_)
66  edm::LogInfo("CalibrationTrackSelector") << "filter N tracks with highest Pt N=" << nHighestPt_;
67 
69  edm::LogInfo("CalibrationTrackSelector")
70  << "apply multiplicity filter N>= " << minMultiplicity_ << "and N<= " << maxMultiplicity_ << " on "
71  << (multiplicityOnInput_ ? "input" : "output");
72 
73  if (applyIsolation_)
74  edm::LogInfo("CalibrationTrackSelector")
75  << "only retain tracks isolated at least by " << minHitIsolation_ << " cm from other rechits";
76 
77  if (chargeCheck_)
78  edm::LogInfo("CalibrationTrackSelector")
79  << "only retain hits with at least " << minHitChargeStrip_ << " ADC counts of total cluster charge";
80 
81  edm::LogInfo("CalibrationTrackSelector")
82  << "Minimum number of hits in TIB/TID/TOB/TEC/BPIX/FPIX = " << minHitsinTIB_ << "/" << minHitsinTID_ << "/"
83  << minHitsinTOB_ << "/" << minHitsinTEC_ << "/" << minHitsinBPIX_ << "/" << minHitsinFPIX_;
84 }
T getParameter(std::string const &) const
const edm::InputTag matchedrecHitsTag_
const edm::InputTag rphirecHitsTag_
CalibrationTrackSelector::~CalibrationTrackSelector ( )

destructor

Definition at line 88 of file CalibrationTrackSelector.cc.

88 {}

Member Function Documentation

CalibrationTrackSelector::Tracks CalibrationTrackSelector::basicCuts ( const Tracks tracks,
const edm::Event evt 
) const
private

apply basic cuts on pt,eta,phi,nhit

Definition at line 124 of file CalibrationTrackSelector.cc.

References chi2n, chi2nMax_, detailedHitsCheck(), PVValHelper::eta, reco::TrackBase::eta(), etaMin_, nHitMax_, nHitMin_, reco::TrackBase::normalizedChi2(), reco::TrackBase::numberOfValidHits(), phi, reco::TrackBase::phi(), phiMax_, phiMin_, EnergyCorrector::pt, reco::TrackBase::pt(), ptMin_, and mps_fire::result.

Referenced by select().

125  {
126  Tracks result;
127 
128  for (Tracks::const_iterator it = tracks.begin(); it != tracks.end(); ++it) {
129  const reco::Track *trackp = *it;
130  float pt = trackp->pt();
131  float eta = trackp->eta();
132  float phi = trackp->phi();
133  int nhit = trackp->numberOfValidHits();
134  float chi2n = trackp->normalizedChi2();
135 
136  // edm::LogDebug("CalibrationTrackSelector") << " pt,eta,phi,nhit: "
137  // <<pt<<","<<eta<<","<<phi<<","<<nhit;
138 
139  if (pt > ptMin_ && pt < ptMax_ && eta > etaMin_ && eta < etaMax_ && phi > phiMin_ && phi < phiMax_ &&
140  nhit >= nHitMin_ && nhit <= nHitMax_ && chi2n < chi2nMax_) {
141  if (this->detailedHitsCheck(trackp, evt))
142  result.push_back(trackp);
143  }
144  }
145 
146  return result;
147 }
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
Definition: TrackBase.h:600
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:684
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:690
bool detailedHitsCheck(const reco::Track *track, const edm::Event &evt) const
checking hit requirements beyond simple number of valid hits
double pt() const
track transverse momentum
Definition: TrackBase.h:660
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:901
std::vector< const reco::Track * > Tracks
bool CalibrationTrackSelector::detailedHitsCheck ( const reco::Track track,
const edm::Event evt 
) const
private

checking hit requirements beyond simple number of valid hits

Definition at line 151 of file CalibrationTrackSelector.cc.

References applyIsolation_, chargeCheck_, isHit2D(), isIsolated(), isOkCharge(), kBPIX, kFPIX, minHitsinBPIX_, minHitsinFPIX_, minHitsinTEC_, minHitsinTIB_, minHitsinTID_, minHitsinTOB_, nHitMin2D_, reco::Track::recHits(), seedOnlyFromAbove_, StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, and DetId::Tracker.

Referenced by basicCuts().

151  {
152  // checking hit requirements beyond simple number of valid hits
153 
155  nHitMin2D_ || chargeCheck_ || applyIsolation_) { // any detailed hit cut is active, so have to check
156 
157  int nhitinTIB = 0, nhitinTOB = 0, nhitinTID = 0;
158  int nhitinTEC = 0, nhitinBPIX = 0, nhitinFPIX = 0;
159  unsigned int nHit2D = 0;
160  unsigned int thishit = 0;
161 
162  for (auto const &hit : trackp->recHits()) {
163  thishit++;
164  int type = hit->geographicalId().subdetId();
165 
166  // *** thishit == 1 means last hit in CTF ***
167  // (FIXME: assumption might change or not be valid for all tracking
168  // algorthms)
169  // ==> for cosmics
170  // seedOnlyFrom = 1 is TIB-TOB-TEC tracks only
171  // seedOnlyFrom = 2 is TOB-TEC tracks only
172  if (seedOnlyFromAbove_ == 1 && thishit == 1 &&
173  (type == int(StripSubdetector::TOB) || type == int(StripSubdetector::TEC)))
174  return false;
175 
176  if (seedOnlyFromAbove_ == 2 && thishit == 1 && type == int(StripSubdetector::TIB))
177  return false;
178 
179  if (!hit->isValid())
180  continue; // only real hits count as in trackp->numberOfValidHits()
181  const DetId detId(hit->geographicalId());
182  if (detId.det() != DetId::Tracker) {
183  edm::LogError("DetectorMismatch")
184  << "@SUB=CalibrationTrackSelector::detailedHitsCheck"
185  << "DetId.det() != DetId::Tracker (=" << DetId::Tracker << "), but " << detId.det() << ".";
186  }
187  if (chargeCheck_ && !(this->isOkCharge(hit)))
188  return false;
189  if (applyIsolation_ && (!this->isIsolated(hit, evt)))
190  return false;
191  if (StripSubdetector::TIB == detId.subdetId())
192  ++nhitinTIB;
193  else if (StripSubdetector::TOB == detId.subdetId())
194  ++nhitinTOB;
195  else if (StripSubdetector::TID == detId.subdetId())
196  ++nhitinTID;
197  else if (StripSubdetector::TEC == detId.subdetId())
198  ++nhitinTEC;
199  else if (kBPIX == detId.subdetId())
200  ++nhitinBPIX;
201  else if (kFPIX == detId.subdetId())
202  ++nhitinFPIX;
203  // Do not call isHit2D(..) if already enough 2D hits for performance
204  // reason:
205  if (nHit2D < nHitMin2D_ && this->isHit2D(*hit))
206  ++nHit2D;
207  } // end loop on hits
208  return (nhitinTIB >= minHitsinTIB_ && nhitinTOB >= minHitsinTOB_ && nhitinTID >= minHitsinTID_ &&
209  nhitinTEC >= minHitsinTEC_ && nhitinBPIX >= minHitsinBPIX_ && nhitinFPIX >= minHitsinFPIX_ &&
210  nHit2D >= nHitMin2D_);
211  } else { // no cuts set, so we are just fine and can avoid loop on hits
212  return true;
213  }
214 }
type
Definition: HCALResponse.h:21
bool isIsolated(const TrackingRecHit *therechit, const edm::Event &evt) const
bool isOkCharge(const TrackingRecHit *therechit) const
Definition: DetId.h:18
const int kBPIX
const int kFPIX
bool isHit2D(const TrackingRecHit &hit) const
bool CalibrationTrackSelector::isHit2D ( const TrackingRecHit hit) const
private

Definition at line 218 of file CalibrationTrackSelector.cc.

References TrackingRecHit::dimension(), TrackingRecHit::geographicalId(), kBPIX, kFPIX, and DetId::Tracker.

Referenced by detailedHitsCheck().

218  {
219  if (hit.dimension() < 2) {
220  return false; // some (muon...) stuff really has RecHit1D
221  } else {
222  const DetId detId(hit.geographicalId());
223  if (detId.det() == DetId::Tracker) {
224  if (detId.subdetId() == kBPIX || detId.subdetId() == kFPIX) {
225  return true; // pixel is always 2D
226  } else { // should be SiStrip now
227  if (dynamic_cast<const SiStripRecHit2D *>(&hit))
228  return false; // normal hit
229  else if (dynamic_cast<const SiStripMatchedRecHit2D *>(&hit))
230  return true; // matched is 2D
231  else if (dynamic_cast<const ProjectedSiStripRecHit2D *>(&hit))
232  return false; // crazy hit...
233  else {
234  edm::LogError("UnkownType") << "@SUB=CalibrationTrackSelector::isHit2D"
235  << "Tracker hit not in pixel and neither SiStripRecHit2D nor "
236  << "SiStripMatchedRecHit2D nor ProjectedSiStripRecHit2D.";
237  return false;
238  }
239  }
240  } else { // not tracker??
241  edm::LogWarning("DetectorMismatch") << "@SUB=CalibrationTrackSelector::isHit2D"
242  << "Hit not in tracker with 'official' dimension >=2.";
243  return true; // dimension() >= 2 so accept that...
244  }
245  }
246  // never reached...
247 }
virtual int dimension() const =0
Definition: DetId.h:18
const int kBPIX
const int kFPIX
DetId geographicalId() const
bool CalibrationTrackSelector::isIsolated ( const TrackingRecHit therechit,
const edm::Event evt 
) const
private

Definition at line 299 of file CalibrationTrackSelector.cc.

References edmNew::DetSetVector< T >::data(), TrackingRecHit::geographicalId(), edm::Event::getByLabel(), BaseTrackerRecHit::localPosition(), TrackingRecHit::localPosition(), mag(), AlignmentTrackSelector_cfi::matchedrecHits, matchedrecHitsTag_, minHitIsolation_, DetId::rawId(), AlignmentTrackSelector_cfi::rphirecHits, and rphirecHitsTag_.

Referenced by detailedHitsCheck().

299  {
300  // edm::ESHandle<TrackerGeometry> tracker;
303  // es.get<TrackerDigiGeometryRecord>().get(tracker);
304  evt.getByLabel(rphirecHitsTag_, rphirecHits);
305  evt.getByLabel(matchedrecHitsTag_, matchedrecHits);
306 
309  const SiStripRecHit2DCollection &stripcollSt = *rphirecHits;
310  const SiStripMatchedRecHit2DCollection &stripcollStm = *matchedrecHits;
311 
312  DetId idet = therechit->geographicalId();
313 
314  // FIXME: instead of looping the full hit collection, we should explore the
315  // features of SiStripRecHit2DCollection::rangeRphi = rphirecHits.get(idet)
316  // and loop only from rangeRphi.first until rangeRphi.second
317  for (istripSt = stripcollSt.data().begin(); istripSt != stripcollSt.data().end(); ++istripSt) {
318  const SiStripRecHit2D *aHit = &*(istripSt);
319  DetId mydet1 = aHit->geographicalId();
320  if (idet.rawId() != mydet1.rawId())
321  continue;
322  float theDistance = (therechit->localPosition() - aHit->localPosition()).mag();
323  // std::cout << "theDistance1 = " << theDistance << "\n";
324  if (theDistance > 0.001 && theDistance < minHitIsolation_)
325  return false;
326  }
327 
328  // FIXME: see above
329  for (istripStm = stripcollStm.data().begin(); istripStm != stripcollStm.data().end(); ++istripStm) {
330  const SiStripMatchedRecHit2D *aHit = &*(istripStm);
331  DetId mydet2 = aHit->geographicalId();
332  if (idet.rawId() != mydet2.rawId())
333  continue;
334  float theDistance = (therechit->localPosition() - aHit->localPosition()).mag();
335  // std::cout << "theDistance1 = " << theDistance << "\n";
336  if (theDistance > 0.001 && theDistance < minHitIsolation_)
337  return false;
338  }
339  return true;
340 }
const edm::InputTag matchedrecHitsTag_
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
data_type const * data(size_t cell) const
const edm::InputTag rphirecHitsTag_
virtual LocalPoint localPosition() const =0
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:480
Definition: DetId.h:18
LocalPoint localPosition() const final
DetId geographicalId() const
bool CalibrationTrackSelector::isOkCharge ( const TrackingRecHit therechit) const
private

Definition at line 251 of file CalibrationTrackSelector.cc.

References SiStripCluster::amplitudes(), SiStripRecHit2D::cluster(), minHitChargeStrip_, SiStripMatchedRecHit2D::monoCluster(), ProjectedSiStripRecHit2D::originalHit(), and SiStripMatchedRecHit2D::stereoCluster().

Referenced by detailedHitsCheck().

251  {
252  float charge1 = 0;
253  float charge2 = 0;
254  const SiStripMatchedRecHit2D *matchedhit = dynamic_cast<const SiStripMatchedRecHit2D *>(therechit);
255  const SiStripRecHit2D *hit = dynamic_cast<const SiStripRecHit2D *>(therechit);
256  const ProjectedSiStripRecHit2D *unmatchedhit = dynamic_cast<const ProjectedSiStripRecHit2D *>(therechit);
257 
258  if (matchedhit) {
259  const SiStripCluster &monocluster = matchedhit->monoCluster();
260  const std::vector<uint16_t> amplitudesmono(monocluster.amplitudes().begin(), monocluster.amplitudes().end());
261  for (size_t ia = 0; ia < amplitudesmono.size(); ++ia) {
262  charge1 += amplitudesmono[ia];
263  }
264 
265  const SiStripCluster &stereocluster = matchedhit->stereoCluster();
266  const std::vector<uint16_t> amplitudesstereo(stereocluster.amplitudes().begin(), stereocluster.amplitudes().end());
267  for (size_t ia = 0; ia < amplitudesstereo.size(); ++ia) {
268  charge2 += amplitudesstereo[ia];
269  }
270  // std::cout << "charge1 = " << charge1 << "\n";
271  // std::cout << "charge2 = " << charge2 << "\n";
272  if (charge1 < minHitChargeStrip_ || charge2 < minHitChargeStrip_)
273  return false;
274  } else if (hit) {
275  const SiStripCluster *cluster = &*(hit->cluster());
276  const std::vector<uint16_t> amplitudes(cluster->amplitudes().begin(), cluster->amplitudes().end());
277  for (size_t ia = 0; ia < amplitudes.size(); ++ia) {
278  charge1 += amplitudes[ia];
279  }
280  // std::cout << "charge1 = " << charge1 << "\n";
281  if (charge1 < minHitChargeStrip_)
282  return false;
283  } else if (unmatchedhit) {
284  const SiStripRecHit2D &orighit = unmatchedhit->originalHit();
285  const SiStripCluster *origcluster = &*(orighit.cluster());
286  const std::vector<uint16_t> amplitudes(origcluster->amplitudes().begin(), origcluster->amplitudes().end());
287  for (size_t ia = 0; ia < amplitudes.size(); ++ia) {
288  charge1 += amplitudes[ia];
289  }
290  // std::cout << "charge1 = " << charge1 << "\n";
291  if (charge1 < minHitChargeStrip_)
292  return false;
293  }
294  return true;
295 }
SiStripCluster const & monoCluster() const
ClusterRef cluster() const
SiStripRecHit2D originalHit() const
SiStripCluster const & stereoCluster() const
const std::vector< uint8_t > & amplitudes() const
CalibrationTrackSelector::Tracks CalibrationTrackSelector::select ( const Tracks tracks,
const edm::Event evt 
) const

select tracks

Definition at line 92 of file CalibrationTrackSelector.cc.

References applyBasicCuts_, applyMultiplicityFilter_, applyNHighestPt_, basicCuts(), maxMultiplicity_, minMultiplicity_, multiplicityOnInput_, mps_fire::result, theNHighestPtTracks(), and l1t::tracks.

Referenced by Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Views.LineDecayView.LineDecayContainer::mousePressEvent(), Vispa.Gui.PortConnection.PointToPointConnection::mousePressEvent(), Vispa.Gui.VispaWidget.VispaWidget::mousePressEvent(), Vispa.Views.AbstractView.AbstractView::restoreSelection(), and SiStripCalTrackConfigSelector::select().

92  {
94  (tracks.size() < static_cast<unsigned int>(minMultiplicity_) ||
95  tracks.size() > static_cast<unsigned int>(maxMultiplicity_))) {
96  return Tracks(); // empty collection
97  }
98 
100  // apply basic track cuts (if selected)
101  if (applyBasicCuts_)
102  result = this->basicCuts(result, evt);
103 
104  // filter N tracks with highest Pt (if selected)
105  if (applyNHighestPt_)
106  result = this->theNHighestPtTracks(result);
107 
108  // apply minimum multiplicity requirement (if selected)
110  if (result.size() < static_cast<unsigned int>(minMultiplicity_) ||
111  result.size() > static_cast<unsigned int>(maxMultiplicity_)) {
112  result.clear();
113  }
114  }
115 
116  // edm::LogDebug("CalibrationTrackSelector") << "tracks all,kept: " <<
117  // tracks.size() << "," << result.size();
118 
119  return result;
120 }
std::vector< const reco::Track * > Tracks
Tracks theNHighestPtTracks(const Tracks &tracks) const
filter the n highest pt tracks
Tracks basicCuts(const Tracks &tracks, const edm::Event &evt) const
apply basic cuts on pt,eta,phi,nhit
CalibrationTrackSelector::Tracks CalibrationTrackSelector::theNHighestPtTracks ( const Tracks tracks) const
private

filter the n highest pt tracks

Definition at line 343 of file CalibrationTrackSelector.cc.

References gen::n, nHighestPt_, ptComparator, mps_fire::result, and l1t::tracks.

Referenced by select().

343  {
344  Tracks sortedTracks = tracks;
345  Tracks result;
346 
347  // sort in pt
348  std::sort(sortedTracks.begin(), sortedTracks.end(), ptComparator);
349 
350  // copy theTrackMult highest pt tracks to result vector
351  int n = 0;
352  for (Tracks::const_iterator it = sortedTracks.begin(); it != sortedTracks.end(); ++it) {
353  if (n < nHighestPt_) {
354  result.push_back(*it);
355  n++;
356  }
357  }
358 
359  return result;
360 }
std::vector< const reco::Track * > Tracks

Member Data Documentation

const bool CalibrationTrackSelector::applyBasicCuts_
private

Definition at line 46 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector(), and select().

const bool CalibrationTrackSelector::applyIsolation_
private

Definition at line 48 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector(), and detailedHitsCheck().

const bool CalibrationTrackSelector::applyMultiplicityFilter_
private

Definition at line 46 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector(), and select().

const bool CalibrationTrackSelector::applyNHighestPt_
private

Definition at line 46 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector(), and select().

const bool CalibrationTrackSelector::chargeCheck_
private

Definition at line 48 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector(), and detailedHitsCheck().

const double CalibrationTrackSelector::chi2nMax_
private

Definition at line 52 of file CalibrationTrackSelector.h.

Referenced by basicCuts(), and CalibrationTrackSelector().

const double CalibrationTrackSelector::etaMax_
private

Definition at line 52 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector().

const double CalibrationTrackSelector::etaMin_
private

Definition at line 52 of file CalibrationTrackSelector.h.

Referenced by basicCuts(), and CalibrationTrackSelector().

const edm::InputTag CalibrationTrackSelector::matchedrecHitsTag_
private

Definition at line 55 of file CalibrationTrackSelector.h.

Referenced by isIsolated().

const int CalibrationTrackSelector::maxMultiplicity_
private

Definition at line 49 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector(), and select().

const double CalibrationTrackSelector::minHitChargeStrip_
private

Definition at line 53 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector(), and isOkCharge().

const double CalibrationTrackSelector::minHitIsolation_
private

Definition at line 53 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector(), and isIsolated().

const int CalibrationTrackSelector::minHitsinBPIX_
private

Definition at line 57 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector(), and detailedHitsCheck().

const int CalibrationTrackSelector::minHitsinFPIX_
private

Definition at line 57 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector(), and detailedHitsCheck().

const int CalibrationTrackSelector::minHitsinTEC_
private

Definition at line 57 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector(), and detailedHitsCheck().

const int CalibrationTrackSelector::minHitsinTIB_
private

Definition at line 57 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector(), and detailedHitsCheck().

const int CalibrationTrackSelector::minHitsinTID_
private

Definition at line 57 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector(), and detailedHitsCheck().

const int CalibrationTrackSelector::minHitsinTOB_
private

Definition at line 57 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector(), and detailedHitsCheck().

const int CalibrationTrackSelector::minMultiplicity_
private

Definition at line 49 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector(), and select().

const bool CalibrationTrackSelector::multiplicityOnInput_
private

Definition at line 50 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector(), and select().

const int CalibrationTrackSelector::nHighestPt_
private

Definition at line 49 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector(), and theNHighestPtTracks().

const double CalibrationTrackSelector::nHitMax_
private

Definition at line 52 of file CalibrationTrackSelector.h.

Referenced by basicCuts(), and CalibrationTrackSelector().

const unsigned int CalibrationTrackSelector::nHitMin2D_
private

Definition at line 56 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector(), and detailedHitsCheck().

const double CalibrationTrackSelector::nHitMin_
private

Definition at line 52 of file CalibrationTrackSelector.h.

Referenced by basicCuts(), and CalibrationTrackSelector().

const double CalibrationTrackSelector::phiMax_
private

Definition at line 52 of file CalibrationTrackSelector.h.

Referenced by basicCuts(), and CalibrationTrackSelector().

const double CalibrationTrackSelector::phiMin_
private

Definition at line 52 of file CalibrationTrackSelector.h.

Referenced by basicCuts(), and CalibrationTrackSelector().

ComparePt CalibrationTrackSelector::ptComparator
private

Definition at line 44 of file CalibrationTrackSelector.h.

Referenced by theNHighestPtTracks().

const double CalibrationTrackSelector::ptMax_
private

Definition at line 52 of file CalibrationTrackSelector.h.

Referenced by CalibrationTrackSelector().

const double CalibrationTrackSelector::ptMin_
private

if true, cut min/maxMultiplicity on input instead of on final result

Definition at line 52 of file CalibrationTrackSelector.h.

Referenced by basicCuts(), and CalibrationTrackSelector().

const edm::InputTag CalibrationTrackSelector::rphirecHitsTag_
private

Definition at line 54 of file CalibrationTrackSelector.h.

Referenced by isIsolated().

const int CalibrationTrackSelector::seedOnlyFromAbove_
private

Definition at line 47 of file CalibrationTrackSelector.h.

Referenced by detailedHitsCheck().