CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
CSCMuonPortCard Class Reference

#include <CSCMuonPortCard.h>

Public Types

typedef CSCTriggerContainer< csctf::TrackStubTrackStubList
 

Public Member Functions

void clear ()
 
 CSCMuonPortCard ()
 
 CSCMuonPortCard (const edm::ParameterSet &conf)
 
void loadDigis (const CSCCorrelatedLCTDigiCollection &thedigis)
 
std::vector< csctf::TrackStubsort (const unsigned endcap, const unsigned station, const unsigned sector, const unsigned subsector, const int bx)
 

Private Attributes

bool drop_invalid_stubs_
 
bool drop_low_quality_stubs_
 
bool sort_stubs_
 
CSCTriggerContainer< csctf::TrackStubstubs_
 

Detailed Description

Definition at line 35 of file CSCMuonPortCard.h.

Member Typedef Documentation

◆ TrackStubList

Definition at line 40 of file CSCMuonPortCard.h.

Constructor & Destructor Documentation

◆ CSCMuonPortCard() [1/2]

CSCMuonPortCard::CSCMuonPortCard ( )

Definition at line 5 of file CSCMuonPortCard.cc.

5 {}

◆ CSCMuonPortCard() [2/2]

CSCMuonPortCard::CSCMuonPortCard ( const edm::ParameterSet conf)

Definition at line 7 of file CSCMuonPortCard.cc.

7  {
8  edm::ParameterSet mpcRun2Params = conf.getParameter<edm::ParameterSet>("mpcRun2");
9  sort_stubs_ = mpcRun2Params.getParameter<bool>("sortStubs");
10  drop_invalid_stubs_ = mpcRun2Params.getParameter<bool>("dropInvalidStubs");
11  drop_low_quality_stubs_ = mpcRun2Params.getParameter<bool>("dropLowQualityStubs");
12 }

References drop_invalid_stubs_, drop_low_quality_stubs_, edm::ParameterSet::getParameter(), and sort_stubs_.

Member Function Documentation

◆ clear()

void CSCMuonPortCard::clear ( void  )
inline

Definition at line 52 of file CSCMuonPortCard.h.

52 { stubs_.clear(); }

References CSCTriggerContainer< T >::clear(), and stubs_.

Referenced by loadDigis().

◆ loadDigis()

void CSCMuonPortCard::loadDigis ( const CSCCorrelatedLCTDigiCollection thedigis)

Definition at line 14 of file CSCMuonPortCard.cc.

14  {
15  // Put everything from the digi container into a trigger container.
16  // This allows us to sort per BX more easily.
17  clear();
18 
20 
21  for (Citer = thedigis.begin(); Citer != thedigis.end(); Citer++) {
22  CSCCorrelatedLCTDigiCollection::const_iterator Diter = (*Citer).second.first;
23  CSCCorrelatedLCTDigiCollection::const_iterator Dend = (*Citer).second.second;
24 
25  for (; Diter != Dend; Diter++) {
26  csctf::TrackStub theStub((*Diter), (*Citer).first);
27  stubs_.push_back(theStub);
28  }
29  }
30 }

References clear(), CSCTriggerContainer< T >::push_back(), and stubs_.

◆ sort()

std::vector< csctf::TrackStub > CSCMuonPortCard::sort ( const unsigned  endcap,
const unsigned  station,
const unsigned  sector,
const unsigned  subsector,
const int  bx 
)

Definition at line 32 of file CSCMuonPortCard.cc.

33  {
34  std::vector<csctf::TrackStub> result;
35  std::vector<csctf::TrackStub>::iterator LCT;
36 
37  result = stubs_.get(endcap, station, sector, subsector, bx);
38 
39  // Make sure no Quality 0 or non-valid LCTs come through the portcard.
40  for (LCT = result.begin(); LCT != result.end(); LCT++) {
41  if ((drop_invalid_stubs_ && !LCT->isValid()) || (drop_low_quality_stubs_ && LCT->getQuality() == 0))
42  result.erase(LCT, LCT);
43  }
44 
45  if (!result.empty()) {
46  if (sort_stubs_)
47  std::sort(result.begin(), result.end(), std::greater<csctf::TrackStub>());
48 
49  // Can return up to MAX_LCTS_PER_MPC (default 18) per bunch crossing.
51  result.erase(result.begin() + CSCConstants::MAX_LCTS_PER_MPC, result.end());
52 
53  // Go through the sorted list and label the LCTs with a sorting number.
54  unsigned i = 0;
55  for (LCT = result.begin(); LCT != result.end(); LCT++)
56  LCT->setMPCLink(++i);
57  }
58 
59  return result;
60 }

References l1GtPatternGenerator_cfi::bx, drop_invalid_stubs_, drop_low_quality_stubs_, makeMuonMisalignmentScenario::endcap, CSCTriggerContainer< T >::get(), mps_fire::i, CSCConstants::MAX_LCTS_PER_MPC, mps_fire::result, sort_stubs_, relativeConstraints::station, and stubs_.

Member Data Documentation

◆ drop_invalid_stubs_

bool CSCMuonPortCard::drop_invalid_stubs_
private

Definition at line 60 of file CSCMuonPortCard.h.

Referenced by CSCMuonPortCard(), and sort().

◆ drop_low_quality_stubs_

bool CSCMuonPortCard::drop_low_quality_stubs_
private

Definition at line 61 of file CSCMuonPortCard.h.

Referenced by CSCMuonPortCard(), and sort().

◆ sort_stubs_

bool CSCMuonPortCard::sort_stubs_
private

Definition at line 59 of file CSCMuonPortCard.h.

Referenced by CSCMuonPortCard(), and sort().

◆ stubs_

CSCTriggerContainer<csctf::TrackStub> CSCMuonPortCard::stubs_
private

Definition at line 56 of file CSCMuonPortCard.h.

Referenced by clear(), loadDigis(), and sort().

CSCTriggerContainer::clear
void clear()
Definition: CSCTriggerContainer.h:57
mps_fire.i
i
Definition: mps_fire.py:355
relativeConstraints.station
station
Definition: relativeConstraints.py:67
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
makeMuonMisalignmentScenario.endcap
endcap
Definition: makeMuonMisalignmentScenario.py:320
CSCMuonPortCard::drop_low_quality_stubs_
bool drop_low_quality_stubs_
Definition: CSCMuonPortCard.h:61
csctf::TrackStub
Definition: TrackStub.h:22
MuonDigiCollection::const_iterator
std::vector< DigiType >::const_iterator const_iterator
Definition: MuonDigiCollection.h:94
edm::ParameterSet
Definition: ParameterSet.h:36
CSCMuonPortCard::clear
void clear()
Definition: CSCMuonPortCard.h:52
CSCMuonPortCard::drop_invalid_stubs_
bool drop_invalid_stubs_
Definition: CSCMuonPortCard.h:60
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
CSCTriggerContainer::push_back
void push_back(const T &data)
Definition: CSCTriggerContainer.h:51
CSCConstants::MAX_LCTS_PER_MPC
Definition: CSCConstants.h:75
mps_fire.result
result
Definition: mps_fire.py:303
CSCMuonPortCard::stubs_
CSCTriggerContainer< csctf::TrackStub > stubs_
Definition: CSCMuonPortCard.h:56
DigiContainerIterator
Definition: MuonDigiCollection.h:30
CSCTriggerContainer::get
std::vector< T > get() const
Definition: CSCTriggerContainer.h:83
CSCMuonPortCard::sort_stubs_
bool sort_stubs_
Definition: CSCMuonPortCard.h:59