File indexing completed on 2024-04-06 11:59:26
0001 #ifndef Calibration_TkAlCaRecoProducers_CalibrationTrackSelector_h
0002 #define Calibration_TkAlCaRecoProducers_CalibrationTrackSelector_h
0003
0004 #include "DataFormats/TrackReco/interface/Track.h"
0005 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2DCollection.h"
0006 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2DCollection.h"
0007 #include "FWCore/Framework/interface/ConsumesCollector.h"
0008 #include "FWCore/Utilities/interface/InputTag.h"
0009 #include <vector>
0010
0011 namespace edm {
0012 class Event;
0013 class ParameterSet;
0014 }
0015
0016 class TrackingRecHit;
0017
0018 class CalibrationTrackSelector {
0019 public:
0020 typedef std::vector<const reco::Track *> Tracks;
0021
0022
0023 CalibrationTrackSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC);
0024
0025
0026 ~CalibrationTrackSelector();
0027
0028
0029 Tracks select(const Tracks &tracks, const edm::Event &evt) const;
0030
0031 private:
0032
0033 Tracks basicCuts(const Tracks &tracks, const edm::Event &evt) const;
0034
0035 bool detailedHitsCheck(const reco::Track *track, const edm::Event &evt) const;
0036 bool isHit2D(const TrackingRecHit &hit) const;
0037 bool isOkCharge(const TrackingRecHit *therechit) const;
0038 bool isIsolated(const TrackingRecHit *therechit, const edm::Event &evt) const;
0039
0040
0041 Tracks theNHighestPtTracks(const Tracks &tracks) const;
0042
0043
0044 struct ComparePt {
0045 bool operator()(const reco::Track *t1, const reco::Track *t2) const { return t1->pt() > t2->pt(); }
0046 };
0047 ComparePt ptComparator;
0048
0049 const bool applyBasicCuts_, applyNHighestPt_, applyMultiplicityFilter_;
0050 const int seedOnlyFromAbove_;
0051 const bool applyIsolation_, chargeCheck_;
0052 const int nHighestPt_, minMultiplicity_, maxMultiplicity_;
0053 const bool multiplicityOnInput_;
0054
0055 const double ptMin_, ptMax_, etaMin_, etaMax_, phiMin_, phiMax_, nHitMin_, nHitMax_, chi2nMax_;
0056 const double minHitChargeStrip_, minHitIsolation_;
0057 const edm::InputTag rphirecHitsTag_;
0058 const edm::InputTag matchedrecHitsTag_;
0059 const unsigned int nHitMin2D_;
0060 const int minHitsinTIB_, minHitsinTOB_, minHitsinTID_, minHitsinTEC_, minHitsinBPIX_, minHitsinFPIX_;
0061 const edm::EDGetTokenT<SiStripRecHit2DCollection> rphirecHitsToken_;
0062 const edm::EDGetTokenT<SiStripMatchedRecHit2DCollection> matchedrecHitsToken_;
0063 };
0064
0065 #endif