CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 56 of file L1RCT.cc.

References makeCrates().

56  :
57  rctLookupTables_(rctLookupTables),
58  empty(),
59  neighborMap(),
60  barrel(18,std::vector<std::vector<unsigned short> >(7,std::vector<unsigned short>(64))),
61  hf(18,std::vector<unsigned short>(8))
62 {
63  makeCrates();
64 }
std::vector< std::vector< unsigned short > > hf
Definition: L1RCT.h:129
void makeCrates()
Definition: L1RCT.cc:48
L1RCTNeighborMap neighborMap
Definition: L1RCT.h:111
L1RCTRegion empty
Definition: L1RCT.h:104
const L1RCTLookupTables * rctLookupTables_
Definition: L1RCT.h:95
std::vector< std::vector< std::vector< unsigned short > > > barrel
Definition: L1RCT.h:128
L1RCT::L1RCT ( )
private

Member Function Documentation

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

Definition at line 116 of file L1RCT.cc.

References funct::abs(), barrel, L1RCTParameters::calcCard(), L1RCTParameters::calcCrate(), L1RCTParameters::calcTower(), ecal_dqm_sourceclient-live_cfg::cerr, gather_cfg::cout, relval_parameters_module::energy, hf, i, input(), j, relval_steps::k, rctLookupTables_, L1RCTLookupTables::rctParameters(), edm::SortedCollection< T, SORT >::size(), and relval_steps::version.

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

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

Definition at line 78 of file L1RCT.h.

References barrel.

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

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

Definition at line 80 of file L1RCT.h.

References barrel.

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

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

Definition at line 85 of file L1RCT.cc.

References barrel, relval_parameters_module::energy, hf, i, input(), j, relval_steps::k, and x.

85  { // added "const" also in .h
86  unsigned short x;
87  std::ifstream instream(filename);
88  if(instream){
89  for(int i = 0; i<18;i++){
90  for(int j = 0; j<7; j++){
91  for(int k = 0; k<64; k++){
92  if(instream >> x){
93  unsigned short bit = x/256; // added J.Leonard Aug. 16 06
94  unsigned short energy = x&255; //
95  unsigned short input = energy*2 + bit; //
96  barrel.at(i).at(j).at(k) = input;
97  }
98  else
99  break;
100  }
101  }
102  for(int j = 0; j<8; j++){
103  if(instream >> x){
104  hf.at(i).at(j) = x;
105  }
106  else
107  break;
108  }
109  }
110  }
111  input();
112 }
std::vector< std::vector< unsigned short > > hf
Definition: L1RCT.h:129
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
void input()
Definition: L1RCT.cc:66
tuple filename
Definition: lut2db_cfg.py:20
std::vector< std::vector< std::vector< unsigned short > > > barrel
Definition: L1RCT.h:128
L1CaloEmCollection L1RCT::getIsolatedEGObjects ( unsigned  crate)

Definition at line 335 of file L1RCT.cc.

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

Referenced by L1RCTProducer::produce().

335  {
336  std::vector<unsigned short> isoEmObjects = crates.at(crate).getIsolatedEGObjects();
337  L1CaloEmCollection isoEmCands;
338  for (uint16_t i = 0; i < 4; i++){
339  unsigned rgn = ((isoEmObjects.at(i)) & 1);
340  unsigned crd = (((isoEmObjects.at(i))/2) & 7);
341  unsigned energy = ((isoEmObjects.at(i))/16);
342  unsigned rank = rctLookupTables_->emRank(energy);
343  L1CaloEmCand isoCand(rank, rgn, crd, crate, 1, i, 0); // includes emcand index
344  isoEmCands.push_back(isoCand);
345  }
346  return isoEmCands;
347 }
int i
Definition: DBlmapReader.cc:9
std::vector< L1CaloEmCand > L1CaloEmCollection
Level-1 Region Calorimeter Trigger EM candidate.
Definition: L1CaloEmCand.h:18
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:119
unsigned int emRank(unsigned short energy) const
const L1RCTLookupTables * rctLookupTables_
Definition: L1RCT.h:95
std::vector<unsigned short> L1RCT::getJetRegions ( unsigned  crate)
inline

Definition at line 72 of file L1RCT.h.

References crates.

72  {
73  return crates.at(crate).getJetRegions();
74  }
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:119
L1CaloEmCollection L1RCT::getNonisolatedEGObjects ( unsigned  crate)

Definition at line 352 of file L1RCT.cc.

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

Referenced by L1RCTProducer::produce().

352  {
353  std::vector<unsigned short> nonIsoEmObjects = crates.at(crate).getNonisolatedEGObjects();
354  L1CaloEmCollection nonIsoEmCands;
355  for (uint16_t i = 0; i < 4; i++){
356  unsigned rgn = ((nonIsoEmObjects.at(i)) & 1);
357  unsigned crd = (((nonIsoEmObjects.at(i))/2) & 7);
358  unsigned energy = ((nonIsoEmObjects.at(i))/16);
359  unsigned rank = rctLookupTables_->emRank(energy);
360  L1CaloEmCand nonIsoCand(rank, rgn, crd, crate, 0, i, 0); // includes emcand index
361  nonIsoEmCands.push_back(nonIsoCand);
362  }
363  return nonIsoEmCands;
364 }
int i
Definition: DBlmapReader.cc:9
std::vector< L1CaloEmCand > L1CaloEmCollection
Level-1 Region Calorimeter Trigger EM candidate.
Definition: L1CaloEmCand.h:18
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:119
unsigned int emRank(unsigned short energy) const
const L1RCTLookupTables * rctLookupTables_
Definition: L1RCT.h:95
vector< L1CaloRegion > L1RCT::getRegions ( unsigned  crate)

Definition at line 366 of file L1RCT.cc.

References crates, relval_parameters_module::energy, HLT_25ns14e33_v3_cff::region, and metsig::tau.

Referenced by L1RCTProducer::produce().

366  {
367  // barrel regions
368  std::bitset<14> taus( (long) crates.at(crate).getTauBits());
369  std::bitset<14> mips( (long) crates.at(crate).getMIPBits());
370  std::bitset<14> quiets( (long) crates.at(crate).getQuietBits());
371  std::bitset<14> overflows( (long) crates.at(crate).getOverFlowBits());
372  std::vector<unsigned short> barrelEnergies = crates.at(crate).getBarrelRegions();
373  std::vector<L1CaloRegion> regionCollection;
374  for (unsigned card = 0; card < 7; card++){
375  for (unsigned rgn = 0; rgn < 2; rgn++){
376  bool tau = taus[card*2+rgn];
377  bool mip = mips[card*2+rgn];
378  bool quiet = quiets[card*2+rgn];
379  bool overflow = overflows[card*2+rgn];
380  unsigned barrelEnergy = barrelEnergies.at(card*2+rgn);
381  L1CaloRegion region(barrelEnergy, overflow, tau, mip, quiet, crate, card, rgn);
382  regionCollection.push_back(region);
383  }
384  }
385 
386  // hf regions
387  std::vector<unsigned short> hfEnergies = crates.at(crate).getHFRegions();
388  // fine grain bits -- still have to work out digi input
389  std::vector<unsigned short> hfFineGrainBits = crates.at(crate).getHFFineGrainBits();
390  for (unsigned hfRgn = 0; hfRgn<8; hfRgn++){ // region number, see diagram on paper. make sure know how hf regions come in.
391  unsigned energy = hfEnergies.at(hfRgn);
392  bool fineGrain = hfFineGrainBits.at(hfRgn);
393  L1CaloRegion hfRegion(energy, fineGrain, crate, hfRgn);
394  regionCollection.push_back(hfRegion);
395  }
396  return regionCollection;
397 }
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:119
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 82 of file L1RCT.h.

References barrel.

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

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

Definition at line 84 of file L1RCT.h.

References barrel.

Referenced by L1RCTSaveInput::analyze().

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

Definition at line 86 of file L1RCT.h.

References hf.

Referenced by L1RCTInputProducer::produce().

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

Definition at line 88 of file L1RCT.h.

References hf.

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

Definition at line 66 of file L1RCT.cc.

References barrel, crates, hf, and i.

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

67 {
68  for(int i = 0; i<18; i++){
69  crates.at(i).input(barrel.at(i),hf.at(i));
70  }
71 }
std::vector< std::vector< unsigned short > > hf
Definition: L1RCT.h:129
int i
Definition: DBlmapReader.cc:9
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:119
std::vector< std::vector< std::vector< unsigned short > > > barrel
Definition: L1RCT.h:128
void L1RCT::input ( const std::vector< std::vector< std::vector< unsigned short > > > &  barrelIn,
const std::vector< std::vector< unsigned short > > &  hfIn 
)

Definition at line 73 of file L1RCT.cc.

References crates, and i.

75 {
76  for(int i = 0; i<18; i++){
77  crates.at(i).input(barrelIn.at(i),hfIn.at(i));
78  }
79 }
int i
Definition: DBlmapReader.cc:9
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:119
void L1RCT::makeCrates ( )
private

Definition at line 48 of file L1RCT.cc.

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

Referenced by L1RCT().

49 {
50  for(int i = 0; i<18; i++){
52  crates.push_back(c);
53  }
54 }
int i
Definition: DBlmapReader.cc:9
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:119
const L1RCTLookupTables * rctLookupTables_
Definition: L1RCT.h:95
void L1RCT::print ( void  )

Definition at line 326 of file L1RCT.cc.

References gather_cfg::cout, crates, and i.

326  {
327  for(int i = 0; i<18; i++){
328  std::cout << "Crate " << i << std::endl;
329  crates.at(i).print();
330  }
331 }
int i
Definition: DBlmapReader.cc:9
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:119
tuple cout
Definition: gather_cfg.py:121
void L1RCT::printCrate ( int  i)
inline

Definition at line 46 of file L1RCT.h.

References crates.

46  {
47  crates.at(i).print();
48  }
int i
Definition: DBlmapReader.cc:9
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:119
void L1RCT::printEIC ( int  i,
int  j 
)
inline

Definition at line 61 of file L1RCT.h.

References crates.

61  {
62  crates.at(i).printEIC(j);
63  }
int i
Definition: DBlmapReader.cc:9
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:119
int j
Definition: DBlmapReader.cc:9
void L1RCT::printEICEdges ( int  i,
int  j 
)
inline

Definition at line 64 of file L1RCT.h.

References crates.

64  {
65  crates.at(i).printEICEdges(j);
66  }
int i
Definition: DBlmapReader.cc:9
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:119
int j
Definition: DBlmapReader.cc:9
void L1RCT::printJSC ( int  i)
inline

Definition at line 49 of file L1RCT.h.

References crates.

49  {
50  crates.at(i).printJSC();
51  }
int i
Definition: DBlmapReader.cc:9
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:119
void L1RCT::printJSC ( )
inline

Definition at line 52 of file L1RCT.h.

References gather_cfg::cout, crates, and i.

52  {
53  for(int i=0;i<18;i++){
54  std::cout << "JSC for Crate " << i << std::endl;
55  crates.at(i).printJSC();
56  }
57  }
int i
Definition: DBlmapReader.cc:9
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:119
tuple cout
Definition: gather_cfg.py:121
void L1RCT::printRC ( int  i,
int  j 
)
inline

Definition at line 58 of file L1RCT.h.

References crates.

58  {
59  crates.at(i).printRC(j);
60  }
int i
Definition: DBlmapReader.cc:9
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:119
int j
Definition: DBlmapReader.cc:9
void L1RCT::processEvent ( )

Definition at line 36 of file L1RCT.cc.

References crates, i, and shareNeighbors().

Referenced by L1RCTProducer::produce().

36  {
37  for(int i=0; i<18;i++)
38  crates.at(i).processReceiverCards();
39  shareNeighbors();
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 }
int i
Definition: DBlmapReader.cc:9
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:119
void shareNeighbors()
Definition: L1RCT.cc:243
void L1RCT::randomInput ( )

Definition at line 220 of file L1RCT.cc.

References barrel, hf, i, input(), j, relval_steps::k, and rand().

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

Definition at line 243 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(), i, j, relval_steps::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().

243  {
246  L1RCTRegion *west;
247  L1RCTRegion *east;
248  L1RCTRegion *se;
249  L1RCTRegion *sw;
250  L1RCTRegion *nw;
251  L1RCTRegion *ne;
252  L1RCTRegion *primary;
253 
254 
255  for(int i = 0; i < 18; i++){
256  for(int j = 0; j < 7; j++){
257  for(int k = 0; k < 2; k++){
258 
259  primary = crates.at(i).getReceiverCard(j)->getRegion(k);
260 
261  vector<int> northIndices = neighborMap.north(i,j,k);
262  if(northIndices.at(0) != -1)
263  north = crates.at(northIndices.at(0)).getReceiverCard(northIndices.at(1))->getRegion(northIndices.at(2));
264  else 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)).getReceiverCard(southIndices.at(1))->getRegion(southIndices.at(2));
269  else south = &empty;
270 
271  vector<int> westIndices = neighborMap.west(i,j,k);
272  if(westIndices.at(0) != -1)
273  west = crates.at(westIndices.at(0)).getReceiverCard(westIndices.at(1))->getRegion(westIndices.at(2));
274  else west = &empty;
275 
276  vector<int> eastIndices = neighborMap.east(i,j,k);
277  if(eastIndices.at(0) != -1)
278  east = crates.at(eastIndices.at(0)).getReceiverCard(eastIndices.at(1))->getRegion(eastIndices.at(2));
279  else east = &empty;
280 
281  vector<int> seIndices = neighborMap.se(i,j,k);
282  if(seIndices.at(0) != -1)
283  se = crates.at(seIndices.at(0)).getReceiverCard(seIndices.at(1))->getRegion(seIndices.at(2));
284  else se = &empty;
285 
286  vector<int> swIndices = neighborMap.sw(i,j,k);
287  if(swIndices.at(0) != -1)
288  sw= crates.at(swIndices.at(0)).getReceiverCard(swIndices.at(1))->getRegion(swIndices.at(2));
289  else sw = &empty;
290 
291  vector<int> neIndices = neighborMap.ne(i,j,k);
292  if(neIndices.at(0) != -1)
293  ne= crates.at(neIndices.at(0)).getReceiverCard(neIndices.at(1))->getRegion(neIndices.at(2));
294  else ne = &empty;
295 
296  vector<int> nwIndices = neighborMap.nw(i,j,k);
297  if(nwIndices.at(0) != -1)
298  nw= crates.at(nwIndices.at(0)).getReceiverCard(nwIndices.at(1))->getRegion(nwIndices.at(2));
299  else nw = &empty;
300 
301  primary->setNorthEt(north->giveNorthEt());
302  primary->setNorthHE_FG(north->giveNorthHE_FG());
303  primary->setSouthEt(south->giveSouthEt());
304  primary->setSouthHE_FG(south->giveSouthHE_FG());
305  primary->setEastEt(east->giveEastEt());
306  primary->setEastHE_FG(east->giveEastHE_FG());
307  primary->setWestEt(west->giveWestEt());
308  primary->setWestHE_FG(west->giveWestHE_FG());
309  primary->setSEEt(se->giveSEEt());
310  primary->setSEHE_FG(se->giveSEHE_FG());
311  primary->setSWEt(sw->giveSWEt());
312  primary->setSWHE_FG(sw->giveSWHE_FG());
313  primary->setNWEt(nw->giveNWEt());
314  primary->setNWHE_FG(nw->giveNWHE_FG());
315  primary->setNEEt(ne->giveNEEt());
316  primary->setNEHE_FG(ne->giveNEHE_FG());
317 
318 
319 
320  }
321  }
322  }
323 
324 }
void setNEEt(unsigned short ne)
Definition: L1RCTRegion.cc:194
std::vector< unsigned short > giveSouthHE_FG() const
Definition: L1RCTRegion.cc:129
int i
Definition: DBlmapReader.cc:9
void setSWHE_FG(unsigned short sw)
Definition: L1RCTRegion.cc:231
std::vector< int > west(int crate, int card, int region)
std::vector< unsigned short > giveWestEt() const
Definition: L1RCTRegion.cc:140
void setNEHE_FG(unsigned short ne)
Definition: L1RCTRegion.cc:197
std::vector< int > north(int crate, int card, int region)
void setNorthHE_FG(const std::vector< unsigned short > &north)
Definition: L1RCTRegion.cc:113
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:173
void setNWHE_FG(unsigned short nw)
Definition: L1RCTRegion.cc:214
std::vector< unsigned short > giveWestHE_FG() const
Definition: L1RCTRegion.cc:151
std::vector< L1RCTCrate > crates
Definition: L1RCT.h:119
void setWestHE_FG(const std::vector< unsigned short > &west)
Definition: L1RCTRegion.cc:157
void setSEEt(unsigned short se)
Definition: L1RCTRegion.cc:245
unsigned short giveNEHE_FG() const
Definition: L1RCTRegion.cc:191
unsigned short giveSEHE_FG() const
Definition: L1RCTRegion.cc:242
int j
Definition: DBlmapReader.cc:9
unsigned short giveSWEt() const
Definition: L1RCTRegion.cc:218
unsigned short giveSEEt() const
Definition: L1RCTRegion.cc:235
void setSWEt(unsigned short sw)
Definition: L1RCTRegion.cc:228
std::vector< int > nw(int crate, int card, int region)
void setSouthHE_FG(const std::vector< unsigned short > &south)
Definition: L1RCTRegion.cc:135
void setNorthEt(const std::vector< unsigned short > &north)
Definition: L1RCTRegion.cc:103
std::vector< int > ne(int crate, int card, int region)
std::vector< unsigned short > giveNorthEt() const
Definition: L1RCTRegion.cc:97
void setSEHE_FG(unsigned short se)
Definition: L1RCTRegion.cc:248
L1RCTNeighborMap neighborMap
Definition: L1RCT.h:111
void setWestEt(const std::vector< unsigned short > &west)
Definition: L1RCTRegion.cc:146
void setEastHE_FG(const std::vector< unsigned short > &east)
Definition: L1RCTRegion.cc:179
void setEastEt(const std::vector< unsigned short > &east)
Definition: L1RCTRegion.cc:168
unsigned short giveNWHE_FG() const
Definition: L1RCTRegion.cc:208
void setNWEt(unsigned short nw)
Definition: L1RCTRegion.cc:211
std::vector< int > east(int crate, int card, int region)
L1RCTRegion empty
Definition: L1RCT.h:104
std::vector< unsigned short > giveEastEt() const
Definition: L1RCTRegion.cc:162
void setSouthEt(const std::vector< unsigned short > &south)
Definition: L1RCTRegion.cc:124
unsigned short giveSWHE_FG() const
Definition: L1RCTRegion.cc:225
std::vector< int > se(int crate, int card, int region)
unsigned short giveNEEt() const
Definition: L1RCTRegion.cc:184
std::vector< unsigned short > giveNorthHE_FG() const
Definition: L1RCTRegion.cc:107
unsigned short giveNWEt() const
Definition: L1RCTRegion.cc:201
std::vector< unsigned short > giveSouthEt() const
Definition: L1RCTRegion.cc:118

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 129 of file L1RCT.h.

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

L1RCTNeighborMap L1RCT::neighborMap
private

Definition at line 111 of file L1RCT.h.

Referenced by shareNeighbors().

const L1RCTLookupTables* L1RCT::rctLookupTables_
private

Definition at line 95 of file L1RCT.h.

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