Definition at line 55 of file SingleLongTrackProducer.cc.
References funct::abs(), DMR_cfg::cerr, debug, reco::deltaR2(), PVValHelper::dxy, PVValHelper::dz, MillePedeFileConverter_cfg::e, reco::HitPattern::getHitPattern(), goodTracks_cfi::goodTracks, h, hcalSimParameters_cfi::hb, iEvent, visualization-live-secondInstance_cfg::m, matchInDr, maxDxy, maxDz, maxEta, minNumberOfLayers, minPt, HerwigMaxPtPartonFilter_cfi::moduleLabel, eostools::move(), DiMuonV_cfg::muons, muonsToken, onlyValidHits, PrimVtxToken, rpcPointValidation_cfi::recHit, reco::Track::setExtra(), HLT_2023v12_cff::track, reco::HitPattern::TRACK_HITS, reco::HitPattern::trackerLayersWithMeasurement(), DiMuonV_cfg::tracks, tracksToken, reco::HitPattern::validHitFilter(), AlignmentTracksFromVertexSelector_cfi::vertices, and L1BJetProducer_cff::vtx.
65 <<
"Input track collection is not valid.\n Returning empty output track collection.";
73 <<
"Input muon collection is not valid.\n Returning empty output track collection.";
81 <<
"Input vertex collection is not valid.\n Returning empty output track collection.";
89 std::vector<reco::Track> selTracks;
91 unsigned int tMuon = 0;
97 double chiNdof =
track.normalizedChi2();
112 for (
const auto &
m : *
muons) {
113 if (
m.isTrackerMuon()) {
130 if (
track.validFraction() < 1.0)
133 if (chiNdof < fitProb) {
139 edm::LogPrint(
"SingleLongTrackProducer") <<
" deltaR2 (general) track to matched Track: " << dR2min;
141 edm::LogPrint(
"SingleLongTrackProducer") <<
"chi2Ndof:" << chiNdof <<
" best Track: " << fitProb;
144 selTracks.push_back(bestTrack);
148 <<
" number of Tracker Muons: " << tMuon <<
", thereof " << selTracks.size() <<
" tracks passed preselection.";
151 bool hitIsNotValid{
false};
153 for (
const auto &
track : selTracks) {
159 auto hb =
track.recHitsBegin();
161 for (
unsigned int h = 0;
h <
track.recHitsSize();
h++) {
166 hitIsNotValid =
true;
176 if (hitIsNotValid ==
true)
183 auto hb =
track.recHitsBegin();
185 for (
unsigned int h = 0;
h <
track.recHitsSize();
h++) {
193 edm::LogPrint(
"SingleLongTrackProducer") <<
"hit not valid: " <<
h;
200 edm::LogPrint(
"SingleLongTrackProducer") <<
"hit not valid: " <<
h;
213 <<
"found tracks with " << deref <<
"missing valid hits and " << deref2 <<
" missing hit pattern";
217 auto const &moduleType = moduleDescription().moduleName();
218 auto const &
moduleLabel = moduleDescription().moduleLabel();
220 <<
" output track size: " <<
goodTracks.get()->size();
const edm::EDGetTokenT< std::vector< reco::Track > > tracksToken
int trackerLayersWithMeasurement() const
const edm::EDGetTokenT< std::vector< reco::Muon > > muonsToken
std::vector< Track > TrackCollection
collection of Tracks
Log< level::Error, false > LogError
muons
the two sets of parameters below are mutually exclusive, depending if RECO or ALCARECO is used the us...
static bool validHitFilter(uint16_t pattern)
Abs< T >::type abs(const T &t)
Log< level::Warning, true > LogPrint
uint16_t getHitPattern(HitCategory category, int position) const
const edm::EDGetTokenT< reco::VertexCollection > PrimVtxToken
void setExtra(const TrackExtraRef &ref)
set reference to "extra" object
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
const int minNumberOfLayers
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.