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
AlignmentCSCOverlapSelector Class Reference

#include <AlignmentCSCOverlapSelector.h>

Public Types

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

Public Member Functions

 AlignmentCSCOverlapSelector (const edm::ParameterSet &iConfig)
 constructor More...
 
Tracks select (const Tracks &tracks, const edm::Event &iEvent) const
 select tracks More...
 
 ~AlignmentCSCOverlapSelector ()
 destructor More...
 

Private Attributes

unsigned int m_minHitsPerChamber
 
int m_station
 

Detailed Description

Definition at line 14 of file AlignmentCSCOverlapSelector.h.

Member Typedef Documentation

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

Definition at line 16 of file AlignmentCSCOverlapSelector.h.

Constructor & Destructor Documentation

AlignmentCSCOverlapSelector::AlignmentCSCOverlapSelector ( const edm::ParameterSet iConfig)

constructor

Definition at line 14 of file AlignmentCSCOverlapSelector.cc.

References m_minHitsPerChamber, and m_station.

15  : m_station(iConfig.getParameter<int>("station"))
16  , m_minHitsPerChamber(iConfig.getParameter<unsigned int>("minHitsPerChamber"))
17 {
18  if (m_station == 0) {
19  edm::LogInfo("AlignmentCSCOverlapSelector")
20  << "Acceptable tracks must have " << m_minHitsPerChamber << " in two chambers on all stations." << std::endl;
21  }
22  else {
23  edm::LogInfo("AlignmentCSCOverlapSelector")
24  << "Acceptable tracks must have " << m_minHitsPerChamber << " in two chambers on station " << m_station << "." << std::endl;
25  }
26 }
T getParameter(std::string const &) const
AlignmentCSCOverlapSelector::~AlignmentCSCOverlapSelector ( )

destructor

Definition at line 30 of file AlignmentCSCOverlapSelector.cc.

30 {}

Member Function Documentation

AlignmentCSCOverlapSelector::Tracks AlignmentCSCOverlapSelector::select ( const Tracks tracks,
const edm::Event iEvent 
) const

select tracks

Definition at line 35 of file AlignmentCSCOverlapSelector.cc.

References CSCDetId::chamber(), MuonSubdetId::CSC, CSCDetId::endcap(), m_minHitsPerChamber, m_station, 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 CSCOverlapConfigSelector::select().

35  {
36  Tracks result;
37 
38  for (Tracks::const_iterator track = tracks.begin(); track != tracks.end(); ++track) {
39  unsigned int MEminus4_even = 0;
40  unsigned int MEminus4_odd = 0;
41  unsigned int MEminus3_even = 0;
42  unsigned int MEminus3_odd = 0;
43  unsigned int MEminus2_even = 0;
44  unsigned int MEminus2_odd = 0;
45  unsigned int MEminus1_even = 0;
46  unsigned int MEminus1_odd = 0;
47 
48  unsigned int MEplus1_even = 0;
49  unsigned int MEplus1_odd = 0;
50  unsigned int MEplus2_even = 0;
51  unsigned int MEplus2_odd = 0;
52  unsigned int MEplus3_even = 0;
53  unsigned int MEplus3_odd = 0;
54  unsigned int MEplus4_even = 0;
55  unsigned int MEplus4_odd = 0;
56 
57  for (trackingRecHit_iterator hit = (*track)->recHitsBegin(); hit != (*track)->recHitsEnd(); ++hit) {
58  DetId id = (*hit)->geographicalId();
59  if (id.det() == DetId::Muon && id.subdetId() == MuonSubdetId::CSC) {
60  CSCDetId cscid(id.rawId());
61  int station = (cscid.endcap() == 1 ? 1 : -1) * cscid.station();
62 
63  if (station == -4) {
64  if (cscid.chamber() % 2 == 0) MEminus4_even++;
65  else MEminus4_odd++;
66  }
67  else if (station == -3) {
68  if (cscid.chamber() % 2 == 0) MEminus3_even++;
69  else MEminus3_odd++;
70  }
71  else if (station == -2) {
72  if (cscid.chamber() % 2 == 0) MEminus2_even++;
73  else MEminus2_odd++;
74  }
75  else if (station == -1) {
76  if (cscid.chamber() % 2 == 0) MEminus1_even++;
77  else MEminus1_odd++;
78  }
79 
80  else if (station == 1) {
81  if (cscid.chamber() % 2 == 0) MEplus1_even++;
82  else MEplus1_odd++;
83  }
84  else if (station == 2) {
85  if (cscid.chamber() % 2 == 0) MEplus2_even++;
86  else MEplus2_odd++;
87  }
88  else if (station == 3) {
89  if (cscid.chamber() % 2 == 0) MEplus3_even++;
90  else MEplus3_odd++;
91  }
92  else if (station == 4) {
93  if (cscid.chamber() % 2 == 0) MEplus4_even++;
94  else MEplus4_odd++;
95  }
96 
97  } // end if it's a CSC hit
98  } // end loop over hits
99 
100  if ((m_station == 0 || m_station == -4) &&
101  (MEminus4_even >= m_minHitsPerChamber) && (MEminus4_odd >= m_minHitsPerChamber)) result.push_back(*track);
102 
103  else if ((m_station == 0 || m_station == -3) &&
104  (MEminus3_even >= m_minHitsPerChamber) && (MEminus3_odd >= m_minHitsPerChamber)) result.push_back(*track);
105 
106  else if ((m_station == 0 || m_station == -2) &&
107  (MEminus2_even >= m_minHitsPerChamber) && (MEminus2_odd >= m_minHitsPerChamber)) result.push_back(*track);
108 
109  else if ((m_station == 0 || m_station == -1) &&
110  (MEminus1_even >= m_minHitsPerChamber) && (MEminus1_odd >= m_minHitsPerChamber)) result.push_back(*track);
111 
112  else if ((m_station == 0 || m_station == 1) &&
113  (MEplus1_even >= m_minHitsPerChamber) && (MEplus1_odd >= m_minHitsPerChamber)) result.push_back(*track);
114 
115  else if ((m_station == 0 || m_station == 2) &&
116  (MEplus2_even >= m_minHitsPerChamber) && (MEplus2_odd >= m_minHitsPerChamber)) result.push_back(*track);
117 
118  else if ((m_station == 0 || m_station == 3) &&
119  (MEplus3_even >= m_minHitsPerChamber) && (MEplus3_odd >= m_minHitsPerChamber)) result.push_back(*track);
120 
121  else if ((m_station == 0 || m_station == 4) &&
122  (MEplus4_even >= m_minHitsPerChamber) && (MEplus4_odd >= m_minHitsPerChamber)) result.push_back(*track);
123 
124  } // end loop over tracks
125 
126  return result;
127 }
tuple result
Definition: mps_fire.py:95
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
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection

Member Data Documentation

unsigned int AlignmentCSCOverlapSelector::m_minHitsPerChamber
private

Definition at line 29 of file AlignmentCSCOverlapSelector.h.

Referenced by AlignmentCSCOverlapSelector(), and select().

int AlignmentCSCOverlapSelector::m_station
private

Definition at line 28 of file AlignmentCSCOverlapSelector.h.

Referenced by AlignmentCSCOverlapSelector(), and select().