CMS 3D CMS Logo

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

#include <LCTContainer.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

This class is a helper class that contains LCTs per BX

Author: Nick McColl

Definition at line 20 of file LCTContainer.h.

Constructor & Destructor Documentation

◆ LCTContainer()

LCTContainer::LCTContainer ( unsigned int  trig_window_size)

Definition at line 3 of file LCTContainer.cc.

3 : match_trig_window_size_(trig_window_size) {}

Member Function Documentation

◆ clear()

void LCTContainer::clear ( void  )

Definition at line 31 of file LCTContainer.cc.

31  {
32  // Loop over all time windows
33  for (int bx = 0; bx < CSCConstants::MAX_LCT_TBINS; bx++) {
34  // Loop over all matched trigger windows
35  for (unsigned int mbx = 0; mbx < match_trig_window_size_; mbx++) {
36  // Loop over all stubs
37  for (int i = 0; i < CSCConstants::MAX_LCTS_PER_CSC; i++) {
38  data[bx][mbx][i].clear();
39  }
40  }
41  }
42 }

References l1GtPatternGenerator_cfi::bx, 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().

◆ getMatched()

void LCTContainer::getMatched ( std::vector< CSCCorrelatedLCTDigi > &  lcts) const

Definition at line 23 of file LCTContainer.cc.

23  {
24  for (int bx = 0; bx < CSCConstants::MAX_LCT_TBINS; bx++) {
25  std::vector<CSCCorrelatedLCTDigi> temp_lcts;
26  LCTContainer::getTimeMatched(bx, temp_lcts);
27  lcts.insert(std::end(lcts), std::begin(temp_lcts), std::end(temp_lcts));
28  }
29 }

References l1GtPatternGenerator_cfi::bx, mps_fire::end, getTimeMatched(), and CSCConstants::MAX_LCT_TBINS.

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

◆ getTimeMatched()

void LCTContainer::getTimeMatched ( const int  bx,
std::vector< CSCCorrelatedLCTDigi > &  lcts 
) const

Definition at line 7 of file LCTContainer.cc.

7  {
8  for (unsigned int mbx = 0; mbx < match_trig_window_size_; mbx++) {
9  for (int i = 0; i < CSCConstants::MAX_LCTS_PER_CSC; i++) {
10  // consider only valid LCTs
11  if (not data[bx][mbx][i].isValid())
12  continue;
13 
14  // remove duplicated LCTs
15  if (std::find(lcts.begin(), lcts.end(), data[bx][mbx][i]) != lcts.end())
16  continue;
17 
18  lcts.push_back(data[bx][mbx][i]);
19  }
20  }
21 }

References l1GtPatternGenerator_cfi::bx, data, spr::find(), mps_fire::i, sistrip::SpyUtilities::isValid(), match_trig_window_size_, and CSCConstants::MAX_LCTS_PER_CSC.

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

◆ operator()()

CSCCorrelatedLCTDigi & LCTContainer::operator() ( int  bx,
int  match_bx,
int  lct 
)

Definition at line 5 of file LCTContainer.cc.

5 { return data[bx][match_bx][lct]; }

References l1GtPatternGenerator_cfi::bx, and data.

Member Data Documentation

◆ data

◆ match_trig_window_size_

const unsigned int LCTContainer::match_trig_window_size_

Definition at line 46 of file LCTContainer.h.

Referenced by clear(), and getTimeMatched().

mps_fire.i
i
Definition: mps_fire.py:428
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
CSCConstants::MAX_LCTS_PER_CSC
Definition: CSCConstants.h:75
mps_fire.end
end
Definition: mps_fire.py:242
CSCConstants::MAX_LCT_TBINS
Definition: CSCConstants.h:65
sistrip::SpyUtilities::isValid
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
Definition: SiStripSpyUtilities.cc:124
LCTContainer::match_trig_window_size_
const unsigned int match_trig_window_size_
Definition: LCTContainer.h:46
LCTContainer::getTimeMatched
void getTimeMatched(const int bx, std::vector< CSCCorrelatedLCTDigi > &) const
Definition: LCTContainer.cc:7
CSCCorrelatedLCTDigi::clear
void clear()
clear this LCT
Definition: CSCCorrelatedLCTDigi.cc:49
LCTContainer::data
CSCCorrelatedLCTDigi data[CSCConstants::MAX_LCT_TBINS][CSCConstants::MAX_MATCH_WINDOW_SIZE][CSCConstants::MAX_LCTS_PER_CSC]
Definition: LCTContainer.h:43