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 ( unsigned int  trig_window_size)

Definition at line 3 of file LCTContainer.cc.

3 : match_trig_window_size_(trig_window_size) {}
const unsigned int match_trig_window_size_
Definition: LCTContainer.h:46

Member Function Documentation

void LCTContainer::clear ( void  )

Definition at line 31 of file LCTContainer.cc.

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

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 }
const unsigned int match_trig_window_size_
Definition: LCTContainer.h:46
CSCCorrelatedLCTDigi data[CSCConstants::MAX_LCT_TBINS][CSCConstants::MAX_MATCH_WINDOW_SIZE][CSCConstants::MAX_LCTS_PER_CSC]
Definition: LCTContainer.h:43
void LCTContainer::getMatched ( std::vector< CSCCorrelatedLCTDigi > &  lcts) const

Definition at line 23 of file LCTContainer.cc.

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

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

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 }
#define end
Definition: vmac.h:39
#define begin
Definition: vmac.h:32
void getTimeMatched(const int bx, std::vector< CSCCorrelatedLCTDigi > &) const
Definition: LCTContainer.cc:7
void LCTContainer::getTimeMatched ( const int  bx,
std::vector< CSCCorrelatedLCTDigi > &  lcts 
) const

Definition at line 7 of file LCTContainer.cc.

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

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

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 unsigned int match_trig_window_size_
Definition: LCTContainer.h:46
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
CSCCorrelatedLCTDigi data[CSCConstants::MAX_LCT_TBINS][CSCConstants::MAX_MATCH_WINDOW_SIZE][CSCConstants::MAX_LCTS_PER_CSC]
Definition: LCTContainer.h:43
CSCCorrelatedLCTDigi & LCTContainer::operator() ( int  bx,
int  match_bx,
int  lct 
)

Definition at line 5 of file LCTContainer.cc.

References l1GtPatternGenerator_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:43

Member Data Documentation

const unsigned int LCTContainer::match_trig_window_size_

Definition at line 46 of file LCTContainer.h.

Referenced by clear(), and getTimeMatched().