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
HcalRecHitsClient Class Reference

#include <HcalRecHitsClient.h>

Inheritance diagram for HcalRecHitsClient:
edm::EDAnalyzer

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob (void)
 
virtual void beginRun (const edm::Run &run, const edm::EventSetup &c)
 
virtual void endJob ()
 
virtual void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
virtual void endRun (const edm::Run &run, const edm::EventSetup &c)
 
 HcalRecHitsClient (const edm::ParameterSet &)
 
int HcalRecHitsEndjob (const std::vector< MonitorElement * > &hcalMEs)
 
virtual void runClient_ ()
 
virtual ~HcalRecHitsClient ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Attributes

edm::ParameterSet conf_
 
DQMStoredbe_
 
bool debug_
 
std::string dirName_
 
std::string dirNameJet_
 
std::string dirNameMET_
 
std::string outputFile_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Definition at line 36 of file HcalRecHitsClient.h.

Constructor & Destructor Documentation

HcalRecHitsClient::HcalRecHitsClient ( const edm::ParameterSet iConfig)
explicit

Definition at line 12 of file HcalRecHitsClient.cc.

References dbe_, debug_, dirName_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), cmsCodeRules.cppFunctionSkipper::operator, outputFile_, and verbose_.

12  :conf_(iConfig)
13 {
14 
15  outputFile_ = iConfig.getUntrackedParameter<std::string>("outputFile", "myfile.root");
16 
18  if (!dbe_) {
19  edm::LogError("HcalRecHitsClient") << "unable to get DQMStore service, upshot is no client histograms will be made";
20  }
21  if(iConfig.getUntrackedParameter<bool>("DQMStore", false)) {
22  if(dbe_) dbe_->setVerbose(0);
23  }
24 
25  debug_ = false;
26  verbose_ = false;
27 
28  dirName_=iConfig.getParameter<std::string>("DQMDirName");
30 
31 }
std::string outputFile_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void setVerbose(unsigned level)
Definition: DQMStore.cc:201
edm::ParameterSet conf_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
HcalRecHitsClient::~HcalRecHitsClient ( )
virtual

Definition at line 34 of file HcalRecHitsClient.cc.

35 {
36 
37 }

Member Function Documentation

void HcalRecHitsClient::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 62 of file HcalRecHitsClient.cc.

63 {
64 
65 }
void HcalRecHitsClient::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 39 of file HcalRecHitsClient.cc.

40 {
41 
42 
43 }
void HcalRecHitsClient::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 50 of file HcalRecHitsClient.cc.

51 {
52 
53 }
void HcalRecHitsClient::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 45 of file HcalRecHitsClient.cc.

References dbe_, outputFile_, and DQMStore::save().

46 {
47  if ( outputFile_.size() != 0 && dbe_ ) dbe_->save(outputFile_);
48 }
std::string outputFile_
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:1883
void HcalRecHitsClient::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 67 of file HcalRecHitsClient.cc.

68 {
69 // runClient_();
70 }
void HcalRecHitsClient::endRun ( const edm::Run run,
const edm::EventSetup c 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 56 of file HcalRecHitsClient.cc.

References runClient_().

57 {
58  runClient_();
59 }
virtual void runClient_()
int HcalRecHitsClient::HcalRecHitsEndjob ( const std::vector< MonitorElement * > &  hcalMEs)

Definition at line 109 of file HcalRecHitsClient.cc.

References gather_cfg::cout, ExpressReco_HICollisions_FallBack::e, MonitorElement::Fill(), MonitorElement::getBinContent(), MonitorElement::getBinError(), MonitorElement::getEntries(), edm::getName(), MonitorElement::getNbinsX(), MonitorElement::getNbinsY(), i, getHLTprescales::index, j, MonitorElement::setBinContent(), and verbose_.

Referenced by runClient_().

109  {
110 
111  int useAllHistos = 0, subdet =5;
112 
113 // for ZS ...
114 // MonitorElement* emap_min_ME =0;
115  MonitorElement* ZS_HO=0, *ZS_seqHO=0;
116  MonitorElement* ZS_HB1=0, *ZS_seqHB1=0, *ZS_HB2=0, *ZS_seqHB2=0;
117  MonitorElement* ZS_HF1=0, *ZS_seqHF1=0, *ZS_HF2=0, *ZS_seqHF2=0;
118  MonitorElement* ZS_HE1=0, *ZS_seqHE1=0, *ZS_HE2=0, *ZS_seqHE2=0, *ZS_HE3=0, *ZS_seqHE3=0;
119  MonitorElement* map_depth1 =0, *map_depth2 =0, *map_depth3 =0, *map_depth4 =0;
120 // others
121  MonitorElement* Nhf=0;
122  MonitorElement* emap_depth1 =0, *emap_depth2 =0, *emap_depth3 =0, *emap_depth4 =0;
123  MonitorElement* occupancy_seqHB1 =0, *occupancy_seqHB2 =0;
124  MonitorElement* occupancy_seqHE1 =0, *occupancy_seqHE2 =0, *occupancy_seqHE3 =0;
125  MonitorElement* occupancy_seqHF1 =0, *occupancy_seqHF2 =0;
126  MonitorElement* occupancy_seqHO =0;
127  MonitorElement* emean_seqHB1 =0, *emean_seqHB2 =0;
128  MonitorElement* emean_seqHE1 =0, *emean_seqHE2 =0, *emean_seqHE3 =0;
129  MonitorElement* emean_seqHF1 =0, *emean_seqHF2 =0;
130  MonitorElement* emean_seqHO =0;
131 
132  MonitorElement* RMS_seq_HB1 =0, *RMS_seq_HB2 =0;
133  MonitorElement* RMS_seq_HE1 =0, *RMS_seq_HE2 =0, *RMS_seq_HE3 =0;
134  MonitorElement* RMS_seq_HF1 =0, *RMS_seq_HF2 =0;
135  MonitorElement* RMS_seq_HO =0;
136 
137  MonitorElement *occupancy_map_HO =0;
138  MonitorElement* occupancy_map_HB1 =0, *occupancy_map_HB2 =0;
139  MonitorElement* occupancy_map_HF1 =0, *occupancy_map_HF2 =0;
140  MonitorElement* occupancy_map_HE1 =0, *occupancy_map_HE2 =0, *occupancy_map_HE3 =0;
141 
142  MonitorElement* emean_vs_ieta_HB1 =0, *emean_vs_ieta_HB2 =0;
143  MonitorElement* emean_vs_ieta_HE1 =0, *emean_vs_ieta_HE2 =0, *emean_vs_ieta_HE3 =0;
144  MonitorElement* emean_vs_ieta_HF1 =0, *emean_vs_ieta_HF2 =0;
145  MonitorElement* emean_vs_ieta_HO =0;
146  MonitorElement* RMS_vs_ieta_HB1 =0, *RMS_vs_ieta_HB2 =0;
147  MonitorElement* RMS_vs_ieta_HE1 =0, *RMS_vs_ieta_HE2 =0, *RMS_vs_ieta_HE3 =0;
148  MonitorElement* RMS_vs_ieta_HF1 =0, *RMS_vs_ieta_HF2 =0;
149  MonitorElement* RMS_vs_ieta_HO =0;
150  MonitorElement* occupancy_vs_ieta_HB1 =0, *occupancy_vs_ieta_HB2 =0;
151  MonitorElement* occupancy_vs_ieta_HE1 =0, *occupancy_vs_ieta_HE2 =0, *occupancy_vs_ieta_HE3 =0;
152  MonitorElement* occupancy_vs_ieta_HF1 =0, *occupancy_vs_ieta_HF2 =0;
153  MonitorElement* occupancy_vs_ieta_HO =0;
154 
155  MonitorElement* RecHit_StatusWord_HB =0, *RecHit_StatusWord_HE=0, *RecHit_StatusWord_HO =0, *RecHit_StatusWord_HF =0, *RecHit_StatusWord_HF67 =0;
156  MonitorElement* RecHit_Aux_StatusWord_HB =0, *RecHit_Aux_StatusWord_HE=0, *RecHit_Aux_StatusWord_HO =0, *RecHit_Aux_StatusWord_HF =0;
157 
158  for(unsigned int ih=0; ih<hcalMEs.size(); ih++){
159  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_map_depth1") ==0 ){
160  useAllHistos =1; subdet =6;
161  }
162  if( strcmp(hcalMEs[ih]->getName().c_str(), "RMS_vs_ieta_HB1") ==0 ){
163  useAllHistos =1;
164  }
165 // if( strcmp(hcalMEs[ih]->getName().c_str(), "emap_min_ME") ==0 ){ emap_min_ME = hcalMEs[ih]; }
166  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_simple1D_HO") ==0 ){ ZS_HO = hcalMEs[ih]; }
167  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_sequential1D_HO") ==0 ){ ZS_seqHO = hcalMEs[ih]; }
168  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_simple1D_HB1") ==0 ){ ZS_HB1 = hcalMEs[ih]; }
169  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_sequential1D_HB1") ==0 ){ ZS_seqHB1 = hcalMEs[ih]; }
170  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_simple1D_HB2") ==0 ){ ZS_HB2 = hcalMEs[ih]; }
171  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_sequential1D_HB2") ==0 ){ ZS_seqHB2 = hcalMEs[ih]; }
172  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_simple1D_HF1") ==0 ){ ZS_HF1 = hcalMEs[ih]; }
173  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_sequential1D_HF1") ==0 ){ ZS_seqHF1 = hcalMEs[ih]; }
174  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_simple1D_HF2") ==0 ){ ZS_HF2 = hcalMEs[ih]; }
175  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_sequential1D_HF2") ==0 ){ ZS_seqHF2 = hcalMEs[ih]; }
176  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_simple1D_HE1") ==0 ){ ZS_HE1 = hcalMEs[ih]; }
177  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_sequential1D_HE1") ==0 ){ ZS_seqHE1 = hcalMEs[ih]; }
178  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_simple1D_HE2") ==0 ){ ZS_HE2 = hcalMEs[ih]; }
179  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_sequential1D_HE2") ==0 ){ ZS_seqHE2 = hcalMEs[ih]; }
180  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_simple1D_HE3") ==0 ){ ZS_HE3 = hcalMEs[ih]; }
181  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_sequential1D_HE3") ==0 ){ ZS_seqHE3 = hcalMEs[ih]; }
182  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_map_depth1") ==0 ){ map_depth1= hcalMEs[ih]; }
183  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_map_depth2") ==0 ){ map_depth2= hcalMEs[ih]; }
184  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_map_depth3") ==0 ){ map_depth3= hcalMEs[ih]; }
185  if( strcmp(hcalMEs[ih]->getName().c_str(), "ZSmin_map_depth4") ==0 ){ map_depth4= hcalMEs[ih]; }
186 
187  if( strcmp(hcalMEs[ih]->getName().c_str(), "N_HF") ==0 ){ Nhf= hcalMEs[ih]; }
188  if( strcmp(hcalMEs[ih]->getName().c_str(), "emap_depth1") ==0 ){ emap_depth1= hcalMEs[ih]; }
189  if( strcmp(hcalMEs[ih]->getName().c_str(), "emap_depth2") ==0 ){ emap_depth2= hcalMEs[ih]; }
190  if( strcmp(hcalMEs[ih]->getName().c_str(), "emap_depth3") ==0 ){ emap_depth3= hcalMEs[ih]; }
191  if( strcmp(hcalMEs[ih]->getName().c_str(), "emap_depth4") ==0 ){ emap_depth4= hcalMEs[ih]; }
192 
193  if( strcmp(hcalMEs[ih]->getName().c_str(), "occ_sequential1D_HB1") ==0 ){ occupancy_seqHB1= hcalMEs[ih]; }
194  if( strcmp(hcalMEs[ih]->getName().c_str(), "occ_sequential1D_HB2") ==0 ){ occupancy_seqHB2= hcalMEs[ih]; }
195  if( strcmp(hcalMEs[ih]->getName().c_str(), "occ_sequential1D_HE1") ==0 ){ occupancy_seqHE1= hcalMEs[ih]; }
196  if( strcmp(hcalMEs[ih]->getName().c_str(), "occ_sequential1D_HE2") ==0 ){ occupancy_seqHE2= hcalMEs[ih]; }
197  if( strcmp(hcalMEs[ih]->getName().c_str(), "occ_sequential1D_HE3") ==0 ){ occupancy_seqHE3= hcalMEs[ih]; }
198  if( strcmp(hcalMEs[ih]->getName().c_str(), "occ_sequential1D_HF1") ==0 ){ occupancy_seqHF1= hcalMEs[ih]; }
199  if( strcmp(hcalMEs[ih]->getName().c_str(), "occ_sequential1D_HF2") ==0 ){ occupancy_seqHF2= hcalMEs[ih]; }
200  if( strcmp(hcalMEs[ih]->getName().c_str(), "occ_sequential1D_HO") ==0 ){ occupancy_seqHO= hcalMEs[ih]; }
201  if( strcmp(hcalMEs[ih]->getName().c_str(), "emean_seq_HB1") ==0 ){ emean_seqHB1= hcalMEs[ih]; }
202  if( strcmp(hcalMEs[ih]->getName().c_str(), "emean_seq_HB2") ==0 ){ emean_seqHB2= hcalMEs[ih]; }
203  if( strcmp(hcalMEs[ih]->getName().c_str(), "emean_seq_HE1") ==0 ){ emean_seqHE1= hcalMEs[ih]; }
204  if( strcmp(hcalMEs[ih]->getName().c_str(), "emean_seq_HE2") ==0 ){ emean_seqHE2= hcalMEs[ih]; }
205  if( strcmp(hcalMEs[ih]->getName().c_str(), "emean_seq_HE3") ==0 ){ emean_seqHE3= hcalMEs[ih]; }
206  if( strcmp(hcalMEs[ih]->getName().c_str(), "emean_seq_HF1") ==0 ){ emean_seqHF1= hcalMEs[ih]; }
207  if( strcmp(hcalMEs[ih]->getName().c_str(), "emean_seq_HF2") ==0 ){ emean_seqHF2= hcalMEs[ih]; }
208  if( strcmp(hcalMEs[ih]->getName().c_str(), "emean_seq_HO") ==0 ){ emean_seqHO= hcalMEs[ih]; }
209  if( strcmp(hcalMEs[ih]->getName().c_str(), "RMS_seq_HB1") ==0 ){ RMS_seq_HB1= hcalMEs[ih]; }
210  if( strcmp(hcalMEs[ih]->getName().c_str(), "RMS_seq_HB2") ==0 ){ RMS_seq_HB2= hcalMEs[ih]; }
211  if( strcmp(hcalMEs[ih]->getName().c_str(), "RMS_seq_HE1") ==0 ){ RMS_seq_HE1= hcalMEs[ih]; }
212  if( strcmp(hcalMEs[ih]->getName().c_str(), "RMS_seq_HE2") ==0 ){ RMS_seq_HE2= hcalMEs[ih]; }
213  if( strcmp(hcalMEs[ih]->getName().c_str(), "RMS_seq_HE3") ==0 ){ RMS_seq_HE3= hcalMEs[ih]; }
214  if( strcmp(hcalMEs[ih]->getName().c_str(), "RMS_seq_HF1") ==0 ){ RMS_seq_HF1= hcalMEs[ih]; }
215  if( strcmp(hcalMEs[ih]->getName().c_str(), "RMS_seq_HF2") ==0 ){ RMS_seq_HF2= hcalMEs[ih]; }
216  if( strcmp(hcalMEs[ih]->getName().c_str(), "RMS_seq_HO") ==0 ){ RMS_seq_HO= hcalMEs[ih]; }
217  if( strcmp(hcalMEs[ih]->getName().c_str(), "occupancy_map_HB1") ==0 ){ occupancy_map_HB1= hcalMEs[ih]; }
218  if( strcmp(hcalMEs[ih]->getName().c_str(), "occupancy_map_HB2") ==0 ){ occupancy_map_HB2= hcalMEs[ih]; }
219  if( strcmp(hcalMEs[ih]->getName().c_str(), "occupancy_map_HE1") ==0 ){ occupancy_map_HE1= hcalMEs[ih]; }
220  if( strcmp(hcalMEs[ih]->getName().c_str(), "occupancy_map_HE2") ==0 ){ occupancy_map_HE2= hcalMEs[ih]; }
221  if( strcmp(hcalMEs[ih]->getName().c_str(), "occupancy_map_HE3") ==0 ){ occupancy_map_HE3= hcalMEs[ih]; }
222  if( strcmp(hcalMEs[ih]->getName().c_str(), "occupancy_map_HF1") ==0 ){ occupancy_map_HF1= hcalMEs[ih]; }
223  if( strcmp(hcalMEs[ih]->getName().c_str(), "occupancy_map_HF2") ==0 ){ occupancy_map_HF2= hcalMEs[ih]; }
224  if( strcmp(hcalMEs[ih]->getName().c_str(), "occupancy_map_HO") ==0 ){ occupancy_map_HO= hcalMEs[ih]; }
225  if( strcmp(hcalMEs[ih]->getName().c_str(), "emean_vs_ieta_HB1") ==0 ){ emean_vs_ieta_HB1= hcalMEs[ih]; }
226  if( strcmp(hcalMEs[ih]->getName().c_str(), "emean_vs_ieta_HB2") ==0 ){ emean_vs_ieta_HB2= hcalMEs[ih]; }
227  if( strcmp(hcalMEs[ih]->getName().c_str(), "emean_vs_ieta_HE1") ==0 ){ emean_vs_ieta_HE1= hcalMEs[ih]; }
228  if( strcmp(hcalMEs[ih]->getName().c_str(), "emean_vs_ieta_HE2") ==0 ){ emean_vs_ieta_HE2= hcalMEs[ih]; }
229  if( strcmp(hcalMEs[ih]->getName().c_str(), "emean_vs_ieta_HE3") ==0 ){ emean_vs_ieta_HE3= hcalMEs[ih]; }
230  if( strcmp(hcalMEs[ih]->getName().c_str(), "emean_vs_ieta_HF1") ==0 ){ emean_vs_ieta_HF1= hcalMEs[ih]; }
231  if( strcmp(hcalMEs[ih]->getName().c_str(), "emean_vs_ieta_HF2") ==0 ){ emean_vs_ieta_HF2= hcalMEs[ih]; }
232  if( strcmp(hcalMEs[ih]->getName().c_str(), "emean_vs_ieta_HO") ==0 ){ emean_vs_ieta_HO= hcalMEs[ih]; }
233  if( strcmp(hcalMEs[ih]->getName().c_str(), "RMS_vs_ieta_HB1") ==0 ){ RMS_vs_ieta_HB1= hcalMEs[ih]; }
234  if( strcmp(hcalMEs[ih]->getName().c_str(), "RMS_vs_ieta_HB2") ==0 ){ RMS_vs_ieta_HB2= hcalMEs[ih]; }
235  if( strcmp(hcalMEs[ih]->getName().c_str(), "RMS_vs_ieta_HE1") ==0 ){ RMS_vs_ieta_HE1= hcalMEs[ih]; }
236  if( strcmp(hcalMEs[ih]->getName().c_str(), "RMS_vs_ieta_HE2") ==0 ){ RMS_vs_ieta_HE2= hcalMEs[ih]; }
237  if( strcmp(hcalMEs[ih]->getName().c_str(), "RMS_vs_ieta_HE3") ==0 ){ RMS_vs_ieta_HE3= hcalMEs[ih]; }
238  if( strcmp(hcalMEs[ih]->getName().c_str(), "RMS_vs_ieta_HF1") ==0 ){ RMS_vs_ieta_HF1= hcalMEs[ih]; }
239  if( strcmp(hcalMEs[ih]->getName().c_str(), "RMS_vs_ieta_HF2") ==0 ){ RMS_vs_ieta_HF2= hcalMEs[ih]; }
240  if( strcmp(hcalMEs[ih]->getName().c_str(), "RMS_vs_ieta_HO") ==0 ){ RMS_vs_ieta_HO= hcalMEs[ih]; }
241  if( strcmp(hcalMEs[ih]->getName().c_str(), "occupancy_vs_ieta_HB1") ==0 ){ occupancy_vs_ieta_HB1= hcalMEs[ih]; }
242  if( strcmp(hcalMEs[ih]->getName().c_str(), "occupancy_vs_ieta_HB2") ==0 ){ occupancy_vs_ieta_HB2= hcalMEs[ih]; }
243  if( strcmp(hcalMEs[ih]->getName().c_str(), "occupancy_vs_ieta_HE1") ==0 ){ occupancy_vs_ieta_HE1= hcalMEs[ih]; }
244  if( strcmp(hcalMEs[ih]->getName().c_str(), "occupancy_vs_ieta_HE2") ==0 ){ occupancy_vs_ieta_HE2= hcalMEs[ih]; }
245  if( strcmp(hcalMEs[ih]->getName().c_str(), "occupancy_vs_ieta_HE3") ==0 ){ occupancy_vs_ieta_HE3= hcalMEs[ih]; }
246  if( strcmp(hcalMEs[ih]->getName().c_str(), "occupancy_vs_ieta_HF1") ==0 ){ occupancy_vs_ieta_HF1= hcalMEs[ih]; }
247  if( strcmp(hcalMEs[ih]->getName().c_str(), "occupancy_vs_ieta_HF2") ==0 ){ occupancy_vs_ieta_HF2= hcalMEs[ih]; }
248  if( strcmp(hcalMEs[ih]->getName().c_str(), "occupancy_vs_ieta_HO") ==0 ){ occupancy_vs_ieta_HO= hcalMEs[ih]; }
249  if( strcmp(hcalMEs[ih]->getName().c_str(), "HcalRecHitTask_RecHit_StatusWord_HB") ==0 ){ RecHit_StatusWord_HB= hcalMEs[ih]; }
250  if( strcmp(hcalMEs[ih]->getName().c_str(), "HcalRecHitTask_RecHit_StatusWord_HE") ==0 ){ RecHit_StatusWord_HE= hcalMEs[ih]; }
251  if( strcmp(hcalMEs[ih]->getName().c_str(), "HcalRecHitTask_RecHit_StatusWord_HO") ==0 ){ RecHit_StatusWord_HO= hcalMEs[ih]; }
252  if( strcmp(hcalMEs[ih]->getName().c_str(), "HcalRecHitTask_RecHit_StatusWord_HF") ==0 ){ RecHit_StatusWord_HF= hcalMEs[ih]; }
253  if( strcmp(hcalMEs[ih]->getName().c_str(), "HcalRecHitTask_RecHit_StatusWord_HF67") ==0 ){ RecHit_StatusWord_HF67= hcalMEs[ih]; }
254  if( strcmp(hcalMEs[ih]->getName().c_str(), "HcalRecHitTask_RecHit_Aux_StatusWord_HB") ==0 ){ RecHit_Aux_StatusWord_HB= hcalMEs[ih]; }
255  if( strcmp(hcalMEs[ih]->getName().c_str(), "HcalRecHitTask_RecHit_Aux_StatusWord_HE") ==0 ){ RecHit_Aux_StatusWord_HE= hcalMEs[ih]; }
256  if( strcmp(hcalMEs[ih]->getName().c_str(), "HcalRecHitTask_RecHit_Aux_StatusWord_HO") ==0 ){ RecHit_Aux_StatusWord_HO= hcalMEs[ih]; }
257  if( strcmp(hcalMEs[ih]->getName().c_str(), "HcalRecHitTask_RecHit_Aux_StatusWord_HF") ==0 ){ RecHit_Aux_StatusWord_HF= hcalMEs[ih]; }
258  }
259  if( useAllHistos !=0 && useAllHistos !=1 ) return 0;
260 
261  //None of the ZS stuff necessary for drawn histograms
262  if (subdet==6 && useAllHistos) {
263 // FIXME: a dummy emap_min! No solutions yet found.
264 // Since useAllHistos is set to disable it in our ususal validation, it's left here to be fixed later...
265  double emap_min[82][72][4][4];
266 /* NOT a valid solution
267  for(unsigned int i1=0; i1 <82; i1++){
268  for(unsigned int i2=0; i2<72; i2++){
269  for(unsigned int i3=0; i3<4; i3++){
270  for(unsigned int i4=0; i4<4; i4++){
271  int idx = i1 + i2*82 + i3*(82*72) + i4*(82*72*4);
272  emap_min[i1][i2][i3][i4] = emap_min_ME->GetBinContent(idx+1);
273  }
274  }
275  }
276  }
277 */
278  for (unsigned int i1 = 0; i1 < 82; i1++) {
279  for (unsigned int i2 = 0; i2 < 72; i2++) {
280 
281  int index = (i1-41) * 72 + i2;
282 
283  double e = emap_min[i1][i2][0][0];
284  if( e < 10000.) {
285  ZS_HB1->Fill(e);
286  ZS_seqHB1->Fill(double(index),e);
287  }
288  e = emap_min[i1][i2][1][0];
289  if( e < 10000.) {
290  ZS_HB2->Fill(e);
291  ZS_seqHB2->Fill(double(index),e);
292  }
293 
294  e = emap_min[i1][i2][0][1];
295  if( e < 10000.) {
296  ZS_HE1->Fill(e);
297  ZS_seqHE1->Fill(double(index),e);
298  }
299  e = emap_min[i1][i2][1][1];
300  if( e < 10000.) {
301  ZS_HE2->Fill(e);
302  ZS_seqHE2->Fill(double(index),e);
303  }
304  e = emap_min[i1][i2][2][1];
305  if( e < 10000.) {
306  ZS_HE3->Fill(e);
307  ZS_seqHE3->Fill(double(index),e);
308  }
309 
310  e = emap_min[i1][i2][3][2];
311  if( e < 10000.) {
312  ZS_HO->Fill(e);
313  ZS_seqHO->Fill(double(index),e);
314  }
315 
316  e = emap_min[i1][i2][0][3];
317  if( e < 10000.) {
318  ZS_HF1->Fill(e);
319  ZS_seqHF1->Fill(double(index),e);
320  }
321 
322  e = emap_min[i1][i2][1][3];
323  if( e < 10000.) {
324  ZS_HF2->Fill(e);
325  ZS_seqHF2->Fill(double(index),e);
326  }
327 
328  for (unsigned int i3 = 0; i3 < 4; i3++) { // depth
329  double emin = 100000.;
330  for (unsigned int i4 = 0; i4 < 4; i4++) { // subdet
331  /*
332  std::cout << "* ieta, iphi, depth, sub = "
333  << i1 << ", " << i2 << ", " << i3 << ", " << i4
334  << " emap_min = " << emap_min [i1][i2][i3][i4]
335  << std::endl;
336  */
337  if ( emin > emap_min [i1][i2][i3][i4])
338  emin = emap_min [i1][i2][i3][i4];
339  }
340 
341  int ieta = i1-41;
342  if( i3 == 0 && emin < 10000.) {
343  map_depth1->Fill(double(ieta),double(i2),emin);
344  /*
345  std::cout << "* Fill map_depth1 " << double(ieta) << " "
346  << double(i2) << " with " << emin << std::endl;
347  */
348  }
349  if( i3 == 1 && emin < 10000.)
350  map_depth2->Fill(double(ieta),double(i2),emin);
351  if( i3 == 2 && emin < 10000.)
352  map_depth3->Fill(double(ieta),double(i2),emin);
353  if( i3 == 3 && emin < 10000.)
354  map_depth4->Fill(double(ieta),double(i2),emin);
355  }
356  }
357  }
358  }
359  // mean energies and occupancies evaluation
360  else {
361 
362  double nevtot = Nhf->getEntries();
363  if(verbose_) std::cout<<"nevtot : "<<nevtot<<std::endl;
364 
365  int nx = emap_depth1->getNbinsX();
366  int ny = emap_depth1->getNbinsY();
367  float cnorm;
368  float fev = float (nevtot);
369  // std::cout << "*** nevtot " << nevtot << std::endl;
370 
371  float sumphi_hb1, sumphi_hb2, sumphi_he1, sumphi_he2, sumphi_he3,
372  sumphi_ho, sumphi_hf1, sumphi_hf2;
373  /*
374  if(nx != 82 || ny != 72)
375  std::cout << "*** problem with binning " << std::endl;
376  */
377  float phi_factor;
378 
379  for (int i = 1; i <= nx; i++) {
380  sumphi_hb1 = 0.;
381  sumphi_hb2 = 0.;
382  sumphi_he1 = 0.;
383  sumphi_he2 = 0.;
384  sumphi_he3 = 0.;
385  sumphi_ho = 0.;
386  sumphi_hf1 = 0.;
387  sumphi_hf2 = 0.;
388 
389  for (int j = 1; j <= ny; j++) {
390 
391  int index = (i-42) * ny + j-1;
392 
393  //Occupancies (needed for occ vs ieta histos)
394  cnorm = occupancy_map_HB1->getBinContent(i,j) / fev;
395  occupancy_map_HB1->setBinContent(i,j,cnorm);
396 
397  cnorm = occupancy_map_HB2->getBinContent(i,j) / fev;
398  occupancy_map_HB2->setBinContent(i,j,cnorm);
399 
400  cnorm = occupancy_map_HE1->getBinContent(i,j) / fev;
401  occupancy_map_HE1->setBinContent(i,j,cnorm);
402 
403  cnorm = occupancy_map_HE2->getBinContent(i,j) / fev;
404  occupancy_map_HE2->setBinContent(i,j,cnorm);
405 
406  cnorm = occupancy_map_HE3->getBinContent(i,j) / fev;
407  occupancy_map_HE3->setBinContent(i,j,cnorm);
408 
409  cnorm = occupancy_map_HO->getBinContent(i,j) / fev;
410  occupancy_map_HO->setBinContent(i,j,cnorm);
411 
412  cnorm = occupancy_map_HF1->getBinContent(i,j) / fev;
413  occupancy_map_HF1->setBinContent(i,j,cnorm);
414 
415  cnorm = occupancy_map_HF2->getBinContent(i,j) / fev;
416  occupancy_map_HF2->setBinContent(i,j,cnorm);
417 
418  sumphi_hb1 += occupancy_map_HB1->getBinContent(i,j);
419  sumphi_hb2 += occupancy_map_HB2->getBinContent(i,j);
420  sumphi_he1 += occupancy_map_HE1->getBinContent(i,j);
421  sumphi_he2 += occupancy_map_HE2->getBinContent(i,j);
422  sumphi_he3 += occupancy_map_HE3->getBinContent(i,j);
423  sumphi_ho += occupancy_map_HO->getBinContent(i,j);
424  sumphi_hf1 += occupancy_map_HF1->getBinContent(i,j);
425  sumphi_hf2 += occupancy_map_HF2->getBinContent(i,j);
426 
427  // Emean maps
428  cnorm = emap_depth1->getBinContent(i,j) / fev;
429  emap_depth1->setBinContent(i,j,cnorm);
430  cnorm = emap_depth2->getBinContent(i,j) / fev;
431  emap_depth2->setBinContent(i,j,cnorm);
432  cnorm = emap_depth3->getBinContent(i,j) / fev;
433  emap_depth3->setBinContent(i,j,cnorm);
434  cnorm = emap_depth4->getBinContent(i,j) / fev;
435  emap_depth4->setBinContent(i,j,cnorm);
436 
437  // Occupancies - not in main drawn set of histos
438  if(useAllHistos){
439  occupancy_seqHB1->Fill(double(index),cnorm);
440  occupancy_seqHB2->Fill(double(index),cnorm);
441  occupancy_seqHE1->Fill(double(index),cnorm);
442  occupancy_seqHE2->Fill(double(index),cnorm);
443  occupancy_seqHE3->Fill(double(index),cnorm);
444  occupancy_seqHO->Fill(double(index),cnorm);
445  occupancy_seqHF1->Fill(double(index),cnorm);
446  occupancy_seqHF2->Fill(double(index),cnorm);
447  }
448  }
449 
450  int ieta = i - 42; // -41 -1, 0 40
451  if(ieta >=0 ) ieta +=1; // -41 -1, 1 41 - to make it detector-like
452 
453  if(ieta >= -20 && ieta <= 20 )
454  {phi_factor = 72.;}
455  else {
456  if(ieta >= 40 || ieta <= -40 ) {phi_factor = 18.;}
457  else
458  phi_factor = 36.;
459  }
460  if(ieta >= 0) ieta -= 1; // -41 -1, 0 40 - to bring back to histo num
461 
462  /*
463  std::cout << "*** ieta = " << ieta << " sumphi_hb1, sumphi_hb2, sumphi_he1, sumphi_he2, simphi_he3, sumphi_ho, simphi_hf1, sumphi_hf2" << std::endl
464  << sumphi_hb1 << " " << sumphi_hb2 << " " << sumphi_he1 << " "
465  << sumphi_he2 << " " << simphi_he3 << " " << sumphi_ho << " "
466  << simphi_hf1 << " " << sumphi_hf2 << std::endl << std::endl;
467  */
468  //Occupancy vs. ieta histos are drawn, RMS is not
469  cnorm = sumphi_hb1 / phi_factor;
470  occupancy_vs_ieta_HB1->Fill(float(ieta), cnorm);
471  cnorm = sumphi_hb2 / phi_factor;
472  occupancy_vs_ieta_HB2->Fill(float(ieta), cnorm);
473  cnorm = sumphi_he1 / phi_factor;
474  occupancy_vs_ieta_HE1->Fill(float(ieta), cnorm);
475  cnorm = sumphi_he2 / phi_factor;
476  occupancy_vs_ieta_HE2->Fill(float(ieta), cnorm);
477  cnorm = sumphi_he3 / phi_factor;
478  occupancy_vs_ieta_HE3->Fill(float(ieta), cnorm);
479  cnorm = sumphi_ho / phi_factor;
480  occupancy_vs_ieta_HO->Fill(float(ieta), cnorm);
481  cnorm = sumphi_hf1 / phi_factor;
482  occupancy_vs_ieta_HF1->Fill(float(ieta), cnorm);
483  cnorm = sumphi_hf2 / phi_factor;
484  occupancy_vs_ieta_HF2->Fill(float(ieta), cnorm);
485 
486  if (useAllHistos){
487  // RMS vs ieta (Emean's one)
488  cnorm = emean_vs_ieta_HB1->getBinError(i);
489  RMS_vs_ieta_HB1->Fill(ieta,cnorm);
490  cnorm = emean_vs_ieta_HB2->getBinError(i);
491  RMS_vs_ieta_HB2->Fill(ieta,cnorm);
492  cnorm = emean_vs_ieta_HE1->getBinError(i);
493  RMS_vs_ieta_HE1->Fill(ieta,cnorm);
494  cnorm = emean_vs_ieta_HE2->getBinError(i);
495  RMS_vs_ieta_HE2->Fill(ieta,cnorm);
496  cnorm = emean_vs_ieta_HE1->getBinError(i);
497  RMS_vs_ieta_HE3->Fill(ieta,cnorm);
498  cnorm = emean_vs_ieta_HB1->getBinError(i);
499  RMS_vs_ieta_HO->Fill(ieta,cnorm);
500  cnorm = emean_vs_ieta_HB1->getBinError(i);
501  RMS_vs_ieta_HF1->Fill(ieta,cnorm);
502  cnorm = emean_vs_ieta_HB1->getBinError(i);
503  RMS_vs_ieta_HF2->Fill(ieta,cnorm);
504  }
505  } // end of i-loop
506 
507 
508  // RMS seq (not drawn)
509  if(useAllHistos){
510  nx = emean_seqHB1->getNbinsX();
511  for(int ibin = 1; ibin <= nx; ibin++ ){
512  cnorm = emean_seqHB1->getBinError(ibin);
513  RMS_seq_HB1->setBinContent(ibin, cnorm);
514  cnorm = emean_seqHB2->getBinError(ibin);
515  RMS_seq_HB2->setBinContent(ibin, cnorm);
516  cnorm = emean_seqHO->getBinError(ibin);
517  RMS_seq_HO->setBinContent(ibin, cnorm);
518  }
519  nx = emean_seqHE1->getNbinsX();
520  for(int ibin = 1; ibin <= nx; ibin++ ){
521  cnorm = emean_seqHE1->getBinError(ibin);
522  RMS_seq_HE1->setBinContent(ibin, cnorm);
523  cnorm = emean_seqHE2->getBinError(ibin);
524  RMS_seq_HE2->setBinContent(ibin, cnorm);
525  cnorm = emean_seqHE3->getBinError(ibin);
526  RMS_seq_HE3->setBinContent(ibin, cnorm);
527  }
528  nx = emean_seqHF1->getNbinsX();
529  for(int ibin = 1; ibin <= nx; ibin++ ){
530  cnorm = emean_seqHF1->getBinError(ibin);
531  RMS_seq_HF1->setBinContent(ibin, cnorm);
532  cnorm = emean_seqHF2->getBinError(ibin);
533  RMS_seq_HF2->setBinContent(ibin, cnorm);
534  }
535  }
536  //Status Word (drawn)
537  nx = RecHit_StatusWord_HB->getNbinsX();
538  for (int ibin = 1; ibin <= nx; ibin++) {
539  cnorm = RecHit_StatusWord_HB->getBinContent(ibin) / (fev * 2592.);
540  RecHit_StatusWord_HB->setBinContent(ibin,cnorm);
541 
542  cnorm = RecHit_StatusWord_HE->getBinContent(ibin) / (fev * 2592.);
543  RecHit_StatusWord_HE->setBinContent(ibin,cnorm);
544 
545  cnorm = RecHit_StatusWord_HO->getBinContent(ibin) / (fev * 2160.);
546  RecHit_StatusWord_HO->setBinContent(ibin,cnorm);
547 
548  cnorm = RecHit_StatusWord_HF->getBinContent(ibin) / (fev * 1728.);
549  RecHit_StatusWord_HF->setBinContent(ibin,cnorm);
550 
551  cnorm = RecHit_Aux_StatusWord_HB->getBinContent(ibin) / (fev * 2592.);
552  RecHit_Aux_StatusWord_HB->setBinContent(ibin,cnorm);
553 
554  cnorm = RecHit_Aux_StatusWord_HE->getBinContent(ibin) / (fev * 2592.);
555  RecHit_Aux_StatusWord_HE->setBinContent(ibin,cnorm);
556 
557  cnorm = RecHit_Aux_StatusWord_HO->getBinContent(ibin) / (fev * 2160.);
558  RecHit_Aux_StatusWord_HO->setBinContent(ibin,cnorm);
559 
560  cnorm = RecHit_Aux_StatusWord_HF->getBinContent(ibin) / (fev * 1728.);
561  RecHit_Aux_StatusWord_HF->setBinContent(ibin,cnorm);
562  }
563  //HF 2-bit status word (not drawn)
564  if(useAllHistos){
565  nx = RecHit_StatusWord_HF67->getNbinsX();
566  for (int ibin = 1; ibin <= nx; ibin++) {
567  cnorm = RecHit_StatusWord_HF67->getBinContent(ibin) / (fev * 1728.);
568  RecHit_StatusWord_HF67->setBinContent(ibin,cnorm);
569  }
570  }
571  }
572 
573  return 1;
574 }
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
double getEntries(void) const
get # of entries
int getNbinsY(void) const
get # of bins in Y-axis
void Fill(long long x)
int j
Definition: DBlmapReader.cc:9
std::string getName(Reflex::Type &cc)
Definition: ClassFiller.cc:18
double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
double getBinContent(int binx) const
get content of bin (1-D)
int getNbinsX(void) const
get # of bins in X-axis
tuple cout
Definition: gather_cfg.py:41
void HcalRecHitsClient::runClient_ ( )
virtual

Definition at line 72 of file HcalRecHitsClient.cc.

References gather_cfg::cout, dbe_, dirName_, DQMStore::getContents(), DQMStore::getSubdirs(), HcalRecHitsEndjob(), i, j, DQMStore::setCurrentFolder(), and verbose_.

Referenced by endRun().

73 {
74  if(!dbe_) return; //we dont have the DQMStore so we cant do anything
76 
77  if (verbose_) std::cout << "\nrunClient" << std::endl;
78 
79  std::vector<MonitorElement*> hcalMEs;
80 
81  // Since out folders are fixed to three, we can just go over these three folders
82  // i.e., CaloTowersV/CaloTowersTask, HcalRecHitsV/HcalRecHitTask, NoiseRatesV/NoiseRatesTask.
83  std::vector<std::string> fullPathHLTFolders = dbe_->getSubdirs();
84  for(unsigned int i=0;i<fullPathHLTFolders.size();i++) {
85 
86  if (verbose_) std::cout <<"\nfullPath: "<< fullPathHLTFolders[i] << std::endl;
87  dbe_->setCurrentFolder(fullPathHLTFolders[i]);
88 
89  std::vector<std::string> fullSubPathHLTFolders = dbe_->getSubdirs();
90  for(unsigned int j=0;j<fullSubPathHLTFolders.size();j++) {
91 
92  if (verbose_) std::cout <<"fullSub: "<<fullSubPathHLTFolders[j] << std::endl;
93 
94  if( strcmp(fullSubPathHLTFolders[j].c_str(), "HcalRecHitsV/HcalRecHitTask") ==0 ){
95  hcalMEs = dbe_->getContents(fullSubPathHLTFolders[j]);
96  if (verbose_) std::cout <<"hltMES size : "<<hcalMEs.size()<<std::endl;
97  if( !HcalRecHitsEndjob(hcalMEs) ) std::cout<<"\nError in HcalRecHitsEndjob!"<<std::endl<<std::endl;
98  }
99 
100  }
101 
102  }
103 
104 }
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1221
int HcalRecHitsEndjob(const std::vector< MonitorElement * > &hcalMEs)
int j
Definition: DBlmapReader.cc:9
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1299
tuple cout
Definition: gather_cfg.py:41
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237

Member Data Documentation

edm::ParameterSet HcalRecHitsClient::conf_
private

Definition at line 42 of file HcalRecHitsClient.h.

DQMStore* HcalRecHitsClient::dbe_
private

Definition at line 39 of file HcalRecHitsClient.h.

Referenced by endJob(), HcalRecHitsClient(), and runClient_().

bool HcalRecHitsClient::debug_
private

Definition at line 45 of file HcalRecHitsClient.h.

Referenced by HcalRecHitsClient().

std::string HcalRecHitsClient::dirName_
private

Definition at line 47 of file HcalRecHitsClient.h.

Referenced by HcalRecHitsClient(), and runClient_().

std::string HcalRecHitsClient::dirNameJet_
private

Definition at line 48 of file HcalRecHitsClient.h.

std::string HcalRecHitsClient::dirNameMET_
private

Definition at line 49 of file HcalRecHitsClient.h.

std::string HcalRecHitsClient::outputFile_
private

Definition at line 40 of file HcalRecHitsClient.h.

Referenced by endJob(), and HcalRecHitsClient().

bool HcalRecHitsClient::verbose_
private

Definition at line 44 of file HcalRecHitsClient.h.

Referenced by HcalRecHitsClient(), HcalRecHitsEndjob(), and runClient_().