CMS 3D CMS Logo

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 17 of file CaloMiscalibMapHcal.h.

Constructor & Destructor Documentation

◆ CaloMiscalibMapHcal()

CaloMiscalibMapHcal::CaloMiscalibMapHcal ( )
inline

Definition at line 19 of file CaloMiscalibMapHcal.h.

19 {}

Member Function Documentation

◆ addCell()

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

Implements CaloMiscalibMap.

Definition at line 41 of file CaloMiscalibMapHcal.h.

41  {
42  //mapHcal_.setValue(cell.rawId(),scaling_factor);
43  mapHcal_[cell.rawId()] = scaling_factor;
44  }

References mapHcal_, and DetId::rawId().

◆ get()

const std::map<uint32_t, float>& CaloMiscalibMapHcal::get ( )
inline

◆ prefillMap()

void CaloMiscalibMapHcal::prefillMap ( const HcalTopology topology)
inline

Definition at line 21 of file CaloMiscalibMapHcal.h.

21  {
22  for (int det = 1; det <= HcalForward; det++) {
24  for (unsigned int phi = 1; phi <= HcalDetId::kHcalPhiMask2; phi++) {
25  for (unsigned int depth = 1; depth <= HcalDetId::kHcalDepthMask2; depth++) {
26  try {
27  HcalDetId hcaldetid((HcalSubdetector)det, eta, phi, depth);
28  if (topology.valid(hcaldetid)) {
29  mapHcal_[hcaldetid.rawId()] = 1.0;
30  // std::cout << "Valid cell found: " << det << " " << eta << " " << phi << " " << depth << std::endl;
31  }
32 
33  } catch (...) {
34  }
35  }
36  }
37  }
38  }
39  }

References LEDCalibrationChannels::depth, PVValHelper::eta, HcalForward, createfilelist::int, HcalDetId::kHcalDepthMask2, HcalDetId::kHcalEtaMask2, HcalDetId::kHcalPhiMask2, mapHcal_, phi, DetId::rawId(), ecaldqm::topology(), and CaloTopology::valid().

Referenced by HcalRecHitRecalib::beginRun().

◆ print()

void CaloMiscalibMapHcal::print ( void  )
inline

Definition at line 46 of file CaloMiscalibMapHcal.h.

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

References mapHcal_.

Referenced by HcalRecHitRecalib::beginRun().

Member Data Documentation

◆ mapHcal_

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

Definition at line 58 of file CaloMiscalibMapHcal.h.

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

ecaldqm::topology
const CaloTopology * topology(nullptr)
PVValHelper::eta
Definition: PVValidationHelpers.h:69
HcalDetId::kHcalPhiMask2
static constexpr uint32_t kHcalPhiMask2
Definition: HcalDetId.h:15
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
HcalDetId::kHcalDepthMask2
static constexpr uint32_t kHcalDepthMask2
Definition: HcalDetId.h:25
CaloMiscalibMapHcal::mapHcal_
std::map< uint32_t, float > mapHcal_
Definition: CaloMiscalibMapHcal.h:58
HcalDetId
Definition: HcalDetId.h:12
createfilelist.int
int
Definition: createfilelist.py:10
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
HcalForward
Definition: HcalAssistant.h:36
DDAxes::phi
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
CaloTopology::valid
bool valid(const DetId &id) const
Is this a valid cell id?
Definition: CaloTopology.cc:74
HcalDetId::kHcalEtaMask2
static constexpr uint32_t kHcalEtaMask2
Definition: HcalDetId.h:19