CMS 3D CMS Logo

Public Member Functions | Private Attributes

CastorTowerJetMonitor Class Reference

#include <CastorTowerJetMonitor.h>

Inheritance diagram for CastorTowerJetMonitor:
CastorBaseMonitor

List of all members.

Public Member Functions

 CastorTowerJetMonitor ()
void done ()
void processEventJetIDs (const reco::CastorJetIDValueMap &castorJetIDs)
void processEventJets (const reco::BasicJet &castorBasicJets)
void processEventTowers (const reco::CastorTowerCollection &castorTowers)
void reset ()
void setup (const edm::ParameterSet &ps, DQMStore *dbe)
 ~CastorTowerJetMonitor ()

Private Attributes

double depthTower
double emEnergyTower
double energyJet
double energyTower
double etaJet
double etaTower
double femTower
double hadEnergyTower
unsigned int idx
int ievt_
MonitorElementmeCastorJetEnergy
MonitorElementmeCastorJetEta
MonitorElementmeCastorJetIDMultiplicity
MonitorElementmeCastorJetMultiplicity
MonitorElementmeCastorJetPhi
MonitorElementmeCastorTowerDepth
MonitorElementmeCastorTowerEMEnergy
MonitorElementmeCastorTowerEnergy
MonitorElementmeCastorTowerEta
MonitorElementmeCastorTowerFEM
MonitorElementmeCastorTowerHADEnergy
MonitorElementmeCastorTowerMultiplicity
MonitorElementmeCastorTowerPhi
MonitorElementmeEVT_
int nJetIDs
int nJets
int nTowers
double phiJet
double phiTower

Detailed Description

Definition at line 19 of file CastorTowerJetMonitor.h.


Constructor & Destructor Documentation

CastorTowerJetMonitor::CastorTowerJetMonitor ( )

Definition at line 15 of file CastorTowerJetMonitor.cc.

                                             {  
}
CastorTowerJetMonitor::~CastorTowerJetMonitor ( )

Definition at line 22 of file CastorTowerJetMonitor.cc.

                                              {
}

Member Function Documentation

void CastorTowerJetMonitor::done ( ) [virtual]

Reimplemented from CastorBaseMonitor.

Definition at line 36 of file CastorTowerJetMonitor.cc.

                                {
}
void CastorTowerJetMonitor::processEventJetIDs ( const reco::CastorJetIDValueMap castorJetIDs)

Definition at line 208 of file CastorTowerJetMonitor.cc.

References edm::ValueMap< T >::begin(), gather_cfg::cout, edm::ValueMap< T >::end(), MonitorElement::Fill(), CastorBaseMonitor::fVerbosity, CastorBaseMonitor::m_dbe, meCastorJetIDMultiplicity, and nJetIDs.

                                                                                          {


 if(fVerbosity>0) 
   std::cout << "==>CastorTowerJetMonitor::processEventJetIDs !!!"<< std::endl;   

 if(!m_dbe) { 
    if(fVerbosity>0) std::cout<<"CastorTowerJetMonitor::processEventJetIDs DQMStore is not instantiated!!!"<<std::endl;  
    return; 
  }  

  nJetIDs=0;

   for(reco::CastorJetIDValueMap::const_iterator iJetID= castorJetIDs.begin();   iJetID!= castorJetIDs.end(); iJetID++) {
    //-- leave it empty for now - no time now...  
    //-- add new stuff here
    nJetIDs++;
   }
  meCastorJetIDMultiplicity->Fill(nJetIDs);
    
  
  return;
}
void CastorTowerJetMonitor::processEventJets ( const reco::BasicJet castorBasicJets)

Definition at line 180 of file CastorTowerJetMonitor.cc.

References reco::CompositePtrCandidate::begin(), gather_cfg::cout, reco::CompositePtrCandidate::end(), MonitorElement::Fill(), CastorBaseMonitor::fVerbosity, idx, CastorBaseMonitor::m_dbe, meCastorJetMultiplicity, and nJets.

                                                                                 {
  
 if(fVerbosity>0) 
   std::cout << "==>CastorTowerJetMonitor::processEventJets !!!"<< std::endl;
   
  if(!m_dbe) { 
    if(fVerbosity>0) std::cout<<"CastorTowerJetMonitor::processEventJets DQMStore is not instantiated!!!"<<std::endl;  
    return; 
  }

   nJets=0; 
   for(reco::BasicJet::const_iterator ibegin = castorBasicJets.begin(), iend = castorBasicJets.end(), ijet = ibegin; ijet!= iend; ++ijet) {
     idx = ijet - ibegin;
     nJets++;
     //-- leave it empty for now - no time now...
     //-- add new stuff here...
    }
   meCastorJetMultiplicity->Fill(nJets);

    return;
}  
void CastorTowerJetMonitor::processEventTowers ( const reco::CastorTowerCollection castorTowers)

Definition at line 102 of file CastorTowerJetMonitor.cc.

References gather_cfg::cout, depthTower, emEnergyTower, energyTower, etaTower, femTower, MonitorElement::Fill(), CastorBaseMonitor::fVerbosity, hadEnergyTower, ievt_, CastorBaseMonitor::m_dbe, meCastorTowerDepth, meCastorTowerEMEnergy, meCastorTowerEnergy, meCastorTowerEta, meCastorTowerFEM, meCastorTowerHADEnergy, meCastorTowerMultiplicity, meCastorTowerPhi, meEVT_, nTowers, and phiTower.

{
  
  
 if(fVerbosity>0) 
   std::cout << "==>CastorTowerJetMonitor::processEventTowers !!!"<< std::endl;


  if(!m_dbe) { 
    if(fVerbosity>0) std::cout<<"CastorTowerJetMonitor::processEventTowers DQMStore is not instantiated!!!"<<std::endl;  
    return; 
  }

  meEVT_->Fill(ievt_);

  nTowers=0; 

   
   if(castorTowers.size()>0){
 
  //for (size_t l=0; l<castorTowers.size() ; l++) 


  for(reco::CastorTowerCollection::const_iterator iTower= castorTowers.begin();  iTower!= castorTowers.end(); iTower++) {

      energyTower = iTower->energy();    
     emEnergyTower = iTower->emEnergy();  
      hadEnergyTower=iTower->hadEnergy();  
      femTower=iTower->fem();
      etaTower=iTower->eta(); 
      phiTower=iTower->phi();
      depthTower=iTower->depth(); 
      
      
      if (energyTower>0) {  //-- just a check
        
      meCastorTowerEnergy->Fill(energyTower);
      meCastorTowerEMEnergy->Fill(emEnergyTower);
      meCastorTowerHADEnergy->Fill(hadEnergyTower);
      meCastorTowerFEM->Fill(femTower);
      meCastorTowerEta->Fill(etaTower);
      meCastorTowerPhi->Fill(phiTower);
      meCastorTowerDepth->Fill(depthTower);
        
      nTowers++;
     }
    }
  meCastorTowerMultiplicity->Fill(nTowers);
   }
   
   
     else {
    if(fVerbosity>0) std::cout << "CastorTowerJetMonitor::processEvent NO Castor Towers !!!" << std::endl;
  }
     
   ievt_++;

  return;
}
void CastorTowerJetMonitor::reset ( void  )

Definition at line 29 of file CastorTowerJetMonitor.cc.

                                 {
}
void CastorTowerJetMonitor::setup ( const edm::ParameterSet ps,
DQMStore dbe 
) [virtual]

Reimplemented from CastorBaseMonitor.

Definition at line 43 of file CastorTowerJetMonitor.cc.

References CastorBaseMonitor::baseFolder_, DQMStore::book1D(), DQMStore::bookInt(), gather_cfg::cout, depthTower, emEnergyTower, energyJet, energyTower, etaJet, etaTower, femTower, MonitorElement::Fill(), CastorBaseMonitor::fVerbosity, hadEnergyTower, ievt_, CastorBaseMonitor::m_dbe, meCastorJetEnergy, meCastorJetEta, meCastorJetIDMultiplicity, meCastorJetMultiplicity, meCastorJetPhi, meCastorTowerDepth, meCastorTowerEMEnergy, meCastorTowerEnergy, meCastorTowerEta, meCastorTowerFEM, meCastorTowerHADEnergy, meCastorTowerMultiplicity, meCastorTowerPhi, meEVT_, nJets, nTowers, NULL, phiJet, phiTower, CastorBaseMonitor::rootFolder_, and DQMStore::setCurrentFolder().

                                                                         {

  CastorBaseMonitor::setup(ps,dbe);
  baseFolder_ = rootFolder_+"CastorTowerJetMonitor";
   
  if(fVerbosity>0) std::cout << "CastorTowerJetMonitor::setup (start)" << std::endl;
  
  ievt_=0;  nTowers=0; energyTower =0;  emEnergyTower = 0; hadEnergyTower=0;  femTower=0; etaTower=0; 
  phiTower=0; depthTower=0; nJets=0; energyJet =0; etaJet=0; phiJet=0;
      
  
  if ( m_dbe !=NULL ) {
    
    m_dbe->setCurrentFolder(baseFolder_);
    meEVT_ = m_dbe->bookInt("TowerJet Event Number");
    meEVT_->Fill(ievt_);
        
    m_dbe->setCurrentFolder(baseFolder_);
  
      meCastorTowerEnergy    =  m_dbe->book1D("CASTOR Tower Total Energy","CASTOR Tower Total Energy",200,0,1000);
      meCastorTowerEMEnergy  =  m_dbe->book1D("CASTOR Tower EM Energy","CASTOR Tower EM Energy",200,0,1000);
      meCastorTowerHADEnergy  =  m_dbe->book1D("CASTOR Tower HAD Energy","CASTOR Tower HAD Energy",200,0,1000);
      meCastorTowerFEM   =  m_dbe->book1D("CASTOR Tower fem - EM to Total Energy Fraction","CASTOR fem - EM to Total Energy Fraction",20,0,1.2);
      meCastorTowerEta   =  m_dbe->book1D("CASTOR Tower Eta","CASTOR Tower Eta",42,-7,7);
      meCastorTowerPhi   =  m_dbe->book1D("CASTOR Tower Phi","CASTOR Tower Phi",35,-3.5,3.5);
      meCastorTowerDepth =  m_dbe->book1D("CASTOR Tower Depth","CASTOR Tower Depth",200,0,1000); 
      meCastorTowerMultiplicity =  m_dbe->book1D("CASTOR Tower Multiplicity","CASTOR Tower Multiplicity",20,0,20); 
      
      
      meCastorJetEnergy    =  m_dbe->book1D("CASTOR BasicJet Total Energy","CASTOR BasicJet Total Energy",200,0,2000);
      meCastorJetEta   =  m_dbe->book1D("CASTOR BasicJet Eta","CASTOR BasicJet Eta",42,-7,7);
      meCastorJetPhi   =  m_dbe->book1D("CASTOR BasicJet Phi","CASTOR BasicJet Phi",35,-3.5,3.5);
      meCastorJetMultiplicity =  m_dbe->book1D("CASTOR BasicJet Multiplicity","CASTOR BasicJet Multiplicity",16,0,16); 
      meCastorJetIDMultiplicity =  m_dbe->book1D("CASTOR JetID Multiplicity","CASTOR JetID Multiplicity",16,0,16); 
      //-- add more here.....
 
   }
  
  
  else{ 
   if(fVerbosity>0) std::cout << "CastorTowerJetMonitor::setup - NO DQMStore service" << std::endl; 
  }

  if(fVerbosity>0) std::cout << "CastorTowerJetMonitor::setup (end)" << std::endl;
  

  return;
}

Member Data Documentation

Definition at line 61 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

Definition at line 48 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

Definition at line 71 of file CastorTowerJetMonitor.h.

Referenced by setup().

Definition at line 45 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

Definition at line 73 of file CastorTowerJetMonitor.h.

Referenced by setup().

Definition at line 56 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

Definition at line 53 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

Definition at line 50 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

unsigned int CastorTowerJetMonitor::idx [private]

Definition at line 68 of file CastorTowerJetMonitor.h.

Referenced by processEventJets().

Definition at line 40 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

Definition at line 99 of file CastorTowerJetMonitor.h.

Referenced by setup().

Definition at line 100 of file CastorTowerJetMonitor.h.

Referenced by setup().

Definition at line 103 of file CastorTowerJetMonitor.h.

Referenced by processEventJetIDs(), and setup().

Definition at line 102 of file CastorTowerJetMonitor.h.

Referenced by processEventJets(), and setup().

Definition at line 101 of file CastorTowerJetMonitor.h.

Referenced by setup().

Definition at line 95 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

Definition at line 90 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

Definition at line 89 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

Definition at line 93 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

Definition at line 92 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

Definition at line 91 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

Definition at line 96 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

Definition at line 94 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

Definition at line 38 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

Definition at line 81 of file CastorTowerJetMonitor.h.

Referenced by processEventJetIDs().

Definition at line 78 of file CastorTowerJetMonitor.h.

Referenced by processEventJets(), and setup().

Definition at line 64 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

Definition at line 75 of file CastorTowerJetMonitor.h.

Referenced by setup().

Definition at line 58 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().