CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/DQM/L1TMonitor/interface/L1ExtraDQM.h

Go to the documentation of this file.
00001 #ifndef DQM_L1TMonitor_L1ExtraDQM_h
00002 #define DQM_L1TMonitor_L1ExtraDQM_h
00003 
00020 // system include files
00021 #include <iosfwd>
00022 #include <memory>
00023 #include <vector>
00024 #include <string>
00025 #include <algorithm>
00026 
00027 // user include files
00028 //   base classes
00029 #include "FWCore/Framework/interface/EDAnalyzer.h"
00030 
00031 //
00032 #include "FWCore/Framework/interface/Frameworkfwd.h"
00033 #include "FWCore/ServiceRegistry/interface/Service.h"
00034 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00035 
00036 #include "FWCore/Framework/interface/Event.h"
00037 #include "FWCore/Framework/interface/Run.h"
00038 #include "FWCore/Framework/interface/EventSetup.h"
00039 
00040 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00041 #include "FWCore/Utilities/interface/InputTag.h"
00042 
00043 #include "DataFormats/Common/interface/Handle.h"
00044 #include "FWCore/Framework/interface/ESHandle.h"
00045 #include "DataFormats/Common/interface/OrphanHandle.h"
00046 
00047 // L1Extra objects
00048 #include "DataFormats/L1Trigger/interface/L1MuonParticle.h"
00049 #include "DataFormats/L1Trigger/interface/L1MuonParticleFwd.h"
00050 #include "DataFormats/L1Trigger/interface/L1EmParticle.h"
00051 #include "DataFormats/L1Trigger/interface/L1EmParticleFwd.h"
00052 #include "DataFormats/L1Trigger/interface/L1JetParticle.h"
00053 #include "DataFormats/L1Trigger/interface/L1JetParticleFwd.h"
00054 #include "DataFormats/L1Trigger/interface/L1EtMissParticle.h"
00055 #include "DataFormats/L1Trigger/interface/L1EtMissParticleFwd.h"
00056 #include "DataFormats/L1Trigger/interface/L1HFRings.h"
00057 #include "DataFormats/L1Trigger/interface/L1HFRingsFwd.h"
00058 
00059 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
00060 
00061 #include "L1Trigger/GlobalTriggerAnalyzer/interface/L1PhiConversion.h"
00062 #include "L1Trigger/GlobalTriggerAnalyzer/interface/L1GetHistLimits.h"
00063 #include "L1Trigger/GlobalTriggerAnalyzer/interface/L1RetrieveL1Extra.h"
00064 
00065 #include "DQMServices/Core/interface/DQMStore.h"
00066 #include "DQMServices/Core/interface/MonitorElement.h"
00067 
00068 #include "boost/lexical_cast.hpp"
00069 
00070 // forward declarations
00071 
00072 
00073 // class declaration
00074 class L1ExtraDQM: public edm::EDAnalyzer {
00075 
00076 public:
00077 
00078     // constructor(s)
00079     explicit L1ExtraDQM(const edm::ParameterSet&);
00080 
00081     // destructor
00082     virtual ~L1ExtraDQM();
00083 
00084 public:
00085 
00086     template<class CollectionType>
00087     class L1ExtraMonElement {
00088 
00089     public:
00090         // constructor
00091         L1ExtraMonElement(const edm::EventSetup&, const int);
00092 
00093         // destructor
00094         virtual ~L1ExtraMonElement();
00095 
00096     public:
00097         typedef typename CollectionType::const_iterator CIterColl;
00098 
00099         void bookHistograms(const edm::EventSetup& evSetup, DQMStore* dbe,
00100                 const std::string& l1ExtraObject,
00101                 const std::vector<L1GtObject>& l1GtObj, const bool bookPhi =
00102                         true, const bool bookEta = true);
00103 
00105         void fillNrObjects(const CollectionType* collType,
00106                 const bool validColl, const bool isL1Coll, const int bxInEvent);
00107 
00109         void fillPtPhiEta(const CollectionType* collType, const bool validColl,
00110                 const bool bookPhi, const bool bookEta, const bool isL1Coll,
00111                 const int bxInEvent);
00112 
00114         void fillEtPhiEta(const CollectionType* collType, const bool validColl,
00115                 const bool bookPhi, const bool bookEta, const bool isL1Coll,
00116                 const int bxInEvent);
00117 
00119         void fillEtTotal(const CollectionType* collType, const bool validColl,
00120                 const bool isL1Coll, const int bxInEvent);
00121 
00123         void fillCharge(const CollectionType* collType, const bool validColl,
00124                 const bool isL1Coll, const int bxInEvent);
00125 
00127         void fillHfBitCounts(const CollectionType* collType,
00128                 const bool validColl, const int countIndex,
00129                 const bool isL1Coll, const int bxInEvent);
00130 
00132         void fillHfRingEtSums(const CollectionType* collType,
00133                 const bool validColl, const int countIndex,
00134                 const bool isL1Coll, const int bxInEvent);
00135 
00136     private:
00137 
00138         std::vector<MonitorElement*> m_monElement;
00139 
00141         int m_indexNrObjects;
00142         int m_indexPt;
00143         int m_indexEt;
00144         int m_indexPhi;
00145         int m_indexEta;
00146         int m_indexEtTotal;
00147         int m_indexCharge;
00148         int m_indexHfBitCounts;
00149         int m_indexHfRingEtSums;
00150 
00151     };
00152 
00153 private:
00154 
00155     void analyzeL1ExtraMuon(const edm::Event&, const edm::EventSetup&);
00156     void analyzeL1ExtraIsoEG(const edm::Event&, const edm::EventSetup&);
00157     void analyzeL1ExtraNoIsoEG(const edm::Event&, const edm::EventSetup&);
00158     void analyzeL1ExtraCenJet(const edm::Event&, const edm::EventSetup&);
00159     void analyzeL1ExtraForJet(const edm::Event&, const edm::EventSetup&);
00160     void analyzeL1ExtraTauJet(const edm::Event&, const edm::EventSetup&);
00161     void analyzeL1ExtraETT(const edm::Event&, const edm::EventSetup&);
00162     void analyzeL1ExtraETM(const edm::Event&, const edm::EventSetup&);
00163     void analyzeL1ExtraHTT(const edm::Event&, const edm::EventSetup&);
00164     void analyzeL1ExtraHTM(const edm::Event&, const edm::EventSetup&);
00165     void analyzeL1ExtraHfBitCounts(const edm::Event&, const edm::EventSetup&);
00166     void analyzeL1ExtraHfRingEtSums(const edm::Event&, const edm::EventSetup&);
00167 
00168     virtual void beginJob();
00169     void beginRun(const edm::Run&, const edm::EventSetup&);
00170 
00171     virtual void analyze(const edm::Event&, const edm::EventSetup&);
00172 
00173     void endRun(const edm::Run&, const edm::EventSetup&);
00174     virtual void endJob();
00175 
00176 private:
00177 
00179 
00180     L1RetrieveL1Extra m_retrieveL1Extra;
00181 
00183     std::string m_dirName;
00184 
00186     int m_nrBxInEventGmt;
00187     int m_nrBxInEventGct;
00188 
00190 
00191     DQMStore* m_dbe;
00192 
00193     bool m_resetModule;
00194     int m_currentRun;
00195 
00197     int m_nrEvJob;
00198     int m_nrEvRun;
00199 
00200 
00201 private:
00202 
00204 
00205     std::vector<L1ExtraMonElement<l1extra::L1MuonParticleCollection>*>
00206             m_meAnalysisL1ExtraMuon;
00207 
00208     std::vector<L1ExtraMonElement<l1extra::L1EmParticleCollection>*>
00209             m_meAnalysisL1ExtraIsoEG;
00210     std::vector<L1ExtraMonElement<l1extra::L1EmParticleCollection>*>
00211             m_meAnalysisL1ExtraNoIsoEG;
00212 
00213     std::vector<L1ExtraMonElement<l1extra::L1JetParticleCollection>*>
00214             m_meAnalysisL1ExtraCenJet;
00215     std::vector<L1ExtraMonElement<l1extra::L1JetParticleCollection>*>
00216             m_meAnalysisL1ExtraForJet;
00217     std::vector<L1ExtraMonElement<l1extra::L1JetParticleCollection>*>
00218             m_meAnalysisL1ExtraTauJet;
00219 
00220     std::vector<L1ExtraMonElement<l1extra::L1EtMissParticleCollection>*>
00221             m_meAnalysisL1ExtraETT;
00222 
00223     std::vector<L1ExtraMonElement<l1extra::L1EtMissParticleCollection>*>
00224             m_meAnalysisL1ExtraETM;
00225 
00226     std::vector<L1ExtraMonElement<l1extra::L1EtMissParticleCollection>*>
00227             m_meAnalysisL1ExtraHTT;
00228 
00229     std::vector<L1ExtraMonElement<l1extra::L1EtMissParticleCollection>*>
00230             m_meAnalysisL1ExtraHTM;
00231 
00232     std::vector<L1ExtraMonElement<l1extra::L1HFRingsCollection>*>
00233             m_meAnalysisL1ExtraHfBitCounts;
00234 
00235     std::vector<L1ExtraMonElement<l1extra::L1HFRingsCollection>*>
00236             m_meAnalysisL1ExtraHfRingEtSums;
00237 
00238 };
00239 
00240 // constructor L1ExtraMonElement
00241 template<class CollectionType>
00242 L1ExtraDQM::L1ExtraMonElement<CollectionType>::L1ExtraMonElement(
00243         const edm::EventSetup& evSetup, const int nrElements) :
00244     m_indexNrObjects(-1),
00245     m_indexPt(-1),
00246     m_indexEt(-1),
00247     m_indexPhi(-1),
00248     m_indexEta(-1),
00249     m_indexEtTotal(-1),
00250     m_indexCharge(-1),
00251     m_indexHfBitCounts(-1),
00252     m_indexHfRingEtSums(-1) {
00253 
00254     m_monElement.reserve(nrElements);
00255 
00256 }
00257 
00258 // destructor L1ExtraMonElement
00259 template<class CollectionType>
00260 L1ExtraDQM::L1ExtraMonElement<CollectionType>::~L1ExtraMonElement() {
00261 
00262     //empty
00263 
00264 }
00265 
00266 
00267 template<class CollectionType>
00268 void L1ExtraDQM::L1ExtraMonElement<CollectionType>::bookHistograms(
00269         const edm::EventSetup& evSetup, DQMStore* dbe,
00270         const std::string& l1ExtraObject,
00271         const std::vector<L1GtObject>& l1GtObj, const bool bookPhi,
00272         const bool bookEta) {
00273 
00274     // FIXME
00275     L1GtObject gtObj = l1GtObj.at(0);
00276 
00277     //
00278     std::string histName;
00279     std::string histTitle;
00280     std::string xAxisTitle;
00281     std::string yAxisTitle;
00282 
00283     std::string quantity = "";
00284 
00285     int indexHistogram = -1;
00286 
00287     if (gtObj == HfBitCounts) {
00288 
00289         L1GetHistLimits l1GetHistLimits(evSetup);
00290         const L1GetHistLimits::L1HistLimits& histLimits =
00291                 l1GetHistLimits.l1HistLimits(gtObj, quantity);
00292 
00293         const int histNrBins = histLimits.nrBins;
00294         const double histMinValue = histLimits.lowerBinValue;
00295         const double histMaxValue = histLimits.upperBinValue;
00296 
00297         indexHistogram++;
00298         m_indexHfBitCounts = indexHistogram;
00299 
00300         for (int iCount = 0; iCount < l1extra::L1HFRings::kNumRings; ++iCount) {
00301 
00302             histName = l1ExtraObject + "_Count_" + boost::lexical_cast<
00303                     std::string>(iCount);
00304             histTitle = l1ExtraObject + ": count " + boost::lexical_cast<
00305                     std::string>(iCount);
00306             xAxisTitle = l1ExtraObject;
00307             yAxisTitle = "Entries";
00308 
00309             m_monElement.push_back(dbe->book1D(histName, histTitle, histNrBins,
00310                     histMinValue, histMaxValue));
00311             m_monElement[m_indexHfBitCounts + iCount]->setAxisTitle(xAxisTitle,
00312                     1);
00313             m_monElement[m_indexHfBitCounts + iCount]->setAxisTitle(yAxisTitle,
00314                     2);
00315 
00316         }
00317 
00318         return;
00319 
00320     }
00321 
00322     // number of objects per event
00323     if ((gtObj == Mu) || (gtObj == IsoEG) || (gtObj == NoIsoEG) || (gtObj
00324             == CenJet) || (gtObj == ForJet) || (gtObj == TauJet)) {
00325 
00326         quantity = "NrObjects";
00327 
00328         L1GetHistLimits l1GetHistLimits(evSetup);
00329         const L1GetHistLimits::L1HistLimits& histLimits =
00330                 l1GetHistLimits.l1HistLimits(gtObj, quantity);
00331 
00332         const int histNrBins = histLimits.nrBins;
00333         const double histMinValue = histLimits.lowerBinValue;
00334         const double histMaxValue = histLimits.upperBinValue;
00335 
00336         histName = l1ExtraObject + "_NrObjectsPerEvent";
00337         histTitle = l1ExtraObject + ": number of objects per event";
00338         xAxisTitle = "Nr_" + l1ExtraObject;
00339         yAxisTitle = "Entries";
00340 
00341         m_monElement.push_back(dbe->book1D(histName, histTitle, histNrBins,
00342                 histMinValue, histMaxValue));
00343         indexHistogram++;
00344 
00345         m_monElement[indexHistogram]->setAxisTitle(xAxisTitle, 1);
00346         m_monElement[indexHistogram]->setAxisTitle(yAxisTitle, 2);
00347         m_indexNrObjects = indexHistogram;
00348 
00349     }
00350 
00351     // transverse momentum (energy)  PT (ET) [GeV]
00352 
00353 
00354     quantity = "ET";
00355     std::string quantityLongName = " transverse energy ";
00356 
00357     if (gtObj == Mu) {
00358         quantity = "PT";
00359         quantityLongName = " transverse momentum ";
00360     }
00361 
00362     L1GetHistLimits l1GetHistLimits(evSetup);
00363     const L1GetHistLimits::L1HistLimits& histLimits =
00364             l1GetHistLimits.l1HistLimits(gtObj, quantity);
00365 
00366     const int histNrBinsET = histLimits.nrBins;
00367     const double histMinValueET = histLimits.lowerBinValue;
00368     const double histMaxValueET = histLimits.upperBinValue;
00369     const std::vector<float>& binThresholdsET = histLimits.binThresholds;
00370 
00371     float* binThresholdsETf;
00372     size_t sizeBinThresholdsET = binThresholdsET.size();
00373     binThresholdsETf = new float[sizeBinThresholdsET];
00374     copy(binThresholdsET.begin(), binThresholdsET.end(), binThresholdsETf);
00375 
00376     LogDebug("L1ExtraDQM") << "\n PT/ET histogram for " << l1ExtraObject
00377             << "\n histNrBinsET = " << histNrBinsET << "\n histMinValueET = "
00378             << histMinValueET << "\n histMaxValueET = " << histMaxValueET
00379             << "\n Last bin value represents the upper limit of the histogram"
00380             << std::endl;
00381     for (size_t iBin = 0; iBin < sizeBinThresholdsET; ++iBin) {
00382         LogTrace("L1ExtraDQM") << "Bin " << iBin << ": " << quantity << " = "
00383                 << binThresholdsETf[iBin] << " GeV" << std::endl;
00384 
00385     }
00386 
00387     histName = l1ExtraObject + "_" + quantity;
00388     histTitle = l1ExtraObject + ":" + quantityLongName + quantity + " [GeV]";
00389     xAxisTitle = l1ExtraObject + "_" + quantity + " [GeV]";
00390     yAxisTitle = "Entries";
00391 
00392     if (gtObj == HfRingEtSums) {
00393 
00394         indexHistogram++;
00395         m_indexHfRingEtSums = indexHistogram;
00396 
00397         for (int iCount = 0; iCount < l1extra::L1HFRings::kNumRings; ++iCount) {
00398 
00399             histName = l1ExtraObject + "_Count_" + boost::lexical_cast<
00400                     std::string>(iCount);
00401             histTitle = l1ExtraObject + ": count " + boost::lexical_cast<
00402                     std::string>(iCount);
00403             xAxisTitle = l1ExtraObject;
00404             yAxisTitle = "Entries";
00405 
00406             m_monElement.push_back(dbe->book1D(histName, histTitle,
00407                     histNrBinsET, binThresholdsETf));
00408 
00409             m_monElement[m_indexHfRingEtSums + iCount]->setAxisTitle(xAxisTitle,
00410                     1);
00411             m_monElement[m_indexHfRingEtSums + iCount]->setAxisTitle(yAxisTitle,
00412                     2);
00413 
00414         }
00415 
00416     } else {
00417 
00418         m_monElement.push_back(dbe->book1D(histName, histTitle, histNrBinsET,
00419                 binThresholdsETf));
00420         indexHistogram++;
00421 
00422         m_monElement[indexHistogram]->setAxisTitle(xAxisTitle, 1);
00423         m_monElement[indexHistogram]->setAxisTitle(yAxisTitle, 2);
00424         m_indexPt = indexHistogram;
00425         m_indexEt = indexHistogram;
00426         m_indexEtTotal = indexHistogram;
00427     }
00428 
00429 
00430     delete[] binThresholdsETf;
00431 
00432     //
00433 
00434     if (bookPhi) {
00435 
00436         quantity = "phi";
00437 
00438         // get limits and binning from L1Extra
00439         L1GetHistLimits l1GetHistLimits(evSetup);
00440         const L1GetHistLimits::L1HistLimits& histLimits =
00441                 l1GetHistLimits.l1HistLimits(gtObj, quantity);
00442 
00443         const int histNrBinsPhi = histLimits.nrBins;
00444         const double histMinValuePhi = histLimits.lowerBinValue;
00445         const double histMaxValuePhi = histLimits.upperBinValue;
00446         const std::vector<float>& binThresholdsPhi = histLimits.binThresholds;
00447 
00448         float* binThresholdsPhif;
00449         size_t sizeBinThresholdsPhi = binThresholdsPhi.size();
00450         binThresholdsPhif = new float[sizeBinThresholdsPhi];
00451         copy(binThresholdsPhi.begin(), binThresholdsPhi.end(),
00452                 binThresholdsPhif);
00453 
00454         LogDebug("L1ExtraDQM") << "\n phi histogram for " << l1ExtraObject
00455                 << "\n histNrBinsPhi = " << histNrBinsPhi
00456                 << "\n histMinValuePhi = " << histMinValuePhi
00457                 << "\n histMaxValuePhi = " << histMaxValuePhi
00458                 << "\n Last bin value represents the upper limit of the histogram"
00459                 << std::endl;
00460         for (size_t iBin = 0; iBin < sizeBinThresholdsPhi; ++iBin) {
00461             LogTrace("L1ExtraDQM") << "Bin " << iBin << ": phi = "
00462                     << binThresholdsPhif[iBin] << " deg" << std::endl;
00463 
00464         }
00465 
00466         histName = l1ExtraObject + "_phi";
00467         histTitle = l1ExtraObject + ": phi distribution ";
00468         xAxisTitle = l1ExtraObject + "_phi [deg]";
00469         yAxisTitle = "Entries";
00470 
00471         m_monElement.push_back(dbe->book1D(histName, histTitle, histNrBinsPhi,
00472                 histMinValuePhi, histMaxValuePhi));
00473         indexHistogram++;
00474 
00475         m_monElement[indexHistogram]->setAxisTitle(xAxisTitle, 1);
00476         m_monElement[indexHistogram]->setAxisTitle(yAxisTitle, 2);
00477         m_indexPhi = indexHistogram;
00478 
00479         delete[] binThresholdsPhif;
00480     }
00481 
00482     //
00483 
00484 
00485     if (bookEta) {
00486 
00487         quantity = "eta";
00488 
00489         // get limits and binning from L1Extra
00490         L1GetHistLimits l1GetHistLimits(evSetup);
00491         const L1GetHistLimits::L1HistLimits& histLimits =
00492                 l1GetHistLimits.l1HistLimits(gtObj, quantity);
00493 
00494         const int histNrBinsEta = histLimits.nrBins;
00495         const double histMinValueEta = histLimits.lowerBinValue;
00496         const double histMaxValueEta = histLimits.upperBinValue;
00497         const std::vector<float>& binThresholdsEta = histLimits.binThresholds;
00498 
00499         //
00500         float* binThresholdsEtaf;
00501         size_t sizeBinThresholdsEta = binThresholdsEta.size();
00502         binThresholdsEtaf = new float[sizeBinThresholdsEta];
00503         copy(binThresholdsEta.begin(), binThresholdsEta.end(),
00504                 binThresholdsEtaf);
00505 
00506         LogDebug("L1ExtraDQM") << "\n eta histogram for " << l1ExtraObject
00507                 << "\n histNrBinsEta = " << histNrBinsEta
00508                 << "\n histMinValueEta = " << histMinValueEta
00509                 << "\n histMaxValueEta = " << histMaxValueEta
00510                 << "\n Last bin value represents the upper limit of the histogram"
00511                 << std::endl;
00512         for (size_t iBin = 0; iBin < sizeBinThresholdsEta; ++iBin) {
00513             LogTrace("L1ExtraDQM") << "Bin " << iBin << ": eta = "
00514                     << binThresholdsEtaf[iBin] << std::endl;
00515 
00516         }
00517 
00518         histName = l1ExtraObject + "_eta";
00519         histTitle = l1ExtraObject + ": eta distribution ";
00520         xAxisTitle = l1ExtraObject + "_eta";
00521         yAxisTitle = "Entries";
00522 
00523         m_monElement.push_back(dbe->book1D(histName, histTitle, histNrBinsEta,
00524                 binThresholdsEtaf));
00525         indexHistogram++;
00526 
00527         m_monElement[indexHistogram]->setAxisTitle(xAxisTitle, 1);
00528         m_monElement[indexHistogram]->setAxisTitle(yAxisTitle, 2);
00529         m_indexEta = indexHistogram;
00530 
00531         delete[] binThresholdsEtaf;
00532 
00533     }
00534 
00535 }
00536 
00537 template<class CollectionType>
00538 void L1ExtraDQM::L1ExtraMonElement<CollectionType>::fillNrObjects(
00539         const CollectionType* collType, const bool validColl,
00540         const bool isL1Coll, const int bxInEvent) {
00541 
00542     if (validColl && isL1Coll) {
00543         size_t collSize = 0;
00544         for (CIterColl iterColl = collType->begin(); iterColl
00545                 != collType->end(); ++iterColl) {
00546 
00547             if (iterColl->bx() == bxInEvent) {
00548                 collSize++;
00549             }
00550         }
00551         m_monElement[m_indexNrObjects]->Fill(collSize);
00552     } else {
00553         size_t collSize = collType->size();
00554         m_monElement[m_indexNrObjects]->Fill(collSize);
00555     }
00556 }
00557 
00558 template<class CollectionType>
00559 void L1ExtraDQM::L1ExtraMonElement<CollectionType>::fillPtPhiEta(
00560         const CollectionType* collType, const bool validColl,
00561         const bool bookPhi, const bool bookEta, const bool isL1Coll, const int bxInEvent) {
00562 
00563     if (validColl) {
00564         for (CIterColl iterColl = collType->begin(); iterColl
00565                 != collType->end(); ++iterColl) {
00566 
00567             if (isL1Coll && (iterColl->bx() != bxInEvent)) {
00568                 continue;
00569             }
00570 
00571             m_monElement[m_indexPt]->Fill(iterColl->pt());
00572 
00573             if (bookPhi) {
00574                 // add a very small quantity to get off the bin edge
00575                 m_monElement[m_indexPhi]->Fill(rad2deg(iterColl->phi()) + 1.e-6);
00576             }
00577 
00578             if (bookEta) {
00579                 m_monElement[m_indexEta]->Fill(iterColl->eta());
00580             }
00581 
00582         }
00583     }
00584 }
00585 
00586 template<class CollectionType>
00587 void L1ExtraDQM::L1ExtraMonElement<CollectionType>::fillEtPhiEta(
00588         const CollectionType* collType, const bool validColl,
00589         const bool bookPhi, const bool bookEta, const bool isL1Coll, const int bxInEvent) {
00590 
00591     if (validColl) {
00592         for (CIterColl iterColl = collType->begin(); iterColl
00593                 != collType->end(); ++iterColl) {
00594 
00595             if (isL1Coll && (iterColl->bx() != bxInEvent)) {
00596                 continue;
00597             }
00598 
00599             m_monElement[m_indexEt]->Fill(iterColl->et());
00600 
00601             if (bookPhi) {
00602                 // add a very small quantity to get off the bin edge
00603                 m_monElement[m_indexPhi]->Fill(rad2deg(iterColl->phi()) + 1.e-6);
00604             }
00605 
00606             if (bookEta) {
00607                 m_monElement[m_indexEta]->Fill(iterColl->eta());
00608             }
00609 
00610         }
00611     }
00612 }
00613 
00614 template<class CollectionType>
00615 void L1ExtraDQM::L1ExtraMonElement<CollectionType>::fillEtTotal(
00616         const CollectionType* collType, const bool validColl, const bool isL1Coll, const int bxInEvent) {
00617 
00618     if (validColl) {
00619         for (CIterColl iterColl = collType->begin(); iterColl
00620                 != collType->end(); ++iterColl) {
00621 
00622             if (isL1Coll && (iterColl->bx() != bxInEvent)) {
00623                 continue;
00624             }
00625 
00626             m_monElement[m_indexEtTotal]->Fill(iterColl->etTotal());
00627         }
00628     }
00629 
00630 }
00631 
00632 template<class CollectionType>
00633 void L1ExtraDQM::L1ExtraMonElement<CollectionType>::fillCharge(
00634         const CollectionType* collType, const bool validColl, const bool isL1Coll, const int bxInEvent) {
00635 
00636     if (validColl) {
00637         for (CIterColl iterColl = collType->begin(); iterColl
00638                 != collType->end(); ++iterColl) {
00639 
00640             if (isL1Coll && (iterColl->bx() != bxInEvent)) {
00641                 continue;
00642             }
00643 
00644             m_monElement[m_indexCharge]->Fill(iterColl->charge());
00645         }
00646     }
00647 
00648 }
00649 
00650 template<class CollectionType>
00651 void L1ExtraDQM::L1ExtraMonElement<CollectionType>::fillHfBitCounts(
00652         const CollectionType* collType, const bool validColl,
00653         const int countIndex, const bool isL1Coll, const int bxInEvent) {
00654 
00655     if (validColl) {
00656         for (CIterColl iterColl = collType->begin(); iterColl
00657                 != collType->end(); ++iterColl) {
00658 
00659             if (isL1Coll && (iterColl->bx() != bxInEvent)) {
00660                 continue;
00661             }
00662 
00663             m_monElement[m_indexHfBitCounts + countIndex]->Fill(
00664                     iterColl->hfBitCount(
00665                             (l1extra::L1HFRings::HFRingLabels) countIndex));
00666         }
00667     }
00668 
00669 }
00670 
00671 template<class CollectionType>
00672 void L1ExtraDQM::L1ExtraMonElement<CollectionType>::fillHfRingEtSums(
00673         const CollectionType* collType, const bool validColl,
00674         const int countIndex, const bool isL1Coll, const int bxInEvent) {
00675 
00676     if (validColl) {
00677         for (CIterColl iterColl = collType->begin(); iterColl
00678                 != collType->end(); ++iterColl) {
00679 
00680             if (isL1Coll && (iterColl->bx() != bxInEvent)) {
00681                 continue;
00682             }
00683 
00684             m_monElement[m_indexHfRingEtSums + countIndex]->Fill(
00685                     iterColl->hfEtSum(
00686                             (l1extra::L1HFRings::HFRingLabels) countIndex));
00687         }
00688     }
00689 
00690 }
00691 
00692 #endif