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 Types | Private Attributes | Static Private Attributes
L1RCTProducer Class Reference

#include <L1RCTProducer.h>

Inheritance diagram for L1RCTProducer:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

virtual void beginLuminosityBlock (edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
 
virtual void beginRun (edm::Run &r, const edm::EventSetup &c)
 
const std::vector< int > getFedVectorFromOmds (const edm::EventSetup &)
 
const std::vector< int > getFedVectorFromRunInfo (const edm::EventSetup &)
 
 L1RCTProducer (const edm::ParameterSet &ps)
 
void printFedVector (const std::vector< int >)
 
void printUpdatedFedMask ()
 
void printUpdatedFedMaskVerbose ()
 
virtual void produce (edm::Event &e, const edm::EventSetup &c)
 
void updateConfiguration (const edm::EventSetup &)
 
void updateFedVector (const edm::EventSetup &, bool getFromOmds, int)
 
virtual ~L1RCTProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Types

enum  crateSection {
  c_min, ebOddFed = c_min, ebEvenFed, eeFed,
  hbheFed, hfFed, c_max = hfFed
}
 

Private Attributes

std::vector< int > bunchCrossings
 
std::vector< edm::InputTagecalDigis
 
L1RCTChannelMaskfedUpdatedMask
 
bool getFedsFromOmds
 
std::vector< edm::InputTaghcalDigis
 
unsigned int queryDelayInLS
 
unsigned int queryIntervalInLS
 
L1RCTrct
 
L1RCTLookupTablesrctLookupTables
 
bool useEcal
 
bool useHcal
 

Static Private Attributes

static const int crateFED [18][5]
 
static const int maxBarrel = 17
 
static const int maxEndcap = 28
 
static const int maxHF =32
 
static const int minBarrel = 1
 
static const int minEndcap = 17
 
static const int minHF = 29
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 47 of file L1RCTProducer.h.

Member Enumeration Documentation

Enumerator
c_min 
ebOddFed 
ebEvenFed 
eeFed 
hbheFed 
hfFed 
c_max 

Definition at line 84 of file L1RCTProducer.h.

Constructor & Destructor Documentation

L1RCTProducer::L1RCTProducer ( const edm::ParameterSet ps)
explicit

Definition at line 38 of file L1RCTProducer.cc.

38  :
41  useEcal(conf.getParameter<bool>("useEcal")),
42  useHcal(conf.getParameter<bool>("useHcal")),
43  ecalDigis(conf.getParameter<std::vector<edm::InputTag> >("ecalDigis")),
44  hcalDigis(conf.getParameter<std::vector<edm::InputTag> >("hcalDigis")),
45  bunchCrossings(conf.getParameter<std::vector<int> >("BunchCrossings")),
46  getFedsFromOmds(conf.getParameter<bool>("getFedsFromOmds")),
47  queryDelayInLS(conf.getParameter<unsigned int>("queryDelayInLS")),
48  queryIntervalInLS(conf.getParameter<unsigned int>("queryIntervalInLS")),
50 {
51  produces<L1CaloEmCollection>();
52  produces<L1CaloRegionCollection>();
53 
54 }
L1RCTLookupTables * rctLookupTables
Definition: L1RCTProducer.h:69
unsigned int queryDelayInLS
Definition: L1RCTProducer.h:77
bool getFedsFromOmds
Definition: L1RCTProducer.h:76
std::vector< edm::InputTag > hcalDigis
Definition: L1RCTProducer.h:74
std::vector< edm::InputTag > ecalDigis
Definition: L1RCTProducer.h:73
std::vector< int > bunchCrossings
Definition: L1RCTProducer.h:75
tuple conf
Definition: dbtoconf.py:185
L1RCTChannelMask * fedUpdatedMask
Definition: L1RCTProducer.h:81
unsigned int queryIntervalInLS
Definition: L1RCTProducer.h:78
Definition: L1RCT.h:20
L1RCTProducer::~L1RCTProducer ( )
virtual

Definition at line 56 of file L1RCTProducer.cc.

References fedUpdatedMask, rct, and rctLookupTables.

57 {
58  if(rct != 0) delete rct;
59  if(rctLookupTables != 0) delete rctLookupTables;
60  if(fedUpdatedMask != 0) delete fedUpdatedMask;
61 }
L1RCTLookupTables * rctLookupTables
Definition: L1RCTProducer.h:69
L1RCTChannelMask * fedUpdatedMask
Definition: L1RCTProducer.h:81

Member Function Documentation

void L1RCTProducer::beginLuminosityBlock ( edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
virtual

Reimplemented from edm::EDProducer.

Definition at line 76 of file L1RCTProducer.cc.

References getFedsFromOmds, edm::LuminosityBlockBase::luminosityBlock(), queryDelayInLS, queryIntervalInLS, edm::LuminosityBlockBase::run(), convertSQLiteXML::runNumber, and updateFedVector().

77 {
78  // check LS number every LS, if the checkOMDS flag is set AND it's the right LS, update the FED vector from OMDS
79  // can pass the flag as the bool?? but only check LS number if flag is true anyhow
80  if (getFedsFromOmds)
81  {
82  unsigned int nLumi = lumiSeg.luminosityBlock(); // doesn't even need the (unsigned int) cast because LuminosityBlockNumber_t is already an unsigned int
83  // LS count starts at 1, want to be able to delay 0 LS's intuitively
84  if ( ( (nLumi - 1) == queryDelayInLS)
85  || (queryIntervalInLS > 0 && nLumi % queryIntervalInLS == 0 ) ) // to guard against problems if online DQM crashes; every 100 LS is ~20-30 minutes, not too big a load, hopefully not too long between
86  {
87  int runNumber = lumiSeg.run();
88  // std::cout << "Lumi section for this FED vector update is " << nLumi << std::endl;
89  updateFedVector(context,true,runNumber); // OMDS
90  }
91  else if (queryIntervalInLS <= 0)
92  {
93  // don't do interval checking... cout message??
94  }
95  }
96 }
unsigned int queryDelayInLS
Definition: L1RCTProducer.h:77
bool getFedsFromOmds
Definition: L1RCTProducer.h:76
LuminosityBlockNumber_t luminosityBlock() const
RunNumber_t run() const
void updateFedVector(const edm::EventSetup &, bool getFromOmds, int)
unsigned int queryIntervalInLS
Definition: L1RCTProducer.h:78
void L1RCTProducer::beginRun ( edm::Run r,
const edm::EventSetup c 
)
virtual

Reimplemented from edm::EDProducer.

Definition at line 64 of file L1RCTProducer.cc.

References edm::RunBase::run(), convertSQLiteXML::runNumber, updateConfiguration(), and updateFedVector().

65 {
66  // std::cout << "getFedsFromOmds is " << getFedsFromOmds << std::endl;
67 
68  updateConfiguration(eventSetup);
69 
70  int runNumber = run.run();
71  updateFedVector(eventSetup,false,runNumber); // RUNINFO ONLY at beginning of run
72 
73 }
void updateConfiguration(const edm::EventSetup &)
void updateFedVector(const edm::EventSetup &, bool getFromOmds, int)
const std::vector< int > L1RCTProducer::getFedVectorFromOmds ( const edm::EventSetup eventSetup)

Definition at line 300 of file L1RCTProducer.cc.

References edm::EventSetup::get(), getFedVectorFromRunInfo(), edm::ESHandleBase::isValid(), RunInfo::m_fed_in, edm::ESHandle< class >::product(), and edmLumisInFiles::summary.

Referenced by updateFedVector().

301 {
302 
303  // std::cout << "Getting FED vector from my specific ES RunInfo object" << std::endl;
304 
305  // get FULL FED vector from RunInfo object specifically created to have OMDS fed vector
307  eventSetup.get<RunInfoRcd>().get("OmdsFedVector",sum); // using label to get my specific instance of RunInfo
308  if (sum.isValid())
309  {
310  const RunInfo* summary=sum.product();
311  const std::vector<int> fedvector = summary->m_fed_in;
312 
313  return fedvector;
314  }
315  else
316  {
317  return getFedVectorFromRunInfo(eventSetup);
318  }
319 
320 }
const std::vector< int > getFedVectorFromRunInfo(const edm::EventSetup &)
std::vector< int > m_fed_in
Definition: RunInfo.h:24
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
bool isValid() const
Definition: ESHandle.h:37
const std::vector< int > L1RCTProducer::getFedVectorFromRunInfo ( const edm::EventSetup eventSetup)

Definition at line 287 of file L1RCTProducer.cc.

References edm::EventSetup::get(), RunInfo::m_fed_in, edm::ESHandle< class >::product(), and edmLumisInFiles::summary.

Referenced by getFedVectorFromOmds(), and updateFedVector().

288 {
289  // std::cout << "Getting FED vector from standard RunInfo object" << std::endl;
290  // get FULL FED vector from RUNINFO
292  eventSetup.get<RunInfoRcd>().get(sum);
293  const RunInfo* summary=sum.product();
294  const std::vector<int> fedvector = summary->m_fed_in;
295 
296  return fedvector;
297 }
std::vector< int > m_fed_in
Definition: RunInfo.h:24
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
void L1RCTProducer::printFedVector ( const std::vector< int >  fedVector)

Definition at line 397 of file L1RCTProducer.cc.

References filterCSVwithJSON::copy, and gather_cfg::cout.

398 {
399  std::cout << "Contents of given fedVector: ";
400  std::copy(fedVector.begin(), fedVector.end(), std::ostream_iterator<int>(std::cout, ", "));
401  std::cout << std::endl;
402 }
tuple cout
Definition: gather_cfg.py:121
void L1RCTProducer::printUpdatedFedMask ( )

Definition at line 405 of file L1RCTProducer.cc.

References gather_cfg::cout, fedUpdatedMask, and L1RCTChannelMask::print().

406 {
407  if (fedUpdatedMask != 0)
408  {
410  }
411  else
412  {
413  std::cout << "Trying to print contents of fedUpdatedMask, but it doesn't exist!" << std::endl;
414  }
415 }
void print(std::ostream &s) const
L1RCTChannelMask * fedUpdatedMask
Definition: L1RCTProducer.h:81
tuple cout
Definition: gather_cfg.py:121
void L1RCTProducer::printUpdatedFedMaskVerbose ( )

Definition at line 418 of file L1RCTProducer.cc.

References gather_cfg::cout, L1RCTChannelMask::ecalMask, fedUpdatedMask, L1RCTChannelMask::hcalMask, L1RCTChannelMask::hfMask, i, j, and gen::k.

419 {
420  if (fedUpdatedMask != 0)
421  {
422  // print contents of fedvector
423  std::cout << "Contents of fedUpdatedMask: ";
424 // std::copy(fedUpdatedMask.begin(), fedUpdatedMask.end(), std::ostream_iterator<int>(std::cout, ", "));
425  std::cout << "--> ECAL mask: " << std::endl;
426  for (int i = 0; i < 18; i++)
427  {
428  for (int j = 0; j < 2; j++)
429  {
430  for (int k = 0; k < 28; k++)
431  {
432  std::cout << fedUpdatedMask->ecalMask[i][j][k] << ", ";
433  }
434  }
435  }
436  std::cout << "--> HCAL mask: " << std::endl;
437  for (int i = 0; i < 18; i++)
438  {
439  for (int j = 0; j < 2; j++)
440  {
441  for (int k = 0; k < 28; k++)
442  {
443  std::cout << fedUpdatedMask->hcalMask[i][j][k] << ", ";
444  }
445  }
446  }
447  std::cout << "--> HF mask: " << std::endl;
448  for (int i = 0; i < 18; i++)
449  {
450  for (int j = 0; j < 2; j++)
451  {
452  for (int k = 0; k < 4; k++)
453  {
454  std::cout << fedUpdatedMask->hfMask[i][j][k] << ", ";
455  }
456  }
457  }
458 
459  std::cout << std::endl;
460  }
461  else
462  {
463  //print error message
464  std::cout << "Trying to print contents of fedUpdatedMask, but it doesn't exist!" << std::endl;
465  }
466 }
int i
Definition: DBlmapReader.cc:9
bool ecalMask[18][2][28]
int j
Definition: DBlmapReader.cc:9
int k[5][pyjets_maxn]
L1RCTChannelMask * fedUpdatedMask
Definition: L1RCTProducer.h:81
bool hcalMask[18][2][28]
tuple cout
Definition: gather_cfg.py:121
bool hfMask[18][2][4]
void L1RCTProducer::produce ( edm::Event e,
const edm::EventSetup c 
)
virtual

Implements edm::EDProducer.

Definition at line 324 of file L1RCTProducer.cc.

References bunchCrossings, L1RCT::digiInput(), patCandidatesForDimuonsSequences_cff::ecal, ecalDigis, edm::hlt::Exception, edm::Event::getByLabel(), L1RCT::getIsolatedEGObjects(), L1RCT::getNonisolatedEGObjects(), L1RCT::getRegions(), patCandidatesForDimuonsSequences_cff::hcal, hcalDigis, i, j, L1RCT::processEvent(), rct, compare_using_db::sample, useEcal, and useHcal.

325 {
326 
327 
328  std::auto_ptr<L1CaloEmCollection> rctEmCands (new L1CaloEmCollection);
329  std::auto_ptr<L1CaloRegionCollection> rctRegions (new L1CaloRegionCollection);
330 
331 
332  if(!(ecalDigis.size()==hcalDigis.size()&&hcalDigis.size()==bunchCrossings.size()))
333  throw cms::Exception("BadInput")
334  << "From what I see the number of your your ECAL input digi collections.\n"
335  <<"is different from the size of your HCAL digi input collections\n"
336  <<"or the size of your BX factor collection"
337  <<"They must be the same to correspond to the same Bxs\n"
338  << "It does not matter if one of them is empty\n";
339 
340 
341 
342 
343  // loop through and process each bx
344  for (unsigned short sample = 0; sample < bunchCrossings.size(); sample++)
345  {
348 
351 
352 
353  if(useHcal&&event.getByLabel(hcalDigis[sample], hcal))
354  hcalIn = *hcal;
355 
356  if(useEcal&&event.getByLabel(ecalDigis[sample],ecal))
357  ecalIn = *ecal;
358 
359  rct->digiInput(ecalIn,hcalIn);
360  rct->processEvent();
361 
362  // Stuff to create
363  for (int j = 0; j<18; j++)
364  {
365  L1CaloEmCollection isolatedEGObjects = rct->getIsolatedEGObjects(j);
366  L1CaloEmCollection nonisolatedEGObjects = rct->getNonisolatedEGObjects(j);
367  for (int i = 0; i<4; i++)
368  {
369  isolatedEGObjects.at(i).setBx(bunchCrossings[sample]);
370  nonisolatedEGObjects.at(i).setBx(bunchCrossings[sample]);
371  rctEmCands->push_back(isolatedEGObjects.at(i));
372  rctEmCands->push_back(nonisolatedEGObjects.at(i));
373  }
374  }
375 
376 
377  for (int i = 0; i < 18; i++)
378  {
379  std::vector<L1CaloRegion> regions = rct->getRegions(i);
380  for (int j = 0; j < 22; j++)
381  {
382  regions.at(j).setBx(bunchCrossings[sample]);
383  rctRegions->push_back(regions.at(j));
384  }
385  }
386 
387  }
388 
389 
390  //putting stuff back into event
391  event.put(rctEmCands);
392  event.put(rctRegions);
393 
394 }
int i
Definition: DBlmapReader.cc:9
std::vector< L1CaloEmCand > L1CaloEmCollection
std::vector< L1CaloRegion > getRegions(unsigned crate)
Definition: L1RCT.cc:363
L1CaloEmCollection getNonisolatedEGObjects(unsigned crate)
Definition: L1RCT.cc:349
std::vector< edm::InputTag > hcalDigis
Definition: L1RCTProducer.h:74
std::vector< edm::InputTag > ecalDigis
Definition: L1RCTProducer.h:73
std::vector< int > bunchCrossings
Definition: L1RCTProducer.h:75
L1CaloEmCollection getIsolatedEGObjects(unsigned crate)
Definition: L1RCT.cc:332
int j
Definition: DBlmapReader.cc:9
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
void processEvent()
Definition: L1RCT.cc:36
void digiInput(const EcalTrigPrimDigiCollection &ecalCollection, const HcalTrigPrimDigiCollection &hcalCollection)
Definition: L1RCT.cc:116
std::vector< L1CaloRegion > L1CaloRegionCollection
void L1RCTProducer::updateConfiguration ( const edm::EventSetup eventSetup)

Definition at line 100 of file L1RCTProducer.cc.

References alignCSCRings::e, edm::EventSetup::get(), h, edm::ESHandle< class >::product(), alignCSCRings::r, rctLookupTables, alignCSCRings::s, L1RCTLookupTables::setEcalScale(), L1RCTLookupTables::setHcalScale(), L1RCTLookupTables::setL1CaloEtScale(), and L1RCTLookupTables::setRCTParameters().

Referenced by beginRun().

101 {
102  // Refresh configuration information every event
103  // Hopefully, this does not take too much time
104  // There should be a call back function in future to
105  // handle changes in configuration
106  // parameters to configure RCT (thresholds, etc)
107  edm::ESHandle<L1RCTParameters> rctParameters;
108  eventSetup.get<L1RCTParametersRcd>().get(rctParameters);
109  const L1RCTParameters* r = rctParameters.product();
110 
111  //SCALES
112 
113  // energy scale to convert eGamma output
115  eventSetup.get<L1EmEtScaleRcd>().get(emScale);
116  const L1CaloEtScale* s = emScale.product();
117 
118  // get energy scale to convert input from ECAL
120  eventSetup.get<L1CaloEcalScaleRcd>().get(ecalScale);
121  const L1CaloEcalScale* e = ecalScale.product();
122 
123  // get energy scale to convert input from HCAL
125  eventSetup.get<L1CaloHcalScaleRcd>().get(hcalScale);
126  const L1CaloHcalScale* h = hcalScale.product();
127 
128  // set scales
131 
134 }
L1RCTLookupTables * rctLookupTables
Definition: L1RCTProducer.h:69
void setHcalScale(const L1CaloHcalScale *hcalScale)
void setL1CaloEtScale(const L1CaloEtScale *etScale)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
void setEcalScale(const L1CaloEcalScale *ecalScale)
void setRCTParameters(const L1RCTParameters *rctParameters)
void L1RCTProducer::updateFedVector ( const edm::EventSetup eventSetup,
bool  getFromOmds,
int  runNumber 
)

Definition at line 137 of file L1RCTProducer.cc.

References c_max, c_min, crateFED, fwrapper::cs, ebEvenFed, ebOddFed, patCandidatesForDimuonsSequences_cff::ecal, L1RCTChannelMask::ecalMask, eeFed, fedUpdatedMask, spr::find(), edm::EventSetup::get(), getFedVectorFromOmds(), getFedVectorFromRunInfo(), hbheFed, L1RCTChannelMask::hcalMask, hfFed, L1RCTChannelMask::hfMask, i, j, gen::k, maxBarrel, maxEndcap, maxHF, minBarrel, minEndcap, minHF, edm::ESHandle< class >::product(), rctLookupTables, L1RCTLookupTables::setChannelMask(), and L1RCTLookupTables::setNoisyChannelMask().

Referenced by beginLuminosityBlock(), and beginRun().

138 {
139  // list of RCT channels to mask
141  eventSetup.get<L1RCTChannelMaskRcd>().get(channelMask);
142  const L1RCTChannelMask* cEs = channelMask.product();
143 
144 
145  // list of Noisy RCT channels to mask
147  eventSetup.get<L1RCTNoisyChannelMaskRcd>().get(hotChannelMask);
148  const L1RCTNoisyChannelMask* cEsNoise = hotChannelMask.product();
150 
151 
152 
153  //Update the channel mask according to the FED VECTOR
154  //This is the beginning of run. We delete the old
155  //create the new and set it in the LUTs
156 
157  if(fedUpdatedMask!=0) delete fedUpdatedMask;
158 
160  // copy a constant object
161  for (int i = 0; i < 18; i++)
162  {
163  for (int j = 0; j < 2; j++)
164  {
165  for (int k = 0; k < 28; k++)
166  {
167  fedUpdatedMask->ecalMask[i][j][k] = cEs->ecalMask[i][j][k];
168  fedUpdatedMask->hcalMask[i][j][k] = cEs->hcalMask[i][j][k] ;
169  }
170  for (int k = 0; k < 4; k++)
171  {
172  fedUpdatedMask->hfMask[i][j][k] = cEs->hfMask[i][j][k];
173  }
174  }
175  }
176 
177 
178 // // adding fed mask into channel mask
179 
180  const std::vector<int> Feds = getFromOmds ? getFedVectorFromOmds(eventSetup) : getFedVectorFromRunInfo(eventSetup); // so can create/initialize/assign const quantity in one line accounting for if statement
181  // wikipedia says this is exactly what it's for: http://en.wikipedia.org/wiki/%3F:#C.2B.2B
182 
183 // std::cout << "Contents of ";
184 // std::cout << (getFromOmds ? "OMDS RunInfo" : "standard RunInfo");
185 // std::cout << " FED vector" << std::endl;
186 // printFedVector(Feds);
187 
188  std::vector<int> caloFeds; // pare down the feds to the interesting ones
189  // is this unneccesary?
190  // Mike B : This will decrease the find speed so better do it
191  for(std::vector<int>::const_iterator cf = Feds.begin(); cf != Feds.end(); ++cf)
192  {
193  int fedNum = *cf;
194  if(fedNum > 600 && fedNum <724)
195  caloFeds.push_back(fedNum);
196  }
197 
198  for(int cr = 0; cr < 18; ++cr)
199  {
200 
201  for(crateSection cs = c_min; cs <= c_max; cs = crateSection(cs +1))
202  {
203  bool fedFound = false;
204 
205 
206  //Try to find the FED
207  std::vector<int>::iterator fv = std::find(caloFeds.begin(),caloFeds.end(),crateFED[cr][cs]);
208  if(fv!=caloFeds.end())
209  fedFound = true;
210 
211  if(!fedFound) {
212  int eta_min=0;
213  int eta_max=0;
214  bool phi_even[2] = {false};//, phi_odd = false;
215  bool ecal=false;
216 
217  switch (cs) {
218  case ebEvenFed :
219  eta_min = minBarrel;
220  eta_max = maxBarrel;
221  phi_even[0] = true;
222  ecal = true;
223  break;
224 
225  case ebOddFed:
226  eta_min = minBarrel;
227  eta_max = maxBarrel;
228  phi_even[1] = true;
229  ecal = true;
230  break;
231 
232  case eeFed:
233  eta_min = minEndcap;
234  eta_max = maxEndcap;
235  phi_even[0] = true;
236  phi_even[1] = true;
237  ecal = true;
238  break;
239 
240  case hbheFed:
241  eta_min = minBarrel;
242  eta_max = maxEndcap;
243  phi_even[0] = true;
244  phi_even[1] = true;
245  ecal = false;
246  break;
247 
248  case hfFed:
249  eta_min = minHF;
250  eta_max = maxHF;
251 
252  phi_even[0] = true;
253  phi_even[1] = true;
254  ecal = false;
255  break;
256  default:
257  break;
258 
259  }
260  for(int ieta = eta_min; ieta <= eta_max; ++ieta)
261  {
262  if(ieta<=28) // barrel and endcap
263  for(int even = 0; even<=1 ; even++)
264  {
265  if(phi_even[even])
266  {
267  if(ecal)
268  fedUpdatedMask->ecalMask[cr][even][ieta-1] = true;
269  else
270  fedUpdatedMask->hcalMask[cr][even][ieta-1] = true;
271  }
272  }
273  else
274  for(int even = 0; even<=1 ; even++)
275  if(phi_even[even])
276  fedUpdatedMask->hfMask[cr][even][ieta-29] = true;
277 
278  }
279  }
280  }
281  }
282 
284 
285 }
int i
Definition: DBlmapReader.cc:9
static const int minHF
auto_ptr< ClusterSequence > cs
const std::vector< int > getFedVectorFromRunInfo(const edm::EventSetup &)
L1RCTLookupTables * rctLookupTables
Definition: L1RCTProducer.h:69
bool ecalMask[18][2][28]
static const int crateFED[18][5]
Definition: L1RCTProducer.h:96
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
static const int maxHF
const std::vector< int > getFedVectorFromOmds(const edm::EventSetup &)
int j
Definition: DBlmapReader.cc:9
static const int minBarrel
Definition: L1RCTProducer.h:97
int k[5][pyjets_maxn]
static const int minEndcap
Definition: L1RCTProducer.h:99
L1RCTChannelMask * fedUpdatedMask
Definition: L1RCTProducer.h:81
const T & get() const
Definition: EventSetup.h:55
static const int maxBarrel
Definition: L1RCTProducer.h:98
T const * product() const
Definition: ESHandle.h:62
static const int maxEndcap
void setNoisyChannelMask(const L1RCTNoisyChannelMask *channelMask)
bool hcalMask[18][2][28]
bool hfMask[18][2][4]
void setChannelMask(const L1RCTChannelMask *channelMask)

Member Data Documentation

std::vector<int> L1RCTProducer::bunchCrossings
private

Definition at line 75 of file L1RCTProducer.h.

Referenced by produce().

const int L1RCTProducer::crateFED
staticprivate
Initial value:
=
{{613, 614, 603, 702, 718},
{611, 612, 602, 700, 718},
{627, 610, 601, 716, 722},
{625, 626, 609, 714, 722},
{623, 624, 608, 712, 722},
{621, 622, 607, 710, 720},
{619, 620, 606, 708, 720},
{617, 618, 605, 706, 720},
{615, 616, 604, 704, 718},
{631, 632, 648, 703, 719},
{629, 630, 647, 701, 719},
{645, 628, 646, 717, 723},
{643, 644, 654, 715, 723},
{641, 642, 653, 713, 723},
{639, 640, 652, 711, 721},
{637, 638, 651, 709, 721},
{635, 636, 650, 707, 721},
{633, 634, 649, 705, 719}}

Definition at line 96 of file L1RCTProducer.h.

Referenced by updateFedVector().

std::vector<edm::InputTag> L1RCTProducer::ecalDigis
private

Definition at line 73 of file L1RCTProducer.h.

Referenced by produce().

L1RCTChannelMask* L1RCTProducer::fedUpdatedMask
private
bool L1RCTProducer::getFedsFromOmds
private

Definition at line 76 of file L1RCTProducer.h.

Referenced by beginLuminosityBlock().

std::vector<edm::InputTag> L1RCTProducer::hcalDigis
private

Definition at line 74 of file L1RCTProducer.h.

Referenced by produce().

const int L1RCTProducer::maxBarrel = 17
staticprivate

Definition at line 98 of file L1RCTProducer.h.

Referenced by updateFedVector().

const int L1RCTProducer::maxEndcap = 28
staticprivate

Definition at line 100 of file L1RCTProducer.h.

Referenced by updateFedVector().

const int L1RCTProducer::maxHF =32
staticprivate

Definition at line 102 of file L1RCTProducer.h.

Referenced by updateFedVector().

const int L1RCTProducer::minBarrel = 1
staticprivate

Definition at line 97 of file L1RCTProducer.h.

Referenced by updateFedVector().

const int L1RCTProducer::minEndcap = 17
staticprivate

Definition at line 99 of file L1RCTProducer.h.

Referenced by updateFedVector().

const int L1RCTProducer::minHF = 29
staticprivate

Definition at line 101 of file L1RCTProducer.h.

Referenced by updateFedVector().

unsigned int L1RCTProducer::queryDelayInLS
private

Definition at line 77 of file L1RCTProducer.h.

Referenced by beginLuminosityBlock().

unsigned int L1RCTProducer::queryIntervalInLS
private

Definition at line 78 of file L1RCTProducer.h.

Referenced by beginLuminosityBlock().

L1RCT* L1RCTProducer::rct
private

Definition at line 70 of file L1RCTProducer.h.

Referenced by produce(), and ~L1RCTProducer().

L1RCTLookupTables* L1RCTProducer::rctLookupTables
private

Definition at line 69 of file L1RCTProducer.h.

Referenced by updateConfiguration(), updateFedVector(), and ~L1RCTProducer().

bool L1RCTProducer::useEcal
private

Definition at line 71 of file L1RCTProducer.h.

Referenced by produce().

bool L1RCTProducer::useHcal
private

Definition at line 72 of file L1RCTProducer.h.

Referenced by produce().