CMS 3D CMS Logo

List of all members | Public Member Functions | Private 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 ()
 
 LCTContainer (unsigned int trig_window_size)
 
CSCCorrelatedLCTDigioperator() (int bx, int match_bx, int lct)
 
void setMatchTrigWindowSize (unsigned trig_window_size)
 

Private Attributes

CSCCorrelatedLCTDigi data [CSCConstants::MAX_LCT_TBINS][CSCConstants::MAX_MATCH_WINDOW_SIZE][CSCConstants::MAX_LCTS_PER_CSC]
 
unsigned 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() [1/2]

LCTContainer::LCTContainer ( unsigned int  trig_window_size)

Definition at line 3 of file LCTContainer.cc.

3 : match_trig_window_size_(trig_window_size) {}

◆ LCTContainer() [2/2]

LCTContainer::LCTContainer ( )
inline

Definition at line 26 of file LCTContainer.h.

26 {}

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 CSCMotherboard::clear().

◆ 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.

◆ 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().

◆ 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.

◆ setMatchTrigWindowSize()

void LCTContainer::setMatchTrigWindowSize ( unsigned  trig_window_size)
inline

Definition at line 41 of file LCTContainer.h.

41 { match_trig_window_size_ = trig_window_size; }

References match_trig_window_size_.

Referenced by CSCMotherboard::CSCMotherboard().

Member Data Documentation

◆ data

◆ match_trig_window_size_

unsigned LCTContainer::match_trig_window_size_
private

Definition at line 52 of file LCTContainer.h.

Referenced by clear(), getTimeMatched(), and setMatchTrigWindowSize().

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:138
mps_fire.end
end
Definition: mps_fire.py:242
CSCConstants::MAX_LCT_TBINS
Definition: CSCConstants.h:128
sistrip::SpyUtilities::isValid
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
Definition: SiStripSpyUtilities.cc:124
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:58
LCTContainer::match_trig_window_size_
unsigned match_trig_window_size_
Definition: LCTContainer.h:52
LCTContainer::data
CSCCorrelatedLCTDigi data[CSCConstants::MAX_LCT_TBINS][CSCConstants::MAX_MATCH_WINDOW_SIZE][CSCConstants::MAX_LCTS_PER_CSC]
Definition: LCTContainer.h:49