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 ()
 
void print ()
 
- Public Member Functions inherited from CaloMiscalibMap
 CaloMiscalibMap ()
 
virtual ~CaloMiscalibMap ()
 

Private Attributes

std::map< uint32_t, float > mapHcal_
 
HcalTopology topology
 

Detailed Description

Definition at line 18 of file CaloMiscalibMapHcal.h.

Constructor & Destructor Documentation

CaloMiscalibMapHcal::CaloMiscalibMapHcal ( )
inline

Definition at line 20 of file CaloMiscalibMapHcal.h.

20  {
21 }

Member Function Documentation

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

Implements CaloMiscalibMap.

Definition at line 49 of file CaloMiscalibMapHcal.h.

References mapHcal_, and DetId::rawId().

50 {
51  //mapHcal_.setValue(cell.rawId(),scaling_factor);
52  mapHcal_[cell.rawId()]=scaling_factor;
53 }
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
std::map< uint32_t, float > mapHcal_
const std::map<uint32_t, float>& CaloMiscalibMapHcal::get ( void  )
inline
void CaloMiscalibMapHcal::prefillMap ( )
inline

Definition at line 23 of file CaloMiscalibMapHcal.h.

References eta(), mapHcal_, phi, DetId::rawId(), topology, and HcalTopology::valid().

Referenced by HcalRecHitRecalib::HcalRecHitRecalib(), and HcalRecHitsMaker::init().

23  {
24 
25  for (int det = 1; det < 5; det++) {
26  for (int eta = -63; eta < 64; eta++) {
27  for (int phi = 0; phi < 128; phi++) {
28  for (int depth = 1; depth < 5; depth++) {
29 
30  try {
31  HcalDetId hcaldetid ((HcalSubdetector) det, eta, phi, depth);
32  if (topology.valid(hcaldetid))
33  // mapHcal_.setValue(hcaldetid.rawId(),1.0);
34  {
35  mapHcal_[hcaldetid.rawId()]=1.0;
36  // std::cout << "Valid cell found: " << det << " " << eta << " " << phi << " " << depth << std::endl;
37  }
38 
39  }
40  catch (...) {
41  }
42  }
43  }
44  }
45  }
46 }
virtual bool valid(const HcalDetId &id) const
Definition: HcalTopology.cc:32
T eta() const
std::map< uint32_t, float > mapHcal_
HcalSubdetector
Definition: HcalAssistant.h:32
Definition: DDAxes.h:10
void CaloMiscalibMapHcal::print ( void  )
inline

Definition at line 55 of file CaloMiscalibMapHcal.h.

References mapHcal_.

Referenced by HcalRecHitRecalib::HcalRecHitRecalib().

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

Member Data Documentation

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

Definition at line 73 of file CaloMiscalibMapHcal.h.

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

HcalTopology CaloMiscalibMapHcal::topology
private

Definition at line 74 of file CaloMiscalibMapHcal.h.

Referenced by prefillMap().