CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HcalRecHitsDQMClient Class Reference

#include <HcalRecHitsDQMClient.h>

Inheritance diagram for HcalRecHitsDQMClient:
DQMEDHarvester edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void beginJob (void) override
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
 HcalRecHitsDQMClient (const edm::ParameterSet &)
 
int HcalRecHitsEndjob (const std::vector< MonitorElement * > &hcalMEs)
 
float phifactor (int ieta)
 
 ~HcalRecHitsDQMClient () override
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQMEDHarvester ()
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &, edm::EventSetup const &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

edm::ParameterSet conf_
 
bool debug_
 
std::string dirName_
 
std::string dirNameJet_
 
std::string dirNameMET_
 
const HcalDDDRecConstantshcons
 
int maxDepthAll_
 
int maxDepthHB_
 
int maxDepthHE_
 
int maxDepthHF_
 
int maxDepthHO_
 
int nChannels_ [5]
 
std::string outputFile_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ESProduct , Transition Tr = Transition::Event>
auto esConsumes (eventsetup::EventSetupRecordKey const &, ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from DQMEDHarvester
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 49 of file HcalRecHitsDQMClient.h.

Constructor & Destructor Documentation

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

Definition at line 11 of file HcalRecHitsDQMClient.cc.

References debug_, dirName_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), outputFile_, AlCaHLTBitMon_QueryRunRegistry::string, and verbose_.

11  :conf_(iConfig)
12 {
13 
14  outputFile_ = iConfig.getUntrackedParameter<std::string>("outputFile", "myfile.root");
15  debug_ = false;
16  verbose_ = false;
17  dirName_=iConfig.getParameter<std::string>("DQMDirName");
18 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::ParameterSet conf_
HcalRecHitsDQMClient::~HcalRecHitsDQMClient ( )
override

Definition at line 21 of file HcalRecHitsDQMClient.cc.

22 {
23 
24 }

Member Function Documentation

void HcalRecHitsDQMClient::beginJob ( void  )
overridevirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 26 of file HcalRecHitsDQMClient.cc.

27 {
28 
29 
30 }
void HcalRecHitsDQMClient::beginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
override

Definition at line 33 of file HcalRecHitsDQMClient.cc.

References geometry, edm::EventSetup::get(), HcalDDDRecConstants::getMaxDepth(), CaloGeometry::getValidDetIds(), DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, hcons, mps_fire::i, maxDepthAll_, maxDepthHB_, maxDepthHE_, maxDepthHF_, maxDepthHO_, and nChannels_.

33  {
34 
36  es.get<HcalRecNumberingRecord>().get( pHRNDC );
37  hcons = &(*pHRNDC);
42 
44 
45  es.get<CaloGeometryRecord > ().get(geometry);
46 
47  const std::vector<DetId>& hbCells = geometry->getValidDetIds(DetId::Hcal, HcalBarrel);
48  const std::vector<DetId>& heCells = geometry->getValidDetIds(DetId::Hcal, HcalEndcap);
49  const std::vector<DetId>& hoCells = geometry->getValidDetIds(DetId::Hcal, HcalOuter);
50  const std::vector<DetId>& hfCells = geometry->getValidDetIds(DetId::Hcal, HcalForward);
51 
52  nChannels_[1] = hbCells.size();
53  nChannels_[2] = heCells.size();
54  nChannels_[3] = hoCells.size();
55  nChannels_[4] = hfCells.size();
56  nChannels_[0] = nChannels_[1] + nChannels_[2] + nChannels_[3] + nChannels_[4];
57  //avoid divide by zero
58  for(unsigned i = 0; i < 5; ++i){
59  if(nChannels_[i]==0) nChannels_[i] = 1;
60  }
61 
62  //std::cout << "Channels HB:" << nChannels_[1] << " HE:" << nChannels_[2] << " HO:" << nChannels_[3] << " HF:" << nChannels_[4] << std::endl;
63 
64  //We hardcode the HF depths because in the dual readout configuration, rechits are not defined for depths 3&4
65  maxDepthHF_ = (maxDepthHF_ > 2 ? 2 : maxDepthHF_); //We reatin the dynamic possibility that HF might have 0 or 1 depths
66 
69 
70 }
const HcalDDDRecConstants * hcons
int getMaxDepth(const int &type) const
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
ESHandle< TrackerGeometry > geometry
void HcalRecHitsDQMClient::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overridevirtual

Implements DQMEDHarvester.

Definition at line 72 of file HcalRecHitsDQMClient.cc.

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

73 {
74  igetter.setCurrentFolder(dirName_);
75 
76  if (verbose_) std::cout << "\nrunClient" << std::endl;
77 
78  std::vector<MonitorElement*> hcalMEs;
79 
80  // Since out folders are fixed to three, we can just go over these three folders
81  // i.e., CaloTowersD/CaloTowersTask, HcalRecHitsD/HcalRecHitTask, NoiseRatesV/NoiseRatesTask.
82  std::vector<std::string> fullPathHLTFolders = igetter.getSubdirs();
83  for(unsigned int i=0;i<fullPathHLTFolders.size();i++) {
84 
85  if (verbose_) std::cout <<"\nfullPath: "<< fullPathHLTFolders[i] << std::endl;
86  igetter.setCurrentFolder(fullPathHLTFolders[i]);
87 
88  std::vector<std::string> fullSubPathHLTFolders = igetter.getSubdirs();
89  for(unsigned int j=0;j<fullSubPathHLTFolders.size();j++) {
90 
91  if (verbose_) std::cout <<"fullSub: "<<fullSubPathHLTFolders[j] << std::endl;
92 
93  if( strcmp(fullSubPathHLTFolders[j].c_str(), "HcalRecHitsD/HcalRecHitTask") ==0 ){
94  hcalMEs = igetter.getContents(fullSubPathHLTFolders[j]);
95  if (verbose_) std::cout <<"hltMES size : "<<hcalMEs.size()<<std::endl;
96  if( !HcalRecHitsEndjob(hcalMEs) ) std::cout<<"\nError in HcalRecHitsEndjob!"<<std::endl<<std::endl;
97  }
98 
99  }
100 
101  }
102 
103 }
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:361
int HcalRecHitsEndjob(const std::vector< MonitorElement * > &hcalMEs)
std::vector< MonitorElement * > getContents(Args &&...args)
Definition: DQMStore.h:192
std::vector< std::string > getSubdirs()
Definition: DQMStore.cc:325
int HcalRecHitsDQMClient::HcalRecHitsEndjob ( const std::vector< MonitorElement * > &  hcalMEs)

Definition at line 108 of file HcalRecHitsDQMClient.cc.

References ws_sso_content_reader::content, gather_cfg::cout, spr::find(), objects.autophobj::float, MonitorElement::getEntries(), mps_fire::i, nChannels_, phifactor(), tablePrinter::prefix, mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, and verbose_.

Referenced by dqmEndJob().

108  {
109 
110  MonitorElement* Nhf=nullptr;
111 
112  //Search for emap histograms, and collect them into this vector
113  //All subdtectors are plotted together in these histograms. We only need to look for different depths
114  std::vector<MonitorElement*> emap_depths;
115 
116  //This vector is filled occupancy_maps identified by both subdetector and depth
117  std::vector<MonitorElement*> occupancy_maps;
118  std::vector<std::string> occupancyID;
119 
120  //This vector is filled with emean_vs_ieta histograms, they are divided by both subdetector and depth
121  std::vector<MonitorElement*> emean_vs_ieta;
122 
123  //These are the only histograms filled in this module; however, the histograms are created empty in HcalRecHitsAnalyzer
124  //occupancy_vs_ieta, divided by both subdetector and depth
125  std::vector<MonitorElement*> occupancy_vs_ieta;
126  std::vector<std::string> occupancy_vs_ietaID;
127 
128  //RecHit_StatusWord & RecHit_Aux_StatusWord
129  //Divided by subdectector
130  std::vector<MonitorElement*> RecHit_StatusWord;
131  std::vector<float> RecHit_StatusWord_Channels;
132  std::vector<MonitorElement*> RecHit_Aux_StatusWord;
133  std::vector<float> RecHit_Aux_StatusWord_Channels;
134 
135  for(unsigned int ih=0; ih<hcalMEs.size(); ih++){
136 
137  //N_HF is not special, it is just convient to get the total number of events
138  //The number of entries in N_HF is equal to the number of events
139  if( hcalMEs[ih]->getName() == "N_HF" ){
140  Nhf= hcalMEs[ih];
141  continue;
142  }
143 
144  // ***********************
145  // * We fill the various MonitorElement vectors by searching for a matching substring
146  // * The methods that are used are agnostic to the ordering of vectors
147  // ***********************
148 
149  if( hcalMEs[ih]->getName().find("emap_depth") != std::string::npos ){
150  emap_depths.push_back(hcalMEs[ih]);
151  continue;
152  }
153 
154  if( hcalMEs[ih]->getName().find("occupancy_map_H") != std::string::npos ){
155  occupancy_maps.push_back(hcalMEs[ih]);
156 
157  // Use occupancyID to save the subdetector and depth information
158  // This will help preserve both indifference to vector ordering and specific details of the detector topology
159  // The position in occupancyID must correspond to the histogram position in occupancy_maps
160 
161  // Save the string after "occupancy_map_"
162 
163  std::string prefix = "occupancy_map_";
164 
165  occupancyID.push_back( hcalMEs[ih]->getName().substr(prefix.size()) );
166 
167  continue;
168  }
169 
170  if( hcalMEs[ih]->getName().find("emean_vs_ieta_H") != std::string::npos ){
171  emean_vs_ieta.push_back(hcalMEs[ih]);
172  continue;
173  }
174 
175  if( hcalMEs[ih]->getName().find("occupancy_vs_ieta_H") != std::string::npos ){
176  occupancy_vs_ieta.push_back(hcalMEs[ih]);
177 
178  // Use occupancy_vs_ietaID to save the subdetector and depth information
179  // This will help preserve both indifference to vector ordering and specific details of the detector topology
180  // The position in occupancyID must correspond to the histogram position in occupancy_vs_ieta
181 
182  // Save the string after "occupancy_vs_ieta_"
183 
184  std::string prefix = "occupancy_vs_ieta_";
185 
186  occupancy_vs_ietaID.push_back( hcalMEs[ih]->getName().substr(prefix.size()) );
187 
188  continue;
189  }
190 
191  if( hcalMEs[ih]->getName().find("HcalRecHitTask_RecHit_StatusWord_H") != std::string::npos ){
192  RecHit_StatusWord.push_back(hcalMEs[ih]);
193 
194  if(hcalMEs[ih]->getName().find("HB") != std::string::npos ){
195  RecHit_StatusWord_Channels.push_back((float)nChannels_[1]);
196  }else if(hcalMEs[ih]->getName().find("HE") != std::string::npos ){
197  RecHit_StatusWord_Channels.push_back((float)nChannels_[2]);
198  }else if(hcalMEs[ih]->getName().find("H0") != std::string::npos ){
199  RecHit_StatusWord_Channels.push_back((float)nChannels_[3]);
200  }else if(hcalMEs[ih]->getName().find("HF") != std::string::npos ){
201  RecHit_StatusWord_Channels.push_back((float)nChannels_[4]);
202  } else {
203  RecHit_StatusWord_Channels.push_back(1.);
204  }
205 
206  continue;
207  }
208 
209  if( hcalMEs[ih]->getName().find("HcalRecHitTask_RecHit_Aux_StatusWord_H") != std::string::npos ){
210  RecHit_Aux_StatusWord.push_back(hcalMEs[ih]);
211 
212  if(hcalMEs[ih]->getName().find("HB") != std::string::npos ){
213  RecHit_Aux_StatusWord_Channels.push_back((float)nChannels_[1]);
214  }else if(hcalMEs[ih]->getName().find("HE") != std::string::npos ){
215  RecHit_Aux_StatusWord_Channels.push_back((float)nChannels_[2]);
216  }else if(hcalMEs[ih]->getName().find("H0") != std::string::npos ){
217  RecHit_Aux_StatusWord_Channels.push_back((float)nChannels_[3]);
218  }else if(hcalMEs[ih]->getName().find("HF") != std::string::npos ){
219  RecHit_Aux_StatusWord_Channels.push_back((float)nChannels_[4]);
220  } else {
221  RecHit_Aux_StatusWord_Channels.push_back(1.);
222  }
223 
224  continue;
225  }
226 
227  }
228 
229  // mean energies and occupancies evaluation
230 
231  double nevtot = Nhf->getEntries(); // Use the number of entries in the Nhf histogram to give the total number of events
232 
233  if(verbose_) std::cout<<"nevtot : "<<nevtot<<std::endl;
234 
235  // emap histograms are scaled by the number of events
236  float fev = float (nevtot);
237  double scaleBynevtot = 1 / fev;
238 
239  // In this and the following histogram vectors, recognize that the for-loop index
240  // does not have to correspond to any particular depth
241  for(unsigned int depthIdx = 0; depthIdx < emap_depths.size(); depthIdx++){
242 
243  int nx = emap_depths[depthIdx]->getNbinsX();
244  int ny = emap_depths[depthIdx]->getNbinsY();
245 
246  float cnorm;
247  float enorm;
248 
249  for (int i = 1; i <= nx; i++) {
250  for (int j = 1; j <= ny; j++) {
251  cnorm = emap_depths[depthIdx]->getBinContent(i,j) * scaleBynevtot;
252  enorm = emap_depths[depthIdx]->getBinError(i,j) * scaleBynevtot;
253  emap_depths[depthIdx]->setBinContent(i,j,cnorm);
254  emap_depths[depthIdx]->setBinError(i,j,enorm);
255 
256  }
257  }
258  }
259 
260  // occupancy_maps & matched occupancy_vs_ieta
261 
262  bool omatched = false;
263 
264  for(unsigned int occupancyIdx = 0; occupancyIdx < occupancy_maps.size(); occupancyIdx++){
265 
266  int nx = occupancy_maps[occupancyIdx]->getNbinsX();
267  int ny = occupancy_maps[occupancyIdx]->getNbinsY();
268 
269  float cnorm;
270  float enorm;
271 
272  unsigned int vsIetaIdx = occupancy_vs_ieta.size();
273  omatched = false;
274 
275  for(vsIetaIdx = 0; vsIetaIdx < occupancy_vs_ieta.size(); vsIetaIdx++){
276  if(occupancyID[occupancyIdx] == occupancy_vs_ietaID[vsIetaIdx]){
277  omatched = true;
278  break;
279  }
280  }// match occupancy_vs_ieta histogram
281 
282  for (int i = 1; i <= nx; i++) {
283  for (int j = 1; j <= ny; j++) {
284  cnorm = occupancy_maps[occupancyIdx]->getBinContent(i,j) * scaleBynevtot;
285  enorm = occupancy_maps[occupancyIdx]->getBinError(i,j) * scaleBynevtot;
286  occupancy_maps[occupancyIdx]->setBinContent(i,j,cnorm);
287  occupancy_maps[occupancyIdx]->setBinError(i,j,enorm);
288 
289  }
290  }
291 
292  //Fill occupancy_vs_ieta
293 
294  if(omatched){
295 
296  //We run over all of the ieta values
297  for (int ieta = -41; ieta <= 41; ieta++) {
298  float phi_factor = 1.;
299  float sumphi = 0.;
300  float sumphie = 0.;
301 
302  if(ieta == 0) continue; //ieta=0 is not defined
303 
304  phi_factor = phifactor(ieta);
305 
306  //the rechits occupancy map defines iphi as 0..71
307  for (int iphi = 0; iphi <= 71; iphi++) {
308  int binIeta = occupancy_maps[occupancyIdx]->getTH2F()->GetXaxis()->FindBin(float(ieta));
309  int binIphi = occupancy_maps[occupancyIdx]->getTH2F()->GetYaxis()->FindBin(float(iphi));
310 
311  float content = occupancy_maps[occupancyIdx]->getBinContent(binIeta,binIphi);
312  float econtent = occupancy_maps[occupancyIdx]->getBinError(binIeta,binIphi);
313 
314  sumphi += content;
315  sumphie += econtent*econtent;
316  }//for loop over phi
317 
318  int ietabin = occupancy_vs_ieta[vsIetaIdx]->getTH1F()->GetXaxis()->FindBin(float(ieta));
319 
320 
321 
322  // fill occupancies vs ieta
323  cnorm = sumphi / phi_factor;
324  enorm = sqrt(sumphie) / phi_factor;
325  occupancy_vs_ieta[vsIetaIdx]->setBinContent(ietabin, cnorm);
326  occupancy_vs_ieta[vsIetaIdx]->setBinError(ietabin,enorm);
327 
328  }//Fill occupancy_vs_ieta
329  }//if omatched
330  }
331 
332  // Status Word
333  // Normalized by number of events and by number of channels per subdetector as well
334 
335  for(unsigned int StatusWordIdx = 0; StatusWordIdx < RecHit_StatusWord.size(); StatusWordIdx++){
336 
337  int nx = RecHit_StatusWord[StatusWordIdx]->getNbinsX();
338 
339  float cnorm;
340  float enorm;
341 
342  for (int i = 1; i <= nx; i++) {
343  cnorm = RecHit_StatusWord[StatusWordIdx]->getBinContent(i) * scaleBynevtot / RecHit_StatusWord_Channels[StatusWordIdx];
344  enorm = RecHit_StatusWord[StatusWordIdx]->getBinError(i) * scaleBynevtot / RecHit_StatusWord_Channels[StatusWordIdx];
345  RecHit_StatusWord[StatusWordIdx]->setBinContent(i,cnorm);
346  RecHit_StatusWord[StatusWordIdx]->setBinError(i,enorm);
347 
348  }
349 
350  }
351 
352  for(unsigned int AuxStatusWordIdx = 0; AuxStatusWordIdx < RecHit_Aux_StatusWord.size(); AuxStatusWordIdx++){
353 
354  int nx = RecHit_Aux_StatusWord[AuxStatusWordIdx]->getNbinsX();
355 
356  float cnorm;
357  float enorm;
358 
359  for (int i = 1; i <= nx; i++) {
360  cnorm = RecHit_Aux_StatusWord[AuxStatusWordIdx]->getBinContent(i) * scaleBynevtot / RecHit_Aux_StatusWord_Channels[AuxStatusWordIdx];
361  enorm = RecHit_Aux_StatusWord[AuxStatusWordIdx]->getBinError(i) * scaleBynevtot / RecHit_Aux_StatusWord_Channels[AuxStatusWordIdx];
362  RecHit_Aux_StatusWord[AuxStatusWordIdx]->setBinContent(i,cnorm);
363  RecHit_Aux_StatusWord[AuxStatusWordIdx]->setBinError(i,enorm);
364 
365  }
366 
367 
368  }
369 
370  return 1;
371 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
T sqrt(T t)
Definition: SSEVec.h:18
double getEntries() const
get # of entries
float HcalRecHitsDQMClient::phifactor ( int  ieta)

Definition at line 373 of file HcalRecHitsDQMClient.cc.

References DEFINE_FWK_MODULE.

Referenced by HcalRecHitsEndjob().

373  {
374 
375  float phi_factor_;
376 
377  if(ieta >= -20 && ieta <= 20 ){
378  phi_factor_ = 72.;
379  } else {
380  if(ieta >= 40 || ieta <= -40 ){
381  phi_factor_ = 18.;
382  } else {
383  phi_factor_ = 36.;
384  }
385  }
386 
387  return phi_factor_;
388 
389 }

Member Data Documentation

edm::ParameterSet HcalRecHitsDQMClient::conf_
private

Definition at line 53 of file HcalRecHitsDQMClient.h.

bool HcalRecHitsDQMClient::debug_
private

Definition at line 56 of file HcalRecHitsDQMClient.h.

Referenced by HcalRecHitsDQMClient().

std::string HcalRecHitsDQMClient::dirName_
private

Definition at line 58 of file HcalRecHitsDQMClient.h.

Referenced by dqmEndJob(), and HcalRecHitsDQMClient().

std::string HcalRecHitsDQMClient::dirNameJet_
private

Definition at line 59 of file HcalRecHitsDQMClient.h.

std::string HcalRecHitsDQMClient::dirNameMET_
private

Definition at line 60 of file HcalRecHitsDQMClient.h.

const HcalDDDRecConstants* HcalRecHitsDQMClient::hcons
private

Definition at line 62 of file HcalRecHitsDQMClient.h.

Referenced by beginRun().

int HcalRecHitsDQMClient::maxDepthAll_
private

Definition at line 63 of file HcalRecHitsDQMClient.h.

Referenced by beginRun().

int HcalRecHitsDQMClient::maxDepthHB_
private

Definition at line 63 of file HcalRecHitsDQMClient.h.

Referenced by beginRun().

int HcalRecHitsDQMClient::maxDepthHE_
private

Definition at line 63 of file HcalRecHitsDQMClient.h.

Referenced by beginRun().

int HcalRecHitsDQMClient::maxDepthHF_
private

Definition at line 63 of file HcalRecHitsDQMClient.h.

Referenced by beginRun().

int HcalRecHitsDQMClient::maxDepthHO_
private

Definition at line 63 of file HcalRecHitsDQMClient.h.

Referenced by beginRun().

int HcalRecHitsDQMClient::nChannels_[5]
private

Definition at line 65 of file HcalRecHitsDQMClient.h.

Referenced by beginRun(), and HcalRecHitsEndjob().

std::string HcalRecHitsDQMClient::outputFile_
private

Definition at line 52 of file HcalRecHitsDQMClient.h.

Referenced by HcalRecHitsDQMClient().

bool HcalRecHitsDQMClient::verbose_
private

Definition at line 55 of file HcalRecHitsDQMClient.h.

Referenced by dqmEndJob(), HcalRecHitsDQMClient(), and HcalRecHitsEndjob().