test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
AlignmentCSCTrackSelector Class Reference

#include <AlignmentCSCTrackSelector.h>

Public Types

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

Public Member Functions

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

Private Attributes

int m_maxHitsPerStation
 
int m_minHitsDT
 
int m_minHitsPerStation
 
edm::InputTag m_src
 
int m_stationA
 
int m_stationB
 

Detailed Description

Definition at line 15 of file AlignmentCSCTrackSelector.h.

Member Typedef Documentation

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

Definition at line 20 of file AlignmentCSCTrackSelector.h.

Constructor & Destructor Documentation

AlignmentCSCTrackSelector::AlignmentCSCTrackSelector ( const edm::ParameterSet cfg)

constructor

Definition at line 16 of file AlignmentCSCTrackSelector.cc.

17  : m_src(cfg.getParameter<edm::InputTag>("src"))
18  , m_stationA(cfg.getParameter<int>("stationA"))
19  , m_stationB(cfg.getParameter<int>("stationB"))
20  , m_minHitsDT(cfg.getParameter<int>("minHitsDT"))
21  , m_minHitsPerStation(cfg.getParameter<int>("minHitsPerStation"))
22  , m_maxHitsPerStation(cfg.getParameter<int>("maxHitsPerStation"))
23 {}
T getParameter(std::string const &) const
AlignmentCSCTrackSelector::~AlignmentCSCTrackSelector ( )

destructor

Definition at line 27 of file AlignmentCSCTrackSelector.cc.

28 {}

Member Function Documentation

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, mps_fire::result, relativeConstraints::station, and CSCDetId::station().

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 CSCTrackConfigSelector::select().

35 {
36  Tracks result;
37 
38  for (Tracks::const_iterator track = tracks.begin(); track != tracks.end(); ++track) {
39  int hitsOnStationA = 0;
40  int hitsOnStationB = 0;
41 
42  for (trackingRecHit_iterator hit = (*track)->recHitsBegin(); hit != (*track)->recHitsEnd(); ++hit) {
43  DetId id = (*hit)->geographicalId();
44 
45  if (id.det() == DetId::Muon && id.subdetId() == MuonSubdetId::DT) {
46  if (m_stationA == 0) hitsOnStationA++;
47  if (m_stationB == 0) hitsOnStationB++;
48  }
49  else if (id.det() == DetId::Muon && id.subdetId() == MuonSubdetId::CSC) {
50  CSCDetId cscid(id.rawId());
51  int station = (cscid.endcap() == 1 ? 1 : -1) * cscid.station();
52 
53  if (station == m_stationA) hitsOnStationA++;
54  if (station == m_stationB) hitsOnStationB++;
55 
56  } // end if CSC
57  } // end loop over hits
58 
59  bool stationAokay;
60  if (m_stationA == 0) stationAokay = (m_minHitsDT <= hitsOnStationA);
61  else stationAokay = (m_minHitsPerStation <= hitsOnStationA && hitsOnStationA <= m_maxHitsPerStation);
62 
63  bool stationBokay;
64  if (m_stationB == 0) stationBokay = (m_minHitsDT <= hitsOnStationB);
65  else stationBokay = (m_minHitsPerStation <= hitsOnStationB && hitsOnStationB <= m_maxHitsPerStation);
66 
67  if (stationAokay && stationBokay) {
68  result.push_back(*track);
69  }
70  } // end loop over tracks
71 
72  return result;
73 }
tuple result
Definition: mps_fire.py:83
static const int CSC
Definition: MuonSubdetId.h:13
std::vector< const reco::Track * > Tracks
Definition: DetId.h:18
tuple tracks
Definition: testEve_cfg.py:39
static const int DT
Definition: MuonSubdetId.h:12
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection

Member Data Documentation

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().

edm::InputTag AlignmentCSCTrackSelector::m_src
private

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().