CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
CastorTowerJetMonitor Class Reference

#include <CastorTowerJetMonitor.h>

Inheritance diagram for CastorTowerJetMonitor:
CastorBaseMonitor

Public Member Functions

void beginRun (const edm::Run &iRun, const edm::EventSetup &iSetup)
 
 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 ()
 
- Public Member Functions inherited from CastorBaseMonitor
 CastorBaseMonitor ()
 
virtual void clearME ()
 
bool getDiagnostics () const
 
int getVerbosity () const
 
void setDiagnostics (bool myval)
 
void setVerbosity (int verb)
 
bool vetoCell (HcalCastorDetId id)
 
virtual ~CastorBaseMonitor ()
 

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
 

Additional Inherited Members

- Protected Attributes inherited from CastorBaseMonitor
std::string baseFolder_
 
edm::CPUTimer cpu_timer
 
int fVerbosity
 
DQMStorem_dbe
 
bool makeDiagnostics
 
std::string rootFolder_
 
bool showTiming
 

Detailed Description

Definition at line 19 of file CastorTowerJetMonitor.h.

Constructor & Destructor Documentation

CastorTowerJetMonitor::CastorTowerJetMonitor ( )

Definition at line 15 of file CastorTowerJetMonitor.cc.

16  {
17 
18  }
CastorTowerJetMonitor::~CastorTowerJetMonitor ( )

Definition at line 24 of file CastorTowerJetMonitor.cc.

25  {
26 
27  }

Member Function Documentation

void CastorTowerJetMonitor::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)

Definition at line 72 of file CastorTowerJetMonitor.cc.

References CastorBaseMonitor::baseFolder_, DQMStore::book1D(), DQMStore::bookInt(), gather_cfg::cout, MonitorElement::Fill(), CastorBaseMonitor::fVerbosity, ievt_, CastorBaseMonitor::m_dbe, meCastorJetEnergy, meCastorJetEta, meCastorJetIDMultiplicity, meCastorJetMultiplicity, meCastorJetPhi, meCastorTowerDepth, meCastorTowerEMEnergy, meCastorTowerEnergy, meCastorTowerEta, meCastorTowerFEM, meCastorTowerHADEnergy, meCastorTowerMultiplicity, meCastorTowerPhi, meEVT_, NULL, and DQMStore::setCurrentFolder().

Referenced by CastorMonitorModule::beginRun().

73  {
74  if(fVerbosity>0) std::cout << "CastorTowerJetMonitor::beginRun (start)" << std::endl;
75 
76  if ( m_dbe !=NULL ) {
77 
79  meEVT_ = m_dbe->bookInt("TowerJet Event Number");
80  meEVT_->Fill(ievt_);
81 
83 
85  meCastorTowerEnergy = m_dbe->book1D("CASTOR Tower Total Energy","CASTOR Tower Total Energy",200,0,1000);
86  meCastorTowerEMEnergy = m_dbe->book1D("CASTOR Tower EM Energy","CASTOR Tower EM Energy",200,0,1000);
87  meCastorTowerHADEnergy = m_dbe->book1D("CASTOR Tower HAD Energy","CASTOR Tower HAD Energy",200,0,1000);
88  meCastorTowerFEM = m_dbe->book1D("CASTOR Tower fem - EM to Total Energy Fraction","CASTOR fem - EM to Total Energy Fraction",20,0,1.2);
89  meCastorTowerEta = m_dbe->book1D("CASTOR Tower Eta","CASTOR Tower Eta",42,-7,7);
90  meCastorTowerPhi = m_dbe->book1D("CASTOR Tower Phi","CASTOR Tower Phi",35,-3.5,3.5);
91  meCastorTowerDepth = m_dbe->book1D("CASTOR Tower Depth","CASTOR Tower Depth",200,0,1000);
92  meCastorTowerMultiplicity = m_dbe->book1D("CASTOR Tower Multiplicity","CASTOR Tower Multiplicity",20,0,20);
93 
94 
96  meCastorJetEnergy = m_dbe->book1D("CASTOR BasicJet Total Energy","CASTOR BasicJet Total Energy",200,0,2000);
97  meCastorJetEta = m_dbe->book1D("CASTOR BasicJet Eta","CASTOR BasicJet Eta",42,-7,7);
98  meCastorJetPhi = m_dbe->book1D("CASTOR BasicJet Phi","CASTOR BasicJet Phi",35,-3.5,3.5);
99  meCastorJetMultiplicity = m_dbe->book1D("CASTOR BasicJet Multiplicity","CASTOR BasicJet Multiplicity",16,0,16);
100  meCastorJetIDMultiplicity = m_dbe->book1D("CASTOR JetID Multiplicity","CASTOR JetID Multiplicity",16,0,16);
101  //-- add more here.....
102 
103  }
104  else
105  {
106  if(fVerbosity>0) std::cout << "CastorTowerJetMonitor::setup - NO DQMStore service" << std::endl;
107  }
108 
109  if(fVerbosity>0) std::cout << "CastorTowerJetMonitor::beginRun (end)" << std::endl;
110 
111 
112  return;
113  }
MonitorElement * meCastorJetEnergy
MonitorElement * meCastorTowerHADEnergy
MonitorElement * meCastorTowerEta
MonitorElement * meCastorJetEta
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:964
MonitorElement * meCastorJetPhi
#define NULL
Definition: scimark2.h:8
MonitorElement * meCastorJetMultiplicity
MonitorElement * meCastorTowerMultiplicity
void Fill(long long x)
MonitorElement * meCastorTowerEMEnergy
std::string baseFolder_
MonitorElement * meCastorTowerDepth
MonitorElement * meCastorTowerEnergy
MonitorElement * meCastorJetIDMultiplicity
MonitorElement * meCastorTowerFEM
tuple cout
Definition: gather_cfg.py:121
MonitorElement * meCastorTowerPhi
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:871
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:677
void CastorTowerJetMonitor::done ( )
virtual

Reimplemented from CastorBaseMonitor.

Definition at line 42 of file CastorTowerJetMonitor.cc.

Referenced by CastorMonitorModule::endJob().

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

Definition at line 226 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.

226  {
227 
228 
229  if(fVerbosity>0)
230  std::cout << "==>CastorTowerJetMonitor::processEventJetIDs !!!"<< std::endl;
231 
232  if(!m_dbe) {
233  if(fVerbosity>0) std::cout<<"CastorTowerJetMonitor::processEventJetIDs DQMStore is not instantiated!!!"<<std::endl;
234  return;
235  }
236 
237  nJetIDs=0;
238 
240  for(reco::CastorJetIDValueMap::const_iterator iJetID= castorJetIDs.begin(); iJetID!= castorJetIDs.end(); iJetID++) {
241  //-- leave it empty for now - no time now...
242  //-- add new stuff here
243  nJetIDs++;
244  }
246 
247 
248  return;
249 }
const_iterator end() const
Definition: ValueMap.h:210
void Fill(long long x)
const_iterator begin() const
Definition: ValueMap.h:209
MonitorElement * meCastorJetIDMultiplicity
tuple cout
Definition: gather_cfg.py:121
void CastorTowerJetMonitor::processEventJets ( const reco::BasicJet castorBasicJets)

Definition at line 198 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.

198  {
199 
200  if(fVerbosity>0)
201  std::cout << "==>CastorTowerJetMonitor::processEventJets !!!"<< std::endl;
202 
203  if(!m_dbe) {
204  if(fVerbosity>0) std::cout<<"CastorTowerJetMonitor::processEventJets DQMStore is not instantiated!!!"<<std::endl;
205  return;
206  }
207 
208  nJets=0;
210  for(reco::BasicJet::const_iterator ibegin = castorBasicJets.begin(), iend = castorBasicJets.end(), ijet = ibegin; ijet!= iend; ++ijet) {
211  idx = ijet - ibegin;
212  nJets++;
213  //-- leave it empty for now - no time now...
214  //-- add new stuff here...
215  }
217 
218  return;
219 }
MonitorElement * meCastorJetMultiplicity
void Fill(long long x)
virtual const_iterator begin() const
first daughter const_iterator
virtual const_iterator end() const
last daughter const_iterator
tuple cout
Definition: gather_cfg.py:121
void CastorTowerJetMonitor::processEventTowers ( const reco::CastorTowerCollection castorTowers)

Definition at line 120 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.

121 {
122 
123 
124  if(fVerbosity>0)
125  std::cout << "==>CastorTowerJetMonitor::processEventTowers !!!"<< std::endl;
126 
127 
128  if(!m_dbe) {
129  if(fVerbosity>0) std::cout<<"CastorTowerJetMonitor::processEventTowers DQMStore is not instantiated!!!"<<std::endl;
130  return;
131  }
132 
133  meEVT_->Fill(ievt_);
134 
136  nTowers=0;
137 
141 
142  if(castorTowers.size()>0){
143 
144  //for (size_t l=0; l<castorTowers.size() ; l++)
145 
146 
147  for(reco::CastorTowerCollection::const_iterator iTower= castorTowers.begin(); iTower!= castorTowers.end(); iTower++) {
148 
150  energyTower = iTower->energy();
152  emEnergyTower = iTower->emEnergy();
154  hadEnergyTower=iTower->hadEnergy();
156  femTower=iTower->fem();
158  etaTower=iTower->eta();
160  phiTower=iTower->phi();
162  depthTower=iTower->depth();
163 
164 
165  if (energyTower>0) { //-- just a check
166 
175 
176  nTowers++;
177  }
178  }
180  }
181 
182 
183  else {
184  if(fVerbosity>0) std::cout << "CastorTowerJetMonitor::processEvent NO Castor Towers !!!" << std::endl;
185  }
186 
187  ievt_++;
188 
189  return;
190 }
MonitorElement * meCastorTowerHADEnergy
MonitorElement * meCastorTowerEta
MonitorElement * meCastorTowerMultiplicity
void Fill(long long x)
MonitorElement * meCastorTowerEMEnergy
MonitorElement * meCastorTowerDepth
MonitorElement * meCastorTowerEnergy
MonitorElement * meCastorTowerFEM
tuple cout
Definition: gather_cfg.py:121
MonitorElement * meCastorTowerPhi
void CastorTowerJetMonitor::reset ( void  )

Definition at line 33 of file CastorTowerJetMonitor.cc.

Referenced by CastorMonitorModule::reset().

34  {
35 
36  }
void CastorTowerJetMonitor::setup ( const edm::ParameterSet ps,
DQMStore dbe 
)
virtual

Reimplemented from CastorBaseMonitor.

Definition at line 51 of file CastorTowerJetMonitor.cc.

References CastorBaseMonitor::baseFolder_, gather_cfg::cout, depthTower, emEnergyTower, energyJet, energyTower, etaJet, etaTower, femTower, CastorBaseMonitor::fVerbosity, hadEnergyTower, ievt_, nJets, nTowers, phiJet, phiTower, CastorBaseMonitor::rootFolder_, and CastorBaseMonitor::setup().

Referenced by CastorMonitorModule::CastorMonitorModule().

52  {
54 
55  if(fVerbosity>0) std::cout << "CastorTowerJetMonitor::setup (start)" << std::endl;
56 
57  baseFolder_ = rootFolder_+"CastorTowerJetMonitor";
58 
61  phiTower=0; depthTower=0; nJets=0; energyJet =0; etaJet=0; phiJet=0;
62 
63  if(fVerbosity>0) std::cout << "CastorTowerJetMonitor::setup (end)" << std::endl;
64 
65  return;
66 }
virtual void setup(const edm::ParameterSet &ps, DQMStore *dbe)
std::string baseFolder_
std::string rootFolder_
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

double CastorTowerJetMonitor::depthTower
private

Definition at line 62 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

double CastorTowerJetMonitor::emEnergyTower
private

Definition at line 49 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

double CastorTowerJetMonitor::energyJet
private

Definition at line 72 of file CastorTowerJetMonitor.h.

Referenced by setup().

double CastorTowerJetMonitor::energyTower
private

Definition at line 46 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

double CastorTowerJetMonitor::etaJet
private

Definition at line 74 of file CastorTowerJetMonitor.h.

Referenced by setup().

double CastorTowerJetMonitor::etaTower
private

Definition at line 57 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

double CastorTowerJetMonitor::femTower
private

Definition at line 54 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

double CastorTowerJetMonitor::hadEnergyTower
private

Definition at line 51 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

unsigned int CastorTowerJetMonitor::idx
private

Definition at line 69 of file CastorTowerJetMonitor.h.

Referenced by processEventJets().

int CastorTowerJetMonitor::ievt_
private

Definition at line 41 of file CastorTowerJetMonitor.h.

Referenced by beginRun(), processEventTowers(), and setup().

MonitorElement* CastorTowerJetMonitor::meCastorJetEnergy
private

Definition at line 100 of file CastorTowerJetMonitor.h.

Referenced by beginRun().

MonitorElement* CastorTowerJetMonitor::meCastorJetEta
private

Definition at line 101 of file CastorTowerJetMonitor.h.

Referenced by beginRun().

MonitorElement* CastorTowerJetMonitor::meCastorJetIDMultiplicity
private

Definition at line 104 of file CastorTowerJetMonitor.h.

Referenced by beginRun(), and processEventJetIDs().

MonitorElement* CastorTowerJetMonitor::meCastorJetMultiplicity
private

Definition at line 103 of file CastorTowerJetMonitor.h.

Referenced by beginRun(), and processEventJets().

MonitorElement* CastorTowerJetMonitor::meCastorJetPhi
private

Definition at line 102 of file CastorTowerJetMonitor.h.

Referenced by beginRun().

MonitorElement* CastorTowerJetMonitor::meCastorTowerDepth
private

Definition at line 96 of file CastorTowerJetMonitor.h.

Referenced by beginRun(), and processEventTowers().

MonitorElement* CastorTowerJetMonitor::meCastorTowerEMEnergy
private

Definition at line 91 of file CastorTowerJetMonitor.h.

Referenced by beginRun(), and processEventTowers().

MonitorElement* CastorTowerJetMonitor::meCastorTowerEnergy
private

Definition at line 90 of file CastorTowerJetMonitor.h.

Referenced by beginRun(), and processEventTowers().

MonitorElement* CastorTowerJetMonitor::meCastorTowerEta
private

Definition at line 94 of file CastorTowerJetMonitor.h.

Referenced by beginRun(), and processEventTowers().

MonitorElement* CastorTowerJetMonitor::meCastorTowerFEM
private

Definition at line 93 of file CastorTowerJetMonitor.h.

Referenced by beginRun(), and processEventTowers().

MonitorElement* CastorTowerJetMonitor::meCastorTowerHADEnergy
private

Definition at line 92 of file CastorTowerJetMonitor.h.

Referenced by beginRun(), and processEventTowers().

MonitorElement* CastorTowerJetMonitor::meCastorTowerMultiplicity
private

Definition at line 97 of file CastorTowerJetMonitor.h.

Referenced by beginRun(), and processEventTowers().

MonitorElement* CastorTowerJetMonitor::meCastorTowerPhi
private

Definition at line 95 of file CastorTowerJetMonitor.h.

Referenced by beginRun(), and processEventTowers().

MonitorElement* CastorTowerJetMonitor::meEVT_
private

Definition at line 39 of file CastorTowerJetMonitor.h.

Referenced by beginRun(), and processEventTowers().

int CastorTowerJetMonitor::nJetIDs
private

Definition at line 82 of file CastorTowerJetMonitor.h.

Referenced by processEventJetIDs().

int CastorTowerJetMonitor::nJets
private

Definition at line 79 of file CastorTowerJetMonitor.h.

Referenced by processEventJets(), and setup().

int CastorTowerJetMonitor::nTowers
private

Definition at line 65 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

double CastorTowerJetMonitor::phiJet
private

Definition at line 76 of file CastorTowerJetMonitor.h.

Referenced by setup().

double CastorTowerJetMonitor::phiTower
private

Definition at line 59 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().