CMS 3D CMS Logo

L1GctJetCounterLut.h File Reference

#include "CondFormats/L1TObjects/interface/L1GctJetCounterSetup.h"
#include "L1Trigger/GlobalCaloTrigger/src/L1GctLut.h"
#include <vector>

Go to the source code of this file.

Classes

class  L1GctJetCounterLut
 Jet Counter LUT. More...

Defines

#define JET_COUNTER_LUT_ADD_BITS   16

Functions

std::ostream & operator<< (std::ostream &os, const L1GctJetCounterLut &lut)


Define Documentation

#define JET_COUNTER_LUT_ADD_BITS   16

Definition at line 4 of file L1GctJetCounterLut.h.


Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const L1GctJetCounterLut lut 
)

Definition at line 52 of file L1GctJetCounterLut.cc.

References L1GctJetCounterSetup::centralEta, lat::endl(), L1GctJetCounterSetup::forwardEta, i, L1GctJetCounterLut::m_cutList, L1GctJetCounterSetup::maxRank, L1GctJetCounterSetup::minRank, L1GctJetCounterLut::nCuts(), L1GctJetCounterSetup::nullCutType, L1GctJetCounterSetup::phiWindow, and pyDBSRunClass::temp.

00053 {
00054 //   os << "===L1GctJetCounterLut===" << endl;
00055 //   os << "Number of cuts for this Lut is " << lut.nCuts() << endl;
00056   for (unsigned i=0; i<lut.nCuts(); i++) {
00057     if (i==0) {
00058       os << "Jet passes ";
00059     } else {
00060       os << "\nand " ;
00061     }
00062     switch (lut.m_cutList.at(i).cutType)
00063       {
00064       case L1GctJetCounterSetup::minRank:
00065         os << "if its rank is at least " << lut.m_cutList.at(i).cutValue1 ;
00066         break;
00067 
00068       case L1GctJetCounterSetup::maxRank:
00069         os << "if its rank is at most " << lut.m_cutList.at(i).cutValue1 ;
00070         break;
00071 
00072       case L1GctJetCounterSetup::centralEta:
00073         os << "if it is in the central eta range with max (local) eta " << lut.m_cutList.at(i).cutValue1 ;
00074         break;
00075 
00076       case L1GctJetCounterSetup::forwardEta:
00077         os << "if it is in the forward eta range with min (local) eta " << lut.m_cutList.at(i).cutValue1 ;
00078         break;
00079 
00080       case L1GctJetCounterSetup::phiWindow:
00081         if (lut.m_cutList.at(i).cutValue2>lut.m_cutList.at(i).cutValue1) {
00082           os << "if its phi is between " << lut.m_cutList.at(i).cutValue1
00083                              << " and " << lut.m_cutList.at(i).cutValue2 ;
00084         } else {
00085           os << "if its phi is larger than " << lut.m_cutList.at(i).cutValue1
00086                      << " or smaller than " << lut.m_cutList.at(i).cutValue2 ;
00087         }
00088         break;
00089 
00090       case L1GctJetCounterSetup::nullCutType:
00091         os << "if Hell freezes over " ;
00092         break;
00093 
00094       default: // do nothing, shouldn't get here!
00095         break;
00096       }
00097   }
00098   os << "\n===Lookup table contents===\n" << std::endl;
00099   const L1GctLut<L1GctJetCounterLut::NAddress,1>* temp=&lut;
00100   os << *temp;
00101   return os;
00102 }


Generated on Tue Jun 9 17:54:36 2009 for CMSSW by  doxygen 1.5.4