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 (std::vector< std::vector< std::vector< unsigned short > > > barrelIn, 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 abs, barrel, L1RCTParameters::calcCard(), L1RCTParameters::calcCrate(), L1RCTParameters::calcTower(), dtNoiseDBValidation_cfg::cerr, gather_cfg::cout, relval_parameters_module::energy, hf, i, input(), j, gen::k, rctLookupTables_, L1RCTLookupTables::rctParameters(), and edm::SortedCollection< T, SORT >::size().

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  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) 0-71
174  // 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 
189  unsigned short energy = hcalCollection[i].SOI_compressedEt(); // access only sample of interest
190  unsigned short fineGrain = (unsigned short) hcalCollection[i].SOI_fineGrain();
191  unsigned short hcalInput = energy*2 + fineGrain;
192  if (absIeta <= 28){
193  // put input into correct crate/card/tower of barrel
194  if ((crate<18) && (card<7) && (tower<32)) { // changed 64 to 32 Sept. 19 J. Leonard, rm -1 7Nov07
195  barrel.at(crate).at(card).at(tower + 32) = hcalInput; // hcal towers are ecal + 32 see RC.cc; rm -1 7Nov07
196  }
197  else { std::cout << "L1RCT: hcal out of range! tower = " << tower << std::endl; }
198  }
199  else if ((absIeta >= 29) && (absIeta <= 32)){
200  // put input into correct crate/region of HF
201  if ((crate<18) && (tower<8)) {
202  hf.at(crate).at(tower) = hcalInput;
203  }
204  else { std::cout << "L1RCT: hf out of range! region = " << tower << std::endl; }
205  }
206 
207  }
208 
209  input();
210 
211  return;
212 
213 }
std::vector< std::vector< unsigned short > > hf
Definition: L1RCT.h:129
int i
Definition: DBlmapReader.cc:9
#define abs(x)
Definition: mlp_lapack.h:159
unsigned short calcTower(unsigned short rct_iphi, unsigned short absIeta) const
int j
Definition: DBlmapReader.cc:9
int k[5][pyjets_maxn]
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, gen::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
int k[5][pyjets_maxn]
void input()
Definition: L1RCT.cc:66
tuple filename
Definition: lut2db_cfg.py:20
Definition: DDAxes.h:10
std::vector< std::vector< std::vector< unsigned short > > > barrel
Definition: L1RCT.h:128
L1CaloEmCollection L1RCT::getIsolatedEGObjects ( unsigned  crate)

Definition at line 332 of file L1RCT.cc.

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

Referenced by L1RCTProducer::produce().

332  {
333  std::vector<unsigned short> isoEmObjects = crates.at(crate).getIsolatedEGObjects();
334  L1CaloEmCollection isoEmCands;
335  for (uint16_t i = 0; i < 4; i++){
336  unsigned rgn = ((isoEmObjects.at(i)) & 1);
337  unsigned crd = (((isoEmObjects.at(i))/2) & 7);
338  unsigned energy = ((isoEmObjects.at(i))/16);
339  unsigned rank = rctLookupTables_->emRank(energy);
340  L1CaloEmCand isoCand(rank, rgn, crd, crate, 1, i, 0); // includes emcand index
341  isoEmCands.push_back(isoCand);
342  }
343  return isoEmCands;
344 }
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 349 of file L1RCT.cc.

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

Referenced by L1RCTProducer::produce().

349  {
350  std::vector<unsigned short> nonIsoEmObjects = crates.at(crate).getNonisolatedEGObjects();
351  L1CaloEmCollection nonIsoEmCands;
352  for (uint16_t i = 0; i < 4; i++){
353  unsigned rgn = ((nonIsoEmObjects.at(i)) & 1);
354  unsigned crd = (((nonIsoEmObjects.at(i))/2) & 7);
355  unsigned energy = ((nonIsoEmObjects.at(i))/16);
356  unsigned rank = rctLookupTables_->emRank(energy);
357  L1CaloEmCand nonIsoCand(rank, rgn, crd, crate, 0, i, 0); // includes emcand index
358  nonIsoEmCands.push_back(nonIsoCand);
359  }
360  return nonIsoEmCands;
361 }
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 363 of file L1RCT.cc.

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

Referenced by L1RCTProducer::produce().

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

References gather_cfg::cout, crates, and i.

323  {
324  for(int i = 0; i<18; i++){
325  std::cout << "Crate " << i << std::endl;
326  crates.at(i).print();
327  }
328 }
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:240
void L1RCT::randomInput ( )

Definition at line 217 of file L1RCT.cc.

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

218 {
219  for(int i = 0; i<18;i++){
220  for(int j = 0; j<7;j++){
221  for(int k = 0; k<64; k++){
222  barrel.at(i).at(j).at(k) = rand()%511;
223  }
224  }
225  for(int j = 0; j<8;j++){
226  hf.at(i).at(j) = rand()%255; // changed from 1023 (10 bits)
227  }
228  }
229  input();
230  return;
231 }
std::vector< std::vector< unsigned short > > hf
Definition: L1RCT.h:129
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
int k[5][pyjets_maxn]
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 240 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, 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().

240  {
243  L1RCTRegion *west;
244  L1RCTRegion *east;
245  L1RCTRegion *se;
246  L1RCTRegion *sw;
247  L1RCTRegion *nw;
248  L1RCTRegion *ne;
249  L1RCTRegion *primary;
250 
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)).getReceiverCard(northIndices.at(1))->getRegion(northIndices.at(2));
261  else north = &empty;
262 
263  vector<int> southIndices = neighborMap.south(i,j,k);
264  if(southIndices.at(0) != -1)
265  south = crates.at(southIndices.at(0)).getReceiverCard(southIndices.at(1))->getRegion(southIndices.at(2));
266  else south = &empty;
267 
268  vector<int> westIndices = neighborMap.west(i,j,k);
269  if(westIndices.at(0) != -1)
270  west = crates.at(westIndices.at(0)).getReceiverCard(westIndices.at(1))->getRegion(westIndices.at(2));
271  else west = &empty;
272 
273  vector<int> eastIndices = neighborMap.east(i,j,k);
274  if(eastIndices.at(0) != -1)
275  east = crates.at(eastIndices.at(0)).getReceiverCard(eastIndices.at(1))->getRegion(eastIndices.at(2));
276  else east = &empty;
277 
278  vector<int> seIndices = neighborMap.se(i,j,k);
279  if(seIndices.at(0) != -1)
280  se = crates.at(seIndices.at(0)).getReceiverCard(seIndices.at(1))->getRegion(seIndices.at(2));
281  else se = &empty;
282 
283  vector<int> swIndices = neighborMap.sw(i,j,k);
284  if(swIndices.at(0) != -1)
285  sw= crates.at(swIndices.at(0)).getReceiverCard(swIndices.at(1))->getRegion(swIndices.at(2));
286  else sw = &empty;
287 
288  vector<int> neIndices = neighborMap.ne(i,j,k);
289  if(neIndices.at(0) != -1)
290  ne= crates.at(neIndices.at(0)).getReceiverCard(neIndices.at(1))->getRegion(neIndices.at(2));
291  else ne = &empty;
292 
293  vector<int> nwIndices = neighborMap.nw(i,j,k);
294  if(nwIndices.at(0) != -1)
295  nw= crates.at(nwIndices.at(0)).getReceiverCard(nwIndices.at(1))->getRegion(nwIndices.at(2));
296  else nw = &empty;
297 
298  primary->setNorthEt(north->giveNorthEt());
299  primary->setNorthHE_FG(north->giveNorthHE_FG());
300  primary->setSouthEt(south->giveSouthEt());
301  primary->setSouthHE_FG(south->giveSouthHE_FG());
302  primary->setEastEt(east->giveEastEt());
303  primary->setEastHE_FG(east->giveEastHE_FG());
304  primary->setWestEt(west->giveWestEt());
305  primary->setWestHE_FG(west->giveWestHE_FG());
306  primary->setSEEt(se->giveSEEt());
307  primary->setSEHE_FG(se->giveSEHE_FG());
308  primary->setSWEt(sw->giveSWEt());
309  primary->setSWHE_FG(sw->giveSWHE_FG());
310  primary->setNWEt(nw->giveNWEt());
311  primary->setNWHE_FG(nw->giveNWHE_FG());
312  primary->setNEEt(ne->giveNEEt());
313  primary->setNEHE_FG(ne->giveNEHE_FG());
314 
315 
316 
317  }
318  }
319  }
320 
321 }
void setNEEt(unsigned short ne)
Definition: L1RCTRegion.cc:194
std::vector< unsigned short > giveSouthHE_FG() const
Definition: L1RCTRegion.cc:129
void setNorthEt(std::vector< unsigned short > north)
Definition: L1RCTRegion.cc:103
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)
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 setSEEt(unsigned short se)
Definition: L1RCTRegion.cc:245
unsigned short giveNEHE_FG() const
Definition: L1RCTRegion.cc:191
void setEastHE_FG(std::vector< unsigned short > east)
Definition: L1RCTRegion.cc:179
unsigned short giveSEHE_FG() const
Definition: L1RCTRegion.cc:242
void setWestHE_FG(std::vector< unsigned short > west)
Definition: L1RCTRegion.cc:157
void setSouthHE_FG(std::vector< unsigned short > south)
Definition: L1RCTRegion.cc:135
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
int k[5][pyjets_maxn]
void setSouthEt(std::vector< unsigned short > south)
Definition: L1RCTRegion.cc:124
std::vector< int > nw(int crate, int card, int region)
void setNorthHE_FG(std::vector< unsigned short > north)
Definition: L1RCTRegion.cc:113
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
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)
void setEastEt(std::vector< unsigned short > east)
Definition: L1RCTRegion.cc:168
L1RCTRegion empty
Definition: L1RCT.h:104
std::vector< unsigned short > giveEastEt() const
Definition: L1RCTRegion.cc:162
unsigned short giveSWHE_FG() const
Definition: L1RCTRegion.cc:225
void setWestEt(std::vector< unsigned short > west)
Definition: L1RCTRegion.cc:146
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().