1 #ifndef ECAL_COND_OBJECT_CONTAINER_HH
2 #define ECAL_COND_OBJECT_CONTAINER_HH
18 typedef typename std::vector<Item>
Items;
20 typedef typename std::vector<Item>::iterator
iterator;
38 inline void insert(std::pair<uint32_t, Item>
const &
a) {
40 switch (
id.subdetId()) {
55 switch (
id.subdetId()) {
78 inline const self &
getMap()
const {
return *
this; }
90 switch (
id.subdetId()) {
107 float &arg_mean_x_EE,
109 int &arg_num_x_EE)
const {
121 float mean_xx_EB = 0;
125 float mean_xx_EE = 0;
129 int thesign =
sign == 1 ? 1 : -1;
131 for (
int ieta = 0; ieta <
kBarlRings; ieta++) {
133 EBDetId id((ieta + 1) * thesign, iphi + 1);
136 float x =
eb_[
id.rawId()];
138 mean_x_EB = mean_x_EB +
x;
139 mean_xx_EB = mean_xx_EB + x *
x;
150 float x =
ee_[
id.rawId()];
152 mean_x_EE = mean_x_EE +
x;
153 mean_xx_EE = mean_xx_EE + x *
x;
159 mean_x_EB = mean_x_EB / num_x_EB;
160 mean_x_EE = mean_x_EE / num_x_EE;
161 mean_xx_EB = mean_xx_EB / num_x_EB;
162 mean_xx_EE = mean_xx_EE / num_x_EE;
163 float rms_EB = (mean_xx_EB - mean_x_EB * mean_x_EB);
164 float rms_EE = (mean_xx_EE - mean_x_EE * mean_x_EE);
166 arg_mean_x_EB = mean_x_EB;
168 arg_num_x_EB = num_x_EB;
170 arg_mean_x_EE = mean_x_EE;
172 arg_num_x_EE = num_x_EE;
std::vector< Item >::iterator iterator
const Item & item(size_t hashid) const
uint16_t *__restrict__ id
const self & getMap() const
const Items & items() const
const_iterator end() const
static const int kBarlRings
EcalContainer< EEDetId, Item > ee_
const Items & barrelItems() const
Item & operator[](uint32_t rawId)
Item operator[](uint32_t rawId) const
EcalContainer< EBDetId, Item > eb_
~EcalCondObjectContainer()
static const int kBarlWedges
void setValue(const uint32_t id, const Item &item)
int hashedIndex(int ieta, int iphi)
static const int kEndcWedgesX
const_iterator find(uint32_t rawId) const
void summary(float &arg_mean_x_EB, float &arg_rms_EB, int &arg_num_x_EB, float &arg_mean_x_EE, float &arg_rms_EE, int &arg_num_x_EE) const
void insert(std::pair< uint32_t, Item > const &a)
static const int MAX_IPHI
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
std::vector< Item >::const_iterator const_iterator
static const int MAX_IETA
std::vector< Item > Items
#define COND_SERIALIZABLE
void insert(std::pair< uint32_t, Item > const &a)
const_iterator find(uint32_t rawId) const
EcalCondObjectContainer()
const_iterator end() const
const Item & barrel(size_t hashedIndex) const
const Items & endcapItems() const
const Item & endcap(size_t hashedIndex) const
EcalCondObjectContainer< float > EcalFloatCondObjectContainer
static const int kEndcWedgesY