CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes

HLTMuonDQMSource Class Reference

#include <HLTMuonDQMSource.h>

Inheritance diagram for HLTMuonDQMSource:
edm::EDAnalyzer

List of all members.

Public Member Functions

 HLTMuonDQMSource (const edm::ParameterSet &)
 ~HLTMuonDQMSource ()

Protected Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &eventSetup)
 Fake Analyze.
void beginJob ()
 BeginJob.
void beginLuminosityBlock (const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &eventSetup)
void beginRun (const edm::Run &run, const edm::EventSetup &eventSetup)
 BeginRun.
void endJob ()
 Endjob.
void endLuminosityBlock (const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &eventSetup)
 DQM Client Diagnostic.
void endRun (const edm::Run &run, const edm::EventSetup &eventSetup)
 EndRun.

Private Attributes

TH1D * _heta1 [NTRIG][2]
TH1D * _heta2 [NTRIG][2]
TH1D * _hphi1 [NTRIG][2]
TH1D * _hphi2 [NTRIG][2]
TH1D * _hpt1 [NTRIG][2]
TH1D * _hpt2 [NTRIG][2]
double coneSize_
 every n events
int counterEvt_
DQMStoredbe_
MonitorElementhcharge [NTRIG][5]
MonitorElementhcharge_IOHit [NTRIG][5]
MonitorElementhcharge_OIHit [NTRIG][5]
MonitorElementhcharge_OIState [NTRIG][5]
MonitorElementhcharge_trk [NTRIG][5]
MonitorElementhcharge_trk_IOHit [NTRIG][5]
MonitorElementhcharge_trk_OIHit [NTRIG][5]
MonitorElementhcharge_trk_OIState [NTRIG][5]
MonitorElementhchargeconv [NTRIG][3]
MonitorElementhd0 [NTRIG][2]
MonitorElementhd0_IOHit [NTRIG][5]
MonitorElementhd0_OIHit [NTRIG][5]
MonitorElementhd0_OIState [NTRIG][5]
 added plots
MonitorElementhd0_trk [NTRIG][5]
MonitorElementhd0_trk_IOHit [NTRIG][5]
MonitorElementhd0_trk_OIHit [NTRIG][5]
MonitorElementhd0_trk_OIState [NTRIG][5]
MonitorElementhd0phi [NTRIG][2]
MonitorElementhdimumass [NTRIG][2]
MonitorElementhdr [NTRIG][2]
MonitorElementhdr_IOHit [NTRIG][5]
MonitorElementhdr_OIHit [NTRIG][5]
MonitorElementhdr_OIState [NTRIG][5]
MonitorElementhdr_trk [NTRIG][5]
MonitorElementhdr_trk_IOHit [NTRIG][5]
MonitorElementhdr_trk_OIHit [NTRIG][5]
MonitorElementhdr_trk_OIState [NTRIG][5]
MonitorElementhdrphi [NTRIG][2]
MonitorElementhdz [NTRIG][2]
MonitorElementhdz0 [NTRIG][2]
MonitorElementhdz0eta [NTRIG][2]
MonitorElementhdz_IOHit [NTRIG][5]
MonitorElementhdz_OIHit [NTRIG][5]
MonitorElementhdz_OIState [NTRIG][5]
MonitorElementhdz_trk [NTRIG][5]
MonitorElementhdz_trk_IOHit [NTRIG][5]
MonitorElementhdz_trk_OIHit [NTRIG][5]
MonitorElementhdz_trk_OIState [NTRIG][5]
MonitorElementhdzeta [NTRIG][2]
MonitorElementherr0 [NTRIG][2]
MonitorElementheta [NTRIG][5]
MonitorElementheta_IOHit [NTRIG][5]
MonitorElementheta_OIHit [NTRIG][5]
MonitorElementheta_OIState [NTRIG][5]
MonitorElementheta_trk [NTRIG][5]
MonitorElementheta_trk_IOHit [NTRIG][5]
MonitorElementheta_trk_OIHit [NTRIG][5]
MonitorElementheta_trk_OIState [NTRIG][5]
MonitorElementhetafrac [NTRIG][2]
MonitorElementhetaphi [NTRIG][5]
MonitorElementhetaphi_IOHit [NTRIG][5]
MonitorElementhetaphi_OIHit [NTRIG][5]
MonitorElementhetaphi_OIState [NTRIG][5]
MonitorElementhetaphi_trk [NTRIG][5]
MonitorElementhetaphi_trk_IOHit [NTRIG][5]
MonitorElementhetaphi_trk_OIHit [NTRIG][5]
MonitorElementhetaphi_trk_OIState [NTRIG][5]
MonitorElementhetapull [NTRIG]
MonitorElementhetapulleta [NTRIG]
MonitorElementhetarelres [NTRIG][3]
MonitorElementhetarelres_L3L3trk [NTRIG][5]
MonitorElementhetarelreseta [NTRIG][3]
MonitorElementhetares [NTRIG][3]
MonitorElementhetares_L3L3trk [NTRIG][5]
MonitorElementhetareseta [NTRIG][3]
MonitorElementhisoL2 [NTRIG]
MonitorElementhisoL3 [NTRIG]
MonitorElementhl1quality [NTRIG]
MonitorElementhL2muonIsoDR [NTRIG]
MonitorElementhL3muonIsoDR [NTRIG]
MonitorElementhnHits [NTRIG][4]
MonitorElementhNMu [NTRIG][5]
MonitorElementhNMu_comp [NTRIG][5]
MonitorElementhNMu_IOHit [NTRIG][5]
MonitorElementhNMu_l3seed_comp [NTRIG][5]
MonitorElementhNMu_OIHit [NTRIG][5]
MonitorElementhNMu_OIState [NTRIG][5]
MonitorElementhNMu_trk [NTRIG][5]
MonitorElementhNMu_trk_comp [NTRIG][5]
MonitorElementhNMu_trk_IOHit [NTRIG][5]
MonitorElementhNMu_trk_OIHit [NTRIG][5]
MonitorElementhNMu_trk_OIState [NTRIG][5]
MonitorElementhnMuValidHits [NTRIG]
MonitorElementhnPixelValidHits [NTRIG]
MonitorElementhnStripValidHits [NTRIG]
MonitorElementhnTkValidHits [NTRIG]
MonitorElementhnValidHits [NTRIG]
MonitorElementhphi [NTRIG][5]
MonitorElementhphi_IOHit [NTRIG][5]
MonitorElementhphi_norm [NTRIG][5]
MonitorElementhphi_OIHit [NTRIG][5]
MonitorElementhphi_OIState [NTRIG][5]
MonitorElementhphi_trk [NTRIG][5]
MonitorElementhphi_trk_IOHit [NTRIG][5]
MonitorElementhphi_trk_OIHit [NTRIG][5]
MonitorElementhphi_trk_OIState [NTRIG][5]
MonitorElementhphifrac [NTRIG][2]
MonitorElementhphipull [NTRIG]
MonitorElementhphipullphi [NTRIG]
MonitorElementhphirelres [NTRIG][3]
MonitorElementhphirelres_L3L3trk [NTRIG][5]
MonitorElementhphirelresphi [NTRIG][3]
MonitorElementhphires [NTRIG][3]
MonitorElementhphires_L3L3trk [NTRIG][5]
MonitorElementhphiresphi [NTRIG][3]
MonitorElementhpt [NTRIG][5]
MonitorElementhpt_IOHit [NTRIG][5]
MonitorElementhpt_OIHit [NTRIG][5]
MonitorElementhpt_OIState [NTRIG][5]
MonitorElementhpt_trk [NTRIG][5]
MonitorElementhpt_trk_IOHit [NTRIG][5]
MonitorElementhpt_trk_OIHit [NTRIG][5]
MonitorElementhpt_trk_OIState [NTRIG][5]
MonitorElementhpteta [NTRIG][5]
MonitorElementhpteta_IOHit [NTRIG][5]
MonitorElementhpteta_OIHit [NTRIG][5]
MonitorElementhpteta_OIState [NTRIG][5]
MonitorElementhpteta_trk [NTRIG][5]
MonitorElementhpteta_trk_IOHit [NTRIG][5]
MonitorElementhpteta_trk_OIHit [NTRIG][5]
MonitorElementhpteta_trk_OIState [NTRIG][5]
MonitorElementhptfrac [NTRIG][2]
MonitorElementhptphi [NTRIG][5]
MonitorElementhptphi_IOHit [NTRIG][5]
MonitorElementhptphi_OIHit [NTRIG][5]
MonitorElementhptphi_OIState [NTRIG][5]
MonitorElementhptphi_trk [NTRIG][5]
MonitorElementhptphi_trk_IOHit [NTRIG][5]
MonitorElementhptphi_trk_OIHit [NTRIG][5]
MonitorElementhptphi_trk_OIState [NTRIG][5]
MonitorElementhptpull [NTRIG]
MonitorElementhptpullpt [NTRIG]
MonitorElementhptrelres [NTRIG][3]
MonitorElementhptrelres_L3L3trk [NTRIG][5]
MonitorElementhptrelrespt [NTRIG][3]
MonitorElementhptres [NTRIG][3]
MonitorElementhptres_L3L3trk [NTRIG][5]
MonitorElementhptrespt [NTRIG][3]
MonitorElementhseedetarelres [NTRIG][2]
MonitorElementhseedetares [NTRIG][2]
MonitorElementhseedNMuper [NTRIG][2]
MonitorElementhseedphirelres [NTRIG][2]
MonitorElementhseedphires [NTRIG][2]
MonitorElementhseedptrelres [NTRIG][2]
MonitorElementhseedptres [NTRIG][2]
MonitorElementhtowerdRL2 [NTRIG]
MonitorElementhtowerdRL3 [NTRIG]
MonitorElementhtowerEmEnergy [NTRIG]
MonitorElementhtowerEmEt [NTRIG]
MonitorElementhtowerEt [NTRIG]
MonitorElementhtowerEta [NTRIG]
MonitorElementhtowerEtaEmEt [NTRIG]
MonitorElementhtowerEtaHadEt [NTRIG]
MonitorElementhtowerEtaOuterEt [NTRIG]
MonitorElementhtowerHadEnergy [NTRIG]
MonitorElementhtowerHadEt [NTRIG]
MonitorElementhtowerOuterEnergy [NTRIG]
MonitorElementhtowerOuterEt [NTRIG]
MonitorElementhtowerPhi [NTRIG]
MonitorElementhtowerPhiEmEt [NTRIG]
MonitorElementhtowerPhiHadEt [NTRIG]
MonitorElementhtowerPhiOuterEt [NTRIG]
edm::InputTag l2collectionTag_
edm::InputTag l2isolationTag_
edm::InputTag l2seedscollectionTag_
edm::InputTag l3collectionTag_
edm::InputTag l3isolationTag_
edm::InputTag l3muons_
edm::InputTag l3muonsIOHit_
edm::InputTag l3muonsOIHit_
edm::InputTag l3muonsOIState_
edm::InputTag l3seedscollectionTag_
edm::InputTag l3seedscollectionTagIOHit_
edm::InputTag l3seedscollectionTagOIHit_
edm::InputTag l3seedscollectionTagOIState_
edm::InputTag l3tktrk_
edm::InputTag l3trkfindingIOHit_
edm::InputTag l3trkfindingOIHit_
edm::InputTag l3trkfindingOIState_
edm::InputTag l3trkIOHit_
edm::InputTag l3trkOIHit_
edm::InputTag l3trkOIState_
std::string monitorName_
int nl3muon
int nl3muonIOHit
int nl3muonOIHit
int nl3muonOIState
int nTrig_
 counter
int nTrigs
std::string outputFile_
edm::ParameterSet parameters_
int prescaleEvt_
 mutriggered events
std::string striggers_ [20]
std::vector< std::string > theDirectoryName
std::vector< std::string > theHLTCollectionLevel
std::vector< std::string > theTriggerBits
edm::InputTag TrigResultInput
bool verbose_
float XMAX
float XMIN

Static Private Attributes

static const int NTRIG = 20

Detailed Description

* DQM Test Client

Date:
2011/03/20 11:13:57
Revision:
1.22
Author:
M. Vander Donckt CERN

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 27 of file HLTMuonDQMSource.h.


Constructor & Destructor Documentation

HLTMuonDQMSource::HLTMuonDQMSource ( const edm::ParameterSet ps)

Definition at line 81 of file HLTMuonDQMSource.cc.

References coneSize_, dbe_, filters, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, l2collectionTag_, l2isolationTag_, l2seedscollectionTag_, l3collectionTag_, l3isolationTag_, l3muons_, l3muonsIOHit_, l3muonsOIHit_, l3muonsOIState_, l3seedscollectionTag_, l3seedscollectionTagIOHit_, l3seedscollectionTagOIHit_, l3seedscollectionTagOIState_, l3tktrk_, l3trkfindingIOHit_, l3trkfindingOIHit_, l3trkfindingOIState_, l3trkIOHit_, l3trkOIHit_, l3trkOIState_, monitorName_, nTrigs, NULL, cmsCodeRules::cppFunctionSkipper::operator, outputFile_, parameters_, prescaleEvt_, striggers_, theDirectoryName, theHLTCollectionLevel, theTriggerBits, TrigResultInput, and verbose_.

                                                              :counterEvt_(0), nTrig_(0)
{
  parameters_ = ps;
  verbose_ = parameters_.getUntrackedParameter < bool > ("verbose", false);
  monitorName_ = parameters_.getUntrackedParameter<std::string>("monitorName","HLT/HLTMonMuon");
  prescaleEvt_ = parameters_.getUntrackedParameter<int>("prescaleEvt", -1);
  coneSize_ = parameters_.getUntrackedParameter<double>("coneSize", 0.24);
  l2seedscollectionTag_ = parameters_.getUntrackedParameter<edm::InputTag>("l2MuonSeedTag",edm::InputTag("hltL2MuonSeeds"));
  l3seedscollectionTag_ = parameters_.getUntrackedParameter<edm::InputTag>("l3MuonSeedTag",edm::InputTag("hltL3TrajectorySeed"));
  l2collectionTag_ = parameters_.getUntrackedParameter<edm::InputTag>("l2MuonTag",edm::InputTag("hltL2MuonCandidates"));
  l3collectionTag_ = parameters_.getUntrackedParameter<edm::InputTag>("l3MuonTag",edm::InputTag("hltL3MuonCandidates"));
  l2isolationTag_ = parameters_.getUntrackedParameter<edm::InputTag>("l2IsolationTag",edm::InputTag("hltL2MuonIsolations"));
  l3isolationTag_ = parameters_.getUntrackedParameter<edm::InputTag>("l3IsolationTag",edm::InputTag("hltL3MuonIsolations"));

  TrigResultInput = parameters_.getUntrackedParameter<edm::InputTag>("TrigResultInputTag", edm::InputTag("TriggerResults"));


  l3seedscollectionTagOIState_ = parameters_.getUntrackedParameter<edm::InputTag>("l3MuonSeedTagOIState",edm::InputTag("hltL3TrajSeedOIState"));
  l3seedscollectionTagOIHit_ = parameters_.getUntrackedParameter<edm::InputTag>("l3MuonSeedTagOIHit",edm::InputTag("hltL3TrajSeedOIHit"));
  l3seedscollectionTagIOHit_ = parameters_.getUntrackedParameter<edm::InputTag>("l3MuonSeedTagIOHit",edm::InputTag("hltL3TrajSeedIOHit"));

  l3trkfindingOIState_ = parameters_.getUntrackedParameter<edm::InputTag>("l3MuonTrkFindingOIState",edm::InputTag("hltL3TrackCandidateFromL2OIState"));
  l3trkfindingOIHit_ = parameters_.getUntrackedParameter<edm::InputTag>("l3MuonTrkFindingOIHit",edm::InputTag("hltL3TrackCandidateFromL2OIHit"));
  l3trkfindingIOHit_ = parameters_.getUntrackedParameter<edm::InputTag>("l3MuonTrkFindingIOHit",edm::InputTag("hltL3TrackCandidateFromL2IOHit"));

  l3trkOIState_ = parameters_.getUntrackedParameter<edm::InputTag>("l3MuonTrkOIState",edm::InputTag("hltL3TkTracksFromL2OIState"));
  l3trkOIHit_ = parameters_.getUntrackedParameter<edm::InputTag>("l3MuonTrkOIHit",edm::InputTag("hltL3TkTracksFromL2OIHit"));
  l3trkIOHit_ = parameters_.getUntrackedParameter<edm::InputTag>("l3MuonTrkIOHit",edm::InputTag("hltL3TkTracksFromL2IOHit"));
  l3tktrk_ = parameters_.getUntrackedParameter<edm::InputTag>("l3MuonTrk",edm::InputTag("hltL3TkTracksFromL2"));

  l3muons_ = parameters_.getUntrackedParameter<edm::InputTag>("l3muons",edm::InputTag("hltL3Muons"));
  l3muonsOIState_ = parameters_.getUntrackedParameter<edm::InputTag>("l3muonsOIState",edm::InputTag("hltL3MuonsOIState"));
  l3muonsOIHit_ = parameters_.getUntrackedParameter<edm::InputTag>("l3muonsOIHit",edm::InputTag("hltL3MuonsOIHit"));
  l3muonsIOHit_ = parameters_.getUntrackedParameter<edm::InputTag>("l3muonsIOHit",edm::InputTag("hltL3MuonsIOHit"));

  dbe_ = 0 ;
  dbe_ = edm::Service < DQMStore > ().operator->();
  dbe_->setVerbose(0);

  outputFile_ =
    parameters_.getUntrackedParameter < std::string > ("outputFile", "");
  if (outputFile_.size() != 0) {
    edm::LogWarning("HLTMuonDQMSource") << "Muon HLT Monitoring histograms will be saved to " 
      << outputFile_ << std::endl;
  }
  else {
    outputFile_ = "HLTMuonDQM.root";
  }

  bool disable =
    parameters_.getUntrackedParameter < bool > ("disableROOToutput", false);
  if (disable) {
    outputFile_ = "";
  }

  if (dbe_ != NULL) {
    dbe_->setCurrentFolder(monitorName_);
  }

  std::vector<edm::ParameterSet> filters = parameters_.getParameter<std::vector<edm::ParameterSet> >("filters");

  for(std::vector<edm::ParameterSet>::iterator filterconf = filters.begin() ; filterconf != filters.end() ; filterconf++){
    theDirectoryName.push_back(filterconf->getParameter<std::string>("directoryName"));
    //theHLTCollectionLevel.push_back(filterconf->getParameter<std::string>("level"));
    //theTriggerBits.push_back(filterconf->getParameter<std::vector<std::string> >("triggerBits"));
    std::string _tmp_level = filterconf->getParameter<std::string>("directoryName");
    std::vector<std::string> _tmp_bits = filterconf->getParameter<std::vector<std::string> >("triggerBits");
    for( size_t i = 0; i < _tmp_bits.size(); ++i ) {
      theTriggerBits.push_back(_tmp_bits[i]);
      theHLTCollectionLevel.push_back(_tmp_level);
    }
  }

  // L1PassThrough, L2PassThrough, L3PassThrough
  nTrigs = theDirectoryName.size();

  for( int trig = 0; trig < nTrigs; trig++ ) striggers_[trig] = "";
}
HLTMuonDQMSource::~HLTMuonDQMSource ( )

Definition at line 161 of file HLTMuonDQMSource.cc.

{

  // do anything here that needs to be done at desctruction time
  // (e.g. close files, deallocate resources etc.)

}

Member Function Documentation

void HLTMuonDQMSource::analyze ( const edm::Event event,
const edm::EventSetup eventSetup 
) [protected, virtual]

Fake Analyze.

Implements edm::EDAnalyzer.

Definition at line 1333 of file HLTMuonDQMSource.cc.

References _heta1, _heta2, _hphi1, _hphi2, _hpt1, _hpt2, beta, TrajectoryStateOnSurface::charge(), coneSize_, counterEvt_, dbe_, deltaR(), PTrajectoryStateOnDet::detId(), eta(), PV3DBase< T, PVType, FrameType >::eta(), edm::HandleBase::failedToGet(), MonitorElement::Fill(), cropTnPTrees::frac, edm::EventSetup::get(), edm::Ref< C, T, F >::get(), edm::Event::getByLabel(), MonitorElement::getEntries(), MonitorElement::getNbinsX(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), hcharge, hcharge_IOHit, hcharge_OIHit, hcharge_OIState, hcharge_trk, hcharge_trk_IOHit, hcharge_trk_OIHit, hcharge_trk_OIState, hchargeconv, hd0, hd0_IOHit, hd0_OIHit, hd0_OIState, hd0_trk, hd0_trk_IOHit, hd0_trk_OIHit, hd0_trk_OIState, hd0phi, hdimumass, hdr, hdr_IOHit, hdr_OIHit, hdr_OIState, hdr_trk, hdr_trk_IOHit, hdr_trk_OIHit, hdr_trk_OIState, hdrphi, hdz, hdz0, hdz0eta, hdz_IOHit, hdz_OIHit, hdz_OIState, hdz_trk, hdz_trk_IOHit, hdz_trk_OIHit, hdz_trk_OIState, hdzeta, herr0, heta, heta_IOHit, heta_OIHit, heta_OIState, heta_trk, heta_trk_IOHit, heta_trk_OIHit, heta_trk_OIState, hetafrac, hetaphi, hetaphi_IOHit, hetaphi_OIHit, hetaphi_OIState, hetaphi_trk, hetaphi_trk_IOHit, hetaphi_trk_OIHit, hetaphi_trk_OIState, hetapull, hetapulleta, hetarelres, hetarelres_L3L3trk, hetarelreseta, hetares, hetares_L3L3trk, hetareseta, hisoL2, hisoL3, hl1quality, hL2muonIsoDR, hL3muonIsoDR, hnHits, hNMu, hNMu_comp, hNMu_IOHit, hNMu_l3seed_comp, hNMu_OIHit, hNMu_OIState, hNMu_trk, hNMu_trk_comp, hNMu_trk_IOHit, hNMu_trk_OIHit, hNMu_trk_OIState, hnMuValidHits, hnPixelValidHits, hnStripValidHits, hnTkValidHits, hnValidHits, hphi, hphi_IOHit, hphi_norm, hphi_OIHit, hphi_OIState, hphi_trk, hphi_trk_IOHit, hphi_trk_OIHit, hphi_trk_OIState, hphifrac, hphipull, hphipullphi, hphirelres, hphirelres_L3L3trk, hphirelresphi, hphires, hphires_L3L3trk, hphiresphi, hpt, hpt_IOHit, hpt_OIHit, hpt_OIState, hpt_trk, hpt_trk_IOHit, hpt_trk_OIHit, hpt_trk_OIState, hpteta, hpteta_IOHit, hpteta_OIHit, hpteta_OIState, hpteta_trk, hpteta_trk_IOHit, hpteta_trk_OIHit, hpteta_trk_OIState, hptfrac, hptphi, hptphi_IOHit, hptphi_OIHit, hptphi_OIState, hptphi_trk, hptphi_trk_IOHit, hptphi_trk_OIHit, hptphi_trk_OIState, hptpull, hptpullpt, hptrelres, hptrelres_L3L3trk, hptrelrespt, hptres, hptres_L3L3trk, hptrespt, hseedetarelres, hseedetares, hseedNMuper, hseedphirelres, hseedphires, hseedptrelres, hseedptres, htowerdRL2, htowerdRL3, htowerEmEnergy, htowerEmEt, htowerEt, htowerEta, htowerEtaEmEt, htowerEtaHadEt, htowerEtaOuterEt, htowerHadEnergy, htowerHadEt, htowerOuterEnergy, htowerOuterEt, htowerPhi, htowerPhiEmEt, htowerPhiHadEt, htowerPhiOuterEt, i, edm::Ref< C, T, F >::id(), edm::Ref< C, T, F >::isNonnull(), edm::HandleBase::isValid(), j, l2collectionTag_, l2isolationTag_, l2seedscollectionTag_, l3collectionTag_, l3isolationTag_, l3muons_, l3muonsIOHit_, l3muonsOIHit_, l3muonsOIState_, TSGFromL2_cfi::l3seeds(), l3seedscollectionTag_, l3seedscollectionTagIOHit_, l3seedscollectionTagOIHit_, l3seedscollectionTagOIState_, l3tktrk_, l3trkfindingIOHit_, l3trkfindingOIHit_, l3trkfindingOIState_, l3trkIOHit_, l3trkOIHit_, l3trkOIState_, testEve_cfg::level, LogDebug, n, NTRIG, ntrig, nTrig_, nTrigs, reco::HitPattern::numberOfHits(), reco::HitPattern::numberOfValidHits(), reco::HitPattern::numberOfValidMuonHits(), reco::HitPattern::numberOfValidPixelHits(), reco::HitPattern::numberOfValidStripHits(), reco::HitPattern::numberOfValidTrackerHits(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), phi, reco::BeamSpot::position(), prescaleEvt_, edm::ESHandle< T >::product(), MonitorElement::setBinContent(), MonitorElement::setBinError(), mathSSE::sqrt(), theDirectoryName, theHLTCollectionLevel, theTriggerBits, TrajectoryStateTransform::transientState(), edm::TriggerNames::triggerIndex(), edm::TriggerNames::triggerNames(), TrigResultInput, and TwoPi.

{  
  if ( !dbe_) return;
  counterEvt_++;
  if (prescaleEvt_ > 0 && counterEvt_%prescaleEvt_!=0) return;
  LogDebug("HLTMuonDQMSource") << " processing conterEvt_: " << counterEvt_ <<std::endl;

  bool trigFired = false;
  bool FiredTriggers[NTRIG] = {false};
  edm::Handle<edm::TriggerResults> trigResult;
  event.getByLabel(TrigResultInput, trigResult);
  if( !trigResult.failedToGet() ) {
    int ntrigs = trigResult->size();
    const edm::TriggerNames & trigName = event.triggerNames(*trigResult);
    for( int itrig = 0; itrig != ntrigs; ++itrig) {
      //std::cout << "trigName = " << trigName.triggerName(itrig) << " " << itrig << std::endl;
      for( unsigned int n = 0; n < (unsigned int)theTriggerBits.size(); n++) { 
        if( trigName.triggerIndex(theTriggerBits[n]) == (unsigned int)ntrigs ) continue;
        if( trigResult->accept(trigName.triggerIndex(theTriggerBits[n])) ) {
          for( unsigned int j = 0; j < (unsigned int)theDirectoryName.size(); j++ ) {
            if( theHLTCollectionLevel[n] == theDirectoryName[j] ) FiredTriggers[j] = true;
          }
          trigFired = true;
        }
      }
    }
  }
  //else std::cout << "failed to get trigResult!!" << std::endl;
  // trigger fired
  if( !trigFired ) return;
  nTrig_++;

  //get the field
  edm::ESHandle<MagneticField> magField;
  eventSetup.get<IdealMagneticFieldRecord>().get(magField);

  //get the geometry
  edm::ESHandle<GlobalTrackingGeometry> glbTrackingGeometry;
  eventSetup.get<GlobalTrackingGeometryRecord>().get(glbTrackingGeometry);

  edm::Handle<reco::RecoChargedCandidateCollection> l2mucands, l3mucands;
  edm::Handle<L2MuonTrajectorySeedCollection> l2seeds; 
  edm::Handle<L3MuonTrajectorySeedCollection> l3seeds; 
  reco::RecoChargedCandidateCollection::const_iterator cand, cand2, cand3;

  event.getByLabel (l2seedscollectionTag_,l2seeds);
  event.getByLabel (l3seedscollectionTag_,l3seeds);
  event.getByLabel (l2collectionTag_,l2mucands);
  event.getByLabel (l3collectionTag_,l3mucands);

  edm::Handle<L3MuonTrajectorySeedCollection> l3seedsOIState; 
  edm::Handle<L3MuonTrajectorySeedCollection> l3seedsOIHit; 
  edm::Handle<L3MuonTrajectorySeedCollection> l3seedsIOHit; 
  event.getByLabel (l3seedscollectionTagOIState_,l3seedsOIState);
  event.getByLabel (l3seedscollectionTagOIHit_,l3seedsOIHit);
  event.getByLabel (l3seedscollectionTagIOHit_,l3seedsIOHit);

  edm::Handle<std::vector<TrackCandidate> > l3trkCandsOIState;
  edm::Handle<std::vector<TrackCandidate> > l3trkCandsOIHit;
  edm::Handle<std::vector<TrackCandidate> > l3trkCandsIOHit;
  event.getByLabel (l3trkfindingOIState_,l3trkCandsOIState);
  event.getByLabel (l3trkfindingOIHit_,l3trkCandsOIHit);
  event.getByLabel (l3trkfindingIOHit_,l3trkCandsIOHit);

  edm::Handle<std::vector<reco::Track> > l3trkOIState;
  edm::Handle<std::vector<reco::Track> > l3trkOIHit;
  edm::Handle<std::vector<reco::Track> > l3trkIOHit;
  edm::Handle<std::vector<reco::Track> > l3tktrk;
  event.getByLabel (l3trkOIState_,l3trkOIState);
  event.getByLabel (l3trkOIHit_,l3trkOIHit);
  event.getByLabel (l3trkIOHit_,l3trkIOHit);
  event.getByLabel (l3tktrk_, l3tktrk);

// 
  edm::Handle<std::vector<reco::Track> > l3muonOIState;
  edm::Handle<std::vector<reco::Track> > l3muonOIHit;
  edm::Handle<std::vector<reco::Track> > l3muonIOHit;
  edm::Handle<std::vector<reco::Track> > l3muon;
  event.getByLabel (l3muonsOIState_,l3muonOIState);
  event.getByLabel (l3muonsOIHit_,l3muonOIHit);
  event.getByLabel (l3muonsIOHit_,l3muonIOHit);
  event.getByLabel (l3muons_, l3muon);

//  
  if( !l2seeds.failedToGet() && l2seeds.isValid() ) {
    event.getByLabel (l2collectionTag_,l2mucands);
    if( !l2mucands.failedToGet() && l2mucands->size() != 0 ) {
      event.getByLabel (l3seedscollectionTag_,l3seeds);
      if( !l3seeds.failedToGet() && l3seeds.isValid() ) event.getByLabel (l3collectionTag_,l3mucands);
    }
  }
  
  for( int ntrig = 0; ntrig < nTrigs; ntrig++ ) {
    if( !FiredTriggers[ntrig] ) continue;
    if( !l2seeds.failedToGet() && l2seeds.isValid() ) {
      hNMu[ntrig][3]->Fill(l2seeds->size());
      L2MuonTrajectorySeedCollection::const_iterator l2seed;
      std::map<l1extra::L1MuonParticleRef, int> l1map;
      for (l2seed=l2seeds->begin() ; l2seed != l2seeds->end();++l2seed){
        PTrajectoryStateOnDet state=l2seed->startingState();
        // Transform Trajectory State on Det to a TSOS
        TrajectoryStateTransform tsTransform;
        DetId seedDetId(state.detId());
        const GeomDet* gdet = glbTrackingGeometry->idToDet( seedDetId );
        TrajectoryStateOnSurface tsos = tsTransform.transientState(state, &(gdet->surface()), magField.product());
        float pt = tsos.globalMomentum().perp();
        float eta = tsos.globalPosition().eta();
        float phi = tsos.globalPosition().phi();
        hcharge[ntrig][3]->Fill(tsos.charge());
        hpt[ntrig][3]->Fill(pt);
        hphi[ntrig][3]->Fill(phi);
        heta[ntrig][3]->Fill(eta);
        hetaphi[ntrig][3]->Fill(phi,eta);
        hptphi[ntrig][3]->Fill(pt,phi);
        hpteta[ntrig][3]->Fill(pt,eta);
        l1extra::L1MuonParticleRef l1ref = l2seed->l1Particle();
        l1map[l1ref]++;
        hseedptres[ntrig][0]->Fill(1/pt - 1/l1ref->pt());
        hseedetares[ntrig][0]->Fill(eta - l1ref->eta());
        hseedphires[ntrig][0]->Fill(phi - l1ref->phi());
        hseedptrelres[ntrig][0]->Fill((1/pt - 1/l1ref->pt())/(1/l1ref->pt()));
        hseedetarelres[ntrig][0]->Fill((eta - l1ref->eta())/l1ref->eta());
        hseedphirelres[ntrig][0]->Fill((phi - l1ref->phi())/l1ref->phi());

        hcharge[ntrig][0]->Fill(l1ref->charge());
        hpt[ntrig][0]->Fill(l1ref->pt());
        hphi[ntrig][0]->Fill(l1ref->phi());

        if(hphi[ntrig][0]->getEntries()){
          for(int ibin = 1; ibin <= hphi[ntrig][0]->getNbinsX(); ++ibin)
            hphi_norm[ntrig][0]->setBinContent(ibin, 
                hphi[ntrig][0]->getBinContent(ibin)/hphi[ntrig][0]->getEntries());
        }

        heta[ntrig][0]->Fill(l1ref->eta());
        hetaphi[ntrig][0]->Fill(l1ref->phi(),l1ref->eta());
        hptphi[ntrig][0]->Fill(l1ref->pt(),l1ref->phi());
        hpteta[ntrig][0]->Fill(l1ref->pt(),l1ref->eta());
        hl1quality[ntrig]->Fill(l1ref->gmtMuonCand().quality());
        _hpt1[ntrig][0]->Fill(l1ref->pt());
        _heta1[ntrig][0]->Fill(l1ref->eta());
        _hphi1[ntrig][0]->Fill(l1ref->phi());
        if ( !l2mucands.failedToGet() && l2mucands.isValid() ) {
          for (cand=l2mucands->begin(); cand!=l2mucands->end(); ++cand) {
            reco::TrackRef tk = cand->get<reco::TrackRef>();
            edm::RefToBase<TrajectorySeed> seed=tk->seedRef();
            if ( (l2seed->startingState()).detId() == (seed->startingState()).detId() ) {
              if(tk->pt()*l1ref->pt() != 0 ) {
                hptres[ntrig][0]->Fill(1/l1ref->pt() - 1/tk->pt());
                hptrespt[ntrig][0]->Fill(tk->pt(), 1/l1ref->pt() - 1/tk->pt());
                hptrelres[ntrig][0]->Fill((1/l1ref->pt() - 1/tk->pt())/(1/tk->pt()));
                hptrelrespt[ntrig][0]->Fill(tk->pt(), (1/l1ref->pt() - 1/tk->pt())/(1/tk->pt()));
              }
              _hpt2[ntrig][0]->Fill(l1ref->pt());
              _heta2[ntrig][0]->Fill(l1ref->eta());
              _hphi2[ntrig][0]->Fill(l1ref->phi());
              hetares[ntrig][0]->Fill(l1ref->eta()-tk->eta());
              hetareseta[ntrig][0]->Fill(tk->eta(),l1ref->eta()-tk->eta());
              hetarelres[ntrig][0]->Fill((l1ref->eta()-tk->eta())/tk->eta());
              hetarelreseta[ntrig][0]->Fill(tk->eta(),(l1ref->eta()-tk->eta())/tk->eta());
              hphires[ntrig][0]->Fill(l1ref->phi()-tk->phi());
              double dphi=l1ref->phi()-tk->phi();
              if (dphi>TMath::TwoPi())dphi-=2*TMath::TwoPi();
              else if (dphi<-TMath::TwoPi()) dphi+=TMath::TwoPi();
              hphiresphi[ntrig][0]->Fill(tk->phi(),dphi);
              hphirelres[ntrig][0]->Fill((l1ref->phi()-tk->phi())/tk->phi());
              hphirelresphi[ntrig][0]->Fill(tk->phi(),dphi/tk->phi());
              // charge conversion
              int chargeconv = -1;
              int l1charge = l1ref->charge();
              int l2charge = tk->charge();
              if( l1charge == -1 && l2charge == -1 ) chargeconv = 0;
              else if( l1charge == -1 && l2charge == 1 ) chargeconv = 1;
              else if( l1charge == 1 && l2charge == -1 ) chargeconv = 2;
              else if( l1charge == 1 && l2charge == 1 ) chargeconv = 3;
              hchargeconv[ntrig][0]->Fill(chargeconv);
              _hpt1[ntrig][1]->Fill(tk->pt());
              _heta1[ntrig][1]->Fill(tk->eta());
              _hphi1[ntrig][1]->Fill(tk->phi());
              //find the L3 build from this L2
              if (!l3mucands.failedToGet() && l3mucands.isValid() ) {
                for (cand=l3mucands->begin(); cand!=l3mucands->end(); ++cand) {
                  reco::TrackRef l3tk= cand->get<reco::TrackRef>();
                  if( l3tk->seedRef().castTo<edm::Ref<L3MuonTrajectorySeedCollection> > ().isAvailable() ) {
                    if (l3tk->seedRef().castTo<edm::Ref<L3MuonTrajectorySeedCollection> >()->l2Track() == tk){
                      if(l1ref->pt()*l3tk->pt() != 0 ) {
                        hptres[ntrig][2]->Fill(1/l1ref->pt() - 1/l3tk->pt());
                        hptrespt[ntrig][2]->Fill(l3tk->pt(), 1/l1ref->pt() - 1/l3tk->pt());
                        hptrelres[ntrig][2]->Fill((1/l1ref->pt() - 1/l3tk->pt())/(1/l3tk->pt()));
                        hptrelrespt[ntrig][2]->Fill(l3tk->pt(), (1/l1ref->pt() - 1/l3tk->pt())/(1/l3tk->pt()));
                      }
                      hetares[ntrig][2]->Fill(l1ref->eta()-l3tk->eta());
                      hetareseta[ntrig][2]->Fill(l1ref->eta(),l1ref->eta()-l3tk->eta());
                      hetarelres[ntrig][2]->Fill((l1ref->eta()-l3tk->eta())/l3tk->eta());
                      hetarelreseta[ntrig][2]->Fill(l1ref->eta(),(l1ref->eta()-l3tk->eta())/l3tk->eta());
                      hphires[ntrig][2]->Fill(l1ref->phi()-l3tk->phi());
                      double dphi=l1ref->phi()-l3tk->phi();
                      if (dphi>TMath::TwoPi())dphi-=2*TMath::TwoPi();
                      else if (dphi<-TMath::TwoPi()) dphi+=TMath::TwoPi();
                      hphiresphi[ntrig][2]->Fill(l3tk->phi(),dphi);
                      hphirelres[ntrig][2]->Fill((l1ref->phi()-l3tk->phi())/l3tk->phi());
                      hphirelresphi[ntrig][2]->Fill(l3tk->phi(),(dphi)/l3tk->phi());
                      // charge conversion
                      int chargeconv = -1;
                      int l1charge = l1ref->charge();
                      int l3charge = l3tk->charge();
                      if( l1charge == -1 && l3charge == -1 ) chargeconv = 0;
                      else if( l1charge == -1 && l3charge == 1 ) chargeconv = 1;
                      else if( l1charge == 1 && l3charge == -1 ) chargeconv = 2;
                      else if( l1charge == 1 && l3charge == 1 ) chargeconv = 3;
                      hchargeconv[ntrig][2]->Fill(chargeconv);
                      _hpt2[ntrig][1]->Fill(tk->pt());
                      _heta2[ntrig][1]->Fill(tk->eta());
                      _hphi2[ntrig][1]->Fill(tk->phi());
                      //break; //plot only once per L2?
                    }//if
                  }
                }//for
              }
              break;
            }
          }
        }
      }
      // mapping
      std::map<l1extra::L1MuonParticleRef, int>::iterator it;
      for( it = l1map.begin(); it != l1map.end(); it++ ) {
        hseedNMuper[ntrig][0]->Fill(it->second);
      }
      hNMu[ntrig][0]->Fill(l1map.size());
    }

    if (!l3seedsOIState.failedToGet() && l3seedsOIState.isValid() ) {
      hNMu_OIState[ntrig][4]->Fill(l3seedsOIState->size());

      L3MuonTrajectorySeedCollection::const_iterator l3seedOIState;
      for(l3seedOIState=l3seedsOIState->begin(); l3seedOIState != l3seedsOIState->end(); ++l3seedOIState){
        PTrajectoryStateOnDet state=l3seedOIState->startingState();
        TrajectoryStateTransform tsTransform;
        DetId seedDetId(state.detId());
        const GeomDet* gdet = glbTrackingGeometry->idToDet( seedDetId );
        TrajectoryStateOnSurface tsos = tsTransform.transientState(state, &(gdet->surface()), magField.product());

        float pt = tsos.globalMomentum().perp();
        float eta = tsos.globalPosition().eta();
        float phi = tsos.globalPosition().phi();

        hNMu_l3seed_comp[ntrig][4]->Fill(1);
        hpt_OIState[ntrig][4]->Fill(pt);
        hphi_OIState[ntrig][4]->Fill(phi);
        heta_OIState[ntrig][4]->Fill(eta);
        hetaphi_OIState[ntrig][4]->Fill(phi,eta);
        hptphi_OIState[ntrig][4]->Fill(pt,phi);
        hpteta_OIState[ntrig][4]->Fill(pt,eta);
        hcharge_OIState[ntrig][4]->Fill(tsos.charge());

        //    reco::TrackRef tk = cand->get<reco::TrackRef>(); 
        //    hpt_OIState[ntrig][2]->Fill(tk->pt());

        // OIState track candidate
        //reco::TrackRef l2tkRef = l3seedOIState->l2Track();
      }
    }

    if ( !l3seedsOIHit.failedToGet() && l3seedsOIHit.isValid() && l3seedsOIHit->size() != 0 ) {
      hNMu_OIHit[ntrig][4]->Fill(l3seedsOIHit->size());

      L3MuonTrajectorySeedCollection::const_iterator l3seedOIHit;
      for(l3seedOIHit=l3seedsOIHit->begin(); l3seedOIHit != l3seedsOIHit->end(); ++l3seedOIHit){
        PTrajectoryStateOnDet state=l3seedOIHit->startingState();
        TrajectoryStateTransform tsTransform;
        DetId seedDetId(state.detId());
        const GeomDet* gdet = glbTrackingGeometry->idToDet( seedDetId );
        TrajectoryStateOnSurface tsos = tsTransform.transientState(state, &(gdet->surface()), magField.product());

        float pt = tsos.globalMomentum().perp();
        float eta = tsos.globalPosition().eta();
        float phi = tsos.globalPosition().phi();

        hNMu_l3seed_comp[ntrig][4]->Fill(2);
        hpt_OIHit[ntrig][4]->Fill(pt);
        hphi_OIHit[ntrig][4]->Fill(phi);
        heta_OIHit[ntrig][4]->Fill(eta);
        hetaphi_OIHit[ntrig][4]->Fill(phi,eta);
        hptphi_OIHit[ntrig][4]->Fill(pt,phi);
        hpteta_OIHit[ntrig][4]->Fill(pt,eta);
        hcharge_OIHit[ntrig][4]->Fill(tsos.charge());

        //reco::TrackRef l2tkRef = l3seedOIHit->l2Track();
//        std::cout << "== l3 cascade->l2tk muon pt : " << l2tkRef->pt() << "  eta : " << l2tkRef->eta() << "  phi : " << l2tkRef->phi() << std::endl;
      }
    }

    if ( !l3seedsIOHit.failedToGet() && l3seedsIOHit.isValid() && l3seedsIOHit->size() != 0 ) {
      hNMu_IOHit[ntrig][4]->Fill(l3seedsIOHit->size());


      L3MuonTrajectorySeedCollection::const_iterator l3seedIOHit;
      for(l3seedIOHit=l3seedsIOHit->begin(); l3seedIOHit != l3seedsIOHit->end(); ++l3seedIOHit){
        PTrajectoryStateOnDet state=l3seedIOHit->startingState();
        TrajectoryStateTransform tsTransform;
        DetId seedDetId(state.detId());
        const GeomDet* gdet = glbTrackingGeometry->idToDet( seedDetId );
        TrajectoryStateOnSurface tsos = tsTransform.transientState(state, &(gdet->surface()), magField.product());

        float pt = tsos.globalMomentum().perp();
        float eta = tsos.globalPosition().eta();
        float phi = tsos.globalPosition().phi();


        hNMu_l3seed_comp[ntrig][4]->Fill(3);
        hpt_IOHit[ntrig][4]->Fill(pt);
        hphi_IOHit[ntrig][4]->Fill(phi);
        heta_IOHit[ntrig][4]->Fill(eta);
        hetaphi_IOHit[ntrig][4]->Fill(phi,eta);
        hptphi_IOHit[ntrig][4]->Fill(pt,phi);
        hpteta_IOHit[ntrig][4]->Fill(pt,eta);
        hcharge_IOHit[ntrig][4]->Fill(tsos.charge());

        //reco::TrackRef l2tkRef = l3seedIOHit->l2Track();
      }
    } 


    if (!l3seeds.failedToGet() && l3seeds.isValid() ) {
      hNMu[ntrig][4]->Fill(l3seeds->size());
      L3MuonTrajectorySeedCollection::const_iterator l3seed;
      std::map<reco::TrackRef, int> l2map;
      for (l3seed=l3seeds->begin() ; l3seed != l3seeds->end();++l3seed){
        PTrajectoryStateOnDet state=l3seed->startingState();
        // Transform Trajectory State on Det to a TSOS
        TrajectoryStateTransform tsTransform;
        DetId seedDetId(state.detId());
        const GeomDet* gdet = glbTrackingGeometry->idToDet( seedDetId );
        TrajectoryStateOnSurface tsos = tsTransform.transientState(state, &(gdet->surface()), magField.product());

        float pt = tsos.globalMomentum().perp();
        float eta = tsos.globalPosition().eta();
        float phi = tsos.globalPosition().phi();


        hNMu_l3seed_comp[ntrig][4]->Fill(0);
        hcharge[ntrig][4]->Fill(tsos.charge());
        hpt[ntrig][4]->Fill(pt);
        hphi[ntrig][4]->Fill(phi);
        heta[ntrig][4]->Fill(eta);
        hetaphi[ntrig][4]->Fill(phi,eta);
        hptphi[ntrig][4]->Fill(pt,phi);
        hpteta[ntrig][4]->Fill(pt,eta);

        reco::TrackRef l2tkRef = l3seed->l2Track();

        l2map[l2tkRef]++;
        hseedptres[ntrig][1]->Fill(1/pt - 1/l2tkRef->pt());
        hseedetares[ntrig][1]->Fill(eta - l2tkRef->eta());
        hseedphires[ntrig][1]->Fill(phi - l2tkRef->phi());
        hseedptrelres[ntrig][1]->Fill((1/pt - 1/l2tkRef->pt())/(1/l2tkRef->pt()));
        hseedetarelres[ntrig][1]->Fill((eta - l2tkRef->eta())/l2tkRef->eta());
        hseedphirelres[ntrig][1]->Fill((phi - l2tkRef->phi())/l2tkRef->phi());
      }
      // mapping
      std::map<reco::TrackRef, int>::iterator it;
      for( it = l2map.begin(); it != l2map.end(); it++ ) {
        hseedNMuper[ntrig][1]->Fill(it->second);
      }
    }


    reco::BeamSpot beamSpot;
    edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
    event.getByLabel("hltOnlineBeamSpot",recoBeamSpotHandle);
    if (!recoBeamSpotHandle.failedToGet())  beamSpot = *recoBeamSpotHandle;

    if (!l2mucands.failedToGet() && l2mucands.isValid() ) {
      LogDebug("HLTMuonDQMSource") << " filling L2 stuff " << std::endl;
      edm::Handle<reco::IsoDepositMap> l2depMap;


      if( l2mucands->size() != 0 ) event.getByLabel (l2isolationTag_,l2depMap);
      hNMu[ntrig][1]->Fill(l2mucands->size());
      for (cand=l2mucands->begin(); cand!=l2mucands->end(); ++cand) {
        reco::TrackRef tk = cand->get<reco::TrackRef>();
        if (!l2depMap.failedToGet() && l2depMap.isValid() ) {
          LogDebug("HLTMuonDQMSource") << " filling L2 Iso stuff " << std::endl;
          if ( tk.isNonnull() &&l2depMap->contains(tk.id()) ){
            reco::IsoDepositMap::value_type calDeposit = (*l2depMap)[tk];
            double dephlt = calDeposit.depositWithin(coneSize_);
            if( dephlt != 0 ) hisoL2[ntrig]->Fill(dephlt);
            // 2D plot: cone size vs. dep
            double depL2[10];
            for( int idep = 0; idep < 10; idep++ ) {
              double conesize = (idep + 1)*coneSize_/10.0;
              depL2[idep] = calDeposit.depositWithin(conesize);
              if( depL2[idep] != 0 ) hL2muonIsoDR[ntrig]->Fill(conesize, depL2[idep]);
            }
          }
        }

        // eta cut
        hpt[ntrig][1]->Fill(tk->pt());      
        hcharge[ntrig][1]->Fill(tk->charge()); 
        if ( tk->charge() != 0 ) {
          heta[ntrig][1]->Fill(tk->eta());      
          hphi[ntrig][1]->Fill(tk->phi()); 


          if(hphi[ntrig][1]->getEntries()){
            for(int ibin = 1; ibin <= hphi[ntrig][1]->getNbinsX(); ++ibin)
              hphi_norm[ntrig][1]->setBinContent(ibin, 
                  hphi[ntrig][1]->getBinContent(ibin)/hphi[ntrig][1]->getEntries());
          }

          hetaphi[ntrig][1]->Fill(tk->phi(),tk->eta()); 
          hptphi[ntrig][1]->Fill(tk->pt(),tk->phi()); 
          hpteta[ntrig][1]->Fill(tk->pt(),tk->eta()); 
          const reco::HitPattern& hitp = tk->hitPattern();
          hnHits[ntrig][1]->Fill(hitp.numberOfHits()); 
          hnValidHits[ntrig]->Fill(hitp.numberOfValidHits()); 
          hd0[ntrig][0]->Fill(tk->d0()); 
          if (!recoBeamSpotHandle.failedToGet()){
            hdr[ntrig][0]->Fill(tk->dxy(beamSpot.position()));  
            hdrphi[ntrig][0]->Fill(tk->phi(),tk->dxy(beamSpot.position())); 
            hdz[ntrig][0]->Fill(tk->dz(beamSpot.position())); 
            hdzeta[ntrig][0]->Fill(tk->eta(),tk->dz(beamSpot.position()));
          } 
          hd0phi[ntrig][0]->Fill(tk->phi(),tk->d0()); 
          hdz0[ntrig][0]->Fill(tk->dz()); 
          hdz0eta[ntrig][0]->Fill(tk->eta(),tk->dz());
          herr0[ntrig][0]->Fill(tk->error(0)); 
          cand2=cand;
          ++cand2;
          for (; cand2!=l2mucands->end(); cand2++) {
            reco::TrackRef tk2=cand2->get<reco::TrackRef>();
            if ( tk->charge()*tk2->charge() == -1 ){
              double mass=(cand->p4()+cand2->p4()).M();
              hdimumass[ntrig][0]->Fill(mass);
            }
          }
        } else edm::LogWarning("HLTMonMuon")<<"stop filling candidate with update@Vtx failure";
      }
    }

    if (!l3mucands.failedToGet() && l3mucands.isValid() ) {
      LogDebug("HLTMuonDQMSource") << " filling L3 stuff " << std::endl;
      hNMu[ntrig][2]->Fill(l3mucands->size());
      edm::Handle<reco::IsoDepositMap> l3depMap;

      if( l3mucands->size() != 0 ) event.getByLabel (l3isolationTag_,l3depMap);
      for (cand=l3mucands->begin(); cand!=l3mucands->end(); ++cand) {
        reco::TrackRef tk = cand->get<reco::TrackRef>();
        if (!l3depMap.failedToGet() && l3depMap.isValid() ) {
          if ( tk.isNonnull() && l3depMap->contains(tk.id()) ){
            reco::IsoDepositMap::value_type calDeposit= (*l3depMap)[tk];
            double dephlt = calDeposit.depositWithin(coneSize_);
            if( dephlt != 0 ) hisoL3[ntrig]->Fill(dephlt);
            double depL3[10];
            for( int idep = 0; idep < 10; idep++ ) {
              double conesize = ( idep + 1 ) * coneSize_/10.0;
              depL3[idep] = calDeposit.depositWithin(conesize);
              if( depL3[idep] != 0 ) hL3muonIsoDR[ntrig]->Fill(conesize,depL3[idep]);
            }
          }
        }
        // eta cut
        hpt[ntrig][2]->Fill(tk->pt());      
        heta[ntrig][2]->Fill(tk->eta());      
        hphi[ntrig][2]->Fill(tk->phi()); 

        if(hphi[ntrig][2]->getEntries()){
          for(int ibin = 1; ibin <= hphi[ntrig][2]->getNbinsX(); ++ibin)
            hphi_norm[ntrig][2]->setBinContent(ibin, 
                hphi[ntrig][2]->getBinContent(ibin)/hphi[ntrig][2]->getEntries());
        }

        hetaphi[ntrig][2]->Fill(tk->phi(),tk->eta()); 
        hptphi[ntrig][2]->Fill(tk->pt(),tk->phi()); 
        hpteta[ntrig][2]->Fill(tk->pt(),tk->eta()); 
        const reco::HitPattern& hitp = tk->hitPattern();
        hnHits[ntrig][2]->Fill(hitp.numberOfHits()); 
        hnTkValidHits[ntrig]->Fill(hitp.numberOfValidTrackerHits()); 
        hnPixelValidHits[ntrig]->Fill(hitp.numberOfValidPixelHits()); 
        hnStripValidHits[ntrig]->Fill(hitp.numberOfValidStripHits()); 
        hnMuValidHits[ntrig]->Fill(hitp.numberOfValidMuonHits()); 
        hd0[ntrig][1]->Fill(tk->d0()); 
        if (!recoBeamSpotHandle.failedToGet()) {
          hdr[ntrig][1]->Fill(tk->dxy(beamSpot.position()));
          hdrphi[ntrig][1]->Fill(tk->phi(),tk->dxy(beamSpot.position())); 
          hdz[ntrig][1]->Fill(tk->dz(beamSpot.position())); 
          hdzeta[ntrig][1]->Fill(tk->eta(),tk->dz(beamSpot.position()));
        }
        hd0phi[ntrig][1]->Fill(tk->phi(),tk->d0()); 
        hdz0[ntrig][1]->Fill(tk->dz()); 
        hdz0eta[ntrig][1]->Fill(tk->eta(),tk->dz());
        herr0[ntrig][1]->Fill(tk->error(0)); 
        hcharge[ntrig][2]->Fill(tk->charge()); 
        cand2=cand;
        ++cand2;

        for (; cand2!=l3mucands->end(); cand2++) {
          reco::TrackRef tk2=cand2->get<reco::TrackRef>();
          if ( tk->charge()*tk2->charge() == -1 ){
            double mass=(cand->p4()+cand2->p4()).M();
            hdimumass[ntrig][1]->Fill(mass);
          }
        }
        if( tk->seedRef().castTo<edm::Ref<L3MuonTrajectorySeedCollection> >().isAvailable() ) {
          reco::TrackRef l2tk = tk->seedRef().castTo<edm::Ref<L3MuonTrajectorySeedCollection> >()->l2Track();
          if(tk->pt()*l2tk->pt() != 0 ) {
            hptres[ntrig][1]->Fill(1/l2tk->pt() - 1/tk->pt());
            hptrespt[ntrig][1]->Fill(tk->pt(), 1/l2tk->pt() - 1/tk->pt());
            hptrelres[ntrig][1]->Fill((1/l2tk->pt() - 1/tk->pt())/(1/tk->pt()));
            hptrelrespt[ntrig][1]->Fill(tk->pt(), (1/l2tk->pt() - 1/tk->pt())/(1/tk->pt()));
            double pterr = (tk->ptError()/(tk->pt()*tk->pt()));
            hptpull[ntrig]->Fill((1/l2tk->pt() - 1/tk->pt())/pterr);
            hptpullpt[ntrig]->Fill(tk->pt(), (1/l2tk->pt() - 1/tk->pt())/pterr);
          }
          hphires[ntrig][1]->Fill(l2tk->phi()-tk->phi());
          double dphi=l2tk->phi()-tk->phi();
          if (dphi>TMath::TwoPi())dphi-=2*TMath::TwoPi();
          else if (dphi<-TMath::TwoPi()) dphi+=TMath::TwoPi();
          hphiresphi[ntrig][1]->Fill(tk->phi(),dphi);
          hphirelres[ntrig][1]->Fill((l2tk->phi()-tk->phi())/tk->phi());
          hphirelresphi[ntrig][1]->Fill(tk->phi(),dphi/tk->phi());
          hphipull[ntrig]->Fill(dphi/tk->phiError());
          hphipullphi[ntrig]->Fill(tk->phi(), dphi/tk->phiError());
          hetares[ntrig][1]->Fill(l2tk->eta()-tk->eta());
          hetareseta[ntrig][1]->Fill(tk->eta(),l2tk->eta()-tk->eta());
          hetarelres[ntrig][1]->Fill((l2tk->eta()-tk->eta())/tk->eta());
          hetarelreseta[ntrig][1]->Fill(tk->eta(),(l2tk->eta()-tk->eta())/tk->eta());
          hetapull[ntrig]->Fill((l2tk->eta()-tk->eta())/tk->etaError());
          hetapulleta[ntrig]->Fill(tk->eta(),(l2tk->eta()-tk->eta())/tk->etaError());
          // charge conversion
          int chargeconv = -1;
          int l2charge = l2tk->charge();
          int l3charge = tk->charge();
          if( l2charge == -1 && l3charge == -1 ) chargeconv = 0;
          else if( l2charge == -1 && l3charge == 1 ) chargeconv = 1;
          else if( l2charge == 1 && l3charge == -1 ) chargeconv = 2;
          else if( l2charge == 1 && l3charge == 1 ) chargeconv = 3;
          hchargeconv[ntrig][1]->Fill(chargeconv);
        }
      }
    }
    // l3 matching

//    std::vector<reco::Track>::const_iterator l3MatchedTrk = l3tktrk->end();
    double bpt = -999.;
    double beta = -999.;
    double bphi = -999.;
    if( !l3mucands.failedToGet() && l3mucands.isValid() ) {
      for(reco::RecoChargedCandidateCollection::const_iterator i = l3mucands->begin(); i != l3mucands->end(); i++ ) {
        double dR_min_tk=1e9;
        if( !l3tktrk.failedToGet() && l3tktrk.isValid() ) {
          for( std::vector<reco::Track>::const_iterator itl3trk = l3tktrk->begin(); itl3trk !=l3tktrk->end(); itl3trk++ ) {
            double dR = deltaR(i->eta(), i->phi(),itl3trk->eta(),itl3trk->phi());
            if( dR < dR_min_tk ) {
              dR_min_tk=dR ;
              bpt = itl3trk->pt();
              beta = itl3trk->eta();
              bphi = itl3trk->phi();
//              l3MatchedTrk = itl3trk;
            }
          }
        }
        if( bpt !=-999 && beta != -999 && bphi != -999  ) {
          hptres_L3L3trk[ntrig][2]->Fill(1/i->pt() - 1/bpt);
          hetares_L3L3trk[ntrig][2]->Fill(i->eta() - beta);
          hphires_L3L3trk[ntrig][2]->Fill(i->phi() - bphi);
          hptrelres_L3L3trk[ntrig][2]->Fill( (1/i->pt() - 1/bpt)/(1/i->pt()) );
          hetarelres_L3L3trk[ntrig][2]->Fill( (i->eta() - beta)/i->eta() );
          hphirelres_L3L3trk[ntrig][2]->Fill( (i->phi() - bphi)/i->phi() );
        }
      }
    }
    std::vector<reco::Track>::const_iterator itl3mu;
    if( !l3muon.failedToGet() && l3muon.isValid() ) {
      for( itl3mu = l3muon->begin(); itl3mu != l3muon->end(); itl3mu++ ) {
        hNMu_comp[ntrig][2]->Fill(0);
      }
    }

    std::vector<reco::Track>::const_iterator itl3muOIState;
    if( !l3muonOIState.failedToGet() && l3muonOIState.isValid() && l3muonOIState->size() > 0 ) {
      hNMu_OIState[ntrig][2]->Fill(l3muonOIState->size());
      for( itl3muOIState = l3muonOIState->begin(); itl3muOIState != l3muonOIState->end(); itl3muOIState++ ) {
        hNMu_comp[ntrig][2]->Fill(1);
        hcharge_OIState[ntrig][2]->Fill(itl3muOIState->charge());
        hpt_OIState[ntrig][2]->Fill(itl3muOIState->pt());
        hphi_OIState[ntrig][2]->Fill(itl3muOIState->phi());
        heta_OIState[ntrig][2]->Fill(itl3muOIState->eta());
        hetaphi_OIState[ntrig][2]->Fill(itl3muOIState->phi(),itl3muOIState->eta());
        hptphi_OIState[ntrig][2]->Fill(itl3muOIState->pt(),itl3muOIState->phi());
        hpteta_OIState[ntrig][2]->Fill(itl3muOIState->pt(),itl3muOIState->eta());

        hd0_OIState[ntrig][2]->Fill(itl3muOIState->d0()); 
        if( !recoBeamSpotHandle.failedToGet()) {
          hdz_OIState[ntrig][2]->Fill(itl3muOIState->dz(beamSpot.position()));
          hdr_OIState[ntrig][2]->Fill(itl3muOIState->dxy(beamSpot.position()));
        }
       //hpt_l3muOIState[ntrig][2]->Fill(itl3muOIState->pt());
      }
    } 
    std::vector<reco::Track>::const_iterator itl3muOIHit;
    if( !l3muonOIHit.failedToGet() && l3muonOIHit.isValid() && l3muonOIHit->size() > 0 ) {
      hNMu_OIHit[ntrig][2]->Fill(l3muonOIHit->size());
      for( itl3muOIHit = l3muonOIHit->begin(); itl3muOIHit != l3muonOIHit->end(); itl3muOIHit++ ) {
        hNMu_comp[ntrig][2]->Fill(2);
        hcharge_OIHit[ntrig][2]->Fill(itl3muOIHit->charge());
        hpt_OIHit[ntrig][2]->Fill(itl3muOIHit->pt());
        hphi_OIHit[ntrig][2]->Fill(itl3muOIHit->phi());
        heta_OIHit[ntrig][2]->Fill(itl3muOIHit->eta());
        hetaphi_OIHit[ntrig][2]->Fill(itl3muOIHit->phi(),itl3muOIHit->eta());
        hptphi_OIHit[ntrig][2]->Fill(itl3muOIHit->pt(),itl3muOIHit->phi());
        hpteta_OIHit[ntrig][2]->Fill(itl3muOIHit->pt(),itl3muOIHit->eta());

        hd0_OIHit[ntrig][2]->Fill(itl3muOIHit->d0()); 
        if( !recoBeamSpotHandle.failedToGet()) {
          hdz_OIHit[ntrig][2]->Fill(itl3muOIHit->dz(beamSpot.position()));
          hdr_OIHit[ntrig][2]->Fill(itl3muOIHit->dxy(beamSpot.position()));
        }
       //hpt_l3muOIHit[ntrig][2]->Fill(itl3muOIHit->pt());
      }
    } 
    std::vector<reco::Track>::const_iterator itl3muIOHit;
    if( !l3muonIOHit.failedToGet() && l3muonIOHit.isValid() && l3muonIOHit->size() > 0 ) {
      hNMu_IOHit[ntrig][2]->Fill(l3muonIOHit->size());
      for( itl3muIOHit = l3muonIOHit->begin(); itl3muIOHit != l3muonIOHit->end(); itl3muIOHit++ ) {
        hNMu_comp[ntrig][2]->Fill(3);
        hcharge_IOHit[ntrig][2]->Fill(itl3muIOHit->charge());
        hpt_IOHit[ntrig][2]->Fill(itl3muIOHit->pt());
        hphi_IOHit[ntrig][2]->Fill(itl3muIOHit->phi());
        heta_IOHit[ntrig][2]->Fill(itl3muIOHit->eta());
        hetaphi_IOHit[ntrig][2]->Fill(itl3muIOHit->phi(),itl3muIOHit->eta());
        hptphi_IOHit[ntrig][2]->Fill(itl3muIOHit->pt(),itl3muIOHit->phi());
        hpteta_IOHit[ntrig][2]->Fill(itl3muIOHit->pt(),itl3muIOHit->eta());

        hd0_IOHit[ntrig][2]->Fill(itl3muIOHit->d0()); 
        if( !recoBeamSpotHandle.failedToGet()) {
          hdz_IOHit[ntrig][2]->Fill(itl3muIOHit->dz(beamSpot.position()));
          hdr_IOHit[ntrig][2]->Fill(itl3muIOHit->dxy(beamSpot.position()));
        }
      //hpt_l3muIOHit[ntrig][2]->Fill(itl3muIOHit->pt());
      }
    } 
    // l3 muon tracker track
    std::vector<reco::Track>::const_iterator itl3tktrk;
    if( l3tktrk.failedToGet() && l3tktrk.isValid() ) {
      hNMu_trk[ntrig][2]->Fill(l3tktrk->size());
      for( itl3tktrk = l3tktrk->begin(); itl3tktrk != l3tktrk->end(); itl3tktrk++ ) {
        hNMu_trk_comp[ntrig][2]->Fill(0);
        hcharge_trk[ntrig][2]->Fill(itl3tktrk->charge());
        hpt_trk[ntrig][2]->Fill(itl3tktrk->pt());
        hphi_trk[ntrig][2]->Fill(itl3tktrk->phi());
        heta_trk[ntrig][2]->Fill(itl3tktrk->eta());
        hetaphi_trk[ntrig][2]->Fill(itl3tktrk->phi(),itl3tktrk->eta());
        hptphi_trk[ntrig][2]->Fill(itl3tktrk->pt(),itl3tktrk->phi());
        hpteta_trk[ntrig][2]->Fill(itl3tktrk->pt(),itl3tktrk->eta());

        //hd0_trk[ntrig][2]->Fill(tk->d0()); 
        hd0_trk[ntrig][2]->Fill(itl3tktrk->d0()); 
        if( !recoBeamSpotHandle.failedToGet()) {
          hdz_trk[ntrig][2]->Fill(itl3tktrk->dz(beamSpot.position()));
          hdr_trk[ntrig][2]->Fill(itl3tktrk->dxy(beamSpot.position()));
        }
      }
    }
    // l3 OIState tracker info.
    std::vector<reco::Track>::const_iterator itl3trkOIState;
    if( !l3trkOIState.failedToGet() && l3trkOIState.isValid() && l3trkOIState->size() > 0 ) {
      hNMu_trk_OIState[ntrig][2]->Fill(l3trkOIState->size());
      for( itl3trkOIState = l3trkOIState->begin(); itl3trkOIState != l3trkOIState->end(); itl3trkOIState++ ) {

        hNMu_trk_comp[ntrig][2]->Fill(1);
        hcharge_trk_OIState[ntrig][2]->Fill(itl3trkOIState->charge());
        hpt_trk_OIState[ntrig][2]->Fill(itl3trkOIState->pt());
        hphi_trk_OIState[ntrig][2]->Fill(itl3trkOIState->phi());
        heta_trk_OIState[ntrig][2]->Fill(itl3trkOIState->eta());
        hetaphi_trk_OIState[ntrig][2]->Fill(itl3trkOIState->phi(),itl3trkOIState->eta());
        hptphi_trk_OIState[ntrig][2]->Fill(itl3trkOIState->pt(),itl3trkOIState->phi());
        hpteta_trk_OIState[ntrig][2]->Fill(itl3trkOIState->pt(),itl3trkOIState->eta());

        hd0_trk_OIState[ntrig][2]->Fill(itl3trkOIState->d0()); 
        if( !recoBeamSpotHandle.failedToGet()) {
          hdz_trk_OIState[ntrig][2]->Fill(itl3trkOIState->dz(beamSpot.position()));
          hdr_trk_OIState[ntrig][2]->Fill(itl3trkOIState->dxy(beamSpot.position()));
        }
      }
    }
    // l3 OIHit tracker info.
    std::vector<reco::Track>::const_iterator itl3trkOIHit;
    if( !l3trkOIHit.failedToGet() && l3trkOIHit.isValid() && l3trkOIHit->size() >0 ) {
      hNMu_trk_OIHit[ntrig][2]->Fill(l3trkOIHit->size());
      for( itl3trkOIHit = l3trkOIHit->begin(); itl3trkOIHit != l3trkOIHit->end(); itl3trkOIHit++ ) {

        hNMu_trk_comp[ntrig][2]->Fill(2);
        hcharge_trk_OIHit[ntrig][2]->Fill(itl3trkOIHit->charge());
        hpt_trk_OIHit[ntrig][2]->Fill(itl3trkOIHit->pt());
        hphi_trk_OIHit[ntrig][2]->Fill(itl3trkOIHit->phi());
        heta_trk_OIHit[ntrig][2]->Fill(itl3trkOIHit->eta());
        hetaphi_trk_OIHit[ntrig][2]->Fill(itl3trkOIHit->phi(),itl3trkOIHit->eta());
        hptphi_trk_OIHit[ntrig][2]->Fill(itl3trkOIHit->pt(),itl3trkOIHit->phi());
        hpteta_trk_OIHit[ntrig][2]->Fill(itl3trkOIHit->pt(),itl3trkOIHit->eta());

        hd0_trk_OIHit[ntrig][2]->Fill(itl3trkOIHit->d0()); 
        if( !recoBeamSpotHandle.failedToGet()) {
          hdz_trk_OIHit[ntrig][2]->Fill(itl3trkOIHit->dz(beamSpot.position()));
          hdr_trk_OIHit[ntrig][2]->Fill(itl3trkOIHit->dxy(beamSpot.position()));
        }
      }
    }
    // l3 IOHit tracker info.
    std::vector<reco::Track>::const_iterator itl3trkIOHit;
    if( !l3trkIOHit.failedToGet() && l3trkIOHit.isValid() && l3trkIOHit->size() > 0 ) {
      hNMu_trk_IOHit[ntrig][2]->Fill(l3trkIOHit->size());
      for( itl3trkIOHit = l3trkIOHit->begin(); itl3trkIOHit != l3trkIOHit->end(); itl3trkIOHit++ ) {

        hNMu_trk_comp[ntrig][2]->Fill(3);
        hcharge_trk_IOHit[ntrig][2]->Fill(itl3trkIOHit->charge());
        hpt_trk_IOHit[ntrig][2]->Fill(itl3trkIOHit->pt());
        hphi_trk_IOHit[ntrig][2]->Fill(itl3trkIOHit->phi());
        heta_trk_IOHit[ntrig][2]->Fill(itl3trkIOHit->eta());
        hetaphi_trk_IOHit[ntrig][2]->Fill(itl3trkIOHit->phi(),itl3trkIOHit->eta());
        hptphi_trk_IOHit[ntrig][2]->Fill(itl3trkIOHit->pt(),itl3trkIOHit->phi());
        hpteta_trk_IOHit[ntrig][2]->Fill(itl3trkIOHit->pt(),itl3trkIOHit->eta());

        hd0_trk_IOHit[ntrig][2]->Fill(itl3trkIOHit->d0()); 
        if( !recoBeamSpotHandle.failedToGet()) {
          hdr_trk_IOHit[ntrig][2]->Fill(itl3trkIOHit->dxy(beamSpot.position()));
          hdz_trk_IOHit[ntrig][2]->Fill(itl3trkIOHit->dz(beamSpot.position()));
        }
      }
    }

    for( int level = 0; level < 2; level++ ) {  
      for( int nbin = 1; nbin < _hpt1[ntrig][level]->GetNbinsX()+1; nbin++ ) {
        if( _hpt1[ntrig][level]->GetBinContent(nbin) != 0 ) {
          double frac = _hpt2[ntrig][level]->GetBinContent(nbin)/_hpt1[ntrig][level]->GetBinContent(nbin);
          double err = sqrt(frac*fabs(1 - frac)/_hpt1[ntrig][level]->GetBinContent(nbin));
          hptfrac[ntrig][level]->setBinContent(nbin, frac);
          hptfrac[ntrig][level]->setBinError(nbin, err);
        }
        if( _heta1[ntrig][level]->GetBinContent(nbin) != 0 ) {
          double frac = _heta2[ntrig][level]->GetBinContent(nbin)/_heta1[ntrig][level]->GetBinContent(nbin);
          double err = sqrt(frac*fabs(1 - frac)/_heta1[ntrig][level]->GetBinContent(nbin));
          hetafrac[ntrig][level]->setBinContent(nbin, frac);
          hetafrac[ntrig][level]->setBinError(nbin, err);
        }
        if( _hphi1[ntrig][level]->GetBinContent(nbin) != 0 ) {
          double frac = _hphi2[ntrig][level]->GetBinContent(nbin)/_hphi1[ntrig][level]->GetBinContent(nbin);
          double err = sqrt(frac*fabs(1 - frac)/_hphi1[ntrig][level]->GetBinContent(nbin));
          hphifrac[ntrig][level]->setBinContent(nbin, frac);
          hphifrac[ntrig][level]->setBinError(nbin, err);
        }
        else {
          hptfrac[ntrig][level]->setBinContent(nbin, 0.0);
          hetafrac[ntrig][level]->setBinContent(nbin, 0.0);
          hphifrac[ntrig][level]->setBinContent(nbin, 0.0);
          hptfrac[ntrig][level]->setBinError(nbin, 0.0);
          hetafrac[ntrig][level]->setBinError(nbin, 0.0);
          hphifrac[ntrig][level]->setBinError(nbin, 0.0);
        }
      }
    }
  }


  // Tower
  edm::Handle<CaloTowerCollection> caloTower; 
  if( !l2mucands.failedToGet() && l2mucands->size() != 0 )
    event.getByLabel(edm::InputTag("hltTowerMakerForMuons"), caloTower);
  for( int ntrig = 0; ntrig < nTrigs; ntrig++ ) {
    if( !FiredTriggers[ntrig] ) continue;
    if( caloTower.isValid() ) {
      CaloTowerCollection::const_iterator itower;
      for( itower = caloTower->begin(); itower != caloTower->end(); ++itower ) {
        if( (*itower).et() == 0 ) continue;

        // deltaR with l2muon
        if (!l2mucands.failedToGet() && l2mucands.isValid() ) {
          for (cand=l2mucands->begin(); cand!=l2mucands->end(); ++cand) {
            reco::TrackRef l2tk= cand->get<reco::TrackRef>();
            double deltaR_l2 = reco::deltaR(*l2tk, (*itower));
            htowerdRL2[ntrig]->Fill(deltaR_l2);
          }
        }
        // deltaR with l3muon
        if (!l3mucands.failedToGet() && l3mucands.isValid() ) {
          for (cand=l3mucands->begin(); cand!=l3mucands->end(); ++cand) {
            reco::TrackRef l3tk= cand->get<reco::TrackRef>();
            double deltaR_l3 = reco::deltaR(*l3tk, (*itower));
            htowerdRL3[ntrig]->Fill(deltaR_l3);
          }
        }
        htowerEt[ntrig]->Fill((*itower).et());
        htowerPhi[ntrig]->Fill((*itower).phi());
        htowerEta[ntrig]->Fill((*itower).eta());

        // energy contributions from different detectors
        // energy in HO ("outerEnergy")is not included in "hadEnergy"
        htowerOuterEnergy[ntrig]->Fill((*itower).outerEnergy());
        htowerHadEnergy[ntrig]->Fill((*itower).hadEnergy());
        htowerEmEnergy[ntrig]->Fill((*itower).emEnergy());

        htowerOuterEt[ntrig]->Fill((*itower).outerEt());
        htowerHadEt[ntrig]->Fill((*itower).hadEt());
        htowerEmEt[ntrig]->Fill((*itower).emEt());

        // 2D plots
        htowerPhiOuterEt[ntrig]->Fill((*itower).phi(), (*itower).outerEt());
        htowerPhiHadEt[ntrig]->Fill((*itower).phi(), (*itower).hadEt());
        htowerPhiEmEt[ntrig]->Fill((*itower).phi(), (*itower).emEt());
        htowerEtaOuterEt[ntrig]->Fill((*itower).eta(), (*itower).outerEt());
        htowerEtaHadEt[ntrig]->Fill((*itower).eta(), (*itower).hadEt());
        htowerEtaEmEt[ntrig]->Fill((*itower).eta(), (*itower).emEt());
      }
    }
  }
}
void HLTMuonDQMSource::beginJob ( void  ) [protected, virtual]

BeginJob.

book some histograms here

Reimplemented from edm::EDAnalyzer.

Definition at line 171 of file HLTMuonDQMSource.cc.

References _heta1, _heta2, _hphi1, _hphi2, _hpt1, _hpt2, DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookProfile(), DQMStore::bookString(), dbe_, hcharge, hcharge_IOHit, hcharge_OIHit, hcharge_OIState, hcharge_trk, hcharge_trk_IOHit, hcharge_trk_OIHit, hcharge_trk_OIState, hchargeconv, hd0, hd0_IOHit, hd0_OIHit, hd0_OIState, hd0_trk, hd0_trk_IOHit, hd0_trk_OIHit, hd0_trk_OIState, hd0phi, hdimumass, hdr, hdr_IOHit, hdr_OIHit, hdr_OIState, hdr_trk, hdr_trk_IOHit, hdr_trk_OIHit, hdr_trk_OIState, hdrphi, hdz, hdz0, hdz0eta, hdz_IOHit, hdz_OIHit, hdz_OIState, hdz_trk, hdz_trk_IOHit, hdz_trk_OIHit, hdz_trk_OIState, hdzeta, herr0, heta, heta_IOHit, heta_OIHit, heta_OIState, heta_trk, heta_trk_IOHit, heta_trk_OIHit, heta_trk_OIState, hetafrac, hetaphi, hetaphi_IOHit, hetaphi_OIHit, hetaphi_OIState, hetaphi_trk, hetaphi_trk_IOHit, hetaphi_trk_OIHit, hetaphi_trk_OIState, hetapull, hetapulleta, hetarelres, hetarelres_L3L3trk, hetarelreseta, hetares, hetares_L3L3trk, hetareseta, hisoL2, hisoL3, hl1quality, hL2muonIsoDR, hL3muonIsoDR, hnHits, hNMu, hNMu_comp, hNMu_IOHit, hNMu_l3seed_comp, hNMu_OIHit, hNMu_OIState, hNMu_trk, hNMu_trk_comp, hNMu_trk_IOHit, hNMu_trk_OIHit, hNMu_trk_OIState, hnMuValidHits, hnPixelValidHits, hnStripValidHits, hnTkValidHits, hnValidHits, hphi, hphi_IOHit, hphi_norm, hphi_OIHit, hphi_OIState, hphi_trk, hphi_trk_IOHit, hphi_trk_OIHit, hphi_trk_OIState, hphifrac, hphipull, hphipullphi, hphirelres, hphirelres_L3L3trk, hphirelresphi, hphires, hphires_L3L3trk, hphiresphi, hpt, hpt_IOHit, hpt_OIHit, hpt_OIState, hpt_trk, hpt_trk_IOHit, hpt_trk_OIHit, hpt_trk_OIState, hpteta, hpteta_IOHit, hpteta_OIHit, hpteta_OIState, hpteta_trk, hpteta_trk_IOHit, hpteta_trk_OIHit, hpteta_trk_OIState, hptfrac, hptphi, hptphi_IOHit, hptphi_OIHit, hptphi_OIState, hptphi_trk, hptphi_trk_IOHit, hptphi_trk_OIHit, hptphi_trk_OIState, hptpull, hptpullpt, hptrelres, hptrelres_L3L3trk, hptrelrespt, hptres, hptres_L3L3trk, hptrespt, hseedetarelres, hseedetares, hseedNMuper, hseedphirelres, hseedphires, hseedptrelres, hseedptres, htowerdRL2, htowerdRL3, htowerEmEnergy, htowerEmEt, htowerEt, htowerEta, htowerEtaEmEt, htowerEtaHadEt, htowerEtaOuterEt, htowerHadEnergy, htowerHadEt, htowerOuterEnergy, htowerOuterEt, htowerPhi, htowerPhiEmEt, htowerPhiHadEt, htowerPhiOuterEt, i, testEve_cfg::level, monitorName_, mergeVDriftHistosByStation::name, NBINS, nTrigs, prescaleEvt_, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), DQMStore::showDirStructure(), striggers_, DQMStore::tagContents(), theDirectoryName, theHLTCollectionLevel, theTriggerBits, indexGen::title, verbose_, XMAX, and XMIN.

{
  if (dbe_) {
    //dbe_->setCurrentFolder("monitorName_");
    if (monitorName_ != "" ) monitorName_ = monitorName_+"/" ;
    edm::LogInfo("HLTMuonDQMSource") << "===>DQM event prescale = " << prescaleEvt_ << " events "<< std::endl;


    int NBINS = 50; XMIN = 0; XMAX = 50;

    // create and cd into new folder
    char name[512], title[512];
    double pt_max;
    std::string dirname;

    for( int trig = 0; trig < nTrigs; trig++ ) {
      dirname = theDirectoryName[trig]+"/";

      for(unsigned int i = 0; i < theHLTCollectionLevel.size(); ++i){
        if(theHLTCollectionLevel[i] == theDirectoryName[trig]) {
          if(!strcmp(striggers_[trig].c_str(), "")) striggers_[trig] = theTriggerBits[i];
          else striggers_[trig] += ", " + theTriggerBits[i];
        }
      }
      dbe_->setCurrentFolder(monitorName_ + dirname);
      sprintf(name,"%s triggers",theDirectoryName[trig].c_str());
      dbe_->bookString(name,striggers_[trig]);

      for ( int level = 1; level < 7; ++level ) {
        if( level < 4 ) sprintf(name,"Level%i",level);
        else if (level == 4 ) sprintf(name,"Level%iSeed", level-2);
        else if (level == 5 ) sprintf(name,"Level%iSeed", level-2);
        else if (level == 6 ) sprintf(name,"Isolation");

        if( level == 1 ) pt_max = 145;
        else pt_max = 200;
        dbe_->setCurrentFolder(monitorName_+dirname+name);
        if( level == 1 ) hl1quality[trig] = dbe_->book1D("h1L1Quality","GMT quality Flag", 8, 0., 8.);
        if( level == 2 ) {
          hnHits[trig][level-1] = dbe_->book1D(name,title, NBINS, 0., 100.);
          hnValidHits[trig] = dbe_->book1D("HLTMuonL2_nValidHits", "L2 Number of Valid Hits", NBINS, 0., 100.);
          hnValidHits[trig]->setAxisTitle("Number of Valid Hits", 1);
        }
        if( level == 3 ) {

          hnTkValidHits[trig] = dbe_->book1D("HLTMuonL3_nTkValidHits", "L3 Number of Valid Tracker Hits", 30, 0., 30.);
          hnTkValidHits[trig]->setAxisTitle("Number of Valid Tracker Hits", 1);
          hnPixelValidHits[trig] = dbe_->book1D("HLTMuonL3_nPixelValidHits", "L3 Number of Valid Pixel Hits", 10, 0., 10.);
          hnPixelValidHits[trig]->setAxisTitle("Number of Valid Pixel Hits", 1);
          hnStripValidHits[trig] = dbe_->book1D("HLTMuonL3_nStripValidHits", "L3 Number of Valid Strip Hits", 20, 0., 20.);
          hnStripValidHits[trig]->setAxisTitle("Number of Valid Strip Hits", 1);
          hnMuValidHits[trig] = dbe_->book1D("HLTMuonL3_nMuValidHits", "L3 Number of Valid Muon Hits", 100, 0., 100.);
          hnMuValidHits[trig]->setAxisTitle("Number of Valid Muon Hits", 1);
        }
        if( level == 1 ) {
          int eta_nbin = 62;
          float eta_bins[63] = {
            -2.40, -2.35, -2.30, -2.25, -2.20, -2.15, -2.10, -2.05,
            -2.00, -1.95, -1.90, -1.85, -1.80, -1.75, -1.70, -1.60,
            -1.50, -1.40, -1.30, -1.20, -1.10, -1.00, -0.90, -0.80,
            -0.70, -0.60, -0.50, -0.40, -0.30, -0.20, -0.10, -0.00,
            0.10,  0.20,  0.30,  0.40,  0.50,  0.60,  0.70,  0.80,
            0.90,  1.00,  1.10,  1.20,  1.30,  1.40,  1.50,  1.60,
            1.70,  1.75,  1.80,  1.85,  1.90,  1.95,  2.00,  2.05,
            2.10,  2.15,  2.20,  2.25,  2.30,  2.35,  2.40
          };
          int phi_nbin = 144;            
          float phi_bins[145];
          for( int ibin = 0; ibin < 145; ibin++ ) {
            phi_bins[ibin] = -3.15 + (ibin)*(6.30/144);
          }
          float pt_bins[51];
          for( int ibin = 0; ibin < 51; ibin++ ) {
            pt_bins[ibin] = ibin*(145./50.);
          }
          sprintf(name,"HLTMuonL%i_NMu",level);
          sprintf(title,"L%i number of muons",level);
          hNMu[trig][level-1] = dbe_->book1D(name,title, 11, -0.5, 10.5);
          hNMu[trig][level-1]->setAxisTitle("Number of muons", 1);
          sprintf(name,"HLTMuonL%i_pt",level);
          sprintf(title,"L%i Pt",level);
          hpt[trig][level-1] = dbe_->book1D(name,title, NBINS, pt_bins);
          hpt[trig][level-1]->setAxisTitle("Pt", 1);
          sprintf(name,"HLTMuonL%i_eta",level);
          sprintf(title,"L%i Muon #eta",level);
          heta[trig][level-1] = dbe_->book1D(name,title, eta_nbin, eta_bins);
          heta[trig][level-1]->setAxisTitle("#eta", 1);
          sprintf(name,"HLTMuonL%i_phi",level);
          sprintf(title,"L%i Muon #phi",level);
          hphi[trig][level-1] = dbe_->book1D(name,title, phi_nbin, phi_bins);
          hphi[trig][level-1]->setAxisTitle("#phi", 1);

          sprintf(name,"HLTMuonL%i_phi_norm",level);
          sprintf(title,"L%i Muon #phi_norm",level);
          hphi_norm[trig][level-1] = dbe_->book1D(name,title, phi_nbin, phi_bins);
          hphi_norm[trig][level-1]->setAxisTitle("#phi", 1);
          sprintf(name,"HLTMuonL%i_etaphi",level);
          sprintf(title,"L%i Muon #eta vs #phi",level);
          hetaphi[trig][level-1] = dbe_->book2D(name,title, phi_nbin, phi_bins, eta_nbin, eta_bins);
          hetaphi[trig][level-1]->setAxisTitle("#phi", 1);
          hetaphi[trig][level-1]->setAxisTitle("#eta", 2); 
          sprintf(name,"HLTMuonL%i_ptphi",level);
          sprintf(title,"L%i Muon pt vs #phi",level);         
          hptphi[trig][level-1] = dbe_->book2D(name,title, NBINS, pt_bins, phi_nbin, phi_bins);
          hptphi[trig][level-1]->setAxisTitle("pt", 1);
          hptphi[trig][level-1]->setAxisTitle("#phi", 2);
          sprintf(name,"HLTMuonL%i_pteta",level);
          sprintf(title,"L%i Muon pt vs #eta",level);         
          hpteta[trig][level-1] = dbe_->book2D(name,title, NBINS, pt_bins, eta_nbin, eta_bins);
          hpteta[trig][level-1]->setAxisTitle("pt", 1);
          hpteta[trig][level-1]->setAxisTitle("#eta", 2);
          sprintf(name,"HLTMuonL%i_charge",level);
          sprintf(title,"L%i Muon Charge",level);         
          hcharge[trig][level-1]  = dbe_->book1D(name,title, 3, -1.5, 1.5);
          hcharge[trig][level-1]->setAxisTitle("Charge", 1);

        }
        if( level > 1 && level < 4 ) {
          sprintf(name,"HLTMuonL%i_NMu",level);
          sprintf(title,"L%i number of muons",level);
          hNMu[trig][level-1] = dbe_->book1D(name,title,11, -0.5, 10.5);
          hNMu[trig][level-1]->setAxisTitle("Number of muons", 1);
          sprintf(name,"HLTMuonL%i_pt",level);
          sprintf(title,"L%i Pt",level);
          hpt[trig][level-1] = dbe_->book1D(name,title, NBINS, 0., pt_max);
          hpt[trig][level-1]->setAxisTitle("Pt", 1);
          sprintf(name,"HLTMuonL%i_eta",level);
          sprintf(title,"L%i Muon #eta",level);
          heta[trig][level-1] = dbe_->book1D(name,title, NBINS, -2.5, 2.5);
          heta[trig][level-1]->setAxisTitle("#eta", 1);
          sprintf(name,"HLTMuonL%i_phi",level);
          sprintf(title,"L%i Muon #phi",level);
          hphi[trig][level-1] = dbe_->book1D(name,title, NBINS, -3.15, 3.15);
          hphi[trig][level-1]->setAxisTitle("#phi", 1);

          sprintf(name,"HLTMuonL%i_phi_norm",level);
          sprintf(title,"L%i Muon #phi_norm",level);
          hphi_norm[trig][level-1] = dbe_->book1D(name,title, NBINS, -3.15, 3.15);
          hphi_norm[trig][level-1]->setAxisTitle("#phi", 1);
          sprintf(name,"HLTMuonL%i_etaphi",level);
          sprintf(title,"L%i Muon #eta vs #phi",level);
          hetaphi[trig][level-1] = dbe_->book2D(name,title, NBINS, -3.15, 3.15,NBINS,-2.5, 2.5);
          hetaphi[trig][level-1]->setAxisTitle("#phi", 1);
          hetaphi[trig][level-1]->setAxisTitle("#eta", 2); 
          sprintf(name,"HLTMuonL%i_ptphi",level);
          sprintf(title,"L%i Muon pt vs #phi",level);         
          hptphi[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., pt_max,NBINS,-3.15, 3.15);
          hptphi[trig][level-1]->setAxisTitle("pt", 1);
          hptphi[trig][level-1]->setAxisTitle("#phi", 2);
          sprintf(name,"HLTMuonL%i_pteta",level);
          sprintf(title,"L%i Muon pt vs #eta",level);         
          hpteta[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., pt_max,NBINS,-2.5, 2.5);
          hpteta[trig][level-1]->setAxisTitle("pt", 1);
          hpteta[trig][level-1]->setAxisTitle("#eta", 2);
          sprintf(name,"HLTMuonL%i_nHits",level);
          sprintf(title,"L%i Number of Hits",level);         
          hnHits[trig][level-1] = dbe_->book1D(name,title, NBINS, 0., 100.);
          hnHits[trig][level-1]->setAxisTitle("Number of Hits", 1);
          sprintf(name,"HLTMuonL%i_charge",level);
          sprintf(title,"L%i Muon Charge",level);         
          hcharge[trig][level-1]  = dbe_->book1D(name,title, 3, -1.5, 1.5);
          hcharge[trig][level-1]->setAxisTitle("Charge", 1);


        }
        else if( level == 4 || level == 5 ) {
          sprintf(name,"HLTMuonL%iSeed_NMu",level-2);
          sprintf(title,"L%iSeed number of muons",level-2);
          hNMu[trig][level-1] = dbe_->book1D(name,title, 11, -0.5, 10.5);
          hNMu[trig][level-1]->setAxisTitle("Number of muons", 1);
          sprintf(name,"HLTMuonL%iSeed_pt",level-2);
          sprintf(title,"L%iSeed Pt",level-2);
          hpt[trig][level-1] = dbe_->book1D(name,title, NBINS, 0., pt_max);
          hpt[trig][level-1]->setAxisTitle("Pt", 1);
          sprintf(name,"HLTMuonL%iSeed_eta",level-2);
          sprintf(title,"L%iSeed Muon #eta",level-2);
          heta[trig][level-1] = dbe_->book1D(name,title, NBINS, -2.5, 2.5);
          heta[trig][level-1]->setAxisTitle("#eta", 1);
          sprintf(name,"HLTMuonL%iSeed_phi",level-2);
          sprintf(title,"L%iSeed Muon #phi",level-2);
          hphi[trig][level-1] = dbe_->book1D(name,title, NBINS, -3.15, 3.15);
          hphi[trig][level-1]->setAxisTitle("#phi", 1);

          sprintf(name,"HLTMuonL%iSeed_etaphi",level-2);
          sprintf(title,"L%iSeed Muon #eta vs #phi",level-2);
          hetaphi[trig][level-1] = dbe_->book2D(name,title, NBINS, -3.15, 3.15,NBINS,-2.5, 2.5);
          hetaphi[trig][level-1]->setAxisTitle("#phi", 1);
          hetaphi[trig][level-1]->setAxisTitle("#eta", 2); 
          sprintf(name,"HLTMuonL%iSeed_ptphi",level-2);
          sprintf(title,"L%iSeed Muon pt vs #phi",level-2);         
          hptphi[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., pt_max,NBINS,-3.15, 3.15);
          hptphi[trig][level-1]->setAxisTitle("pt", 1);
          hptphi[trig][level-1]->setAxisTitle("#phi", 2);
          sprintf(name,"HLTMuonL%iSeed_pteta",level-2);
          sprintf(title,"L%iSeed Muon pt vs #eta",level-2);         
          hpteta[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., pt_max,NBINS,-2.5, 2.5);
          hpteta[trig][level-1]->setAxisTitle("pt", 1);
          hpteta[trig][level-1]->setAxisTitle("#eta", 2);
          sprintf(name,"HLTMuonL%iSeed_charge",level-2);
          sprintf(title,"L%iSeed Muon Charge",level-2);         
          hcharge[trig][level-1]  = dbe_->book1D(name,title, 3, -1.5, 1.5);
          hcharge[trig][level-1]->setAxisTitle("Charge", 1);
          // pt
          sprintf(name,"HLTMuonL%iSeedtoL%i_ptres",level-2,level-3);
          sprintf(title,"L%iSeed1/Pt - L%iMuon1/Pt",level-2,level-3);         
          hseedptres[trig][level-4] = dbe_->book1D(name,title, NBINS, -0.1, 0.1);
          sprintf(title,"1/PtL%iSeed - 1/PtL%i",level-2,level-3);         
          hseedptres[trig][level-4]->setAxisTitle(title, 1);
          sprintf(name,"HLTMuonL%iSeedtoL%i_ptrelres",level-2,level-3);
          sprintf(title,"(L%iSeed1/Pt - L%iMuon1/Pt)/(L%iMuon1/Pt)",level-2,level-3,level-3);         
          hseedptrelres[trig][level-4] = dbe_->book1D(name,title, NBINS, -1.0, 1.0);
          sprintf(title,"(1/PtL%iSeed - 1/PtL%i)/(1/PtL%i)",level-2,level-3,level-3);         
          hseedptrelres[trig][level-4]->setAxisTitle(title, 1);
          // eta
          sprintf(name,"HLTMuonL%iSeedtoL%i_etares",level-2,level-3);
          sprintf(title,"L%iSeed#eta - L%iMuon#eta",level-2,level-3);         
          hseedetares[trig][level-4] =dbe_->book1D(name,title, NBINS, -0.1, 0.1);
          sprintf(title,"L%iSeed #eta - L%i #eta",level-2,level-3);         
          hseedetares[trig][level-4]->setAxisTitle(title, 1);
          sprintf(name,"HLTMuonL%iSeedtoL%i_etarelres",level-2,level-3);
          sprintf(title,"(L%iSeed#eta - L%iMuon#eta)/L%iMuon#eta",level-2,level-3,level-3);         
          hseedetarelres[trig][level-4] =dbe_->book1D(name,title, NBINS, -1.0, 1.0);
          sprintf(title,"(L%iSeed #eta - L%i #eta)/L%i #eta",level-2,level-3,level-3);         
          hseedetarelres[trig][level-4]->setAxisTitle(title, 1);
          // phi
          sprintf(name,"HLTMuonL%iSeedtoL%i_phires",level-2,level-3);
          sprintf(title,"L%iSeed#phi - L%iMuon#phi",level-2,level-3);         
          hseedphires[trig][level-4] =dbe_->book1D(name,title, NBINS, -0.1, 0.1);
          sprintf(title,"L%iSeed #phi - L%i #phi",level-2,level-3);         
          hseedphires[trig][level-4]->setAxisTitle(title, 1);
          sprintf(name,"HLTMuonL%iSeedtoL%i_phirelres",level-2,level-3);
          sprintf(title,"(L%iSeed#phi - L%iMuon#phi)/L%iMuon#phi",level-2,level-3,level-3);         
          hseedphirelres[trig][level-4] =dbe_->book1D(name,title, NBINS, -0.1, 0.1);
          sprintf(title,"(L%iSeed #phi - L%i #phi)/L%i #phi",level-2,level-3,level-3);         
          hseedphirelres[trig][level-4]->setAxisTitle(title, 1);

          sprintf(name,"HLTMuonL%iSeed_NMuperL%i",level-2,level-3);
          sprintf(title,"L%iSeedNMu per L%i",level-2,level-3);         
          hseedNMuper[trig][level-4] = dbe_->book1D(name, title, 5, -0.5, 4.5);
          hseedNMuper[trig][level-4]->setAxisTitle(title, 1);

          if( level == 5 ){
            dbe_->setCurrentFolder(monitorName_+dirname+"Level3Seed");

            sprintf(name,"HLTMuonL3Seed_NMu_comp");
            sprintf(title,"Comparison of each HLT L3 Muon Seed");
            hNMu_l3seed_comp[trig][level-1] = dbe_->book1D(name,title,4,0,4);
            hNMu_l3seed_comp[trig][level-1]->setAxisTitle("Number of muons",1);
            hNMu_l3seed_comp[trig][level-1]->setBinLabel(1, "Cascade", 1);
            hNMu_l3seed_comp[trig][level-1]->setBinLabel(2, "OIState", 1);
            hNMu_l3seed_comp[trig][level-1]->setBinLabel(3, "OIHit", 1);
            hNMu_l3seed_comp[trig][level-1]->setBinLabel(4, "IOHit", 1);

            dbe_->setCurrentFolder(monitorName_+dirname+"Level3Seed/OIState");

            sprintf(name,"HLTMuonL%iSeed_NMu_OIState",level-2);
            sprintf(title,"OIState L%iSeed number of muons",level-2);
            hNMu_OIState[trig][level-1] = dbe_->book1D(name,title, 11, -0.5, 10.5);
            hNMu_OIState[trig][level-1]->setAxisTitle("Number of muons", 1);
            sprintf(name,"HLTMuonL%iSeed_pt_OIState",level-2);
            sprintf(title,"L%iSeed OIState Muon Pt",level-2);
            hpt_OIState[trig][level-1] = dbe_->book1D(name,title, NBINS, 0., pt_max);
            hpt_OIState[trig][level-1]->setAxisTitle("Pt", 1);
            sprintf(name,"HLTMuonL%iSeed_eta_OIState",level-2);
            sprintf(title,"L%iSeed OIState Muon #eta",level-2);
            heta_OIState[trig][level-1] = dbe_->book1D(name,title, NBINS, -2.5, 2.5);
            heta_OIState[trig][level-1]->setAxisTitle("#eta", 1);
            sprintf(name,"HLTMuonL%iSeed_phi_OIState",level-2);
            sprintf(title,"L%iSeed OIState Muon #phi",level-2);
            hphi_OIState[trig][level-1] = dbe_->book1D(name,title, NBINS, -3.15, 3.15);
            hphi_OIState[trig][level-1]->setAxisTitle("#phi", 1);
            sprintf(name,"HLTMuonL%iSeed_etaphi_OIState",level-2);
            sprintf(title,"L%iSeed OIState Muon #eta vs #phi",level-2);
            hetaphi_OIState[trig][level-1] = dbe_->book2D(name,title, NBINS, -3.15, 3.15, NBINS, -2.5, 2.5);
            hetaphi_OIState[trig][level-1]->setAxisTitle("#phi", 1);
            hetaphi_OIState[trig][level-1]->setAxisTitle("#eta", 2);
            sprintf(name,"HLTMuonL%iSeed_ptphi_OIState",level-2);
            sprintf(title,"L%iSeed OIState Muon pt vs #phi",level-2);
            hptphi_OIState[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., pt_max, NBINS, -3.15, 3.15);
            hptphi_OIState[trig][level-1]->setAxisTitle("pt", 1);
            hptphi_OIState[trig][level-1]->setAxisTitle("#phi", 2);
            sprintf(name,"HLTMuonL%iSeed_pteta_OIState",level-2);
            sprintf(title,"L%iSeed OIState Muon pt vs #eta",level-2);
            hpteta_OIState[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., pt_max, NBINS, -2.5, 2.5);
            hpteta_OIState[trig][level-1]->setAxisTitle("pt", 1);
            hpteta_OIState[trig][level-1]->setAxisTitle("#eta", 2);
            sprintf(name,"HLTMuonL%iSeed_charge_OIState",level-2);
            sprintf(title,"L%iSeed OIState Muon Charge",level-2);
            hcharge_OIState[trig][level-1]  = dbe_->book1D(name,title, 3, -1.5, 1.5);
            hcharge_OIState[trig][level-1]->setAxisTitle("Charge", 1);

            dbe_->setCurrentFolder(monitorName_+dirname+"Level3Seed/OIHit");

            sprintf(name,"HLTMuonL%iSeed_NMu_OIHit",level-2);
            sprintf(title,"OIHit L%iSeed number of muons",level-2);
            hNMu_OIHit[trig][level-1] = dbe_->book1D(name,title, 11, -0.5, 10.5);
            hNMu_OIHit[trig][level-1]->setAxisTitle("Number of muons", 1);
            sprintf(name,"HLTMuonL%iSeed_pt_OIHit",level-2);
            sprintf(title,"L%iSeed OIHit Muon Pt",level-2);
            hpt_OIHit[trig][level-1] = dbe_->book1D(name,title, NBINS, 0., pt_max);
            hpt_OIHit[trig][level-1]->setAxisTitle("Pt", 1);
            sprintf(name,"HLTMuonL%iSeed_eta_OIHit",level-2);
            sprintf(title,"L%iSeed OIHit Muon #eta",level-2);
            heta_OIHit[trig][level-1] = dbe_->book1D(name,title, NBINS, -2.5, 2.5);
            heta_OIHit[trig][level-1]->setAxisTitle("#eta", 1);
            sprintf(name,"HLTMuonL%iSeed_phi_OIHit",level-2);
            sprintf(title,"L%iSeed OIHit Muon #phi",level-2);
            hphi_OIHit[trig][level-1] = dbe_->book1D(name,title, NBINS, -3.15, 3.15);
            hphi_OIHit[trig][level-1]->setAxisTitle("#phi", 1);
            sprintf(name,"HLTMuonL%iSeed_etaphi_OIHit",level-2);
            sprintf(title,"L%iSeed OIHit Muon #eta vs #phi",level-2);
            hetaphi_OIHit[trig][level-1] = dbe_->book2D(name,title, NBINS, -3.15, 3.15, NBINS, -2.5, 2.5);
            hetaphi_OIHit[trig][level-1]->setAxisTitle("#phi", 1);
            hetaphi_OIHit[trig][level-1]->setAxisTitle("#eta", 2);
            sprintf(name,"HLTMuonL%iSeed_ptphi_OIHit",level-2);
            sprintf(title,"L%iSeed OIHit Muon pt vs #phi",level-2);
            hptphi_OIHit[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., pt_max, NBINS, -3.15, 3.15);
            hptphi_OIHit[trig][level-1]->setAxisTitle("pt", 1);
            hptphi_OIHit[trig][level-1]->setAxisTitle("#phi", 2);
            sprintf(name,"HLTMuonL%iSeed_pteta_OIHit",level-2);
            sprintf(title,"L%iSeed OIHit Muon pt vs #eta",level-2);
            hpteta_OIHit[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., pt_max, NBINS, -2.5, 2.5);
            hpteta_OIHit[trig][level-1]->setAxisTitle("pt", 1);
            hpteta_OIHit[trig][level-1]->setAxisTitle("#eta", 2);
            sprintf(name,"HLTMuonL%iSeed_charge_OIHit",level-2);
            sprintf(title,"L%iSeed OIHit Muon Charge",level-2);
            hcharge_OIHit[trig][level-1]  = dbe_->book1D(name,title, 3, -1.5, 1.5);
            hcharge_OIHit[trig][level-1]->setAxisTitle("Charge", 1);

            dbe_->setCurrentFolder(monitorName_+dirname+"Level3Seed/IOHit");

            sprintf(name,"HLTMuonL%iSeed_NMu_IOHit",level-2);
            sprintf(title,"IOHit L%iSeed number of muons",level-2);
            hNMu_IOHit[trig][level-1] = dbe_->book1D(name,title, 11, -0.5, 10.5);
            hNMu_IOHit[trig][level-1]->setAxisTitle("Number of muons", 1);
            sprintf(name,"HLTMuonL%iSeed_pt_IOHit",level-2);
            sprintf(title,"L%iSeed IOHit Muon Pt",level-2);
            hpt_IOHit[trig][level-1] = dbe_->book1D(name,title, NBINS, 0., pt_max);
            hpt_IOHit[trig][level-1]->setAxisTitle("Pt", 1);
            sprintf(name,"HLTMuonL%iSeed_eta_IOHit",level-2);
            sprintf(title,"L%iSeed IOHit Muon #eta",level-2);
            heta_IOHit[trig][level-1] = dbe_->book1D(name,title, NBINS, -2.5, 2.5);
            heta_IOHit[trig][level-1]->setAxisTitle("#eta", 1);
            sprintf(name,"HLTMuonL%iSeed_phi_IOHit",level-2);
            sprintf(title,"L%iSeed IOHit Muon #phi",level-2);
            hphi_IOHit[trig][level-1] = dbe_->book1D(name,title, NBINS, -3.15, 3.15);
            hphi_IOHit[trig][level-1]->setAxisTitle("#phi", 1);
            sprintf(name,"HLTMuonL%iSeed_etaphi_IOHit",level-2);
            sprintf(title,"L%iSeed IOHit Muon #eta vs #phi",level-2);
            hetaphi_IOHit[trig][level-1] = dbe_->book2D(name,title, NBINS, -3.15, 3.15, NBINS, -2.5, 2.5);
            hetaphi_IOHit[trig][level-1]->setAxisTitle("#phi", 1);
            hetaphi_IOHit[trig][level-1]->setAxisTitle("#eta", 2);
            sprintf(name,"HLTMuonL%iSeed_ptphi_IOHit",level-2);
            sprintf(title,"L%iSeed IOHit Muon pt vs #phi",level-2);
            hptphi_IOHit[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., pt_max, NBINS, -3.15, 3.15);
            hptphi_IOHit[trig][level-1]->setAxisTitle("pt", 1);
            hptphi_IOHit[trig][level-1]->setAxisTitle("#phi", 2);
            sprintf(name,"HLTMuonL%iSeed_pteta_IOHit",level-2);
            sprintf(title,"L%iSeed IOHit Muon pt vs #eta",level-2);
            hpteta_IOHit[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., pt_max, NBINS, -2.5, 2.5);
            hpteta_IOHit[trig][level-1]->setAxisTitle("pt", 1);
            hpteta_IOHit[trig][level-1]->setAxisTitle("#eta", 2);
            sprintf(name,"HLTMuonL%iSeed_charge_IOHit",level-2);
            sprintf(title,"L%iSeed IOHit Muon Charge",level-2);
            hcharge_IOHit[trig][level-1]  = dbe_->book1D(name,title, 3, -1.5, 1.5);
            hcharge_IOHit[trig][level-1]->setAxisTitle("Charge", 1);

          } 
        }
        else if( level == 6 ) {
          double max_energy = 1.0;

          sprintf(name,"HLTMuonL2_driso");
          sprintf(title,"dR Cone Size");
          hL2muonIsoDR[trig] = dbe_->book2D(name, title, 10, 0, 0.24, NBINS, 0, 5.0);
          hL2muonIsoDR[trig]->setAxisTitle(title, 1);
          hL2muonIsoDR[trig]->setAxisTitle("Calo Energy in Iso Cone (GeV)", 2);

          sprintf(name,"HLTMuonL3_driso");
          sprintf(title,"dR Cone Size");
          hL3muonIsoDR[trig] = dbe_->book2D(name, title, 10, 0, 0.24, NBINS, 0, 5.0);
          hL3muonIsoDR[trig]->setAxisTitle(title, 1);
          hL3muonIsoDR[trig]->setAxisTitle("Calo Energy in Iso Cone (GeV)", 2);

          sprintf(name,"HLTCaloTower_dRwithL2");
          sprintf(title,"#Delta R(L2muon, CaloTower)");
          htowerdRL2[trig] = dbe_->book1D(name, title, NBINS, 0, 0.5);
          htowerdRL2[trig]->setAxisTitle(title, 1);
          sprintf(name,"HLTCaloTower_dRwithL3");
          sprintf(title,"#Delta R(L3muon, CaloTower)");
          htowerdRL3[trig] = dbe_->book1D(name, title, NBINS, 0, 0.5);
          htowerdRL3[trig]->setAxisTitle(title, 1);

          sprintf(name,"HLTCaloTower_Et");
          sprintf(title,"HLT CaloTower Et");
          htowerEt[trig] = dbe_->book1D(name, title, NBINS, 0, max_energy);
          htowerEt[trig]->setAxisTitle(title, 1);
          sprintf(name,"HLTCaloTower_Eta");
          sprintf(title,"HLT CaloTower #eta");
          htowerEta[trig] = dbe_->book1D(name, title, NBINS, -2.5, 2.5);
          htowerEta[trig]->setAxisTitle(title, 1);
          sprintf(name,"HLTCaloTower_Phi");
          sprintf(title,"HLT CaloTower #phi");
          htowerPhi[trig] = dbe_->book1D(name, title, NBINS, -3.14, 3.14);
          htowerPhi[trig]->setAxisTitle(title, 1);

          sprintf(name,"HLTCaloTower_HadEnergy");
          sprintf(title,"HLT CaloTower hadEnergy");
          htowerHadEnergy[trig] = dbe_->book1D(name, title, NBINS, 0, max_energy);
          htowerHadEnergy[trig]->setAxisTitle(title, 1);
          sprintf(name,"HLTCaloTower_EmEnergy");
          sprintf(title,"HLT CaloTower emEnergy");
          htowerEmEnergy[trig] = dbe_->book1D(name, title, NBINS, 0, max_energy);
          htowerEmEnergy[trig]->setAxisTitle(title, 1);
          sprintf(name,"HLTCaloTower_OuterEnergy");
          sprintf(title,"HLT CaloTower outerEnergy");
          htowerOuterEnergy[trig] = dbe_->book1D(name, title, NBINS, 0, max_energy);
          htowerOuterEnergy[trig]->setAxisTitle(title, 1);

          sprintf(name,"HLTCaloTower_HadEt");
          sprintf(title,"HLT CaloTower hadEt");
          htowerHadEt[trig] = dbe_->book1D(name, title, NBINS, 0, max_energy);
          htowerHadEt[trig]->setAxisTitle(title, 1);
          sprintf(name,"HLTCaloTower_EmEt");
          sprintf(title,"HLT CaloTower emEt");
          htowerEmEt[trig] = dbe_->book1D(name, title, NBINS, 0, max_energy);
          htowerEmEt[trig]->setAxisTitle(title, 1);
          sprintf(name,"HLTCaloTower_OuterEt");
          sprintf(title,"HLT CaloTower outerEt");
          htowerOuterEt[trig] = dbe_->book1D(name, title, NBINS, 0, max_energy);
          htowerOuterEt[trig]->setAxisTitle(title, 1);

          sprintf(name,"HLTCaloTower_EtaHadEt");
          sprintf(title,"HLT CaloTower hadEt");
          htowerEtaHadEt[trig] = dbe_->book2D(name, title, NBINS, -2.5, 2.5, NBINS, 0, max_energy);
          htowerEtaHadEt[trig]->setAxisTitle("CaloTower #eta", 1);
          htowerEtaHadEt[trig]->setAxisTitle(title, 2);
          sprintf(name,"HLTCaloTower_EtaEmEt");
          sprintf(title,"HLT CaloTower emEt");
          htowerEtaEmEt[trig] = dbe_->book2D(name, title, NBINS, -2.5, 2.5, NBINS, 0, max_energy);
          htowerEtaEmEt[trig]->setAxisTitle("CaloTower #eta", 1);
          htowerEtaEmEt[trig]->setAxisTitle(title, 2);
          sprintf(name,"HLTCaloTower_EtaOuterEt");
          sprintf(title,"HLT CaloTower outerEt");
          htowerEtaOuterEt[trig] = dbe_->book2D(name, title, NBINS, -2.5, 2.5, NBINS, 0, max_energy);
          htowerEtaOuterEt[trig]->setAxisTitle("CaloTower #eta", 1);
          htowerEtaOuterEt[trig]->setAxisTitle(title, 2);

          sprintf(name,"HLTCaloTower_PhiHadEt");
          sprintf(title,"HLT CaloTower hadEt");
          htowerPhiHadEt[trig] = dbe_->book2D(name, title, NBINS, -3.15, 3.15, NBINS, 0, max_energy);
          htowerPhiHadEt[trig]->setAxisTitle("CaloTower #phi", 1);
          htowerPhiHadEt[trig]->setAxisTitle(title, 2);
          sprintf(name,"HLTCaloTower_PhiEmEt");
          sprintf(title,"HLT CaloTower emEt");
          htowerPhiEmEt[trig] = dbe_->book2D(name, title, NBINS, -3.15, 3.15, NBINS, 0, max_energy);
          htowerPhiEmEt[trig]->setAxisTitle("CaloTower #phi", 1);
          htowerPhiEmEt[trig]->setAxisTitle(title, 2);
          sprintf(name,"HLTCaloTower_PhiOuterEt");
          sprintf(title,"HLT CaloTower outerEt");
          htowerPhiOuterEt[trig] = dbe_->book2D(name, title, NBINS, -3.15, 3.15, NBINS, 0, max_energy);
          htowerPhiOuterEt[trig]->setAxisTitle("CaloTower #phi", 1);
          htowerPhiOuterEt[trig]->setAxisTitle(title, 2);

          sprintf(name,"HLTMuonL2_iso");
          sprintf(title,"L2 Muon Energy in Isolation cone");         
          hisoL2[trig] = dbe_->book1D(name,title, NBINS, 0., 5./1);
          hisoL2[trig]->setAxisTitle("Calo Energy in Iso Cone (GeV)", 1);
          sprintf(name,"HLTMuonL3_iso");
          sprintf(title,"L3 Muon SumPt in Isolation cone");               
          hisoL3[trig] = dbe_->book1D(name,title, NBINS, 0., 5./2);
          hisoL3[trig]->setAxisTitle("Sum Pt in Iso Cone (GeV)", 1);
        }

        if (level>1&&level<4){

          sprintf(name,"HLTMuonL%i_dr",level);
          sprintf(title,"L%i Muon radial impact vs BeamSpot",level);         
          hdr[trig][level-2] = dbe_->book1D(name,title, NBINS, -0.3, 0.3);
          hdr[trig][level-2]->setAxisTitle("R Impact (cm) vs BeamSpot", 1);
          sprintf(name,"HLTMuonL%i_d0",level);
          sprintf(title,"L%i Muon radial impact vs (0,0)",level);         
          hd0[trig][level-2] = dbe_->book1D(name,title, NBINS, -0.3, 0.3);
          hd0[trig][level-2]->setAxisTitle("R Impact (cm) vs 0,0", 1);
          sprintf(name,"HLTMuonL%i_dz0",level);
          sprintf(title,"L%i Muon Z impact vs (0)",level);         
          hdz0[trig][level-2] = dbe_->book1D(name,title, NBINS, -25., 25.);
          hdz0[trig][level-2]->setAxisTitle("Z impact (cm) vs 0", 1);
          sprintf(name,"HLTMuonL%i_dz",level);
          sprintf(title,"L%i Muon Z impact vs BeamSpot",level);         
          hdz[trig][level-2] = dbe_->book1D(name,title, NBINS, -25., 25.);
          hdz[trig][level-2]->setAxisTitle("Z impact (cm) vs BeamSpot", 1);
          sprintf(name,"HLTMuonL%i_err0",level);
          sprintf(title,"L%i Muon Error on Pt",level);         
          herr0[trig][level-2] = dbe_->book1D(name,title,NBINS, 0., 0.03);
          herr0[trig][level-2]->setAxisTitle("Error on Pt", 1);
          sprintf(name,"HLTMuonL%i_DiMuMass",level);
          sprintf(title,"L%i Opposite charge DiMuon invariant Mass",level);         
          hdimumass[trig][level-2]= dbe_->book1D(name,title, NBINS, 0., 150.);
          hdimumass[trig][level-2]->setAxisTitle("Di Muon Invariant Mass (GeV)");

          sprintf(name,"HLTMuonL%i_drphi",level);
          sprintf(title,"L%i #Deltar vs #phi",level);         
          hdrphi[trig][level-2] = dbe_->bookProfile(name,title, NBINS, -3.15, 3.15,1,-999.,999.,"s");
          hdrphi[trig][level-2]->setAxisTitle("#phi", 1);
          sprintf(title,"L%i Muon radial impact vs BeamSpot",level);         
          hdrphi[trig][level-2]->setAxisTitle(title, 2);

          sprintf(name,"HLTMuonL%i_d0phi",level);
          sprintf(title,"L%i #Delta0 vs #phi",level);         
          hd0phi[trig][level-2] = dbe_->bookProfile(name,title, NBINS, -3.15, 3.15,1,-999.,999.,"s");
          hd0phi[trig][level-2]->setAxisTitle("#phi", 1);
          sprintf(title,"L%i Muon radial impact vs (0,0)",level);         
          hd0phi[trig][level-2]->setAxisTitle(title, 2);

          sprintf(name,"HLTMuonL%i_dz0eta",level);
          sprintf(title,"L%i #Deltaz0 vs #eta",level);         
          hdz0eta[trig][level-2] = dbe_->bookProfile(name,title, NBINS,-2.5, 2.5,1,-999.,999.,"s");
          hdz0eta[trig][level-2]->setAxisTitle("#eta", 1);
          sprintf(title,"L%i Muon Z impact vs (0)",level);         
          hdz0eta[trig][level-2]->setAxisTitle(title, 2);

          sprintf(name,"HLTMuonL%i_dzeta",level);
          sprintf(title,"L%i #Deltaz vs #eta",level);         
          hdzeta[trig][level-2] = dbe_->bookProfile(name,title, NBINS,-2.5, 2.5,1,-999.,999.,"s");
          hdzeta[trig][level-2]->setAxisTitle("#eta", 1);
          sprintf(title,"L%i Muon Z impact vs BeamSpot",level);         
          hdzeta[trig][level-2]->setAxisTitle(title, 2);

        }
        if(level == 2 ) {

          sprintf(name,"HLTMuonL%itoL%i_ptpull",level,level+1);
          sprintf(title,"(L%iMuon1/Pt - L%iMuon1/Pt)/#sigma_{pt}^{L2}",level,level+1);         
          hptpull[trig] = dbe_->book1D(name,title, NBINS, -10.0, 10.0);
          sprintf(title,"(1/PtL%i - 1/PtL%i)/#sigma_{pt}^{L2}",level,level+1);         
          hptpull[trig]->setAxisTitle(title, 1);
          sprintf(name,"HLTMuonL%itoL%i_etapull",level,level+1);
          sprintf(title,"(L%iMuon#eta - L%iMuon#eta)/#sigma_{#eta}^{L2}",level,level+1);         
          hetapull[trig] =dbe_->book1D(name,title, NBINS, -10.0, 10.0);
          sprintf(title,"(L%i #eta - L%i #eta)/#sigma_{#eta}^{L2}",level,level+1);         
          hetapull[trig]->setAxisTitle(title, 1);
          sprintf(name,"HLTMuonL%itoL%i_phipull",level,level+1);
          sprintf(title,"(L%iMuon#phi - L%iMuon#phi)/#sigma_{#phi}^{L2}",level,level+1);         
          hphipull[trig] =dbe_->book1D(name,title, NBINS, -10.0, 10.0);
          sprintf(title,"(L%i #phi - L%i #phi)/#sigma_{#phi}^{L2}",level,level+1);         
          hphipull[trig]->setAxisTitle(title, 1);

          sprintf(name,"HLTMuonL%itoL%i_ptpullpt",level,level+1);
          sprintf(title,"L%i Muon #Delta Pt/#sigma_{pt}^{L2} vs Pt ",level);         
          hptpullpt[trig] =dbe_->bookProfile(name,title, NBINS, 0, pt_max,1,-999.,999.,"s");
          sprintf(title,"(1/PtL%i - 1/PtL%i)/#sigma_{pt}^{L2}",level,level+1);         
          hptpullpt[trig]->setAxisTitle(title, 2);
          hptpullpt[trig]->setAxisTitle("Pt", 1);
          sprintf(name,"HLTMuonL%itoL%i_etapulleta",level,level+1);
          sprintf(title,"L%i Muon #Delta#eta/#sigma_{#eta}^{L2} vs #eta ",level);         
          hetapulleta[trig] =dbe_->bookProfile(name,title, NBINS,-2.5, 2.5,1,-999.,999.,"s");
          sprintf(title,"(L%i #eta - L%i #eta)/#sigma_{#eta}^{L2}",level,level+1);         
          hetapulleta[trig]->setAxisTitle(title, 2);
          hetapulleta[trig]->setAxisTitle("#eta", 1);
          sprintf(name,"HLTMuonL%itoL%i_phipullphi",level,level+1);
          sprintf(title,"L%i Muon #Delta#phi/#sigma_{#phi}^{L2} vs #phi ",level);         
          hphipullphi[trig] =dbe_->bookProfile(name,title, NBINS, -3.15, 3.15,1,-999.,999.,"s");
          sprintf(title,"(L%i #phi - L%i #phi)/#sigma_{#phi}^{L2}",level,level+1);         
          hphipullphi[trig]->setAxisTitle(title, 2);
          hphipullphi[trig]->setAxisTitle("#phi", 1);

        }
        if( level == 3 ){
          sprintf(name,"HLTMuonL3_NMu_comp");
          sprintf(title,"Comparison of each HLT L3 Muons");
          hNMu_comp[trig][level-1] = dbe_->book1D(name,title,4,0,4);
          hNMu_comp[trig][level-1]->setAxisTitle("Number of muons",1);
          hNMu_comp[trig][level-1]->setBinLabel(1, "Cascade", 1);
          hNMu_comp[trig][level-1]->setBinLabel(2, "OIState", 1);
          hNMu_comp[trig][level-1]->setBinLabel(3, "OIHit", 1);
          hNMu_comp[trig][level-1]->setBinLabel(4, "IOHit", 1);
          sprintf(name,"HLTMuonL3_trk_NMu_comp");
          sprintf(title,"Comparison of each HLT L3 Muons");
          hNMu_trk_comp[trig][level-1] = dbe_->book1D(name,title,4,0,4);
          hNMu_trk_comp[trig][level-1]->setAxisTitle("Number of muons",1);
          hNMu_trk_comp[trig][level-1]->setBinLabel(1, "Cascade", 1);
          hNMu_trk_comp[trig][level-1]->setBinLabel(2, "OIState", 1);
          hNMu_trk_comp[trig][level-1]->setBinLabel(3, "OIHit", 1);
          hNMu_trk_comp[trig][level-1]->setBinLabel(4, "IOHit", 1);

          sprintf(name,"HLTMuonL%i_trk_NMu",level);
          sprintf(title," L%i tracker number of muons",level);
          hNMu_trk[trig][level-1] = dbe_->book1D(name,title, 10, -0.5, 10.5);
          hNMu_trk[trig][level-1]->setAxisTitle("Number of muons", 1);
          sprintf(name,"HLTMuonL%i_trk_pt",level);
          sprintf(title,"L%i tracker Muon Pt",level);
          hpt_trk[trig][level-1] = dbe_->book1D(name,title, NBINS, 0., 200);
          hpt_trk[trig][level-1]->setAxisTitle("Pt", 1);
          sprintf(name,"HLTMuonL%i_trk_eta",level);
          sprintf(title,"L%i tracker Muon #eta",level);
          heta_trk[trig][level-1] = dbe_->book1D(name,title, NBINS, -2.5, 2.5);
          heta_trk[trig][level-1]->setAxisTitle("#eta", 1);
          sprintf(name,"HLTMuonL%i_trk_phi",level);
          sprintf(title,"L%i tracker Muon #phi",level);
          hphi_trk[trig][level-1] = dbe_->book1D(name,title, NBINS, -3.15, 3.15);
          hphi_trk[trig][level-1]->setAxisTitle("#phi", 1);
          sprintf(name,"HLTMuonL%i_trk_etaphi",level);
          sprintf(title,"L%i tracker Muon #eta vs #phi",level);
          hetaphi_trk[trig][level-1] = dbe_->book2D(name,title, NBINS, -3.15, 3.15, NBINS, -2.5, 2.5);
          hetaphi_trk[trig][level-1]->setAxisTitle("#phi", 1);
          hetaphi_trk[trig][level-1]->setAxisTitle("#eta", 2);
          sprintf(name,"HLTMuonL%i_trk_ptphi",level);
          sprintf(title,"L%i tracker Muon pt vs #phi",level);
          hptphi_trk[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., 200, NBINS, -3.15, 3.15);
          hptphi_trk[trig][level-1]->setAxisTitle("pt", 1);
          hptphi_trk[trig][level-1]->setAxisTitle("#phi", 2);
          sprintf(name,"HLTMuonL%i_trk_pteta",level);
          sprintf(title,"L%i tracker Muon pt vs #eta",level);
          hpteta_trk[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., 200, NBINS, -2.5, 2.5);
          hpteta_trk[trig][level-1]->setAxisTitle("pt", 1);
          hpteta_trk[trig][level-1]->setAxisTitle("#eta", 2);
          sprintf(name,"HLTMuonL%i_trk_charge",level);
          sprintf(title,"L%i tracker Muon Charge",level);
          hcharge_trk[trig][level-1]  = dbe_->book1D(name,title, 3, -1.5, 1.5);
          hcharge_trk[trig][level-1]->setAxisTitle("Charge", 1);
          sprintf(name,"HLTMuonL%i_trk_d0",level);
          sprintf(title,"L%i tracker Muon from  radial impact vs (0,0)",level);
          hd0_trk[trig][level-1] = dbe_->book1D(name,title, 50, -0.3, 0.3 );
          hd0_trk[trig][level-1]->setAxisTitle("R Impact (cm) vs 0,0", 1);
          sprintf(name,"HLTMuonL%i_trk_dz",level);
          sprintf(title,"L%i tracker Muon from Z impact vs BeamSpot",level);
          hdz_trk[trig][level-1] = dbe_->book1D(name,title, NBINS, -25., 25.);
          hdz_trk[trig][level-1]->setAxisTitle("Z impact (cm) vs BeamSpot", 1);
          sprintf(name,"HLTMuonL%i_trk_dr",level);
          sprintf(title,"L%i tracker Muon radial impact vs BeamSpot",level);
          hdr_trk[trig][level-1] = dbe_->book1D(name,title, 50, -0.3, 0.3 );
          hdr_trk[trig][level-1]->setAxisTitle("R Impact (cm) vs BeamSpot", 1);

          hptres_L3L3trk[trig][level-1] = dbe_->book1D("HLTMuonL3toL3trk_ptres","L3Muon 1/Pt - L3trkMuon 1/Pt;L3 1/P_{T} - L3 trk 1/P_{T}",50+1,-0.02,0.02);

          hetares_L3L3trk[trig][level-1] = dbe_->book1D("HLTMuonL3toL3trk_etares","L3Muon #eta - L3trkMuon #eta;L3 #eta - L3 trk #eta",50,-0.02,0.02);
          hphires_L3L3trk[trig][level-1] = dbe_->book1D("HLTMuonL3toL3trk_phires","L3Muon #phi - L3trkMuon #phi;L3 #phi - L3 trk #phi",50,-0.02,0.02);
          hptrelres_L3L3trk[trig][level-1] = dbe_->book1D("HLTMuonL3toL3trk_ptrelres","(L3Muon 1/Pt - L3trkMuon 1/Pt)/(L3Muon 1/Pt);(L3 1/P_{T} - L3 trk 1/P_{T})/(L3 1/P_{T})",50,-0.05,0.05);
          hetarelres_L3L3trk[trig][level-1] = dbe_->book1D("HLTMuonL3toL3trk_etarelres","(L3Muon #eta - L3trkMuon #eta)/L3Muon #eta;(L3 #eta - L3 trk #eta)/L3 #eta",50,-0.02,0.02);
          hphirelres_L3L3trk[trig][level-1] = dbe_->book1D("HLTMuonL3toL3trk_phirelres","(L3Muon #phi - L3trkMuon #phi)/L3Muon #phi;(L3 #phi - L3 trk #phi)/L3 #phi",50,-0.02,0.02);

          dbe_->setCurrentFolder(monitorName_+dirname+"Level3/OIState");

          sprintf(name,"HLTMuonL%i_NMu_OIState",level);
          sprintf(title,"OIState L%i number of muons",level);
          hNMu_OIState[trig][level-1] = dbe_->book1D(name,title, 10, -0.5, 10.5);
          hNMu_OIState[trig][level-1]->setAxisTitle("Number of muons", 1);
          sprintf(name,"HLTMuonL%i_pt_OIState",level);
          sprintf(title,"L%i Pt_OIState",level);
          hpt_OIState[trig][level-1] = dbe_->book1D(name,title, NBINS, 0., 200);
          hpt_OIState[trig][level-1]->setAxisTitle("Pt", 1);
          sprintf(name,"HLTMuonL%i_eta_OIState",level);
          sprintf(title,"L%i Muon #eta_OIState",level);
          heta_OIState[trig][level-1] = dbe_->book1D(name,title, NBINS, -2.5, 2.5);
          heta_OIState[trig][level-1]->setAxisTitle("#eta", 1);
          sprintf(name,"HLTMuonL%i_phi_OIState",level);
          sprintf(title,"L%i Muon #phi_OIState",level);
          hphi_OIState[trig][level-1] = dbe_->book1D(name,title, NBINS, -3.15, 3.15);
          hphi_OIState[trig][level-1]->setAxisTitle("#phi", 1);
          sprintf(name,"HLTMuonL%i_etaphi_OIState",level);
          sprintf(title,"L%i Muon #eta vs #phi_OIState",level);
          hetaphi_OIState[trig][level-1] = dbe_->book2D(name,title, NBINS, -3.15, 3.15, NBINS, -2.5, 2.5);
          hetaphi_OIState[trig][level-1]->setAxisTitle("#phi", 1);
          hetaphi_OIState[trig][level-1]->setAxisTitle("#eta", 2);
          sprintf(name,"HLTMuonL%i_ptphi_OIState",level);
          sprintf(title,"L%i Muon pt vs #phi_OIState",level);
          hptphi_OIState[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., 200, NBINS, -3.15, 3.15);
          hptphi_OIState[trig][level-1]->setAxisTitle("pt", 1);
          hptphi_OIState[trig][level-1]->setAxisTitle("#phi", 2);
          sprintf(name,"HLTMuonL%i_pteta_OIState",level);
          sprintf(title,"L%i Muon pt vs #eta_OIState",level);
          hpteta_OIState[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., 200, NBINS, -2.5, 2.5);
          hpteta_OIState[trig][level-1]->setAxisTitle("pt", 1);
          hpteta_OIState[trig][level-1]->setAxisTitle("#eta", 2);
          sprintf(name,"HLTMuonL%i_charge_OIState",level);
          sprintf(title,"L%i Muon Charge_OIState",level);
          hcharge_OIState[trig][level-1]  = dbe_->book1D(name,title, 3, -1.5, 1.5);
          hcharge_OIState[trig][level-1]->setAxisTitle("Charge", 1);
          sprintf(name,"HLTMuonL%i_d0_OIState",level);
          sprintf(title,"L%i Muon from OIState radial impact vs (0,0)",level);
          hd0_OIState[trig][level-1] = dbe_->book1D(name,title, 50, -0.3, 0.3 );
          hd0_OIState[trig][level-1]->setAxisTitle("R Impact (cm) vs 0,0", 1);
          sprintf(name,"HLTMuonL%i_dz_OIState",level);
          sprintf(title,"L%i Muon from OIStateZ impact vs BeamSpot",level);
          hdz_OIState[trig][level-1] = dbe_->book1D(name,title, NBINS, -25., 25.);
          hdz_OIState[trig][level-1]->setAxisTitle("Z impact (cm) vs BeamSpot", 1);
          sprintf(name,"HLTMuonL%i_dr_OIState",level);
          sprintf(title,"L%i Muon from OIState radial impact vs BeamSpot",level);
          hdr_OIState[trig][level-1] = dbe_->book1D(name,title, 50, -0.3, 0.3 );
          hdr_OIState[trig][level-1]->setAxisTitle("R Impact (cm) vs BeamSpot", 1);

          sprintf(name,"HLTMuonL%i_trk_OIState_NMu",level);
          sprintf(title," L%i OIState tracker number of muons",level);
          hNMu_trk_OIState[trig][level-1] = dbe_->book1D(name,title, 10, -0.5, 10.5);
          hNMu_trk_OIState[trig][level-1]->setAxisTitle("Number of muons", 1);
          sprintf(name,"HLTMuonL%i_trk_OIState_pt",level);
          sprintf(title,"L%i OIState tracker Muon Pt",level);
          hpt_trk_OIState[trig][level-1] = dbe_->book1D(name,title, NBINS, 0., 200);
          hpt_trk_OIState[trig][level-1]->setAxisTitle("Pt", 1);
          sprintf(name,"HLTMuonL%i_trk_OIState_eta",level);
          sprintf(title,"L%i OIState tracker Muon #eta",level);
          heta_trk_OIState[trig][level-1] = dbe_->book1D(name,title, NBINS, -2.5, 2.5);
          heta_trk_OIState[trig][level-1]->setAxisTitle("#eta", 1);
          sprintf(name,"HLTMuonL%i_trk_OIState_phi",level);
          sprintf(title,"L%i OIState tracker Muon #phi",level);
          hphi_trk_OIState[trig][level-1] = dbe_->book1D(name,title, NBINS, -3.15, 3.15);
          hphi_trk_OIState[trig][level-1]->setAxisTitle("#phi", 1);
          sprintf(name,"HLTMuonL%i_trk_OIState_etaphi",level);
          sprintf(title,"L%i OIState tracker Muon #eta vs #phi",level);
          hetaphi_trk_OIState[trig][level-1] = dbe_->book2D(name,title, NBINS, -3.15, 3.15, NBINS, -2.5, 2.5);
          hetaphi_trk_OIState[trig][level-1]->setAxisTitle("#phi", 1);
          hetaphi_trk_OIState[trig][level-1]->setAxisTitle("#eta", 2);
          sprintf(name,"HLTMuonL%i_trk_OIState_ptphi",level);
          sprintf(title,"L%i OIState tracker Muon pt vs #phi",level);
          hptphi_trk_OIState[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., 200, NBINS, -3.15, 3.15);
          hptphi_trk_OIState[trig][level-1]->setAxisTitle("pt", 1);
          hptphi_trk_OIState[trig][level-1]->setAxisTitle("#phi", 2);
          sprintf(name,"HLTMuonL%i_trk_OIState_pteta",level);
          sprintf(title,"L%i OIState tracker Muon pt vs #eta",level);
          hpteta_trk_OIState[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., 200, NBINS, -2.5, 2.5);
          hpteta_trk_OIState[trig][level-1]->setAxisTitle("pt", 1);
          hpteta_trk_OIState[trig][level-1]->setAxisTitle("#eta", 2);
          sprintf(name,"HLTMuonL%i_trk_OIState_charge",level);
          sprintf(title,"L%i OIState tracker Muon Charge",level);
          hcharge_trk_OIState[trig][level-1]  = dbe_->book1D(name,title, 3, -1.5, 1.5);
          hcharge_trk_OIState[trig][level-1]->setAxisTitle("Charge", 1);
          sprintf(name,"HLTMuonL%i_trk_OIState_d0",level);
          sprintf(title,"L%i OIState tracker Muon from  radial impact vs (0,0)",level);
          hd0_trk_OIState[trig][level-1] = dbe_->book1D(name,title, 50, -0.3, 0.3 );
          hd0_trk_OIState[trig][level-1]->setAxisTitle("R Impact (cm) vs 0,0", 1);
          sprintf(name,"HLTMuonL%i_trk_OIState_dz",level);
          sprintf(title,"L%i OIState tracker Muon from Z impact vs BeamSpot",level);
          hdz_trk_OIState[trig][level-1] = dbe_->book1D(name,title, NBINS, -25., 25.);
          hdz_trk_OIState[trig][level-1]->setAxisTitle("Z impact (cm) vs BeamSpot", 1);
          sprintf(name,"HLTMuonL%i_trk_OIState_dr",level);
          sprintf(title,"L%i OIState tracker Muon radial impact vs BeamSpot",level);
          hdr_trk_OIState[trig][level-1] = dbe_->book1D(name,title, 50, -0.3, 0.3 );
          hdr_trk_OIState[trig][level-1]->setAxisTitle("R Impact (cm) vs BeamSpot", 1);

          dbe_->setCurrentFolder(monitorName_+dirname+"Level3/OIHit");

          sprintf(name,"HLTMuonL%i_NMu_OIHit",level);
          sprintf(title,"OIHit L%i number of muons",level);
          hNMu_OIHit[trig][level-1] = dbe_->book1D(name,title, 10, -0.5, 10.5);
          hNMu_OIHit[trig][level-1]->setAxisTitle("Number of muons", 1);

          sprintf(name,"HLTMuonL%i_pt_OIHit",level);
          sprintf(title,"L%i Pt_OIHit",level);
          hpt_OIHit[trig][level-1] = dbe_->book1D(name,title, NBINS, 0., 200);
          hpt_OIHit[trig][level-1]->setAxisTitle("Pt", 1);
          sprintf(name,"HLTMuonL%i_eta_OIHit",level);
          sprintf(title,"L%i Muon #eta_OIHit",level);
          heta_OIHit[trig][level-1] = dbe_->book1D(name,title, NBINS, -2.5, 2.5);
          heta_OIHit[trig][level-1]->setAxisTitle("#eta", 1);
          sprintf(name,"HLTMuonL%i_phi_OIHit",level);
          sprintf(title,"L%i Muon #phi_OIHit",level);
          hphi_OIHit[trig][level-1] = dbe_->book1D(name,title, NBINS, -3.15, 3.15);
          hphi_OIHit[trig][level-1]->setAxisTitle("#phi", 1);
          sprintf(name,"HLTMuonL%i_etaphi_OIHit",level);
          sprintf(title,"L%i Muon #eta vs #phi_OIHit",level);
          hetaphi_OIHit[trig][level-1] = dbe_->book2D(name,title, NBINS, -3.15, 3.15, NBINS, -2.5, 2.5);
          hetaphi_OIHit[trig][level-1]->setAxisTitle("#phi", 1);
          hetaphi_OIHit[trig][level-1]->setAxisTitle("#eta", 2);
          sprintf(name,"HLTMuonL%i_ptphi_OIHit",level);
          sprintf(title,"L%i Muon pt vs #phi_OIHit",level);
          hptphi_OIHit[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., 200, NBINS, -3.15, 3.15);
          hptphi_OIHit[trig][level-1]->setAxisTitle("pt", 1);
          hptphi_OIHit[trig][level-1]->setAxisTitle("#phi", 2);
          sprintf(name,"HLTMuonL%i_pteta_OIHit",level);
          sprintf(title,"L%i Muon pt vs #eta_OIHit",level);
          hpteta_OIHit[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., 200, NBINS, -2.5, 2.5);
          hpteta_OIHit[trig][level-1]->setAxisTitle("pt", 1);
          hpteta_OIHit[trig][level-1]->setAxisTitle("#eta", 2);
          sprintf(name,"HLTMuonL%i_charge_OIHit",level);
          sprintf(title,"L%i Muon Charge_OIHit",level);
          hcharge_OIHit[trig][level-1]  = dbe_->book1D(name,title, 3, -1.5, 1.5);
          hcharge_OIHit[trig][level-1]->setAxisTitle("Charge", 1);
 
          sprintf(name,"HLTMuonL%i_d0_OIHit",level);
          sprintf(title,"L%i Muon from OIHit radial impact vs (0,0)",level);
          hd0_OIHit[trig][level-1] = dbe_->book1D(name,title, 50, -0.3, 0.3 );
          hd0_OIHit[trig][level-1]->setAxisTitle("R Impact (cm) vs 0,0", 1);
          sprintf(name,"HLTMuonL%i_dz_OIHit",level);
          sprintf(title,"L%i Muon from OIHit Z impact vs BeamSpot",level);
          hdz_OIHit[trig][level-1] = dbe_->book1D(name,title, NBINS, -25., 25.);
          hdz_OIHit[trig][level-1]->setAxisTitle("Z impact (cm) vs BeamSpot", 1);
          sprintf(name,"HLTMuonL%i_dr_OIHit",level);
          sprintf(title,"L%i Muon from OIHit radial impact vs BeamSpot",level);
          hdr_OIHit[trig][level-1] = dbe_->book1D(name,title, 50, -0.3, 0.3 );
          hdr_OIHit[trig][level-1]->setAxisTitle("R Impact (cm) vs BeamSpot", 1);

          sprintf(name,"HLTMuonL%i_trk_OIHit_NMu",level);
          sprintf(title," L%i OIHit tracker number of muons",level);
          hNMu_trk_OIHit[trig][level-1] = dbe_->book1D(name,title, 10, -0.5, 10.5);
          hNMu_trk_OIHit[trig][level-1]->setAxisTitle("Number of muons", 1);
          sprintf(name,"HLTMuonL%i_trk_OIHit_pt",level);
          sprintf(title,"L%i OIHit tracker Muon Pt",level);
          hpt_trk_OIHit[trig][level-1] = dbe_->book1D(name,title, NBINS, 0., 200);
          hpt_trk_OIHit[trig][level-1]->setAxisTitle("Pt", 1);
          sprintf(name,"HLTMuonL%i_trk_OIHit_eta",level);
          sprintf(title,"L%i OIHit tracker Muon #eta",level);
          heta_trk_OIHit[trig][level-1] = dbe_->book1D(name,title, NBINS, -2.5, 2.5);
          heta_trk_OIHit[trig][level-1]->setAxisTitle("#eta", 1);
          sprintf(name,"HLTMuonL%i_trk_OIHit_phi",level);
          sprintf(title,"L%i OIHit tracker Muon #phi",level);
          hphi_trk_OIHit[trig][level-1] = dbe_->book1D(name,title, NBINS, -3.15, 3.15);
          hphi_trk_OIHit[trig][level-1]->setAxisTitle("#phi", 1);
          sprintf(name,"HLTMuonL%i_trk_OIHit_etaphi",level);
          sprintf(title,"L%i OIHit tracker Muon #eta vs #phi",level);
          hetaphi_trk_OIHit[trig][level-1] = dbe_->book2D(name,title, NBINS, -3.15, 3.15, NBINS, -2.5, 2.5);
          hetaphi_trk_OIHit[trig][level-1]->setAxisTitle("#phi", 1);
          hetaphi_trk_OIHit[trig][level-1]->setAxisTitle("#eta", 2);
          sprintf(name,"HLTMuonL%i_trk_OIHit_ptphi",level);
          sprintf(title,"L%i OIHit tracker Muon pt vs #phi",level);
          hptphi_trk_OIHit[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., 200, NBINS, -3.15, 3.15);
          hptphi_trk_OIHit[trig][level-1]->setAxisTitle("pt", 1);
          hptphi_trk_OIHit[trig][level-1]->setAxisTitle("#phi", 2);
          sprintf(name,"HLTMuonL%i_trk_OIHit_pteta",level);
          sprintf(title,"L%i OIHit tracker Muon pt vs #eta",level);
          hpteta_trk_OIHit[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., 200, NBINS, -2.5, 2.5);
          hpteta_trk_OIHit[trig][level-1]->setAxisTitle("pt", 1);
          hpteta_trk_OIHit[trig][level-1]->setAxisTitle("#eta", 2);
          sprintf(name,"HLTMuonL%i_trk_OIHit_charge",level);
          sprintf(title,"L%i OIHit tracker Muon Charge",level);
          hcharge_trk_OIHit[trig][level-1]  = dbe_->book1D(name,title, 3, -1.5, 1.5);
          hcharge_trk_OIHit[trig][level-1]->setAxisTitle("Charge", 1);
          sprintf(name,"HLTMuonL%i_trk_OIHit_d0",level);
          sprintf(title,"L%i OIHit tracker Muon from  radial impact vs (0,0)",level);
          hd0_trk_OIHit[trig][level-1] = dbe_->book1D(name,title, 50, -0.3, 0.3 );
          hd0_trk_OIHit[trig][level-1]->setAxisTitle("R Impact (cm) vs 0,0", 1);
          sprintf(name,"HLTMuonL%i_trk_OIHit_dz",level);
          sprintf(title,"L%i OIHit tracker Muon from Z impact vs BeamSpot",level);
          hdz_trk_OIHit[trig][level-1] = dbe_->book1D(name,title, NBINS, -25., 25.);
          hdz_trk_OIHit[trig][level-1]->setAxisTitle("Z impact (cm) vs BeamSpot", 1);
          sprintf(name,"HLTMuonL%i_trk_OIHit_dr",level);
          sprintf(title,"L%i OIHit tracker Muon radial impact vs BeamSpot",level);
          hdr_trk_OIHit[trig][level-1] = dbe_->book1D(name,title, 50, -0.3, 0.3 );
          hdr_trk_OIHit[trig][level-1]->setAxisTitle("R Impact (cm) vs BeamSpot", 1);

          dbe_->setCurrentFolder(monitorName_+dirname+"Level3/IOHit");

          sprintf(name,"HLTMuonL%i_NMu_IOHit",level);
          sprintf(title,"IOHit L%i number of muons",level);
          hNMu_IOHit[trig][level-1] = dbe_->book1D(name,title, 10, -0.5, 10.5);
          hNMu_IOHit[trig][level-1]->setAxisTitle("Number of muons", 1);

          sprintf(name,"HLTMuonL%i_pt_IOHit",level);
          sprintf(title,"L%i Pt_IOHit",level);
          hpt_IOHit[trig][level-1] = dbe_->book1D(name,title, NBINS, 0., 200);
          hpt_IOHit[trig][level-1]->setAxisTitle("Pt", 1);
          sprintf(name,"HLTMuonL%i_eta_IOHit",level);
          sprintf(title,"L%i Muon #eta_IOHit",level);
          heta_IOHit[trig][level-1] = dbe_->book1D(name,title, NBINS, -2.5, 2.5);
          heta_IOHit[trig][level-1]->setAxisTitle("#eta", 1);
          sprintf(name,"HLTMuonL%i_phi_IOHit",level);
          sprintf(title,"L%i Muon #phi_IOHit",level);
          hphi_IOHit[trig][level-1] = dbe_->book1D(name,title, NBINS, -3.15, 3.15);
          hphi_IOHit[trig][level-1]->setAxisTitle("#phi", 1);
          sprintf(name,"HLTMuonL%i_etaphi_IOHit",level);
          sprintf(title,"L%i Muon #eta vs #phi_IOHit",level);
          hetaphi_IOHit[trig][level-1] = dbe_->book2D(name,title, NBINS, -3.15, 3.15, NBINS, -2.5, 2.5);
          hetaphi_IOHit[trig][level-1]->setAxisTitle("#phi", 1);
          hetaphi_IOHit[trig][level-1]->setAxisTitle("#eta", 2);
          sprintf(name,"HLTMuonL%i_ptphi_IOHit",level);
          sprintf(title,"L%i Muon pt vs #phi_IOHit",level);
          hptphi_IOHit[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., 200, NBINS, -3.15, 3.15);
          hptphi_IOHit[trig][level-1]->setAxisTitle("pt", 1);
          hptphi_IOHit[trig][level-1]->setAxisTitle("#phi", 2);
          sprintf(name,"HLTMuonL%i_pteta_IOHit",level);
          sprintf(title,"L%i Muon pt vs #eta_IOHit",level);
          hpteta_IOHit[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., 200, NBINS, -2.5, 2.5);
          hpteta_IOHit[trig][level-1]->setAxisTitle("pt", 1);
          hpteta_IOHit[trig][level-1]->setAxisTitle("#eta", 2);
          sprintf(name,"HLTMuonL%i_charge_IOHit",level);
          sprintf(title,"L%i Muon Charge_IOHit",level);
          hcharge_IOHit[trig][level-1]  = dbe_->book1D(name,title, 3, -1.5, 1.5);
          hcharge_IOHit[trig][level-1]->setAxisTitle("Charge", 1);

          sprintf(name,"HLTMuonL%i_d0_IOHit",level);
          sprintf(title,"L%i Muon from IOHit radial impact vs (0,0)",level);
          hd0_IOHit[trig][level-1] = dbe_->book1D(name,title, 50, -0.3, 0.3 );
          hd0_IOHit[trig][level-1]->setAxisTitle("R Impact (cm) vs 0,0", 1);
          sprintf(name,"HLTMuonL%i_dz_IOHit",level);
          sprintf(title,"L%i Muon from IOHit Z impact vs BeamSpot",level);
          hdz_IOHit[trig][level-1] = dbe_->book1D(name,title, NBINS, -25., 25.);
          hdz_IOHit[trig][level-1]->setAxisTitle("Z impact (cm) vs BeamSpot", 1);
          sprintf(name,"HLTMuonL%i_dr_IOHit",level);
          sprintf(title,"L%i Muon from IOHit radial impact vs BeamSpot",level);
          hdr_IOHit[trig][level-1] = dbe_->book1D(name,title, 50, -0.3, 0.3 );
          hdr_IOHit[trig][level-1]->setAxisTitle("R Impact (cm) vs BeamSpot", 1);

          sprintf(name,"HLTMuonL%i_trk_IOHit_NMu",level);
          sprintf(title," L%i IOHit tracker number of muons",level);
          hNMu_trk_IOHit[trig][level-1] = dbe_->book1D(name,title, 10, -0.5, 10.5);
          hNMu_trk_IOHit[trig][level-1]->setAxisTitle("Number of muons", 1);
          sprintf(name,"HLTMuonL%i_trk_IOHit_pt",level);
          sprintf(title,"L%i IOHit tracker Muon Pt",level);
          hpt_trk_IOHit[trig][level-1] = dbe_->book1D(name,title, NBINS, 0., 200);
          hpt_trk_IOHit[trig][level-1]->setAxisTitle("Pt", 1);
          sprintf(name,"HLTMuonL%i_trk_IOHit_eta",level);
          sprintf(title,"L%i IOHit tracker Muon #eta",level);
          heta_trk_IOHit[trig][level-1] = dbe_->book1D(name,title, NBINS, -2.5, 2.5);
          heta_trk_IOHit[trig][level-1]->setAxisTitle("#eta", 1);
          sprintf(name,"HLTMuonL%i_trk_IOHit_phi",level);
          sprintf(title,"L%i IOHit tracker Muon #phi",level);
          hphi_trk_IOHit[trig][level-1] = dbe_->book1D(name,title, NBINS, -3.15, 3.15);
          hphi_trk_IOHit[trig][level-1]->setAxisTitle("#phi", 1);
          sprintf(name,"HLTMuonL%i_trk_IOHit_etaphi",level);
          sprintf(title,"L%i IOHit tracker Muon #eta vs #phi",level);
          hetaphi_trk_IOHit[trig][level-1] = dbe_->book2D(name,title, NBINS, -3.15, 3.15, NBINS, -2.5, 2.5);
          hetaphi_trk_IOHit[trig][level-1]->setAxisTitle("#phi", 1);
          hetaphi_trk_IOHit[trig][level-1]->setAxisTitle("#eta", 2);
          sprintf(name,"HLTMuonL%i_trk_IOHit_ptphi",level);
          sprintf(title,"L%i IOHit tracker Muon pt vs #phi",level);
          hptphi_trk_IOHit[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., 200, NBINS, -3.15, 3.15);
          hptphi_trk_IOHit[trig][level-1]->setAxisTitle("pt", 1);
          hptphi_trk_IOHit[trig][level-1]->setAxisTitle("#phi", 2);
          sprintf(name,"HLTMuonL%i_trk_IOHit_pteta",level);
          sprintf(title,"L%i IOHit tracker Muon pt vs #eta",level);
          hpteta_trk_IOHit[trig][level-1] = dbe_->book2D(name,title, NBINS, 0., 200, NBINS, -2.5, 2.5);
          hpteta_trk_IOHit[trig][level-1]->setAxisTitle("pt", 1);
          hpteta_trk_IOHit[trig][level-1]->setAxisTitle("#eta", 2);
          sprintf(name,"HLTMuonL%i_trk_IOHit_charge",level);
          sprintf(title,"L%i IOHit tracker Muon Charge",level);
          hcharge_trk_IOHit[trig][level-1]  = dbe_->book1D(name,title, 3, -1.5, 1.5);
          hcharge_trk_IOHit[trig][level-1]->setAxisTitle("Charge", 1);
          sprintf(name,"HLTMuonL%i_trk_IOHit_d0",level);
          sprintf(title,"L%i IOHit tracker Muon from  radial impact vs (0,0)",level);
          hd0_trk_IOHit[trig][level-1] = dbe_->book1D(name,title, 50, -0.3, 0.3 );
          hd0_trk_IOHit[trig][level-1]->setAxisTitle("R Impact (cm) vs 0,0", 1);
          sprintf(name,"HLTMuonL%i_trk_IOHit_dz",level);
          sprintf(title,"L%i IOHit tracker Muon from Z impact vs BeamSpot",level);
          hdz_trk_IOHit[trig][level-1] = dbe_->book1D(name,title, NBINS, -25., 25.);
          hdz_trk_IOHit[trig][level-1]->setAxisTitle("Z impact (cm) vs BeamSpot", 1);
          sprintf(name,"HLTMuonL%i_trk_IOHit_dr",level);
          sprintf(title,"L%i IOHit tracker Muon radial impact vs BeamSpot",level);
          hdr_trk_IOHit[trig][level-1] = dbe_->book1D(name,title, 50, -0.3, 0.3 );
          hdr_trk_IOHit[trig][level-1]->setAxisTitle("R Impact (cm) vs BeamSpot", 1);

        }
        if (level < 3 ) {

          // res
          sprintf(name,"HLTMuonL%itoL%i_ptres",level,level+1);
          sprintf(title,"L%iMuon1/Pt - L%iMuon1/Pt",level,level+1);         
          hptres[trig][level-1] = dbe_->book1D(name,title, NBINS, -0.1, 0.1);
          sprintf(title,"1/PtL%i - 1/PtL%i",level,level+1);         
          hptres[trig][level-1]->setAxisTitle(title, 1);
          sprintf(name,"HLTMuonL%itoL%i_etares",level,level+1);
          sprintf(title,"L%iMuon#eta - L%iMuon#eta",level,level+1);         
          hetares[trig][level-1] =dbe_->book1D(name,title, NBINS, -0.1, 0.1);
          sprintf(title,"L%i #eta - L%i #eta",level,level+1);         
          hetares[trig][level-1]->setAxisTitle(title, 1);
          sprintf(name,"HLTMuonL%itoL%i_phires",level,level+1);
          sprintf(title,"L%iMuon#phi - L%iMuon#phi",level,level+1);         
          hphires[trig][level-1] =dbe_->book1D(name,title, NBINS, -0.1, 0.1);
          sprintf(title,"L%i #phi - L%i #phi",level,level+1);         
          hphires[trig][level-1]->setAxisTitle(title, 1);

          sprintf(name,"HLTMuonL%itoL%i_ptrespt",level,level+1);
          sprintf(title,"L%i Muon #Delta Pt vs Pt ",level);         
          hptrespt[trig][level-1] =dbe_->bookProfile(name,title, NBINS, 0, pt_max,1,-999.,999.,"s");
          sprintf(title,"1/PtL%i - 1/PtL%i",level,level+1);         
          hptrespt[trig][level-1]->setAxisTitle(title, 2);
          hptrespt[trig][level-1]->setAxisTitle("Pt", 1);
          sprintf(name,"HLTMuonL%itoL%i_phiresphi",level,level+1);
          sprintf(title,"L%i Muon #Delta#phi vs #phi ",level);         
          hphiresphi[trig][level-1] =dbe_->bookProfile(name,title, NBINS, -3.15, 3.15,1,-999.,999.,"s");
          sprintf(title,"L%i #phi - L%i #phi",level,level+1);         
          hphiresphi[trig][level-1]->setAxisTitle(title, 2);
          hphiresphi[trig][level-1]->setAxisTitle("#phi", 1);
          sprintf(name,"HLTMuonL%itoL%i_etareseta",level,level+1);
          sprintf(title,"L%i Muon #Delta#eta vs #eta ",level);         
          hetareseta[trig][level-1] =dbe_->bookProfile(name,title, NBINS,-2.5, 2.5,1,-999.,999.,"s");
          sprintf(title,"L%i #eta - L%i #eta",level,level+1);         
          hetareseta[trig][level-1]->setAxisTitle(title, 2);
          hetareseta[trig][level-1]->setAxisTitle("#eta", 1);

          // relres
          sprintf(name,"HLTMuonL%itoL%i_ptrelres",level,level+1);
          sprintf(title,"(L%iMuon1/Pt - L%iMuon1/Pt)/(L%iMuon1/Pt)",level,level+1,level+1);         
          hptrelres[trig][level-1] = dbe_->book1D(name,title, NBINS, -1.0, 1.0);
          sprintf(title,"(1/PtL%i - 1/PtL%i)/(1/PtL%i)",level,level+1,level+1);         
          hptrelres[trig][level-1]->setAxisTitle(title, 1);
          sprintf(name,"HLTMuonL%itoL%i_etarelres",level,level+1);
          sprintf(title,"(L%iMuon#eta - L%iMuon#eta)/L%iMuon#eta",level,level+1,level+1);         
          hetarelres[trig][level-1] =dbe_->book1D(name,title, NBINS, -1.0, 1.0);
          sprintf(title,"(L%i #eta - L%i #eta)/L%i #eta",level,level+1,level+1);         
          hetarelres[trig][level-1]->setAxisTitle(title, 1);
          sprintf(name,"HLTMuonL%itoL%i_phirelres",level,level+1);
          sprintf(title,"(L%iMuon#phi - L%iMuon#phi)/L%iMuon#phi",level,level+1,level+1);         
          hphirelres[trig][level-1] =dbe_->book1D(name,title, NBINS, -1.0, 1.0);
          sprintf(title,"(L%i #phi - L%i #phi)/L%i #phi",level,level+1,level+1);         
          hphirelres[trig][level-1]->setAxisTitle(title, 1);

          sprintf(name,"HLTMuonL%itoL%i_ptrelrespt",level,level+1);
          sprintf(title,"L%i Muon #DeltaPt/Pt vs Pt ",level);         
          hptrelrespt[trig][level-1] =dbe_->bookProfile(name,title, NBINS, 0, pt_max,1,-999.,999.,"s");
          sprintf(title,"(1/PtL%i - 1/PtL%i)/(1/PtL%i)",level,level+1,level+1);         
          hptrelrespt[trig][level-1]->setAxisTitle(title, 2);
          hptrelrespt[trig][level-1]->setAxisTitle("Pt", 1);
          sprintf(name,"HLTMuonL%itoL%i_phirelresphi",level,level+1);
          sprintf(title,"L%i Muon #Delta#phi/#phi vs #phi ",level);         
          hphirelresphi[trig][level-1] =dbe_->bookProfile(name,title, NBINS, -3.15, 3.15,1,-999.,999.,"s");
          sprintf(title,"(L%i #phi - L%i #phi)/L%i #phi",level,level+1,level+1);         
          hphirelresphi[trig][level-1]->setAxisTitle(title, 2);
          hphirelresphi[trig][level-1]->setAxisTitle("#phi", 1);
          sprintf(name,"HLTMuonL%itoL%i_etarelreseta",level,level+1);
          sprintf(title,"L%i Muon #Delta#eta/#eta vs #eta ",level);         
          hetarelreseta[trig][level-1] =dbe_->bookProfile(name,title, NBINS,-2.5, 2.5,1,-999.,999.,"s");
          sprintf(title,"(L%i #eta - L%i #eta)/L%i #eta",level,level+1,level+1);         
          hetarelreseta[trig][level-1]->setAxisTitle(title, 2);
          hetarelreseta[trig][level-1]->setAxisTitle("#eta", 1);
          // charge conversion
          sprintf(name,"HLTMuonL%itoL%i_chargeconvers",level,level+1);
          sprintf(title,"L%i Muon charge #rightarrow L%i Muon charge",level,level+1);         
          hchargeconv[trig][level-1] =dbe_->book1D(name,title, 4, 0, 4);
          hchargeconv[trig][level-1]->setAxisTitle(title, 1);
          hchargeconv[trig][level-1]->setBinLabel(1, "- #rightarrow -", 1);
          hchargeconv[trig][level-1]->setBinLabel(2, "- #rightarrow +", 1);
          hchargeconv[trig][level-1]->setBinLabel(3, "+ #rightarrow -", 1);
          hchargeconv[trig][level-1]->setBinLabel(4, "+ #rightarrow +", 1);
          // reconstruction fraction with dependence
          sprintf(name,"HLTMuonL%itoL%i_fracpt",level,level+1);
          sprintf(title,"#ofL%iMuon/#ofL%iMuon",level+1,level);         
          hptfrac[trig][level-1] = dbe_->book1D(name,title, 40, 0, pt_max);
          hptfrac[trig][level-1]->setAxisTitle("Pt", 1);
          sprintf(name,"HLTMuonL%itoL%i_fraceta",level,level+1);
          sprintf(title,"#ofL%iMuon/#ofL%iMuon",level+1,level);         
          hetafrac[trig][level-1] = dbe_->book1D(name,title, 40, -2.5, 2.5);
          hetafrac[trig][level-1]->setAxisTitle("#eta", 1);
          sprintf(name,"HLTMuonL%itoL%i_fracphi",level,level+1);
          sprintf(title,"#ofL%iMuon/#ofL%iMuon",level+1,level);         
          hphifrac[trig][level-1] = dbe_->book1D(name,title, 40, -3.15, 3.15);
          hphifrac[trig][level-1]->setAxisTitle("#phi", 1);
          if (level  == 1 ){
            // res
            sprintf(name,"HLTMuonL%itoL3_ptres",level);
            sprintf(title,"L%iMuon1/Pt - L%iMuon1/Pt",level,level+2);         
            hptres[trig][level+1] = dbe_->book1D(name,title, NBINS, -0.1, 0.1);
            sprintf(title,"1/PtL%i - 1/PtL%i",level,level+2);         
            hptres[trig][level+1]->setAxisTitle(title, 1);
            sprintf(name,"HLTMuonL%itoL3_etares",level);
            sprintf(title,"L%iMuon#eta - L3Muon#eta",level);         
            hetares[trig][level+1] =dbe_->book1D(name,title, NBINS, -0.1, 0.1);
            sprintf(title,"L%i #eta - L3 #eta",level);         
            hetares[trig][level+1]->setAxisTitle(title, 1);
            sprintf(name,"HLTMuonL%itoL3_phires",level);
            sprintf(title,"L%iMuon#phi - L3Muon#phi",level);         
            hphires[trig][level+1] =dbe_->book1D(name,title, NBINS, -0.1, 0.1);
            sprintf(title,"L%i #phi - L3 #phi",level);         
            hphires[trig][level+1]->setAxisTitle(title, 1);

            sprintf(name,"HLTMuonL%itoL3_ptrespt",level);
            sprintf(title,"L%i Muon #Delta Pt vs Pt (wrt L3) ",level);         
            hptrespt[trig][level+1] =dbe_->bookProfile(name,title, NBINS, 0, pt_max,1,-999.,999.,"s");
            sprintf(title,"1/PtL%i - 1/PtL3",level);         
            hptrespt[trig][level+1]->setAxisTitle(title, 2);
            hptrespt[trig][level+1]->setAxisTitle("Pt", 1);
            sprintf(name,"HLTMuonL%itoL3_phiresphi",level);
            sprintf(title,"L%i Muon #Delta#phi vs #phi (wrt L3) ",level);         
            hphiresphi[trig][level+1] =dbe_->bookProfile(name,title, NBINS, -3.15, 3.15,1,-999.,999.,"s");
            sprintf(title,"L%i #phi - L3 #phi",level);         
            hphiresphi[trig][level+1]->setAxisTitle(title, 2);
            hphiresphi[trig][level+1]->setAxisTitle("#phi", 1);
            sprintf(name,"HLTMuonL%itoL3_etareseta",level);
            sprintf(title,"L%i Muon #Delta#eta vs #eta (wrt L3) ",level);         
            hetareseta[trig][level+1] =dbe_->bookProfile(name,title, NBINS,-2.5, 2.5,1,-999.,999.,"s");
            sprintf(title,"L%i #eta - L3 #eta",level);         
            hetareseta[trig][level+1]->setAxisTitle(title, 2);
            hetareseta[trig][level+1]->setAxisTitle("#eta", 1);

            // relres
            sprintf(name,"HLTMuonL%itoL3_ptrelres",level);
            sprintf(title,"(L%iMuon1/Pt - L%iMuon1/Pt)/(L%iMuon1/Pt)",level,level+2,level+2); 
            hptrelres[trig][level+1] = dbe_->book1D(name,title, NBINS, -1.0, 1.0);
            sprintf(title,"(1/PtL%i - 1/PtL3)/(1/PtL3)",level);         
            hptrelres[trig][level+1]->setAxisTitle(title, 1);
            sprintf(name,"HLTMuonL%itoL3_etarelres",level);
            sprintf(title,"(L%iMuon#eta - L3Muon#eta)/L3Muon#eta",level);         
            hetarelres[trig][level+1] =dbe_->book1D(name,title, NBINS, -1.0, 1.0);
            sprintf(title,"(L%i #eta - L3 #eta)/L3 #eta",level);         
            hetarelres[trig][level+1]->setAxisTitle(title, 1);
            sprintf(name,"HLTMuonL%itoL3_phirelres",level);
            sprintf(title,"(L%iMuon#phi - L3Muon#phi)/L3Muon#phi",level);         
            hphirelres[trig][level+1] =dbe_->book1D(name,title, NBINS, -1.0, 1.0);
            sprintf(title,"(L%i #phi - L3 #phi)/L3 #phi",level);         
            hphirelres[trig][level+1]->setAxisTitle(title, 1);

            sprintf(name,"HLTMuonL%itoL3_ptrelrespt",level);
            sprintf(title,"L%i Muon #DeltaPt/Pt vs Pt (wrt L3) ",level);         
            hptrelrespt[trig][level+1] =dbe_->bookProfile(name,title, NBINS, 0, pt_max,1,-999.,999.,"s");
            sprintf(title,"(1/PtL%i - 1/PtL3)/(1/PtL3)",level);         
            hptrelrespt[trig][level+1]->setAxisTitle(title, 2);
            hptrelrespt[trig][level+1]->setAxisTitle("Pt", 1);
            sprintf(name,"HLTMuonL%itoL3_phirelresphi",level);
            sprintf(title,"L%i Muon #Delta#phi/#phi vs #phi (wrt L3) ",level);         
            hphirelresphi[trig][level+1] =dbe_->bookProfile(name,title, NBINS, -3.15, 3.15,1,-999.,999.,"s");
            sprintf(title,"(L%i #phi - L3 #phi)/L3 #phi",level);         
            hphirelresphi[trig][level+1]->setAxisTitle(title, 2);
            hphirelresphi[trig][level+1]->setAxisTitle("#phi", 1);
            sprintf(name,"HLTMuonL%itoL3_etarelreseta",level);
            sprintf(title,"L%i Muon #Delta#eta/#eta vs #eta (wrt L3) ",level);         
            hetarelreseta[trig][level+1] =dbe_->bookProfile(name,title, NBINS,-2.5, 2.5,1,-999.,999.,"s");
            sprintf(title,"(L%i #eta - L3 #eta)/L3 #eta",level);         
            hetarelreseta[trig][level+1]->setAxisTitle(title, 2);
            hetarelreseta[trig][level+1]->setAxisTitle("#eta", 1);

            sprintf(name,"HLTMuonL%itoL3_chargeconvers",level);
            sprintf(title,"L%i Muon charge #rightarrow L3 Muon charge",level);         
            hchargeconv[trig][level+1] =dbe_->book1D(name,title, 4, 0, 4);
            hchargeconv[trig][level+1]->setAxisTitle(title, 1);
            hchargeconv[trig][level+1]->setBinLabel(1, "- #rightarrow -", 1);
            hchargeconv[trig][level+1]->setBinLabel(2, "- #rightarrow +", 1);
            hchargeconv[trig][level+1]->setBinLabel(3, "+ #rightarrow -", 1);
            hchargeconv[trig][level+1]->setBinLabel(4, "+ #rightarrow +", 1);
          }

        }
      }
      if(verbose_)dbe_->showDirStructure();
    }
    // Muon det id is 2 pushed in bits 28:31
    const unsigned int detector_id = 2<<28;
    dbe_->tagContents(monitorName_, detector_id);
  } 

  for( int trig = 0; trig < nTrigs; trig++ ) {
    for( int level = 1; level < 3; ++level ) {
      char name[512];

      sprintf(name, "DenominatorL%iptTrig%i", level, trig);
      _hpt1[trig][level-1] = new TH1D(name, name, 40, 0, 145);
      sprintf(name, "NumeratorL%iptTrig%i", level, trig);
      _hpt2[trig][level-1] = new TH1D(name, name, 40, 0, 145);
      sprintf(name, "DenominatorL%ietaTrig%i", level, trig);
      _heta1[trig][level-1] = new TH1D(name, name, 40, -2.5, 2.5);
      sprintf(name, "NumeratorL%ietaTrig%i", level, trig);
      _heta2[trig][level-1] = new TH1D(name, name, 40, -2.5, 2.5);
      sprintf(name, "DenominatorL%iphiTrig%i", level, trig);
      _hphi1[trig][level-1] = new TH1D(name, name, 40, -3.15, 3.15);
      sprintf(name, "NumeratorL%iphiTrig%i", level, trig);
      _hphi2[trig][level-1] = new TH1D(name, name, 40, -3.15, 3.15);

    }
  }
}
void HLTMuonDQMSource::beginLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup eventSetup 
) [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 1327 of file HLTMuonDQMSource.cc.

                                     {

}
void HLTMuonDQMSource::beginRun ( const edm::Run run,
const edm::EventSetup eventSetup 
) [protected, virtual]

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 1322 of file HLTMuonDQMSource.cc.

                                                                                  {

}
void HLTMuonDQMSource::endJob ( void  ) [protected, virtual]

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 2164 of file HLTMuonDQMSource.cc.

References counterEvt_.

                             {
  edm::LogInfo("HLTMonMuon") << "analyzed " << counterEvt_ << " events";
  //std::cout << "analyzed = " << counterEvt_ << " , triggered = " << nTrig_ << std::endl;


  //if (outputFile_.size() != 0 && dbe_)
  //dbe_->save(outputFile_);

  return;
}
void HLTMuonDQMSource::endLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup eventSetup 
) [protected, virtual]

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 2157 of file HLTMuonDQMSource.cc.

                                     {
}
void HLTMuonDQMSource::endRun ( const edm::Run run,
const edm::EventSetup eventSetup 
) [protected, virtual]

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 2161 of file HLTMuonDQMSource.cc.

                                                                               {
}

Member Data Documentation

TH1D* HLTMuonDQMSource::_heta1[NTRIG][2] [private]

Definition at line 184 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

TH1D * HLTMuonDQMSource::_heta2[NTRIG][2] [private]

Definition at line 184 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

TH1D* HLTMuonDQMSource::_hphi1[NTRIG][2] [private]

Definition at line 185 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

TH1D * HLTMuonDQMSource::_hphi2[NTRIG][2] [private]

Definition at line 185 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

TH1D* HLTMuonDQMSource::_hpt1[NTRIG][2] [private]

Definition at line 183 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

TH1D * HLTMuonDQMSource::_hpt2[NTRIG][2] [private]

Definition at line 183 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

double HLTMuonDQMSource::coneSize_ [private]

every n events

Definition at line 66 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 63 of file HLTMuonDQMSource.h.

Referenced by analyze(), and endJob().

Definition at line 60 of file HLTMuonDQMSource.h.

Referenced by analyze(), beginJob(), and HLTMuonDQMSource().

Definition at line 105 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 226 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 225 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 224 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 229 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 262 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 251 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 240 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 106 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 121 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 190 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 189 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

added plots

Definition at line 188 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 236 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 269 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 258 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 247 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 125 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 135 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 120 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 196 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 195 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 194 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 238 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 271 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 260 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 249 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 124 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 122 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 123 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 127 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 193 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 192 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 191 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 237 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 270 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 259 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 248 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 126 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 128 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 108 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 211 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 210 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 209 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 231 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 264 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 253 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 242 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 140 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 119 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 220 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 219 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 218 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 235 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 268 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 257 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 246 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 147 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 148 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 154 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 277 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 155 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 115 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 274 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 116 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 136 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 137 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 138 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 178 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 179 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 129 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 104 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 198 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 205 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 200 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 204 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 203 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 228 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 199 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 261 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 250 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 239 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 134 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 132 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 133 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 131 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 130 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 109 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 214 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 110 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 213 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 212 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 232 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 265 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 254 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 243 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 141 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 149 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 150 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 156 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 278 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 157 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 117 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 275 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 118 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 107 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 208 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 207 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 206 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 230 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 263 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 252 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 241 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 112 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 217 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 216 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 215 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 233 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 266 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 255 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 244 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 139 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 111 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 223 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 222 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 221 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 234 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 267 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 256 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 245 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 145 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 146 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 152 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 276 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 153 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 113 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 273 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 114 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 159 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 143 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 151 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 160 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 144 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 158 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 142 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 176 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 177 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 165 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 168 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 161 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 162 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 171 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 170 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 172 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 164 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 167 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 166 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 169 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 163 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 174 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 173 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 175 of file HLTMuonDQMSource.h.

Referenced by analyze(), and beginJob().

Definition at line 68 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 69 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 70 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 72 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 73 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 95 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 98 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 97 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 96 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 71 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 84 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 83 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 82 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 93 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 88 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 87 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 86 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 92 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 91 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 90 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

std::string HLTMuonDQMSource::monitorName_ [private]

Definition at line 61 of file HLTMuonDQMSource.h.

Referenced by beginJob(), and HLTMuonDQMSource().

Definition at line 67 of file HLTMuonDQMSource.h.

Definition at line 67 of file HLTMuonDQMSource.h.

Definition at line 67 of file HLTMuonDQMSource.h.

Definition at line 67 of file HLTMuonDQMSource.h.

const int HLTMuonDQMSource::NTRIG = 20 [static, private]

Definition at line 101 of file HLTMuonDQMSource.h.

Referenced by analyze().

int HLTMuonDQMSource::nTrig_ [private]

counter

Definition at line 64 of file HLTMuonDQMSource.h.

Referenced by analyze().

int HLTMuonDQMSource::nTrigs [private]

Definition at line 102 of file HLTMuonDQMSource.h.

Referenced by analyze(), beginJob(), and HLTMuonDQMSource().

std::string HLTMuonDQMSource::outputFile_ [private]

Definition at line 62 of file HLTMuonDQMSource.h.

Referenced by HLTMuonDQMSource().

Definition at line 58 of file HLTMuonDQMSource.h.

Referenced by HLTMuonDQMSource().

mutriggered events

Definition at line 65 of file HLTMuonDQMSource.h.

Referenced by analyze(), beginJob(), and HLTMuonDQMSource().

std::string HLTMuonDQMSource::striggers_[20] [private]

Definition at line 80 of file HLTMuonDQMSource.h.

Referenced by beginJob(), and HLTMuonDQMSource().

std::vector<std::string> HLTMuonDQMSource::theDirectoryName [private]

Definition at line 78 of file HLTMuonDQMSource.h.

Referenced by analyze(), beginJob(), and HLTMuonDQMSource().

std::vector<std::string> HLTMuonDQMSource::theHLTCollectionLevel [private]

Definition at line 79 of file HLTMuonDQMSource.h.

Referenced by analyze(), beginJob(), and HLTMuonDQMSource().

std::vector<std::string> HLTMuonDQMSource::theTriggerBits [private]

Definition at line 77 of file HLTMuonDQMSource.h.

Referenced by analyze(), beginJob(), and HLTMuonDQMSource().

Definition at line 75 of file HLTMuonDQMSource.h.

Referenced by analyze(), and HLTMuonDQMSource().

Definition at line 100 of file HLTMuonDQMSource.h.

Referenced by beginJob(), and HLTMuonDQMSource().

float HLTMuonDQMSource::XMAX [private]

Definition at line 181 of file HLTMuonDQMSource.h.

Referenced by beginJob().

float HLTMuonDQMSource::XMIN [private]

Definition at line 181 of file HLTMuonDQMSource.h.

Referenced by beginJob().