#include <AlignmentCSCTrackSelector.h>
Public Types | |
typedef std::vector< const reco::Track * > | Tracks |
Public Member Functions | |
AlignmentCSCTrackSelector (const edm::ParameterSet &cfg) | |
constructor | |
Tracks | select (const Tracks &tracks, const edm::Event &evt) const |
select tracks | |
~AlignmentCSCTrackSelector () | |
destructor | |
Private Attributes | |
int | m_maxHitsPerStation |
int | m_minHitsDT |
int | m_minHitsPerStation |
edm::InputTag | m_src |
int | m_stationA |
int | m_stationB |
Definition at line 15 of file AlignmentCSCTrackSelector.h.
typedef std::vector<const reco::Track*> AlignmentCSCTrackSelector::Tracks |
Definition at line 20 of file AlignmentCSCTrackSelector.h.
AlignmentCSCTrackSelector::AlignmentCSCTrackSelector | ( | const edm::ParameterSet & | cfg | ) |
constructor
Definition at line 16 of file AlignmentCSCTrackSelector.cc.
: m_src(cfg.getParameter<edm::InputTag>("src")) , m_stationA(cfg.getParameter<int>("stationA")) , m_stationB(cfg.getParameter<int>("stationB")) , m_minHitsDT(cfg.getParameter<int>("minHitsDT")) , m_minHitsPerStation(cfg.getParameter<int>("minHitsPerStation")) , m_maxHitsPerStation(cfg.getParameter<int>("maxHitsPerStation")) {}
AlignmentCSCTrackSelector::~AlignmentCSCTrackSelector | ( | ) |
AlignmentCSCTrackSelector::Tracks AlignmentCSCTrackSelector::select | ( | const Tracks & | tracks, |
const edm::Event & | evt | ||
) | const |
select tracks
Definition at line 34 of file AlignmentCSCTrackSelector.cc.
References MuonSubdetId::CSC, MuonSubdetId::DT, CSCDetId::endcap(), m_maxHitsPerStation, m_minHitsDT, m_minHitsPerStation, m_stationA, m_stationB, DetId::Muon, query::result, relativeConstraints::station, CSCDetId::station(), and ExpressReco_HICollisions_FallBack::track.
Referenced by CSCTrackConfigSelector::select().
{ Tracks result; for (Tracks::const_iterator track = tracks.begin(); track != tracks.end(); ++track) { int hitsOnStationA = 0; int hitsOnStationB = 0; for (trackingRecHit_iterator hit = (*track)->recHitsBegin(); hit != (*track)->recHitsEnd(); ++hit) { DetId id = (*hit)->geographicalId(); if (id.det() == DetId::Muon && id.subdetId() == MuonSubdetId::DT) { if (m_stationA == 0) hitsOnStationA++; if (m_stationB == 0) hitsOnStationB++; } else if (id.det() == DetId::Muon && id.subdetId() == MuonSubdetId::CSC) { CSCDetId cscid(id.rawId()); int station = (cscid.endcap() == 1 ? 1 : -1) * cscid.station(); if (station == m_stationA) hitsOnStationA++; if (station == m_stationB) hitsOnStationB++; } // end if CSC } // end loop over hits bool stationAokay; if (m_stationA == 0) stationAokay = (m_minHitsDT <= hitsOnStationA); else stationAokay = (m_minHitsPerStation <= hitsOnStationA && hitsOnStationA <= m_maxHitsPerStation); bool stationBokay; if (m_stationB == 0) stationBokay = (m_minHitsDT <= hitsOnStationB); else stationBokay = (m_minHitsPerStation <= hitsOnStationB && hitsOnStationB <= m_maxHitsPerStation); if (stationAokay && stationBokay) { result.push_back(*track); } } // end loop over tracks return result; }
int AlignmentCSCTrackSelector::m_maxHitsPerStation [private] |
Definition at line 34 of file AlignmentCSCTrackSelector.h.
Referenced by select().
int AlignmentCSCTrackSelector::m_minHitsDT [private] |
Definition at line 34 of file AlignmentCSCTrackSelector.h.
Referenced by select().
int AlignmentCSCTrackSelector::m_minHitsPerStation [private] |
Definition at line 34 of file AlignmentCSCTrackSelector.h.
Referenced by select().
Definition at line 33 of file AlignmentCSCTrackSelector.h.
int AlignmentCSCTrackSelector::m_stationA [private] |
Definition at line 34 of file AlignmentCSCTrackSelector.h.
Referenced by select().
int AlignmentCSCTrackSelector::m_stationB [private] |
Definition at line 34 of file AlignmentCSCTrackSelector.h.
Referenced by select().