CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1RCT Class Reference

#include <L1RCT.h>

Public Member Functions

void digiInput (const EcalTrigPrimDigiCollection &ecalCollection, const HcalTrigPrimDigiCollection &hcalCollection)
 
unsigned short ecalCompressedET (int crate, int card, int tower)
 
unsigned short ecalFineGrainBit (int crate, int card, int tower)
 
void fileInput (const char *filename)
 
L1CaloEmCollection getIsolatedEGObjects (unsigned crate)
 
std::vector< unsigned short > getJetRegions (unsigned crate)
 
L1CaloEmCollection getNonisolatedEGObjects (unsigned crate)
 
std::vector< L1CaloRegiongetRegions (unsigned crate)
 
unsigned short hcalCompressedET (int crate, int card, int tower)
 
unsigned short hcalFineGrainBit (int crate, int card, int tower)
 
unsigned short hfCompressedET (int crate, int tower)
 
unsigned short hfFineGrainBit (int crate, int tower)
 
void input ()
 
void input (const std::vector< std::vector< std::vector< unsigned short >>> &barrelIn, const std::vector< std::vector< unsigned short >> &hfIn)
 
 L1RCT (const L1RCTLookupTables *rctLookupTables)
 
void print ()
 
void printCrate (int i)
 
void printEIC (int i, int j)
 
void printEICEdges (int i, int j)
 
void printJSC (int i)
 
void printJSC ()
 
void printRC (int i, int j)
 
void processEvent ()
 
void randomInput ()
 

Private Member Functions

void configureCards ()
 
 L1RCT ()
 
void makeCrates ()
 
void shareNeighbors ()
 

Private Attributes

std::vector< std::vector< std::vector< unsigned short > > > barrel
 
std::vector< L1RCTCratecrates
 
L1RCTRegion empty
 
std::vector< std::vector< unsigned short > > hf
 
L1RCTNeighborMap neighborMap
 
const L1RCTLookupTablesrctLookupTables_
 

Detailed Description

Definition at line 20 of file L1RCT.h.

Constructor & Destructor Documentation

L1RCT::L1RCT ( const L1RCTLookupTables rctLookupTables)

Definition at line 55 of file L1RCT.cc.

References makeCrates().

56  : rctLookupTables_(rctLookupTables), empty(), neighborMap(),
57  barrel(18, std::vector<std::vector<unsigned short>>(
58  7, std::vector<unsigned short>(64))),
59  hf(18, std::vector<unsigned short>(8)) {
60  makeCrates();
61 }
std::vector< std::vector< unsigned short > > hf
Definition: L1RCT.h:124
void makeCrates()
Definition: L1RCT.cc:48
L1RCTNeighborMap neighborMap
Definition: L1RCT.h:106
L1RCTRegion empty
Definition: L1RCT.h:99
const L1RCTLookupTables * rctLookupTables_
Definition: L1RCT.h:90
std::vector< std::vector< std::vector< unsigned short > > > barrel
Definition: L1RCT.h:123
L1RCT::L1RCT ( )
private

Referenced by hfFineGrainBit().

Member Function Documentation

void L1RCT::configureCards ( )
private
void L1RCT::digiInput ( const EcalTrigPrimDigiCollection ecalCollection,
const HcalTrigPrimDigiCollection hcalCollection 
)

Definition at line 109 of file L1RCT.cc.

References funct::abs(), barrel, L1RCTParameters::calcCard(), L1RCTParameters::calcCrate(), L1RCTParameters::calcTower(), MessageLogger_cfi::cerr, gather_cfg::cout, hf, mps_fire::i, input(), gen::k, rctLookupTables_, L1RCTLookupTables::rctParameters(), edm::SortedCollection< T, SORT >::size(), and jets_cff::version.

Referenced by L1RCTSaveInput::analyze(), L1RCTInputProducer::produce(), and L1RCTProducer::produce().

110  {
111  // fills input vectors with 0's in case ecal or hcal collection not used
112  for (int i = 0; i < 18; i++) {
113  for (int j = 0; j < 7; j++) {
114  for (int k = 0; k < 64; k++) {
115  barrel.at(i).at(j).at(k) = 0;
116  }
117  }
118  for (int j = 0; j < 8; j++) {
119  hf.at(i).at(j) = 0;
120  }
121  }
122 
123  int nEcalDigi = ecalCollection.size();
124  if (nEcalDigi > 4032) {
125  nEcalDigi = 4032;
126  }
127  for (int i = 0; i < nEcalDigi; i++) {
128  short ieta = (short)ecalCollection[i].id().ieta();
129  // Note absIeta counts from 1-28 (not 0-27)
130  unsigned short absIeta = (unsigned short)abs(ieta);
131  unsigned short cal_iphi = (unsigned short)ecalCollection[i].id().iphi();
132  unsigned short iphi =
133  (72 + 18 - cal_iphi) % 72; // transform TOWERS (not regions) into local
134  // rct (intuitive) phi bins
135 
136  // map digis to crates, cards, and towers
137  unsigned short crate = 999, card = 999, tower = 999;
138  crate = rctLookupTables_->rctParameters()->calcCrate(iphi, ieta);
139  card = rctLookupTables_->rctParameters()->calcCard(iphi, absIeta);
140  tower = rctLookupTables_->rctParameters()->calcTower(iphi, absIeta);
141 
142  unsigned short energy = ecalCollection[i].compressedEt();
143  unsigned short fineGrain =
144  (unsigned short)ecalCollection[i].fineGrain(); // 0 or 1
145  unsigned short ecalInput = energy * 2 + fineGrain;
146 
147  // put input into correct crate/card/tower of barrel
148  if ((crate < 18) && (card < 7) &&
149  (tower < 32)) { // changed 64 to 32 Sept. 19 J. Leonard, rm -1 7Nov07
150  barrel.at(crate).at(card).at(tower) = ecalInput; // rm -1
151  } else {
152  std::cerr << "L1RCT: ecal out of range! tower = " << tower << " iphi is "
153  << iphi << " absieta is " << absIeta << std::endl;
154  }
155  }
156 
157  // same for hcal, once we get the hcal digis, just need to add 32 to towers:
158  // just copied and pasted and changed names where necessary
159  int nHcalDigi = hcalCollection.size();
160  // if (nHcalDigi != 4176){ std::cout << "L1RCT: Warning: There are " <<
161  // nHcalDigi << "hcal digis instead of 4176!" << std::endl;}
162  // incl HF 4032 + 144 = 4176
163  for (int i = 0; i < nHcalDigi; i++) {
164  if (hcalCollection[i].id().version() != 0) {
165  continue;
166  }
167  short ieta = (short)hcalCollection[i].id().ieta();
168  unsigned short absIeta = (unsigned short)abs(ieta);
169  unsigned short cal_iphi = (unsigned short)hcalCollection[i].id().iphi();
170  // All Hcal primitives (including HF) are reported
171  // with phi bin numbering in the range 0-72.
172  unsigned short iphi = (72 + 18 - cal_iphi) % 72;
173  // transform Hcal TOWERS (1-72)into local rct (intuitive) phi bins (72 bins)
174  // 0-71 Use local iphi to work out the region and crate (for HB/HE and HF)
175  // HF regions need to have local iphi 0-17
176  if (absIeta >= 29) {
177  iphi = iphi / 4;
178  }
179 
180  // map digis to crates, cards, and towers
181  unsigned short crate = 999, card = 999, tower = 999;
182  crate = rctLookupTables_->rctParameters()->calcCrate(iphi, ieta);
183  if (absIeta < 29) {
184  card = rctLookupTables_->rctParameters()->calcCard(iphi, absIeta);
185  }
186  tower = rctLookupTables_->rctParameters()->calcTower(iphi, absIeta);
187 
188  unsigned short energy =
189  hcalCollection[i].SOI_compressedEt(); // access only sample of interest
190  unsigned short fineGrain =
191  (unsigned short)hcalCollection[i].SOI_fineGrain();
192  unsigned short hcalInput = energy * 2 + fineGrain;
193  if (absIeta <= 28) {
194  // put input into correct crate/card/tower of barrel
195  if ((crate < 18) && (card < 7) &&
196  (tower < 32)) { // changed 64 to 32 Sept. 19 J. Leonard, rm -1 7Nov07
197  barrel.at(crate).at(card).at(tower + 32) =
198  hcalInput; // hcal towers are ecal + 32 see RC.cc; rm -1 7Nov07
199  } else {
200  std::cout << "L1RCT: hcal out of range! tower = " << tower
201  << std::endl;
202  }
203  } else if ((absIeta >= 29) && (absIeta <= 32)) {
204  // put input into correct crate/region of HF
205  if ((crate < 18) && (tower < 8)) {
206  hf.at(crate).at(tower) = hcalInput;
207  } else {
208  std::cout << "L1RCT: hf out of range! region = " << tower << std::endl;
209  }
210  }
211  }
212 
213  input();
214 
215  return;
216 }
std::vector< std::vector< unsigned short > > hf
Definition: L1RCT.h:124
unsigned short calcTower(unsigned short rct_iphi, unsigned short absIeta) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int k[5][pyjets_maxn]
unsigned short calcCard(unsigned short rct_iphi, unsigned short absIeta) const
void input()
Definition: L1RCT.cc:63
const L1RCTParameters * rctParameters() const
size_type size() const
const L1RCTLookupTables * rctLookupTables_
Definition: L1RCT.h:90
unsigned short calcCrate(unsigned short rct_iphi, short ieta) const
std::vector< std::vector< std::vector< unsigned short > > > barrel
Definition: L1RCT.h:123
unsigned short L1RCT::ecalCompressedET ( int  crate,
int  card,
int  tower 
)
inline

Definition at line 68 of file L1RCT.h.

References barrel.

Referenced by L1RCTSaveInput::analyze(), and L1RCTInputProducer::produce().

68  {
69  return barrel.at(crate).at(card).at(tower) / 2;
70  }
std::vector< std::vector< std::vector< unsigned short > > > barrel
Definition: L1RCT.h:123
unsigned short L1RCT::ecalFineGrainBit ( int  crate,
int  card,
int  tower 
)
inline

Definition at line 71 of file L1RCT.h.

References barrel.

Referenced by L1RCTSaveInput::analyze(), and L1RCTInputProducer::produce().

71  {
72  return barrel.at(crate).at(card).at(tower) & 1;
73  }
std::vector< std::vector< std::vector< unsigned short > > > barrel
Definition: L1RCT.h:123
void L1RCT::fileInput ( const char *  filename)

Definition at line 81 of file L1RCT.cc.

References barrel, hf, mps_fire::i, input(), gen::k, and x.

81  { // added "const" also in .h
82  unsigned short x;
83  std::ifstream instream(filename);
84  if (instream) {
85  for (int i = 0; i < 18; i++) {
86  for (int j = 0; j < 7; j++) {
87  for (int k = 0; k < 64; k++) {
88  if (instream >> x) {
89  unsigned short bit = x / 256; // added J.Leonard Aug. 16 06
90  unsigned short energy = x & 255; //
91  unsigned short input = energy * 2 + bit; //
92  barrel.at(i).at(j).at(k) = input;
93  } else
94  break;
95  }
96  }
97  for (int j = 0; j < 8; j++) {
98  if (instream >> x) {
99  hf.at(i).at(j) = x;
100  } else
101  break;
102  }
103  }
104  }
105  input();
106 }
std::vector< std::vector< unsigned short > > hf
Definition: L1RCT.h:124
int k[5][pyjets_maxn]
void input()
Definition: L1RCT.cc:63
std::vector< std::vector< std::vector< unsigned short > > > barrel
Definition: L1RCT.h:123
L1CaloEmCollection L1RCT::getIsolatedEGObjects ( unsigned  crate)

Definition at line 352 of file L1RCT.cc.

References crates, L1RCTLookupTables::emRank(), mps_fire::i, and rctLookupTables_.

Referenced by printEICEdges(), and L1RCTProducer::produce().

352  {
353  std::vector<unsigned short> isoEmObjects =
354  crates.at(crate).getIsolatedEGObjects();
355  L1CaloEmCollection isoEmCands;
356  for (uint16_t i = 0; i < 4; i++) {
357  unsigned rgn = ((isoEmObjects.at(i)) & 1);
358  unsigned crd = (((isoEmObjects.at(i)) / 2) & 7);
359  unsigned energy = ((isoEmObjects.at(i)) / 16);
360  unsigned rank = rctLookupTables_->emRank(energy);
361  L1CaloEmCand isoCand(rank, rgn, crd, crate, true, i,
362  0); // includes emcand index
363  isoEmCands.push_back(isoCand);
364  }
365  return isoEmCands;
366 }
std::vector< L1CaloEmCand > L1CaloEmCollection
Level-1 Region Calorimeter Trigger EM candidate.
Definition: L1CaloEmCand.h:18
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:114
unsigned int emRank(unsigned short energy) const
const L1RCTLookupTables * rctLookupTables_
Definition: L1RCT.h:90
std::vector<unsigned short> L1RCT::getJetRegions ( unsigned  crate)
inline

Definition at line 62 of file L1RCT.h.

References crates, and getRegions().

62  {
63  return crates.at(crate).getJetRegions();
64  }
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:114
L1CaloEmCollection L1RCT::getNonisolatedEGObjects ( unsigned  crate)

Definition at line 370 of file L1RCT.cc.

References crates, L1RCTLookupTables::emRank(), mps_fire::i, and rctLookupTables_.

Referenced by printEICEdges(), and L1RCTProducer::produce().

370  {
371  std::vector<unsigned short> nonIsoEmObjects =
372  crates.at(crate).getNonisolatedEGObjects();
373  L1CaloEmCollection nonIsoEmCands;
374  for (uint16_t i = 0; i < 4; i++) {
375  unsigned rgn = ((nonIsoEmObjects.at(i)) & 1);
376  unsigned crd = (((nonIsoEmObjects.at(i)) / 2) & 7);
377  unsigned energy = ((nonIsoEmObjects.at(i)) / 16);
378  unsigned rank = rctLookupTables_->emRank(energy);
379  L1CaloEmCand nonIsoCand(rank, rgn, crd, crate, false, i,
380  0); // includes emcand index
381  nonIsoEmCands.push_back(nonIsoCand);
382  }
383  return nonIsoEmCands;
384 }
std::vector< L1CaloEmCand > L1CaloEmCollection
Level-1 Region Calorimeter Trigger EM candidate.
Definition: L1CaloEmCand.h:18
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:114
unsigned int emRank(unsigned short energy) const
const L1RCTLookupTables * rctLookupTables_
Definition: L1RCT.h:90
vector< L1CaloRegion > L1RCT::getRegions ( unsigned  crate)

Definition at line 386 of file L1RCT.cc.

References crates, metsig::tau, and nano_cff::taus.

Referenced by getJetRegions(), and L1RCTProducer::produce().

386  {
387  // barrel regions
388  std::bitset<14> taus((long)crates.at(crate).getTauBits());
389  std::bitset<14> mips((long)crates.at(crate).getMIPBits());
390  std::bitset<14> quiets((long)crates.at(crate).getQuietBits());
391  std::bitset<14> overflows((long)crates.at(crate).getOverFlowBits());
392  std::vector<unsigned short> barrelEnergies =
393  crates.at(crate).getBarrelRegions();
394  std::vector<L1CaloRegion> regionCollection;
395  for (unsigned card = 0; card < 7; card++) {
396  for (unsigned rgn = 0; rgn < 2; rgn++) {
397  bool tau = taus[card * 2 + rgn];
398  bool mip = mips[card * 2 + rgn];
399  bool quiet = quiets[card * 2 + rgn];
400  bool overflow = overflows[card * 2 + rgn];
401  unsigned barrelEnergy = barrelEnergies.at(card * 2 + rgn);
402  L1CaloRegion region(barrelEnergy, overflow, tau, mip, quiet, crate, card,
403  rgn);
404  regionCollection.push_back(region);
405  }
406  }
407 
408  // hf regions
409  std::vector<unsigned short> hfEnergies = crates.at(crate).getHFRegions();
410  // fine grain bits -- still have to work out digi input
411  std::vector<unsigned short> hfFineGrainBits =
412  crates.at(crate).getHFFineGrainBits();
413  for (unsigned hfRgn = 0; hfRgn < 8;
414  hfRgn++) { // region number, see diagram on paper. make sure know how hf
415  // regions come in.
416  unsigned energy = hfEnergies.at(hfRgn);
417  bool fineGrain = hfFineGrainBits.at(hfRgn);
418  L1CaloRegion hfRegion(energy, fineGrain, crate, hfRgn);
419  regionCollection.push_back(hfRegion);
420  }
421  return regionCollection;
422 }
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:114
A calorimeter trigger region (sum of 4x4 trigger towers)
Definition: L1CaloRegion.h:22
unsigned short L1RCT::hcalCompressedET ( int  crate,
int  card,
int  tower 
)
inline

Definition at line 74 of file L1RCT.h.

References barrel.

Referenced by L1RCTSaveInput::analyze(), and L1RCTInputProducer::produce().

74  {
75  return barrel.at(crate).at(card).at(tower + 32) / 2;
76  }
std::vector< std::vector< std::vector< unsigned short > > > barrel
Definition: L1RCT.h:123
unsigned short L1RCT::hcalFineGrainBit ( int  crate,
int  card,
int  tower 
)
inline

Definition at line 77 of file L1RCT.h.

References barrel.

Referenced by L1RCTSaveInput::analyze().

77  {
78  return barrel.at(crate).at(card).at(tower + 32) & 1;
79  }
std::vector< std::vector< std::vector< unsigned short > > > barrel
Definition: L1RCT.h:123
unsigned short L1RCT::hfCompressedET ( int  crate,
int  tower 
)
inline

Definition at line 80 of file L1RCT.h.

References hf.

Referenced by L1RCTInputProducer::produce().

80  {
81  return hf.at(crate).at(tower) / 2;
82  }
std::vector< std::vector< unsigned short > > hf
Definition: L1RCT.h:124
unsigned short L1RCT::hfFineGrainBit ( int  crate,
int  tower 
)
inline

Definition at line 83 of file L1RCT.h.

References hf, and L1RCT().

83  {
84  return hf.at(crate).at(tower) & 1;
85  }
std::vector< std::vector< unsigned short > > hf
Definition: L1RCT.h:124
void L1RCT::input ( )

Definition at line 63 of file L1RCT.cc.

References barrel, crates, hf, and mps_fire::i.

Referenced by digiInput(), fileInput(), and randomInput().

63  {
64  for (int i = 0; i < 18; i++) {
65  crates.at(i).input(barrel.at(i), hf.at(i));
66  }
67 }
std::vector< std::vector< unsigned short > > hf
Definition: L1RCT.h:124
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:114
std::vector< std::vector< std::vector< unsigned short > > > barrel
Definition: L1RCT.h:123
void L1RCT::input ( const std::vector< std::vector< std::vector< unsigned short >>> &  barrelIn,
const std::vector< std::vector< unsigned short >> &  hfIn 
)

Definition at line 69 of file L1RCT.cc.

References crates, and mps_fire::i.

71  {
72  for (int i = 0; i < 18; i++) {
73  crates.at(i).input(barrelIn.at(i), hfIn.at(i));
74  }
75 }
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:114
void L1RCT::makeCrates ( )
private

Definition at line 48 of file L1RCT.cc.

References EnergyCorrector::c, crates, mps_fire::i, and rctLookupTables_.

Referenced by L1RCT().

48  {
49  for (int i = 0; i < 18; i++) {
51  crates.push_back(c);
52  }
53 }
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:114
const L1RCTLookupTables * rctLookupTables_
Definition: L1RCT.h:90
void L1RCT::print ( void  )

Definition at line 343 of file L1RCT.cc.

References gather_cfg::cout, crates, and mps_fire::i.

343  {
344  for (int i = 0; i < 18; i++) {
345  std::cout << "Crate " << i << std::endl;
346  crates.at(i).print();
347  }
348 }
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:114
void L1RCT::printCrate ( int  i)
inline

Definition at line 46 of file L1RCT.h.

References crates.

46 { crates.at(i).print(); }
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:114
void L1RCT::printEIC ( int  i,
int  j 
)
inline

Definition at line 55 of file L1RCT.h.

References crates.

55 { crates.at(i).printEIC(j); }
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:114
void L1RCT::printEICEdges ( int  i,
int  j 
)
inline

Definition at line 56 of file L1RCT.h.

References crates, getIsolatedEGObjects(), and getNonisolatedEGObjects().

56 { crates.at(i).printEICEdges(j); }
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:114
void L1RCT::printJSC ( int  i)
inline

Definition at line 47 of file L1RCT.h.

References crates.

47 { crates.at(i).printJSC(); }
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:114
void L1RCT::printJSC ( )
inline

Definition at line 48 of file L1RCT.h.

References gather_cfg::cout, crates, and mps_fire::i.

48  {
49  for (int i = 0; i < 18; i++) {
50  std::cout << "JSC for Crate " << i << std::endl;
51  crates.at(i).printJSC();
52  }
53  }
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:114
void L1RCT::printRC ( int  i,
int  j 
)
inline

Definition at line 54 of file L1RCT.h.

References crates.

54 { crates.at(i).printRC(j); }
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:114
void L1RCT::processEvent ( )

Definition at line 36 of file L1RCT.cc.

References crates, mps_fire::i, and shareNeighbors().

Referenced by L1RCTProducer::produce().

36  {
37  for (int i = 0; i < 18; i++)
38  crates.at(i).processReceiverCards();
40  for (int i = 0; i < 18; i++) {
41  crates.at(i).fillElectronIsolationCards();
42  crates.at(i).processElectronIsolationCards();
43  crates.at(i).fillJetSummaryCard();
44  crates.at(i).processJetSummaryCard();
45  }
46 }
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:114
void shareNeighbors()
Definition: L1RCT.cc:241
void L1RCT::randomInput ( )

Definition at line 220 of file L1RCT.cc.

References barrel, hf, mps_fire::i, input(), gen::k, and rand().

220  {
221  for (int i = 0; i < 18; i++) {
222  for (int j = 0; j < 7; j++) {
223  for (int k = 0; k < 64; k++) {
224  barrel.at(i).at(j).at(k) = rand() % 511;
225  }
226  }
227  for (int j = 0; j < 8; j++) {
228  hf.at(i).at(j) = rand() % 255; // changed from 1023 (10 bits)
229  }
230  }
231  input();
232  return;
233 }
std::vector< std::vector< unsigned short > > hf
Definition: L1RCT.h:124
int k[5][pyjets_maxn]
void input()
Definition: L1RCT.cc:63
Signal rand(Signal arg)
Definition: vlib.cc:442
std::vector< std::vector< std::vector< unsigned short > > > barrel
Definition: L1RCT.h:123
void L1RCT::shareNeighbors ( )
private

Definition at line 241 of file L1RCT.cc.

References crates, L1RCTNeighborMap::east(), east, empty, L1RCTRegion::giveEastEt(), L1RCTRegion::giveEastHE_FG(), L1RCTRegion::giveNEEt(), L1RCTRegion::giveNEHE_FG(), L1RCTRegion::giveNorthEt(), L1RCTRegion::giveNorthHE_FG(), L1RCTRegion::giveNWEt(), L1RCTRegion::giveNWHE_FG(), L1RCTRegion::giveSEEt(), L1RCTRegion::giveSEHE_FG(), L1RCTRegion::giveSouthEt(), L1RCTRegion::giveSouthHE_FG(), L1RCTRegion::giveSWEt(), L1RCTRegion::giveSWHE_FG(), L1RCTRegion::giveWestEt(), L1RCTRegion::giveWestHE_FG(), mps_fire::i, gen::k, L1RCTNeighborMap::ne(), Vispa.Plugins.EdmBrowser.EdmDataAccessor::ne(), neighborMap, L1RCTNeighborMap::north(), north, L1RCTNeighborMap::nw(), L1RCTNeighborMap::se(), L1RCTRegion::setEastEt(), L1RCTRegion::setEastHE_FG(), L1RCTRegion::setNEEt(), L1RCTRegion::setNEHE_FG(), L1RCTRegion::setNorthEt(), L1RCTRegion::setNorthHE_FG(), L1RCTRegion::setNWEt(), L1RCTRegion::setNWHE_FG(), L1RCTRegion::setSEEt(), L1RCTRegion::setSEHE_FG(), L1RCTRegion::setSouthEt(), L1RCTRegion::setSouthHE_FG(), L1RCTRegion::setSWEt(), L1RCTRegion::setSWHE_FG(), L1RCTRegion::setWestEt(), L1RCTRegion::setWestHE_FG(), L1RCTNeighborMap::south(), south, L1RCTNeighborMap::sw(), L1RCTNeighborMap::west(), and west.

Referenced by processEvent().

241  {
244  L1RCTRegion *west;
245  L1RCTRegion *east;
246  L1RCTRegion *se;
247  L1RCTRegion *sw;
248  L1RCTRegion *nw;
249  L1RCTRegion *ne;
250  L1RCTRegion *primary;
251 
252  for (int i = 0; i < 18; i++) {
253  for (int j = 0; j < 7; j++) {
254  for (int k = 0; k < 2; k++) {
255 
256  primary = crates.at(i).getReceiverCard(j)->getRegion(k);
257 
258  vector<int> northIndices = neighborMap.north(i, j, k);
259  if (northIndices.at(0) != -1)
260  north = crates.at(northIndices.at(0))
261  .getReceiverCard(northIndices.at(1))
262  ->getRegion(northIndices.at(2));
263  else
264  north = &empty;
265 
266  vector<int> southIndices = neighborMap.south(i, j, k);
267  if (southIndices.at(0) != -1)
268  south = crates.at(southIndices.at(0))
269  .getReceiverCard(southIndices.at(1))
270  ->getRegion(southIndices.at(2));
271  else
272  south = &empty;
273 
274  vector<int> westIndices = neighborMap.west(i, j, k);
275  if (westIndices.at(0) != -1)
276  west = crates.at(westIndices.at(0))
277  .getReceiverCard(westIndices.at(1))
278  ->getRegion(westIndices.at(2));
279  else
280  west = &empty;
281 
282  vector<int> eastIndices = neighborMap.east(i, j, k);
283  if (eastIndices.at(0) != -1)
284  east = crates.at(eastIndices.at(0))
285  .getReceiverCard(eastIndices.at(1))
286  ->getRegion(eastIndices.at(2));
287  else
288  east = &empty;
289 
290  vector<int> seIndices = neighborMap.se(i, j, k);
291  if (seIndices.at(0) != -1)
292  se = crates.at(seIndices.at(0))
293  .getReceiverCard(seIndices.at(1))
294  ->getRegion(seIndices.at(2));
295  else
296  se = &empty;
297 
298  vector<int> swIndices = neighborMap.sw(i, j, k);
299  if (swIndices.at(0) != -1)
300  sw = crates.at(swIndices.at(0))
301  .getReceiverCard(swIndices.at(1))
302  ->getRegion(swIndices.at(2));
303  else
304  sw = &empty;
305 
306  vector<int> neIndices = neighborMap.ne(i, j, k);
307  if (neIndices.at(0) != -1)
308  ne = crates.at(neIndices.at(0))
309  .getReceiverCard(neIndices.at(1))
310  ->getRegion(neIndices.at(2));
311  else
312  ne = &empty;
313 
314  vector<int> nwIndices = neighborMap.nw(i, j, k);
315  if (nwIndices.at(0) != -1)
316  nw = crates.at(nwIndices.at(0))
317  .getReceiverCard(nwIndices.at(1))
318  ->getRegion(nwIndices.at(2));
319  else
320  nw = &empty;
321 
322  primary->setNorthEt(north->giveNorthEt());
323  primary->setNorthHE_FG(north->giveNorthHE_FG());
324  primary->setSouthEt(south->giveSouthEt());
325  primary->setSouthHE_FG(south->giveSouthHE_FG());
326  primary->setEastEt(east->giveEastEt());
327  primary->setEastHE_FG(east->giveEastHE_FG());
328  primary->setWestEt(west->giveWestEt());
329  primary->setWestHE_FG(west->giveWestHE_FG());
330  primary->setSEEt(se->giveSEEt());
331  primary->setSEHE_FG(se->giveSEHE_FG());
332  primary->setSWEt(sw->giveSWEt());
333  primary->setSWHE_FG(sw->giveSWHE_FG());
334  primary->setNWEt(nw->giveNWEt());
335  primary->setNWHE_FG(nw->giveNWHE_FG());
336  primary->setNEEt(ne->giveNEEt());
337  primary->setNEHE_FG(ne->giveNEHE_FG());
338  }
339  }
340  }
341 }
void setNEEt(unsigned short ne)
Definition: L1RCTRegion.cc:184
std::vector< unsigned short > giveSouthHE_FG() const
Definition: L1RCTRegion.cc:121
void setSWHE_FG(unsigned short sw)
Definition: L1RCTRegion.cc:207
std::vector< int > west(int crate, int card, int region)
std::vector< unsigned short > giveWestEt() const
Definition: L1RCTRegion.cc:132
void setNEHE_FG(unsigned short ne)
Definition: L1RCTRegion.cc:185
std::vector< int > north(int crate, int card, int region)
void setNorthHE_FG(const std::vector< unsigned short > &north)
Definition: L1RCTRegion.cc:105
std::vector< int > sw(int crate, int card, int region)
std::vector< int > south(int crate, int card, int region)
std::vector< unsigned short > giveEastHE_FG() const
Definition: L1RCTRegion.cc:165
void setNWHE_FG(unsigned short nw)
Definition: L1RCTRegion.cc:196
std::vector< unsigned short > giveWestHE_FG() const
Definition: L1RCTRegion.cc:143
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:114
void setWestHE_FG(const std::vector< unsigned short > &west)
Definition: L1RCTRegion.cc:149
void setSEEt(unsigned short se)
Definition: L1RCTRegion.cc:219
unsigned short giveNEHE_FG() const
Definition: L1RCTRegion.cc:183
unsigned short giveSEHE_FG() const
Definition: L1RCTRegion.cc:218
unsigned short giveSWEt() const
Definition: L1RCTRegion.cc:198
unsigned short giveSEEt() const
Definition: L1RCTRegion.cc:211
void setSWEt(unsigned short sw)
Definition: L1RCTRegion.cc:206
int k[5][pyjets_maxn]
std::vector< int > nw(int crate, int card, int region)
void setSouthHE_FG(const std::vector< unsigned short > &south)
Definition: L1RCTRegion.cc:127
void setNorthEt(const std::vector< unsigned short > &north)
Definition: L1RCTRegion.cc:95
std::vector< int > ne(int crate, int card, int region)
std::vector< unsigned short > giveNorthEt() const
Definition: L1RCTRegion.cc:89
void setSEHE_FG(unsigned short se)
Definition: L1RCTRegion.cc:220
L1RCTNeighborMap neighborMap
Definition: L1RCT.h:106
void setWestEt(const std::vector< unsigned short > &west)
Definition: L1RCTRegion.cc:138
void setEastHE_FG(const std::vector< unsigned short > &east)
Definition: L1RCTRegion.cc:171
void setEastEt(const std::vector< unsigned short > &east)
Definition: L1RCTRegion.cc:160
unsigned short giveNWHE_FG() const
Definition: L1RCTRegion.cc:194
void setNWEt(unsigned short nw)
Definition: L1RCTRegion.cc:195
std::vector< int > east(int crate, int card, int region)
L1RCTRegion empty
Definition: L1RCT.h:99
std::vector< unsigned short > giveEastEt() const
Definition: L1RCTRegion.cc:154
void setSouthEt(const std::vector< unsigned short > &south)
Definition: L1RCTRegion.cc:116
unsigned short giveSWHE_FG() const
Definition: L1RCTRegion.cc:205
std::vector< int > se(int crate, int card, int region)
unsigned short giveNEEt() const
Definition: L1RCTRegion.cc:176
std::vector< unsigned short > giveNorthHE_FG() const
Definition: L1RCTRegion.cc:99
unsigned short giveNWEt() const
Definition: L1RCTRegion.cc:187
std::vector< unsigned short > giveSouthEt() const
Definition: L1RCTRegion.cc:110

Member Data Documentation

std::vector<std::vector<std::vector<unsigned short> > > L1RCT::barrel
private
std::vector<L1RCTCrate> L1RCT::crates
private
L1RCTRegion L1RCT::empty
private
std::vector<std::vector<unsigned short> > L1RCT::hf
private

Definition at line 124 of file L1RCT.h.

Referenced by digiInput(), fileInput(), hfCompressedET(), hfFineGrainBit(), input(), and randomInput().

L1RCTNeighborMap L1RCT::neighborMap
private

Definition at line 106 of file L1RCT.h.

Referenced by shareNeighbors().

const L1RCTLookupTables* L1RCT::rctLookupTables_
private

Definition at line 90 of file L1RCT.h.

Referenced by digiInput(), getIsolatedEGObjects(), getNonisolatedEGObjects(), and makeCrates().