CalibCalorimetry
CaloMiscalibTools
interface
CaloMiscalibMapHcal.h
Go to the documentation of this file.
1
#ifndef _CALO_MISCALIB_MAP_HCAL
2
#define _CALO_MISCALIB_MAP_HCAL
3
#include "
CalibCalorimetry/CaloMiscalibTools/interface/CaloMiscalibMap.h
"
4
#include "
Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h
"
5
#include "
Geometry/Records/interface/IdealGeometryRecord.h
"
6
#include "
Geometry/CaloGeometry/interface/CaloGeometry.h
"
7
#include "
FWCore/Framework/interface/EDProducer.h
"
8
#include "
DataFormats/HcalDetId/interface/HcalDetId.h
"
9
#include "
DataFormats/HcalDetId/interface/HcalSubdetector.h
"
10
#include "
Geometry/CaloTopology/interface/HcalTopology.h
"
11
12
#include <iostream>
13
#include <iomanip>
14
#include <map>
15
#include <vector>
16
17
class
CaloMiscalibMapHcal
:
public
CaloMiscalibMap
{
18
public
:
19
CaloMiscalibMapHcal
() {}
20
21
void
prefillMap
(
const
HcalTopology
&topology) {
22
for
(
int
det = 1; det <=
HcalForward
; det++) {
23
for
(
int
eta
= -
HcalDetId::kHcalEtaMask2
;
eta
<= (
int
)(
HcalDetId::kHcalEtaMask2
);
eta
++) {
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
}
40
41
void
addCell
(
const
DetId
&cell,
float
scaling_factor)
override
{
42
//mapHcal_.setValue(cell.rawId(),scaling_factor);
43
mapHcal_
[cell.
rawId
()] = scaling_factor;
44
}
45
46
void
print
() {
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
}
54
55
const
std::map<uint32_t, float> &
get
() {
return
mapHcal_
; }
56
57
private
:
58
std::map<uint32_t, float>
mapHcal_
;
59
// EcalIntercalibConstants map_;
60
// const CaloSubdetectorGeometry *geometry;
61
};
62
63
#endif
EDProducer.h
CaloMiscalibMapHcal::print
void print()
Definition:
CaloMiscalibMapHcal.h:46
HcalTopology
Definition:
HcalTopology.h:26
DetId
Definition:
DetId.h:17
PVValHelper::eta
Definition:
PVValidationHelpers.h:70
HcalDetId::kHcalPhiMask2
static constexpr uint32_t kHcalPhiMask2
Definition:
HcalDetId.h:15
CaloMiscalibMapHcal
Definition:
CaloMiscalibMapHcal.h:17
CaloMiscalibMapHcal::CaloMiscalibMapHcal
CaloMiscalibMapHcal()
Definition:
CaloMiscalibMapHcal.h:19
LEDCalibrationChannels.depth
depth
Definition:
LEDCalibrationChannels.py:65
CaloMiscalibMapHcal::prefillMap
void prefillMap(const HcalTopology &topology)
Definition:
CaloMiscalibMapHcal.h:21
HcalDetId::kHcalDepthMask2
static constexpr uint32_t kHcalDepthMask2
Definition:
HcalDetId.h:25
CaloMiscalibMapHcal::mapHcal_
std::map< uint32_t, float > mapHcal_
Definition:
CaloMiscalibMapHcal.h:58
CaloSubdetectorGeometry.h
HcalDetId.h
HcalDetId
Definition:
HcalDetId.h:12
createfilelist.int
int
Definition:
createfilelist.py:10
IdealGeometryRecord.h
HcalSubdetector.h
HcalSubdetector
HcalSubdetector
Definition:
HcalAssistant.h:31
HcalForward
Definition:
HcalAssistant.h:36
HcalTopology::valid
bool valid(const DetId &id) const override
Definition:
HcalTopology.cc:225
DDAxes::phi
HcalTopology.h
CaloMiscalibMap.h
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition:
DetId.h:57
CaloMiscalibMap
Definition:
CaloMiscalibMap.h:8
CaloMiscalibMapHcal::addCell
void addCell(const DetId &cell, float scaling_factor) override
Definition:
CaloMiscalibMapHcal.h:41
CaloGeometry.h
CaloMiscalibMapHcal::get
const std::map< uint32_t, float > & get()
Definition:
CaloMiscalibMapHcal.h:55
HcalDetId::kHcalEtaMask2
static constexpr uint32_t kHcalEtaMask2
Definition:
HcalDetId.h:19
Generated for CMSSW Reference Manual by
1.8.16