CMS 3D CMS Logo

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

#include <CaloMiscalibMapHcal.h>

Inheritance diagram for CaloMiscalibMapHcal:
CaloMiscalibMap

Public Member Functions

void addCell (const DetId &cell, float scaling_factor) override
 
 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 16 of file CaloMiscalibMapHcal.h.

Constructor & Destructor Documentation

CaloMiscalibMapHcal::CaloMiscalibMapHcal ( )
inline

Definition at line 18 of file CaloMiscalibMapHcal.h.

18 {}

Member Function Documentation

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

Implements CaloMiscalibMap.

Definition at line 40 of file CaloMiscalibMapHcal.h.

References mapHcal_, and DetId::rawId().

40  {
41  //mapHcal_.setValue(cell.rawId(),scaling_factor);
42  mapHcal_[cell.rawId()] = scaling_factor;
43  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
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 20 of file CaloMiscalibMapHcal.h.

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

Referenced by HcalRecHitRecalib::beginRun().

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

Definition at line 45 of file CaloMiscalibMapHcal.h.

References mapHcal_.

Referenced by HcalRecHitRecalib::beginRun().

45  {
46  std::map<uint32_t, float>::const_iterator it;
47 
48  // for(it=mapHcal_.getMap().begin();it!=mapHcal_.getMap().end();it++){
49  // }
50  for (it = mapHcal_.begin(); it != mapHcal_.end(); it++) {
51  }
52  }
std::map< uint32_t, float > mapHcal_

Member Data Documentation

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

Definition at line 57 of file CaloMiscalibMapHcal.h.

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