CMS 3D CMS Logo

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

#include <CaloMiscalibMapEcal.h>

Inheritance diagram for CaloMiscalibMapEcal:
CaloMiscalibMap

Public Member Functions

void addCell (const DetId &cell, float scaling_factor) override
 
 CaloMiscalibMapEcal ()
 
const EcalIntercalibConstantsget ()
 
void prefillMap ()
 
void print ()
 
- Public Member Functions inherited from CaloMiscalibMap
 CaloMiscalibMap ()
 
virtual ~CaloMiscalibMap ()
 

Private Attributes

const CaloSubdetectorGeometrygeometry
 
EcalIntercalibConstants map_
 

Detailed Description

Definition at line 16 of file CaloMiscalibMapEcal.h.

Constructor & Destructor Documentation

◆ CaloMiscalibMapEcal()

CaloMiscalibMapEcal::CaloMiscalibMapEcal ( )
inline

Definition at line 18 of file CaloMiscalibMapEcal.h.

18 {}

Member Function Documentation

◆ addCell()

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

Implements CaloMiscalibMap.

Definition at line 46 of file CaloMiscalibMapEcal.h.

46 { map_.setValue(cell.rawId(), scaling_factor); }

References map_, DetId::rawId(), and EcalCondObjectContainer< T >::setValue().

◆ get()

const EcalIntercalibConstants& CaloMiscalibMapEcal::get ( )
inline

◆ prefillMap()

void CaloMiscalibMapEcal::prefillMap ( )
inline

Definition at line 20 of file CaloMiscalibMapEcal.h.

20  {
21  for (int iEta = -EBDetId::MAX_IETA; iEta <= EBDetId::MAX_IETA; ++iEta) {
22  if (iEta == 0)
23  continue;
24  for (int iPhi = EBDetId::MIN_IPHI; iPhi <= EBDetId::MAX_IPHI; ++iPhi) {
25  try {
26  EBDetId ebdetid(iEta, iPhi);
27  map_.setValue(ebdetid.rawId(), 1.0);
28  } catch (...) {
29  }
30  }
31  }
32 
33  for (int iX = EEDetId::IX_MIN; iX <= EEDetId::IX_MAX; ++iX) {
34  for (int iY = EEDetId::IY_MIN; iY <= EEDetId::IY_MAX; ++iY) {
35  try {
36  EEDetId eedetidpos(iX, iY, 1);
37  map_.setValue(eedetidpos.rawId(), 1.0);
38  EEDetId eedetidneg(iX, iY, -1);
39  map_.setValue(eedetidneg.rawId(), 1.0);
40  } catch (...) {
41  }
42  }
43  }
44  }

References L1TowerCalibrationProducer_cfi::iEta, EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, map_, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, DetId::rawId(), and EcalCondObjectContainer< T >::setValue().

Referenced by InvRingCalib::duringLoop(), and ZeeCalibration::duringLoop().

◆ print()

void CaloMiscalibMapEcal::print ( void  )
inline

Definition at line 48 of file CaloMiscalibMapEcal.h.

48  {
49  int icount = 0;
50  for (int iEta = -EBDetId::MAX_IETA; iEta <= EBDetId::MAX_IETA; ++iEta) {
51  if (iEta == 0)
52  continue;
53  for (int iPhi = EBDetId::MIN_IPHI; iPhi <= EBDetId::MAX_IPHI; ++iPhi) {
54  if (EBDetId::validDetId(iEta, iPhi)) {
55  EBDetId ebdetid(iEta, iPhi);
56  EcalIntercalibConstantMap::const_iterator icalit = map_.find(ebdetid.rawId());
57  EcalIntercalibConstant icalconst;
58  icalconst = (*icalit);
59 
60  icount++;
61  if (icount % 230 == 0) {
62  std::cout << "here is value for chan eta/phi " << iEta << "/" << iPhi << "=" << icalconst << std::endl;
63  }
64  }
65  }
66  }
67  for (int iX = EEDetId::IX_MIN; iX <= EEDetId::IX_MAX; ++iX) {
68  for (int iY = EEDetId::IY_MIN; iY <= EEDetId::IY_MAX; ++iY) {
69  if (EEDetId::validDetId(iX, iY, 1)) {
70  EEDetId eedetidpos(iX, iY, 1);
71  EcalIntercalibConstantMap::const_iterator icalit = map_.find(eedetidpos.rawId());
72  EcalIntercalibConstant icalconst;
73  icalconst = (*icalit);
74 
75  EEDetId eedetidneg(iX, iY, -1);
76  EcalIntercalibConstantMap::const_iterator icalit2 = map_.find(eedetidneg.rawId());
77  EcalIntercalibConstant icalconst2;
78  icalconst2 = (*icalit2);
79 
80  icount++;
81  if (icount % 230 == 0) {
82  std::cout << "here is value for chan x/y " << iX << "/" << iY << " pos side is =" << icalconst
83  << " and neg side is= " << icalconst2 << std::endl;
84  }
85  }
86  }
87  }
88  }

References gather_cfg::cout, EcalCondObjectContainer< T >::find(), L1TowerCalibrationProducer_cfi::iEta, EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, map_, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, DetId::rawId(), EBDetId::validDetId(), and EEDetId::validDetId().

Member Data Documentation

◆ geometry

const CaloSubdetectorGeometry* CaloMiscalibMapEcal::geometry
private

Definition at line 94 of file CaloMiscalibMapEcal.h.

◆ map_

EcalIntercalibConstants CaloMiscalibMapEcal::map_
private

Definition at line 93 of file CaloMiscalibMapEcal.h.

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

CaloMiscalibMapEcal::map_
EcalIntercalibConstants map_
Definition: CaloMiscalibMapEcal.h:93
EBDetId
Definition: EBDetId.h:17
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EEDetId::IX_MIN
static const int IX_MIN
Definition: EEDetId.h:290
EEDetId::IY_MIN
static const int IY_MIN
Definition: EEDetId.h:294
EcalIntercalibConstant
float EcalIntercalibConstant
Definition: EcalIntercalibConstants.h:10
EcalCondObjectContainer::find
const_iterator find(uint32_t rawId) const
Definition: EcalCondObjectContainer.h:53
EBDetId::MAX_IPHI
static const int MAX_IPHI
Definition: EBDetId.h:137
EEDetId::IY_MAX
static const int IY_MAX
Definition: EEDetId.h:302
EEDetId
Definition: EEDetId.h:14
EcalCondObjectContainer::setValue
void setValue(const uint32_t id, const Item &item)
Definition: EcalCondObjectContainer.h:76
EEDetId::IX_MAX
static const int IX_MAX
Definition: EEDetId.h:298
EBDetId::validDetId
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
EEDetId::validDetId
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
L1TowerCalibrationProducer_cfi.iEta
iEta
Definition: L1TowerCalibrationProducer_cfi.py:60
EcalCondObjectContainer::const_iterator
std::vector< Item >::const_iterator const_iterator
Definition: EcalCondObjectContainer.h:19
EBDetId::MAX_IETA
static const int MAX_IETA
Definition: EBDetId.h:136
EBDetId::MIN_IPHI
static const int MIN_IPHI
Definition: EBDetId.h:135