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

 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.

15  {
16 }
CastorTowerJetMonitor::~CastorTowerJetMonitor ( )

Definition at line 22 of file CastorTowerJetMonitor.cc.

22  {
23 }

Member Function Documentation

void CastorTowerJetMonitor::done ( )
virtual

Reimplemented from CastorBaseMonitor.

Definition at line 36 of file CastorTowerJetMonitor.cc.

36  {
37 }
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.

208  {
209 
210 
211  if(fVerbosity>0)
212  std::cout << "==>CastorTowerJetMonitor::processEventJetIDs !!!"<< std::endl;
213 
214  if(!m_dbe) {
215  if(fVerbosity>0) std::cout<<"CastorTowerJetMonitor::processEventJetIDs DQMStore is not instantiated!!!"<<std::endl;
216  return;
217  }
218 
219  nJetIDs=0;
220 
222  for(reco::CastorJetIDValueMap::const_iterator iJetID= castorJetIDs.begin(); iJetID!= castorJetIDs.end(); iJetID++) {
223  //-- leave it empty for now - no time now...
224  //-- add new stuff here
225  nJetIDs++;
226  }
228 
229 
230  return;
231 }
const_iterator end() const
Definition: ValueMap.h:197
void Fill(long long x)
const_iterator begin() const
Definition: ValueMap.h:196
MonitorElement * meCastorJetIDMultiplicity
tuple cout
Definition: gather_cfg.py:121
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.

180  {
181 
182  if(fVerbosity>0)
183  std::cout << "==>CastorTowerJetMonitor::processEventJets !!!"<< std::endl;
184 
185  if(!m_dbe) {
186  if(fVerbosity>0) std::cout<<"CastorTowerJetMonitor::processEventJets DQMStore is not instantiated!!!"<<std::endl;
187  return;
188  }
189 
190  nJets=0;
192  for(reco::BasicJet::const_iterator ibegin = castorBasicJets.begin(), iend = castorBasicJets.end(), ijet = ibegin; ijet!= iend; ++ijet) {
193  idx = ijet - ibegin;
194  nJets++;
195  //-- leave it empty for now - no time now...
196  //-- add new stuff here...
197  }
199 
200  return;
201 }
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 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.

103 {
104 
105 
106  if(fVerbosity>0)
107  std::cout << "==>CastorTowerJetMonitor::processEventTowers !!!"<< std::endl;
108 
109 
110  if(!m_dbe) {
111  if(fVerbosity>0) std::cout<<"CastorTowerJetMonitor::processEventTowers DQMStore is not instantiated!!!"<<std::endl;
112  return;
113  }
114 
115  meEVT_->Fill(ievt_);
116 
118  nTowers=0;
119 
123 
124  if(castorTowers.size()>0){
125 
126  //for (size_t l=0; l<castorTowers.size() ; l++)
127 
128 
129  for(reco::CastorTowerCollection::const_iterator iTower= castorTowers.begin(); iTower!= castorTowers.end(); iTower++) {
130 
132  energyTower = iTower->energy();
134  emEnergyTower = iTower->emEnergy();
136  hadEnergyTower=iTower->hadEnergy();
138  femTower=iTower->fem();
140  etaTower=iTower->eta();
142  phiTower=iTower->phi();
144  depthTower=iTower->depth();
145 
146 
147  if (energyTower>0) { //-- just a check
148 
157 
158  nTowers++;
159  }
160  }
162  }
163 
164 
165  else {
166  if(fVerbosity>0) std::cout << "CastorTowerJetMonitor::processEvent NO Castor Towers !!!" << std::endl;
167  }
168 
169  ievt_++;
170 
171  return;
172 }
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 29 of file CastorTowerJetMonitor.cc.

29  {
30 }
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_, DQMStore::setCurrentFolder(), and CastorBaseMonitor::setup().

43  {
44 
46  baseFolder_ = rootFolder_+"CastorTowerJetMonitor";
47 
48  if(fVerbosity>0) std::cout << "CastorTowerJetMonitor::setup (start)" << std::endl;
49 
52  phiTower=0; depthTower=0; nJets=0; energyJet =0; etaJet=0; phiJet=0;
53 
54 
55  if ( m_dbe !=NULL ) {
56 
58  meEVT_ = m_dbe->bookInt("TowerJet Event Number");
59  meEVT_->Fill(ievt_);
60 
62 
64  meCastorTowerEnergy = m_dbe->book1D("CASTOR Tower Total Energy","CASTOR Tower Total Energy",200,0,1000);
65  meCastorTowerEMEnergy = m_dbe->book1D("CASTOR Tower EM Energy","CASTOR Tower EM Energy",200,0,1000);
66  meCastorTowerHADEnergy = m_dbe->book1D("CASTOR Tower HAD Energy","CASTOR Tower HAD Energy",200,0,1000);
67  meCastorTowerFEM = m_dbe->book1D("CASTOR Tower fem - EM to Total Energy Fraction","CASTOR fem - EM to Total Energy Fraction",20,0,1.2);
68  meCastorTowerEta = m_dbe->book1D("CASTOR Tower Eta","CASTOR Tower Eta",42,-7,7);
69  meCastorTowerPhi = m_dbe->book1D("CASTOR Tower Phi","CASTOR Tower Phi",35,-3.5,3.5);
70  meCastorTowerDepth = m_dbe->book1D("CASTOR Tower Depth","CASTOR Tower Depth",200,0,1000);
71  meCastorTowerMultiplicity = m_dbe->book1D("CASTOR Tower Multiplicity","CASTOR Tower Multiplicity",20,0,20);
72 
73 
75  meCastorJetEnergy = m_dbe->book1D("CASTOR BasicJet Total Energy","CASTOR BasicJet Total Energy",200,0,2000);
76  meCastorJetEta = m_dbe->book1D("CASTOR BasicJet Eta","CASTOR BasicJet Eta",42,-7,7);
77  meCastorJetPhi = m_dbe->book1D("CASTOR BasicJet Phi","CASTOR BasicJet Phi",35,-3.5,3.5);
78  meCastorJetMultiplicity = m_dbe->book1D("CASTOR BasicJet Multiplicity","CASTOR BasicJet Multiplicity",16,0,16);
79  meCastorJetIDMultiplicity = m_dbe->book1D("CASTOR JetID Multiplicity","CASTOR JetID Multiplicity",16,0,16);
80  //-- add more here.....
81 
82  }
83 
84 
85  else{
86  if(fVerbosity>0) std::cout << "CastorTowerJetMonitor::setup - NO DQMStore service" << std::endl;
87  }
88 
89  if(fVerbosity>0) std::cout << "CastorTowerJetMonitor::setup (end)" << std::endl;
90 
91 
92  return;
93 }
MonitorElement * meCastorJetEnergy
MonitorElement * meCastorTowerHADEnergy
MonitorElement * meCastorTowerEta
virtual void setup(const edm::ParameterSet &ps, DQMStore *dbe)
MonitorElement * meCastorJetEta
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
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
std::string rootFolder_
MonitorElement * meCastorTowerFEM
tuple cout
Definition: gather_cfg.py:121
MonitorElement * meCastorTowerPhi
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:624
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429

Member Data Documentation

double CastorTowerJetMonitor::depthTower
private

Definition at line 61 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

double CastorTowerJetMonitor::emEnergyTower
private

Definition at line 48 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

double CastorTowerJetMonitor::energyJet
private

Definition at line 71 of file CastorTowerJetMonitor.h.

Referenced by setup().

double CastorTowerJetMonitor::energyTower
private

Definition at line 45 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

double CastorTowerJetMonitor::etaJet
private

Definition at line 73 of file CastorTowerJetMonitor.h.

Referenced by setup().

double CastorTowerJetMonitor::etaTower
private

Definition at line 56 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

double CastorTowerJetMonitor::femTower
private

Definition at line 53 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

double CastorTowerJetMonitor::hadEnergyTower
private

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().

int CastorTowerJetMonitor::ievt_
private

Definition at line 40 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

MonitorElement* CastorTowerJetMonitor::meCastorJetEnergy
private

Definition at line 99 of file CastorTowerJetMonitor.h.

Referenced by setup().

MonitorElement* CastorTowerJetMonitor::meCastorJetEta
private

Definition at line 100 of file CastorTowerJetMonitor.h.

Referenced by setup().

MonitorElement* CastorTowerJetMonitor::meCastorJetIDMultiplicity
private

Definition at line 103 of file CastorTowerJetMonitor.h.

Referenced by processEventJetIDs(), and setup().

MonitorElement* CastorTowerJetMonitor::meCastorJetMultiplicity
private

Definition at line 102 of file CastorTowerJetMonitor.h.

Referenced by processEventJets(), and setup().

MonitorElement* CastorTowerJetMonitor::meCastorJetPhi
private

Definition at line 101 of file CastorTowerJetMonitor.h.

Referenced by setup().

MonitorElement* CastorTowerJetMonitor::meCastorTowerDepth
private

Definition at line 95 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

MonitorElement* CastorTowerJetMonitor::meCastorTowerEMEnergy
private

Definition at line 90 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

MonitorElement* CastorTowerJetMonitor::meCastorTowerEnergy
private

Definition at line 89 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

MonitorElement* CastorTowerJetMonitor::meCastorTowerEta
private

Definition at line 93 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

MonitorElement* CastorTowerJetMonitor::meCastorTowerFEM
private

Definition at line 92 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

MonitorElement* CastorTowerJetMonitor::meCastorTowerHADEnergy
private

Definition at line 91 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

MonitorElement* CastorTowerJetMonitor::meCastorTowerMultiplicity
private

Definition at line 96 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

MonitorElement* CastorTowerJetMonitor::meCastorTowerPhi
private

Definition at line 94 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

MonitorElement* CastorTowerJetMonitor::meEVT_
private

Definition at line 38 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

int CastorTowerJetMonitor::nJetIDs
private

Definition at line 81 of file CastorTowerJetMonitor.h.

Referenced by processEventJetIDs().

int CastorTowerJetMonitor::nJets
private

Definition at line 78 of file CastorTowerJetMonitor.h.

Referenced by processEventJets(), and setup().

int CastorTowerJetMonitor::nTowers
private

Definition at line 64 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().

double CastorTowerJetMonitor::phiJet
private

Definition at line 75 of file CastorTowerJetMonitor.h.

Referenced by setup().

double CastorTowerJetMonitor::phiTower
private

Definition at line 58 of file CastorTowerJetMonitor.h.

Referenced by processEventTowers(), and setup().