CMS 3D CMS Logo

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

RCTMonitor Class Reference

#include <RCTMonitor.h>

Inheritance diagram for RCTMonitor:
edm::EDAnalyzer

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginJob ()
void BookRCT ()
virtual void endJob (void)
void FillRCT (const edm::Event &, const edm::EventSetup &)
 RCTMonitor (const edm::ParameterSet &)
 ~RCTMonitor ()

Private Member Functions

 RCTMonitor ()

Private Attributes

DQMStorem_dbe
bool m_enableMonitorDaemon
int m_nevts
std::string m_outputFileName
MonitorElementm_rctIsoEmOccEtaPhi1
MonitorElementm_rctIsoEmOccEtaPhi10
MonitorElementm_rctIsoEmRank1
MonitorElementm_rctIsoEmRank10
MonitorElementm_rctIsoEmRankEtaPhi1
MonitorElementm_rctIsoEmRankEtaPhi10
MonitorElementm_rctNonIsoEmOccEtaPhi1
MonitorElementm_rctNonIsoEmOccEtaPhi10
MonitorElementm_rctNonIsoEmRank1
MonitorElementm_rctNonIsoEmRank10
MonitorElementm_rctNonIsoEmRankEtaPhi1
MonitorElementm_rctNonIsoEmRankEtaPhi10
MonitorElementm_rctRegionEt
MonitorElementm_rctRegionsEtEtaPhi
MonitorElementm_rctRegionsOccEtaPhi
MonitorElementm_rctRelaxedEmOccEtaPhi1
MonitorElementm_rctRelaxedEmOccEtaPhi10
MonitorElementm_rctRelaxedEmRank1
MonitorElementm_rctRelaxedEmRank10
MonitorElementm_rctRelaxedEmRankEtaPhi1
MonitorElementm_rctRelaxedEmRankEtaPhi10
edm::InputTag m_rctSource
MonitorElementm_rctTauVetoEtaPhi
bool m_writeOutputFile

Static Private Attributes

static const unsigned int ETABINS = 22
static const float ETAMAX = 21.5
static const float ETAMIN = -0.5
static const unsigned int L1EETABINS = 22
static const float L1EETAMAX = 5
static const float L1EETAMIN = -5
static const unsigned int L1EPHIBINS = 18
static const float L1EPHIMAX = M_PI
static const float L1EPHIMIN = -M_PI
static const unsigned int METPHIBINS = 72
static const float METPHIMAX = 71.5
static const float METPHIMIN = -0.5
static const unsigned int PHIBINS = 18
static const float PHIMAX = 17.5
static const float PHIMIN = -0.5
static const unsigned int R10BINS = 1024
static const float R10MAX = 1023.5
static const float R10MIN = -0.5
static const unsigned int R12BINS = 4096
static const float R12MAX = 4095.5
static const float R12MIN = -0.5
static const unsigned int R6BINS = 64
static const float R6MAX = 63.5
static const float R6MIN = -0.5
static const unsigned int RTPBINS = 101
static const float RTPMAX = 100.5
static const float RTPMIN = -0.5
static const unsigned int TEVBINS = 1001
static const float TEVMAX = 1000.5
static const float TEVMIN = -0.5
static const unsigned int TPETABINS = 65
static const float TPETAMAX = 32.5
static const float TPETAMIN = -32.5
static const unsigned int TPPHIBINS = 72
static const float TPPHIMAX = 72.5
static const float TPPHIMIN = 0.5

Detailed Description

Description: DQM monitor for the Regional Calorimeter Trigger

Definition at line 74 of file RCTMonitor.h.


Constructor & Destructor Documentation

RCTMonitor::RCTMonitor ( const edm::ParameterSet iConfig) [explicit]

Definition at line 6 of file RCTMonitor.cc.

                                                      :
  m_nevts(0),
  m_dbe(edm::Service<DQMStore>().operator->()),
  m_enableMonitorDaemon(iConfig.getUntrackedParameter<bool>("EnableMonitorDaemon")),
  m_rctSource(iConfig.getUntrackedParameter<edm::InputTag>("rctSource")),
  m_writeOutputFile(iConfig.getUntrackedParameter<bool>("WriteOutputFile")),
  m_outputFileName(iConfig.getUntrackedParameter<std::string>("OutputFileName"))
{
}
RCTMonitor::~RCTMonitor ( )

Definition at line 17 of file RCTMonitor.cc.

{
}
RCTMonitor::RCTMonitor ( ) [private]

Member Function Documentation

void RCTMonitor::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [virtual]

Implements edm::EDAnalyzer.

Definition at line 41 of file RCTMonitor.cc.

References FillRCT(), and m_nevts.

{

  // Fill histograms

 
   FillRCT(iEvent,iSetup) ;

   
  // Increment number of events
  m_nevts++;

}
void RCTMonitor::beginJob ( void  ) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 22 of file RCTMonitor.cc.

References BookRCT().

{
   BookRCT() ;
   
}
void RCTMonitor::BookRCT ( )

Definition at line 126 of file RCTMonitor.cc.

References DQMStore::book1D(), DQMStore::book2D(), ETABINS, ETAMAX, ETAMIN, m_dbe, m_rctIsoEmOccEtaPhi1, m_rctIsoEmOccEtaPhi10, m_rctIsoEmRank1, m_rctIsoEmRank10, m_rctIsoEmRankEtaPhi1, m_rctIsoEmRankEtaPhi10, m_rctNonIsoEmOccEtaPhi1, m_rctNonIsoEmOccEtaPhi10, m_rctNonIsoEmRank1, m_rctNonIsoEmRank10, m_rctNonIsoEmRankEtaPhi1, m_rctNonIsoEmRankEtaPhi10, m_rctRegionEt, m_rctRegionsEtEtaPhi, m_rctRegionsOccEtaPhi, m_rctRelaxedEmOccEtaPhi1, m_rctRelaxedEmOccEtaPhi10, m_rctRelaxedEmRank1, m_rctRelaxedEmRank10, m_rctRelaxedEmRankEtaPhi1, m_rctRelaxedEmRankEtaPhi10, m_rctTauVetoEtaPhi, PHIBINS, PHIMAX, PHIMIN, R10BINS, R10MAX, R10MIN, R6BINS, R6MAX, R6MIN, and DQMStore::setCurrentFolder().

Referenced by beginJob().

{
//std::cout << "I am in the RCT booking"  << std::endl ;

  // Book RCT histograms
  m_dbe->setCurrentFolder("RCT");

  m_rctIsoEmRankEtaPhi1     = m_dbe->book2D("RctIsoEmRankEtaPhi",      "ISO EM RANK"         , PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
  m_rctIsoEmOccEtaPhi1      = m_dbe->book2D("RctIsoEmOccEtaPhi",       "ISO EM OCCUPANCY"    , PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
  m_rctIsoEmRank1           = m_dbe->book1D("RctIsoEmRank",            "ISO EM RANK"         , R6BINS, R6MIN, R6MAX);
  m_rctIsoEmRankEtaPhi10    = m_dbe->book2D("RctIsoEmRankEtaPhi10",    "ISO EM RANK"         , PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
  m_rctIsoEmOccEtaPhi10     = m_dbe->book2D("RctIsoEmOccEtaPhi10",     "ISO EM OCCUPANCY"    , PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
  m_rctIsoEmRank10          = m_dbe->book1D("RctIsoEmRank10",          "ISO EM RANK"         , R6BINS, R6MIN, R6MAX);

  m_rctNonIsoEmRankEtaPhi1  = m_dbe->book2D("RctNonIsoEmRankEtaPhi",   "NON-ISO EM RANK"     , PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
  m_rctNonIsoEmOccEtaPhi1   = m_dbe->book2D("RctNonIsoEmOccEtaPhi",    "NON-ISO EM OCCUPANCY", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
  m_rctNonIsoEmRank1        = m_dbe->book1D("RctNonIsoEmRank",         "NON-ISO EM RANK"     , R6BINS, R6MIN, R6MAX);
  m_rctNonIsoEmRankEtaPhi10 = m_dbe->book2D("RctNonIsoEmRankEtaPhi10", "NON-ISO EM RANK"     , PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
  m_rctNonIsoEmOccEtaPhi10  = m_dbe->book2D("RctNonIsoEmOccEtaPhi10",  "NON-ISO EM OCCUPANCY", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
  m_rctNonIsoEmRank10       = m_dbe->book1D("RctNonIsoEmRank10",       "NON-ISO EM RANK"     , R6BINS, R6MIN, R6MAX);

  m_rctRelaxedEmRankEtaPhi1 = m_dbe->book2D("RctRelaxedEmRankEtaPhi",  "RELAXED EM RANK"     , PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
  m_rctRelaxedEmOccEtaPhi1  = m_dbe->book2D("RctRelaxedEmOccEtaPhi",   "RELAXED EM OCCUPANCY", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
  m_rctRelaxedEmRank1       = m_dbe->book1D("RctRelaxedEmRank",        "RELAXED EM RANK"     , R6BINS, R6MIN, R6MAX);
  m_rctRelaxedEmRankEtaPhi10= m_dbe->book2D("RctRelaxedEmRankEtaPhi",  "RELAXED EM RANK"     , PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
  m_rctRelaxedEmOccEtaPhi10 = m_dbe->book2D("RctRelaxedEmOccEtaPhi10",   "RELAXED EM OCCUPANCY", PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
  m_rctRelaxedEmRank10      = m_dbe->book1D("RctRelaxedEmRank",        "RELAXED EM RANK"     , R6BINS, R6MIN, R6MAX);

  m_rctRegionsEtEtaPhi      = m_dbe->book2D("RctRegionsEtEtaPhi",      "REGION E_{T}"        , PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
  m_rctRegionsOccEtaPhi     = m_dbe->book2D("RctRegionsOccEtaPhi",     "REGION OCCUPANCY"    , PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
  m_rctTauVetoEtaPhi        = m_dbe->book2D("RctTauVetoEtaPhi",        "TAU VETO OCCUPANCY"  , PHIBINS, PHIMIN, PHIMAX, ETABINS, ETAMIN, ETAMAX);
  m_rctRegionEt             = m_dbe->book1D("RctRegionEt",             "REGION E_{T}"        , R10BINS, R10MIN, R10MAX);



}
void RCTMonitor::endJob ( void  ) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 29 of file RCTMonitor.cc.

References m_dbe, m_outputFileName, m_writeOutputFile, DQMStore::save(), and DQMStore::showDirStructure().

{
  // Print out directory structure
  m_dbe->showDirStructure();

  // If requested write output to a root file
  if (m_writeOutputFile){
    m_dbe->save(m_outputFileName);
  }
}
void RCTMonitor::FillRCT ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)

Definition at line 66 of file RCTMonitor.cc.

References DynamicScale(), MonitorElement::Fill(), edm::Event::getByLabel(), m_rctIsoEmOccEtaPhi1, m_rctIsoEmOccEtaPhi10, m_rctIsoEmRank1, m_rctIsoEmRankEtaPhi1, m_rctNonIsoEmOccEtaPhi1, m_rctNonIsoEmOccEtaPhi10, m_rctNonIsoEmRank1, m_rctNonIsoEmRankEtaPhi1, m_rctRelaxedEmOccEtaPhi1, m_rctRelaxedEmOccEtaPhi10, m_rctRelaxedEmRank1, m_rctRelaxedEmRankEtaPhi1, and m_rctSource.

Referenced by analyze().

{

  // Get the RCT digis
  edm::Handle<L1CaloEmCollection> em;
 //  edm::Handle<L1CaloRegionCollection> rgn;

 // iEvent.getByType(em);
 // iEvent.getByType(rgn);
  
   iEvent.getByLabel(m_rctSource,em);



  // Regions
//  for (L1CaloRegionCollection::const_iterator ireg=rgn->begin(); ireg!=rgn->end(); ireg++) {

//  if(ireg->et()>7){
//    m_rctRegionsOccEtaPhi->Fill(ireg->gctPhi(),ireg->gctEta(),DynamicScale(ireg->gctEta()));
//    m_rctRegionsEtEtaPhi->Fill(ireg->gctPhi(),ireg->gctEta(),ireg->et());
//    m_rctRegionEt->Fill(ireg->et());
//    m_rctTauVetoEtaPhi->Fill(ireg->gctPhi(),ireg->gctEta(),ireg->tauVeto());
//   }
//  }


  //Isolated and non-isolated EM with cut at >1 GeV
  for (L1CaloEmCollection::const_iterator iem=em->begin(); iem!=em->end(); iem++) {
   if(iem->rank()>1.){  //applies the 1 GeV cut
    if (iem->isolated()){  //looks for isolated EM candidates only
      m_rctIsoEmRank1->Fill(iem->rank());
//std::cout << "Just to show what is there " << iem->rank() <<  std::endl ;
      m_rctIsoEmRankEtaPhi1->Fill(iem->regionId().iphi(),iem->regionId().ieta(),iem->rank());
      m_rctIsoEmOccEtaPhi1->Fill(iem->regionId().iphi(),iem->regionId().ieta(),DynamicScale(iem->regionId().ieta()));
      m_rctRelaxedEmRankEtaPhi1->Fill(iem->regionId().iphi(),iem->regionId().ieta(),iem->rank());
      m_rctRelaxedEmOccEtaPhi1->Fill(iem->regionId().iphi(),iem->regionId().ieta(),DynamicScale(iem->regionId().ieta()));
      m_rctRelaxedEmRank1->Fill(iem->rank());
    } else {  //instructions for Non-isolated EM candidates
      m_rctNonIsoEmRank1->Fill(iem->rank());
      m_rctNonIsoEmRankEtaPhi1->Fill(iem->regionId().iphi(),iem->regionId().ieta(),iem->rank());
      m_rctNonIsoEmOccEtaPhi1->Fill(iem->regionId().iphi(),iem->regionId().ieta(),DynamicScale(iem->regionId().ieta()));
      m_rctRelaxedEmRankEtaPhi1->Fill(iem->regionId().iphi(),iem->regionId().ieta(),iem->rank());
      m_rctRelaxedEmOccEtaPhi1->Fill(iem->regionId().iphi(),iem->regionId().ieta(),DynamicScale(iem->regionId().ieta()));
      m_rctRelaxedEmRank1->Fill(iem->rank());
    }
   }
   if(iem->rank()>10.){  //applies the 10 GeV cut
    if (iem->isolated()){  //looks for isolated EM candidates only
      m_rctIsoEmOccEtaPhi10->Fill(iem->regionId().iphi(),iem->regionId().ieta(),DynamicScale(iem->regionId().ieta()));
      m_rctRelaxedEmOccEtaPhi10->Fill(iem->regionId().iphi(),iem->regionId().ieta(),DynamicScale(iem->regionId().ieta()));
    } else {  //instructions for Non-isolated EM candidates
      m_rctNonIsoEmOccEtaPhi10->Fill(iem->regionId().iphi(),iem->regionId().ieta(),DynamicScale(iem->regionId().ieta()));
      m_rctRelaxedEmOccEtaPhi10->Fill(iem->regionId().iphi(),iem->regionId().ieta(),DynamicScale(iem->regionId().ieta()));;
    }
   }
  }
}

Member Data Documentation

const unsigned int RCTMonitor::ETABINS = 22 [static, private]

Definition at line 122 of file RCTMonitor.h.

Referenced by BookRCT().

const float RCTMonitor::ETAMAX = 21.5 [static, private]

Definition at line 122 of file RCTMonitor.h.

Referenced by BookRCT().

const float RCTMonitor::ETAMIN = -0.5 [static, private]

Definition at line 122 of file RCTMonitor.h.

Referenced by BookRCT().

const unsigned int RCTMonitor::L1EETABINS = 22 [static, private]

Definition at line 136 of file RCTMonitor.h.

const float RCTMonitor::L1EETAMAX = 5 [static, private]

Definition at line 136 of file RCTMonitor.h.

const float RCTMonitor::L1EETAMIN = -5 [static, private]

Definition at line 136 of file RCTMonitor.h.

const unsigned int RCTMonitor::L1EPHIBINS = 18 [static, private]

Definition at line 137 of file RCTMonitor.h.

const float RCTMonitor::L1EPHIMAX = M_PI [static, private]

Definition at line 137 of file RCTMonitor.h.

const float RCTMonitor::L1EPHIMIN = -M_PI [static, private]

Definition at line 137 of file RCTMonitor.h.

Definition at line 143 of file RCTMonitor.h.

Referenced by BookRCT(), and endJob().

Definition at line 146 of file RCTMonitor.h.

int RCTMonitor::m_nevts [private]

Definition at line 140 of file RCTMonitor.h.

Referenced by analyze().

std::string RCTMonitor::m_outputFileName [private]

Definition at line 154 of file RCTMonitor.h.

Referenced by endJob().

Definition at line 102 of file RCTMonitor.h.

Referenced by BookRCT(), and FillRCT().

Definition at line 103 of file RCTMonitor.h.

Referenced by BookRCT(), and FillRCT().

Definition at line 112 of file RCTMonitor.h.

Referenced by BookRCT(), and FillRCT().

Definition at line 113 of file RCTMonitor.h.

Referenced by BookRCT().

Definition at line 100 of file RCTMonitor.h.

Referenced by BookRCT(), and FillRCT().

Definition at line 101 of file RCTMonitor.h.

Referenced by BookRCT().

Definition at line 108 of file RCTMonitor.h.

Referenced by BookRCT(), and FillRCT().

Definition at line 109 of file RCTMonitor.h.

Referenced by BookRCT(), and FillRCT().

Definition at line 116 of file RCTMonitor.h.

Referenced by BookRCT(), and FillRCT().

Definition at line 117 of file RCTMonitor.h.

Referenced by BookRCT().

Definition at line 104 of file RCTMonitor.h.

Referenced by BookRCT(), and FillRCT().

Definition at line 105 of file RCTMonitor.h.

Referenced by BookRCT().

Definition at line 98 of file RCTMonitor.h.

Referenced by BookRCT().

Definition at line 95 of file RCTMonitor.h.

Referenced by BookRCT().

Definition at line 96 of file RCTMonitor.h.

Referenced by BookRCT().

Definition at line 110 of file RCTMonitor.h.

Referenced by BookRCT(), and FillRCT().

Definition at line 111 of file RCTMonitor.h.

Referenced by BookRCT(), and FillRCT().

Definition at line 114 of file RCTMonitor.h.

Referenced by BookRCT(), and FillRCT().

Definition at line 115 of file RCTMonitor.h.

Referenced by BookRCT().

Definition at line 106 of file RCTMonitor.h.

Referenced by BookRCT(), and FillRCT().

Definition at line 107 of file RCTMonitor.h.

Referenced by BookRCT().

Definition at line 150 of file RCTMonitor.h.

Referenced by FillRCT().

Definition at line 97 of file RCTMonitor.h.

Referenced by BookRCT().

Definition at line 153 of file RCTMonitor.h.

Referenced by endJob().

const unsigned int RCTMonitor::METPHIBINS = 72 [static, private]

Definition at line 124 of file RCTMonitor.h.

const float RCTMonitor::METPHIMAX = 71.5 [static, private]

Definition at line 124 of file RCTMonitor.h.

const float RCTMonitor::METPHIMIN = -0.5 [static, private]

Definition at line 124 of file RCTMonitor.h.

const unsigned int RCTMonitor::PHIBINS = 18 [static, private]

Definition at line 123 of file RCTMonitor.h.

Referenced by BookRCT().

const float RCTMonitor::PHIMAX = 17.5 [static, private]

Definition at line 123 of file RCTMonitor.h.

Referenced by BookRCT().

const float RCTMonitor::PHIMIN = -0.5 [static, private]

Definition at line 123 of file RCTMonitor.h.

Referenced by BookRCT().

const unsigned int RCTMonitor::R10BINS = 1024 [static, private]

Definition at line 126 of file RCTMonitor.h.

Referenced by BookRCT().

const float RCTMonitor::R10MAX = 1023.5 [static, private]

Definition at line 126 of file RCTMonitor.h.

Referenced by BookRCT().

const float RCTMonitor::R10MIN = -0.5 [static, private]

Definition at line 126 of file RCTMonitor.h.

Referenced by BookRCT().

const unsigned int RCTMonitor::R12BINS = 4096 [static, private]

Definition at line 127 of file RCTMonitor.h.

const float RCTMonitor::R12MAX = 4095.5 [static, private]

Definition at line 127 of file RCTMonitor.h.

const float RCTMonitor::R12MIN = -0.5 [static, private]

Definition at line 127 of file RCTMonitor.h.

const unsigned int RCTMonitor::R6BINS = 64 [static, private]

Definition at line 125 of file RCTMonitor.h.

Referenced by BookRCT().

const float RCTMonitor::R6MAX = 63.5 [static, private]

Definition at line 125 of file RCTMonitor.h.

Referenced by BookRCT().

const float RCTMonitor::R6MIN = -0.5 [static, private]

Definition at line 125 of file RCTMonitor.h.

Referenced by BookRCT().

const unsigned int RCTMonitor::RTPBINS = 101 [static, private]

Definition at line 132 of file RCTMonitor.h.

const float RCTMonitor::RTPMAX = 100.5 [static, private]

Definition at line 132 of file RCTMonitor.h.

const float RCTMonitor::RTPMIN = -0.5 [static, private]

Definition at line 132 of file RCTMonitor.h.

const unsigned int RCTMonitor::TEVBINS = 1001 [static, private]

Definition at line 135 of file RCTMonitor.h.

const float RCTMonitor::TEVMAX = 1000.5 [static, private]

Definition at line 135 of file RCTMonitor.h.

const float RCTMonitor::TEVMIN = -0.5 [static, private]

Definition at line 135 of file RCTMonitor.h.

const unsigned int RCTMonitor::TPETABINS = 65 [static, private]

Definition at line 130 of file RCTMonitor.h.

const float RCTMonitor::TPETAMAX = 32.5 [static, private]

Definition at line 130 of file RCTMonitor.h.

const float RCTMonitor::TPETAMIN = -32.5 [static, private]

Definition at line 130 of file RCTMonitor.h.

const unsigned int RCTMonitor::TPPHIBINS = 72 [static, private]

Definition at line 131 of file RCTMonitor.h.

const float RCTMonitor::TPPHIMAX = 72.5 [static, private]

Definition at line 131 of file RCTMonitor.h.

const float RCTMonitor::TPPHIMIN = 0.5 [static, private]

Definition at line 131 of file RCTMonitor.h.