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

#include <CaloMiscalibMapHcal.h>

Inheritance diagram for CaloMiscalibMapHcal:
CaloMiscalibMap

Public Member Functions

virtual void addCell (const DetId &cell, float scaling_factor)
 
 CaloMiscalibMapHcal ()
 
const std::map< uint32_t, float > & get ()
 
void prefillMap (const HcalTopology &topology)
 
void print ()
 
- Public Member Functions inherited from CaloMiscalibMap
 CaloMiscalibMap ()
 
virtual ~CaloMiscalibMap ()
 

Private Attributes

std::map< uint32_t, float > mapHcal_
 

Detailed Description

Definition at line 17 of file CaloMiscalibMapHcal.h.

Constructor & Destructor Documentation

CaloMiscalibMapHcal::CaloMiscalibMapHcal ( )
inline

Definition at line 19 of file CaloMiscalibMapHcal.h.

19  {
20  }

Member Function Documentation

virtual void CaloMiscalibMapHcal::addCell ( const DetId cell,
float  scaling_factor 
)
inlinevirtual

Implements CaloMiscalibMap.

Definition at line 46 of file CaloMiscalibMapHcal.h.

References mapHcal_, and DetId::rawId().

47 {
48  //mapHcal_.setValue(cell.rawId(),scaling_factor);
49  mapHcal_[cell.rawId()]=scaling_factor;
50 }
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
std::map< uint32_t, float > mapHcal_
const std::map<uint32_t, float>& CaloMiscalibMapHcal::get ( )
inline
void CaloMiscalibMapHcal::prefillMap ( const HcalTopology topology)
inline

Definition at line 22 of file CaloMiscalibMapHcal.h.

References HLT_FULL_cff::depth, eta, HcalForward, HcalDetId::kHcalDepthMask2, HcalDetId::kHcalEtaMask2, HcalDetId::kHcalPhiMask2, mapHcal_, phi, DetId::rawId(), and HcalTopology::valid().

Referenced by HcalRecHitRecalib::beginRun().

22  {
23 
24  for (int det = 1; det <= HcalForward; det++) {
26  for (int phi = 1; phi <= HcalDetId::kHcalPhiMask2; phi++) {
27  for (int depth = 1; depth <= HcalDetId::kHcalDepthMask2; depth++) {
28 
29  try {
30  HcalDetId hcaldetid ((HcalSubdetector) det, eta, phi, depth);
31  if (topology.valid(hcaldetid)) {
32  mapHcal_[hcaldetid.rawId()]=1.0;
33  // std::cout << "Valid cell found: " << det << " " << eta << " " << phi << " " << depth << std::endl;
34  }
35 
36  }
37  catch (...) {
38  }
39  }
40  }
41  }
42  }
43 }
static const int kHcalDepthMask2
Definition: HcalDetId.h:26
std::map< uint32_t, float > mapHcal_
HcalSubdetector
Definition: HcalAssistant.h:31
static const int kHcalPhiMask2
Definition: HcalDetId.h:16
virtual bool valid(const DetId &id) const
static const int kHcalEtaMask2
Definition: HcalDetId.h:20
void CaloMiscalibMapHcal::print ( void  )
inline

Definition at line 52 of file CaloMiscalibMapHcal.h.

References mapHcal_.

Referenced by HcalRecHitRecalib::beginRun().

53  {
54 
55  std::map<uint32_t,float>::const_iterator it;
56 
57  // for(it=mapHcal_.getMap().begin();it!=mapHcal_.getMap().end();it++){
58  // }
59  for(it=mapHcal_.begin();it!=mapHcal_.end();it++){
60  }
61 
62 }
std::map< uint32_t, float > mapHcal_

Member Data Documentation

std::map<uint32_t, float> CaloMiscalibMapHcal::mapHcal_
private

Definition at line 70 of file CaloMiscalibMapHcal.h.

Referenced by addCell(), get(), prefillMap(), and print().