CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
CSCUpgradeMotherboard::LCTContainer Class Reference

#include <CSCUpgradeMotherboard.h>

Public Member Functions

void clear ()
 
void getMatched (std::vector< CSCCorrelatedLCTDigi > &) const
 
void getTimeMatched (const int bx, std::vector< CSCCorrelatedLCTDigi > &) const
 
 LCTContainer (unsigned int trig_window_size)
 
CSCCorrelatedLCTDigioperator() (int bx, int match_bx, int lct)
 

Public Attributes

CSCCorrelatedLCTDigi data [CSCConstants::MAX_LCT_TBINS][15][2]
 
const unsigned int match_trig_window_size_
 

Detailed Description

for the case when more than 2 LCTs/BX are allowed; maximum match window = 15

Definition at line 44 of file CSCUpgradeMotherboard.h.

Constructor & Destructor Documentation

CSCUpgradeMotherboard::LCTContainer::LCTContainer ( unsigned int  trig_window_size)

Definition at line 4 of file CSCUpgradeMotherboard.cc.

5  : match_trig_window_size_(trig_window_size)
6 {
7 }

Member Function Documentation

void CSCUpgradeMotherboard::LCTContainer::clear ( void  )

Definition at line 43 of file CSCUpgradeMotherboard.cc.

References CSCCorrelatedLCTDigi::clear(), data, mps_fire::i, match_trig_window_size_, CSCConstants::MAX_LCT_TBINS, and CSCConstants::MAX_LCTS_PER_CSC.

Referenced by CSCUpgradeMotherboard::clear(), CSCMotherboardME3141::run(), CSCGEMMotherboardME21::run(), and CSCMotherboardME11::run().

44 {
45  // Loop over all time windows
46  for (int bx = 0; bx < CSCConstants::MAX_LCT_TBINS; bx++) {
47  // Loop over all matched trigger windows
48  for (unsigned int mbx = 0; mbx < match_trig_window_size_; mbx++) {
49  // Loop over all stubs
50  for (int i=0;i<CSCConstants::MAX_LCTS_PER_CSC;i++) {
51  data[bx][mbx][i].clear();
52  }
53  }
54  }
55 }
CSCCorrelatedLCTDigi data[CSCConstants::MAX_LCT_TBINS][15][2]
void CSCUpgradeMotherboard::LCTContainer::getMatched ( std::vector< CSCCorrelatedLCTDigi > &  lcts) const

Definition at line 33 of file CSCUpgradeMotherboard.cc.

References begin, end, getTimeMatched(), and CSCConstants::MAX_LCT_TBINS.

Referenced by CSCMotherboardME3141::readoutLCTs(), CSCGEMMotherboardME21::readoutLCTs(), and CSCGEMMotherboardME11::readoutLCTs().

34 {
35  for (int bx = 0; bx < CSCConstants::MAX_LCT_TBINS; bx++){
36  std::vector<CSCCorrelatedLCTDigi> temp_lcts;
38  lcts.insert(std::end(lcts), std::begin(temp_lcts), std::end(temp_lcts));
39  }
40 }
#define end
Definition: vmac.h:39
void getTimeMatched(const int bx, std::vector< CSCCorrelatedLCTDigi > &) const
#define begin
Definition: vmac.h:32
void CSCUpgradeMotherboard::LCTContainer::getTimeMatched ( const int  bx,
std::vector< CSCCorrelatedLCTDigi > &  lcts 
) const

Definition at line 16 of file CSCUpgradeMotherboard.cc.

References data, spr::find(), mps_fire::i, and match_trig_window_size_.

Referenced by getMatched(), and CSCGEMMotherboardME11::sortLCTs().

18 {
19  for (unsigned int mbx = 0; mbx < match_trig_window_size_; mbx++) {
20  for (int i=0;i<2;i++) {
21  // consider only valid LCTs
22  if (not data[bx][mbx][i].isValid()) continue;
23 
24  // remove duplicated LCTs
25  if (std::find(lcts.begin(), lcts.end(), data[bx][mbx][i]) != lcts.end()) continue;
26 
27  lcts.push_back(data[bx][mbx][i]);
28  }
29  }
30 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
CSCCorrelatedLCTDigi data[CSCConstants::MAX_LCT_TBINS][15][2]
CSCCorrelatedLCTDigi & CSCUpgradeMotherboard::LCTContainer::operator() ( int  bx,
int  match_bx,
int  lct 
)

Definition at line 10 of file CSCUpgradeMotherboard.cc.

References data.

11 {
12  return data[bx][match_bx][lct];
13 }
CSCCorrelatedLCTDigi data[CSCConstants::MAX_LCT_TBINS][15][2]

Member Data Documentation

CSCCorrelatedLCTDigi CSCUpgradeMotherboard::LCTContainer::data[CSCConstants::MAX_LCT_TBINS][15][2]
const unsigned int CSCUpgradeMotherboard::LCTContainer::match_trig_window_size_

Definition at line 66 of file CSCUpgradeMotherboard.h.

Referenced by clear(), and getTimeMatched().