CMS 3D CMS Logo

Enumerations | Functions
EcalFloatCondObjectContainerUtils.h File Reference
#include "CondCore/Utilities/interface/PayloadInspector.h"
#include "DataFormats/EcalDetId/interface/EBDetId.h"
#include "DataFormats/EcalDetId/interface/EEDetId.h"
#include "CondFormats/EcalObjects/interface/EcalCondObjectContainer.h"
#include "TH2F.h"
#include <string>

Go to the source code of this file.

Enumerations

enum  { kEBChannels = 61200, kEEChannels = 14648 }
 
enum  {
  MIN_IETA = 1, MIN_IPHI = 1, MAX_IETA = 85, MAX_IPHI = 360,
  EBhistEtaMax = 171
}
 
enum  {
  IX_MIN = 1, IY_MIN = 1, IX_MAX = 100, IY_MAX = 100,
  EEhistXMax = 220
}
 

Functions

template<class floatCondObj >
void fillEBMap_DiffIOV (std::shared_ptr< floatCondObj > payload, TH2F *&barrel, int irun, float pEB[], float &pEBmin, float &pEBmax)
 
template<class floatCondObj >
void fillEBMap_SingleIOV (std::shared_ptr< floatCondObj > payload, TH2F *&barrel)
 
template<class floatCondObj >
void fillEEMap_DiffIOV (std::shared_ptr< floatCondObj > payload, TH2F *&endc_m, TH2F *&endc_p, int irun, float pEE[], float &pEEmin, float &pEEmax)
 
template<class floatCondObj >
void fillEEMap_SingleIOV (std::shared_ptr< floatCondObj > payload, TH2F *&endc_m, TH2F *&endc_p)
 
void fillTableWithSummary (TH2F *&align, std::string title, const float &mean_x_EB, const float &rms_EB, const int &num_x_EB, const float &mean_x_EE, const float &rms_EE, const int &num_x_EE)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
kEBChannels 
kEEChannels 

Definition at line 9 of file EcalFloatCondObjectContainerUtils.h.

9 { kEBChannels = 61200, kEEChannels = 14648 };

◆ anonymous enum

anonymous enum
Enumerator
MIN_IETA 
MIN_IPHI 
MAX_IETA 
MAX_IPHI 
EBhistEtaMax 

Definition at line 10 of file EcalFloatCondObjectContainerUtils.h.

10  {
11  MIN_IETA = 1,
12  MIN_IPHI = 1,
13  MAX_IETA = 85,
14  MAX_IPHI = 360,
15  EBhistEtaMax = 171
16 }; // barrel lower and upper bounds on eta and phi

◆ anonymous enum

anonymous enum
Enumerator
IX_MIN 
IY_MIN 
IX_MAX 
IY_MAX 
EEhistXMax 

Definition at line 17 of file EcalFloatCondObjectContainerUtils.h.

17  {
18  IX_MIN = 1,
19  IY_MIN = 1,
20  IX_MAX = 100,
21  IY_MAX = 100,
22  EEhistXMax = 220
23 }; // endcaps lower and upper bounds on x and y

Function Documentation

◆ fillEBMap_DiffIOV()

template<class floatCondObj >
void fillEBMap_DiffIOV ( std::shared_ptr< floatCondObj >  payload,
TH2F *&  barrel,
int  irun,
float  pEB[],
float &  pEBmin,
float &  pEBmax 
)

Definition at line 69 of file EcalFloatCondObjectContainerUtils.h.

70  {
71  for (int cellid = EBDetId::MIN_HASH; cellid < EBDetId::kSizeForDenseIndexing; ++cellid) {
72  uint32_t rawid = EBDetId::unhashIndex(cellid);
74  if (value_ptr == payload->end())
75  continue; // cell absent from payload
76 
77  float weight = (float)(*value_ptr);
78  if (irun == 0)
79  pEB[cellid] = weight;
80  else {
81  Double_t phi = (Double_t)(EBDetId(rawid)).iphi() - 0.5;
82  Double_t eta = (Double_t)(EBDetId(rawid)).ieta();
83 
84  if (eta > 0.)
85  eta = eta - 0.5; // 0.5 to 84.5
86  else
87  eta = eta + 0.5; // -84.5 to -0.5
88 
89  double diff = weight - pEB[cellid];
90 
91  if (diff < pEBmin)
92  pEBmin = diff;
93  if (diff > pEBmax)
94  pEBmax = diff;
95 
96  barrel->Fill(phi, eta, diff);
97  }
98 
99  } // loop over cellid
100 }

References Reference_intrackfit_cff::barrel, change_name::diff, PVValHelper::eta, dqmMemoryStats::float, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, EBDetId::kSizeForDenseIndexing, EBDetId::MIN_HASH, jets_cff::payload, PVValHelper::phi, EBDetId::unhashIndex(), and mps_merge::weight.

◆ fillEBMap_SingleIOV()

template<class floatCondObj >
void fillEBMap_SingleIOV ( std::shared_ptr< floatCondObj >  payload,
TH2F *&  barrel 
)

Definition at line 26 of file EcalFloatCondObjectContainerUtils.h.

26  {
27  for (int cellid = EBDetId::MIN_HASH; cellid < EBDetId::kSizeForDenseIndexing; ++cellid) {
28  uint32_t rawid = EBDetId::unhashIndex(cellid);
30  if (value_ptr == payload->end())
31  continue; // cell absent from payload
32 
33  float weight = (float)(*value_ptr);
34  Double_t phi = (Double_t)(EBDetId(rawid)).iphi() - 0.5;
35  Double_t eta = (Double_t)(EBDetId(rawid)).ieta();
36 
37  if (eta > 0.)
38  eta = eta - 0.5; // 0.5 to 84.5
39  else
40  eta = eta + 0.5; // -84.5 to -0.5
41 
42  barrel->Fill(phi, eta, weight);
43  } // loop over cellid
44 }

References Reference_intrackfit_cff::barrel, PVValHelper::eta, dqmMemoryStats::float, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, EBDetId::kSizeForDenseIndexing, EBDetId::MIN_HASH, jets_cff::payload, PVValHelper::phi, and EBDetId::unhashIndex().

◆ fillEEMap_DiffIOV()

template<class floatCondObj >
void fillEEMap_DiffIOV ( std::shared_ptr< floatCondObj >  payload,
TH2F *&  endc_m,
TH2F *&  endc_p,
int  irun,
float  pEE[],
float &  pEEmin,
float &  pEEmax 
)

Definition at line 103 of file EcalFloatCondObjectContainerUtils.h.

109  {
110  // looping over the EE channels
111  for (int iz = -1; iz < 2; iz = iz + 2) // -1 or +1
112  for (int iy = IY_MIN; iy < IY_MAX + IY_MIN; iy++)
113  for (int ix = IX_MIN; ix < IX_MAX + IX_MIN; ix++)
114  if (EEDetId::validDetId(ix, iy, iz)) {
115  EEDetId myEEId = EEDetId(ix, iy, iz, EEDetId::XYMODE);
116  uint32_t cellid = myEEId.hashedIndex();
117  uint32_t rawid = myEEId.rawId();
119 
120  if (value_ptr == payload->end())
121  continue; // cell absent from payload
122  float weight = (float)(*value_ptr);
123 
124  if (irun == 0)
125  pEE[cellid] = weight;
126  else {
127  double diff = weight - pEE[cellid];
128  if (diff < pEEmin)
129  pEEmin = diff;
130 
131  if (diff > pEEmax)
132  pEEmax = diff;
133  if (iz == 1)
134  endc_p->Fill(ix, iy, diff);
135  else
136  endc_m->Fill(ix, iy, diff);
137  }
138 
139  } // validDetId
140 }

References change_name::diff, dqmMemoryStats::float, EEDetId::hashedIndex(), IX_MAX, IX_MIN, IY_MAX, IY_MIN, jets_cff::payload, DetId::rawId(), EEDetId::validDetId(), mps_merge::weight, and EEDetId::XYMODE.

◆ fillEEMap_SingleIOV()

template<class floatCondObj >
void fillEEMap_SingleIOV ( std::shared_ptr< floatCondObj >  payload,
TH2F *&  endc_m,
TH2F *&  endc_p 
)

Definition at line 47 of file EcalFloatCondObjectContainerUtils.h.

47  {
48  // looping over the EE channels
49  for (int iz = -1; iz < 2; iz = iz + 2) // -1 or +1
50  for (int iy = IY_MIN; iy < IY_MAX + IY_MIN; iy++)
51  for (int ix = IX_MIN; ix < IX_MAX + IX_MIN; ix++)
52  if (EEDetId::validDetId(ix, iy, iz)) {
53  EEDetId myEEId = EEDetId(ix, iy, iz, EEDetId::XYMODE);
54  uint32_t rawid = myEEId.rawId();
56  if (value_ptr == payload->end())
57  continue; // cell absent from payload
58 
59  float weight = (float)(*value_ptr);
60  if (iz == 1)
61  endc_p->Fill(ix, iy, weight);
62  else
63  endc_m->Fill(ix, iy, weight);
64 
65  } // validDetId
66 }

References dqmMemoryStats::float, IX_MAX, IX_MIN, IY_MAX, IY_MIN, jets_cff::payload, DetId::rawId(), EEDetId::validDetId(), and EEDetId::XYMODE.

◆ fillTableWithSummary()

void fillTableWithSummary ( TH2F *&  align,
std::string  title,
const float &  mean_x_EB,
const float &  rms_EB,
const int &  num_x_EB,
const float &  mean_x_EE,
const float &  rms_EE,
const int &  num_x_EE 
)

Definition at line 142 of file EcalFloatCondObjectContainerUtils.h.

149  {
150  int NbRows = 2;
151  align = new TH2F(title.c_str(), "EB/EE mean_x rms num_x", 4, 0, 4, NbRows, 0, NbRows);
152 
153  double row = NbRows - 0.5;
154 
155  align->Fill(0.5, row, 1);
156  align->Fill(1.5, row, mean_x_EB);
157  align->Fill(2.5, row, rms_EB);
158  align->Fill(3.5, row, num_x_EB);
159 
160  row--;
161 
162  align->Fill(0.5, row, 2);
163  align->Fill(1.5, row, mean_x_EE);
164  align->Fill(2.5, row, rms_EE);
165  align->Fill(3.5, row, num_x_EE);
166 
167  align->GetXaxis()->SetTickLength(0.);
168  align->GetXaxis()->SetLabelSize(0.);
169  align->GetYaxis()->SetTickLength(0.);
170  align->GetYaxis()->SetLabelSize(0.);
171 }

References overlapproblemtsosanalyzer_cfi::title.

change_name.diff
diff
Definition: change_name.py:13
Reference_intrackfit_cff.barrel
list barrel
Definition: Reference_intrackfit_cff.py:37
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
align
Definition: AlignableIndexer.h:30
kEEChannels
Definition: EcalFloatCondObjectContainerUtils.h:9
MAX_IPHI
Definition: EcalFloatCondObjectContainerUtils.h:14
IX_MAX
Definition: EcalFloatCondObjectContainerUtils.h:20
IY_MAX
Definition: EcalFloatCondObjectContainerUtils.h:21
EBDetId
Definition: EBDetId.h:17
mps_merge.weight
weight
Definition: mps_merge.py:88
EBDetId::unhashIndex
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:110
EcalCondObjectContainer
Definition: EcalCondObjectContainer.h:13
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
PVValHelper::eta
Definition: PVValidationHelpers.h:69
MIN_IETA
Definition: EcalFloatCondObjectContainerUtils.h:11
jets_cff.payload
payload
Definition: jets_cff.py:34
EEDetId
Definition: EEDetId.h:14
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
IY_MIN
Definition: EcalFloatCondObjectContainerUtils.h:19
PVValHelper::phi
Definition: PVValidationHelpers.h:68
EEDetId::hashedIndex
int hashedIndex() const
Definition: EEDetId.h:183
MIN_IPHI
Definition: EcalFloatCondObjectContainerUtils.h:12
EEhistXMax
Definition: EcalFloatCondObjectContainerUtils.h:22
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
EBhistEtaMax
Definition: EcalFloatCondObjectContainerUtils.h:15
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
EEDetId::XYMODE
static const int XYMODE
Definition: EEDetId.h:335
EBDetId::kSizeForDenseIndexing
Definition: EBDetId.h:155
EEDetId::validDetId
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
EBDetId::MIN_HASH
static const int MIN_HASH
Definition: EBDetId.h:149
kEBChannels
Definition: EcalFloatCondObjectContainerUtils.h:9
IX_MIN
Definition: EcalFloatCondObjectContainerUtils.h:18
weight
Definition: weight.py:1
MAX_IETA
Definition: EcalFloatCondObjectContainerUtils.h:13