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][CSCConstants::MAX_MATCH_WINDOW_SIZE][CSCConstants::MAX_LCTS_PER_CSC]
 
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 40 of file CSCUpgradeMotherboard.h.

Constructor & Destructor Documentation

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

Definition at line 3 of file CSCUpgradeMotherboard.cc.

4  : match_trig_window_size_(trig_window_size)
5 {
6 }

Member Function Documentation

void CSCUpgradeMotherboard::LCTContainer::clear ( void  )

Definition at line 42 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(), CSCGEMMotherboardME21::run(), CSCMotherboardME11::run(), and CSCUpgradeMotherboard::run().

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

Definition at line 32 of file CSCUpgradeMotherboard.cc.

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

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

33 {
34  for (int bx = 0; bx < CSCConstants::MAX_LCT_TBINS; bx++){
35  std::vector<CSCCorrelatedLCTDigi> temp_lcts;
37  lcts.insert(std::end(lcts), std::begin(temp_lcts), std::end(temp_lcts));
38  }
39 }
#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 15 of file CSCUpgradeMotherboard.cc.

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

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

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

Definition at line 9 of file CSCUpgradeMotherboard.cc.

References data.

10 {
11  return data[bx][match_bx][lct];
12 }
CSCCorrelatedLCTDigi data[CSCConstants::MAX_LCT_TBINS][CSCConstants::MAX_MATCH_WINDOW_SIZE][CSCConstants::MAX_LCTS_PER_CSC]

Member Data Documentation

const unsigned int CSCUpgradeMotherboard::LCTContainer::match_trig_window_size_

Definition at line 65 of file CSCUpgradeMotherboard.h.

Referenced by clear(), and getTimeMatched().