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 (unsigned int trig_window_size)
 
 LCTContainer ()
 
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) {}
unsigned match_trig_window_size_
Definition: LCTContainer.h:52

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

References simKBmtfDigis_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().

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 }
unsigned match_trig_window_size_
Definition: LCTContainer.h:52
CSCCorrelatedLCTDigi data[CSCConstants::MAX_LCT_TBINS][CSCConstants::MAX_MATCH_WINDOW_SIZE][CSCConstants::MAX_LCTS_PER_CSC]
Definition: LCTContainer.h:49
void clear()
clear this LCT

◆ getMatched()

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

Definition at line 23 of file LCTContainer.cc.

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

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 }
void getTimeMatched(const int bx, std::vector< CSCCorrelatedLCTDigi > &) const
Definition: LCTContainer.cc:7

◆ getTimeMatched()

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

Definition at line 7 of file LCTContainer.cc.

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

Referenced by getMatched().

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 }
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
unsigned match_trig_window_size_
Definition: LCTContainer.h:52
CSCCorrelatedLCTDigi data[CSCConstants::MAX_LCT_TBINS][CSCConstants::MAX_MATCH_WINDOW_SIZE][CSCConstants::MAX_LCTS_PER_CSC]
Definition: LCTContainer.h:49

◆ operator()()

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

Definition at line 5 of file LCTContainer.cc.

References simKBmtfDigis_cfi::bx, and data.

5 { return data[bx][match_bx][lct]; }
CSCCorrelatedLCTDigi data[CSCConstants::MAX_LCT_TBINS][CSCConstants::MAX_MATCH_WINDOW_SIZE][CSCConstants::MAX_LCTS_PER_CSC]
Definition: LCTContainer.h:49

◆ setMatchTrigWindowSize()

void LCTContainer::setMatchTrigWindowSize ( unsigned  trig_window_size)
inline

Definition at line 41 of file LCTContainer.h.

References match_trig_window_size_.

Referenced by CSCMotherboard::CSCMotherboard().

41 { match_trig_window_size_ = trig_window_size; }
unsigned match_trig_window_size_
Definition: LCTContainer.h:52

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