CMS 3D CMS Logo

Functions
hcaldqm::utilities Namespace Reference

Functions

template<class Digi >
double adc2fCDBMinusPedestal (const edm::ESHandle< HcalDbService > &conditions, const CaloSamples &calo_samples, const HcalDetId did, const Digi &digi, unsigned int n)
 
template<typename DIGI >
double aveADC (DIGI const &digi, double ped, int i=0, int j=3)
 
template<typename DIGI >
double aveQ (DIGI const &digi, double ped, int i=0, int j=3)
 
template<typename DIGI >
double aveTS (DIGI const &digi, double ped=0, int i=0, int j=3)
 
template<typename FRAME >
double aveTS_v10 (FRAME const &frame, double ped=0, int i=0, int j=3)
 
template<class Digi >
double aveTSDB (const edm::ESHandle< HcalDbService > &conditions, const CaloSamples &calo_samples, const HcalDetId did, const Digi &digi, unsigned int i_start, unsigned int i_end)
 
uint16_t crate2fed (int crate, int slot)
 
template<typename STDTYPE >
void dqmdebug (STDTYPE const &x, int debug=0)
 
std::pair< uint16_t, uint16_t > fed2crate (int fed)
 
std::map< int, uint32_t > getCrateHashMap (HcalElectronicsMap const *emap)
 
std::vector< int > getCrateList (HcalElectronicsMap const *emap)
 
std::vector< int > getFEDList (HcalElectronicsMap const *)
 
std::vector< int > getFEDuTCAList (HcalElectronicsMap const *)
 
std::vector< int > getFEDVMEList (HcalElectronicsMap const *)
 
int getRBX (uint32_t iphi)
 
int getTPSubDet (HcalTrigTowerDetId const &)
 
int getTPSubDetPM (HcalTrigTowerDetId const &)
 
uint32_t hash (HcalDetId const &)
 
uint32_t hash (HcalElectronicsId const &)
 
uint32_t hash (HcalTrigTowerDetId const &)
 
bool isFEDHBHE (HcalElectronicsId const &)
 
bool isFEDHF (HcalElectronicsId const &)
 
bool isFEDHO (HcalElectronicsId const &)
 
template<class Digi >
CaloSamples loadADC2fCDB (const edm::ESHandle< HcalDbService > &conditions, const HcalDetId did, const Digi &digi)
 
template<typename DIGI >
int maxTS (DIGI const &digi, double ped=0)
 
std::string ogtype2string (constants::OrbitGapType type)
 
template<typename DIGI >
double sumADC (DIGI const &digi, double ped, int i=0, int j=3)
 
template<typename DIGI >
double sumQ (DIGI const &digi, double ped, int i=0, int j=3)
 
template<typename FRAME >
double sumQ_v10 (FRAME const &frame, double ped, int i=0, int j=3)
 
template<class Digi >
double sumQDB (const edm::ESHandle< HcalDbService > &conditions, const CaloSamples &calo_samples, const HcalDetId did, const Digi &digi, unsigned int i_start, unsigned int i_end)
 

Function Documentation

◆ adc2fCDBMinusPedestal()

template<class Digi >
double hcaldqm::utilities::adc2fCDBMinusPedestal ( const edm::ESHandle< HcalDbService > &  conditions,
const CaloSamples calo_samples,
const HcalDetId  did,
const Digi &  digi,
unsigned int  n 
)

Definition at line 33 of file Utilities.h.

37  {
39  int capid = digi[n].capid();
40  return calo_samples[n] - calibrations.pedestal(capid);
41  }

References AlignmentProducer_cff::calibrations, HcalDbService::getHcalCalibrations(), and dqmiodumpmetadata::n.

Referenced by aveTSDB(), and sumQDB().

◆ aveADC()

template<typename DIGI >
double hcaldqm::utilities::aveADC ( DIGI const &  digi,
double  ped,
int  i = 0,
int  j = 3 
)

Definition at line 147 of file Utilities.h.

147  {
148  return sumADC<DIGI>(digi, ped, i, j) / (j - i + 1);
149  }

References mps_fire::i, and dqmiolumiharvest::j.

◆ aveQ()

template<typename DIGI >
double hcaldqm::utilities::aveQ ( DIGI const &  digi,
double  ped,
int  i = 0,
int  j = 3 
)

Definition at line 134 of file Utilities.h.

134  {
135  return sumQ<DIGI>(digi, ped, i, j) / (j - i + 1);
136  }

References mps_fire::i, and dqmiolumiharvest::j.

◆ aveTS()

template<typename DIGI >
double hcaldqm::utilities::aveTS ( DIGI const &  digi,
double  ped = 0,
int  i = 0,
int  j = 3 
)

Definition at line 114 of file Utilities.h.

114  {
115  double sumQ = 0;
116  double sumQT = 0;
117  for (int ii = i; ii <= j; ii++) {
118  sumQ += digi.sample(ii).nominal_fC() - ped;
119  sumQT += (ii + 1) * (digi.sample(ii).nominal_fC() - ped);
120  }
121 
122  return sumQ > 0 ? sumQT / sumQ - 1 : constants::GARBAGE_VALUE;
123  }

References hcaldqm::constants::GARBAGE_VALUE, mps_fire::i, cuy::ii, dqmiolumiharvest::j, and sumQ().

Referenced by LEDTask::_process(), and LaserTask::_process().

◆ aveTS_v10()

template<typename FRAME >
double hcaldqm::utilities::aveTS_v10 ( FRAME const &  frame,
double  ped = 0,
int  i = 0,
int  j = 3 
)

Definition at line 78 of file Utilities.h.

78  {
79  double sumQ = 0;
80  double sumQT = 0;
81  for (int ii = i; ii <= j; ii++) {
82  double q = constants::adc2fC[frame[ii].adc()] - ped;
83  sumQ += q;
84  sumQT += (ii + 1) * q;
85  }
86 
87  return sumQ > 0 ? sumQT / sumQ - 1 : constants::GARBAGE_VALUE;
88  }

References hcaldqm::constants::adc2fC, amptDefault_cfi::frame, hcaldqm::constants::GARBAGE_VALUE, mps_fire::i, cuy::ii, dqmiolumiharvest::j, data-class-funcs::q, and sumQ().

◆ aveTSDB()

template<class Digi >
double hcaldqm::utilities::aveTSDB ( const edm::ESHandle< HcalDbService > &  conditions,
const CaloSamples calo_samples,
const HcalDetId  did,
const Digi &  digi,
unsigned int  i_start,
unsigned int  i_end 
)

Definition at line 44 of file Utilities.h.

49  {
50  double sumQ = 0;
51  double sumQT = 0;
52  for (unsigned int i = i_start; i <= i_end; ++i) {
53  double q = adc2fCDBMinusPedestal(conditions, calo_samples, did, digi, i);
54  sumQ += q;
55  sumQT += (i + 1) * q;
56  }
57  return (sumQ > 0 ? sumQT / sumQ - 1 : constants::GARBAGE_VALUE);
58  }

References adc2fCDBMinusPedestal(), hcaldqm::constants::GARBAGE_VALUE, mps_fire::i, data-class-funcs::q, and sumQ().

◆ crate2fed()

uint16_t hcaldqm::utilities::crate2fed ( int  crate,
int  slot 
)

Definition at line 27 of file Utilities.cc.

27  {
28  // for the details see Constants.h
29  int fed = 0;
30  auto it_crate2fed = constants::crate2fed_map.find(crate);
31  if (it_crate2fed != constants::crate2fed_map.end()) {
32  fed = it_crate2fed->second;
33  if (fed <= FED_VME_MAX && fed > 0) {
34  if (slot > 10 && (std::find(constants::crateListVME.begin(), constants::crateListVME.end(), crate) !=
36  ++fed;
37  }
38  } else {
40  constants::crateListuTCA.end())) { // needed to handle dual fed readout
41  ++fed;
42  }
43  }
44  }
45  return fed;
46  }

References begin, hcaldqm::constants::crate2fed_map, hcaldqm::constants::crateListuTCA, hcaldqm::constants::crateListVME, end, and spr::find().

Referenced by getFEDList(), getFEDuTCAList(), getFEDVMEList(), hcaldqm::quantity::getLabels_FED(), hcaldqm::quantity::getLabels_FEDuTCA(), hcaldqm::quantity::getLabels_FEDuTCASlot(), hcaldqm::quantity::FEDQuantity::getValue(), hcaldqm::quantity::getValue_FED(), hcaldqm::quantity::getValue_FEDuTCA(), hcaldqm::quantity::getValue_FEDVME(), isFEDHBHE(), isFEDHF(), hcaldqm::hashfunctions::name_FED(), hcaldqm::hashfunctions::name_FEDSlot(), and hcaldqm::hashfunctions::name_FEDSpigot().

◆ dqmdebug()

template<typename STDTYPE >
void hcaldqm::utilities::dqmdebug ( STDTYPE const &  x,
int  debug = 0 
)

Definition at line 155 of file Utilities.h.

155  {
156  if (debug == 0)
157  return;
158  std::cout << "%MSG" << std::endl;
159  std::cout << "%MSG-d HCALDQM::" << x;
160  std::cout << std::endl;
161  }

References gather_cfg::cout, and debug.

◆ fed2crate()

std::pair< uint16_t, uint16_t > hcaldqm::utilities::fed2crate ( int  fed)

Definition at line 10 of file Utilities.cc.

10  {
11  // uTCA Crate is split in half
12  uint16_t slot = 0;
13  if (fed <= FED_VME_MAX) {
14  slot = fed % 2 == 0 ? SLOT_uTCA_MIN : SLOT_uTCA_MIN + 6;
15  } else {
16  slot = fed % 2 == 0 ? SLOT_uTCA_MIN : SLOT_uTCA_MIN + 6;
17  }
18  std::pair<uint16_t, uint16_t> crate_slot = std::make_pair<uint16_t, uint16_t>(0, 0);
19  auto it_fed2crate = constants::fed2crate_map.find(fed);
20  if (it_fed2crate != constants::fed2crate_map.end()) {
21  crate_slot =
22  std::make_pair<uint16_t const, uint16_t const>((uint16_t const)it_fed2crate->second, (uint16_t const)slot);
23  }
24  return crate_slot;
25  }

References end, hcaldqm::constants::fed2crate_map, hcaldqm::constants::FED_VME_MAX, and hcaldqm::constants::SLOT_uTCA_MIN.

Referenced by RawTask::_process(), hcaldqm::DQHarvester::beginRun(), hcaldqm::DQClient::beginRun(), PedestalTask::bookHistograms(), TPTask::bookHistograms(), LaserTask::bookHistograms(), RawTask::bookHistograms(), RecHitTask::bookHistograms(), DigiTask::bookHistograms(), hcaldqm::DQTask::bookHistograms(), hcaldqm::quantity::getEid_FED(), hcaldqm::quantity::getEid_FEDuTCA(), hcaldqm::hashfunctions::hash_FED(), hcaldqm::hashfunctions::hash_FEDSlot(), and hcaldqm::hashfunctions::hash_FEDSpigot().

◆ getCrateHashMap()

std::map< int, uint32_t > hcaldqm::utilities::getCrateHashMap ( HcalElectronicsMap const *  emap)

Definition at line 66 of file Utilities.cc.

66  {
67  std::map<int, uint32_t> crateHashMap;
68  std::vector<HcalElectronicsId> vids = emap->allElectronicsIdPrecision();
69  for (std::vector<HcalElectronicsId>::const_iterator it = vids.begin(); it != vids.end(); ++it) {
71  int this_crate = eid.crateId();
72  uint32_t this_hash =
73  (eid.isVMEid()
76  if (crateHashMap.find(this_crate) == crateHashMap.end()) {
77  crateHashMap[this_crate] = this_hash;
78  }
79  }
80  return crateHashMap;
81  }

References HcalElectronicsMap::allElectronicsIdPrecision(), runTauDisplay::eid, hcaldqm::constants::FIBER_uTCA_MIN1, hcaldqm::constants::FIBER_VME_MIN, hcaldqm::constants::FIBERCH_MIN, and hash().

Referenced by hcaldqm::DQHarvester::beginRun(), hcaldqm::DQClient::beginRun(), and hcaldqm::quantity::CrateQuantity::setup().

◆ getCrateList()

std::vector< int > hcaldqm::utilities::getCrateList ( HcalElectronicsMap const *  emap)

Definition at line 52 of file Utilities.cc.

52  {
53  std::vector<int> vCrates;
54  std::vector<HcalElectronicsId> vids = emap->allElectronicsIdPrecision();
55  for (std::vector<HcalElectronicsId>::const_iterator it = vids.begin(); it != vids.end(); ++it) {
57  int crate = eid.crateId();
58  if (std::find(vCrates.begin(), vCrates.end(), crate) == vCrates.end()) {
59  vCrates.push_back(crate);
60  }
61  }
62  std::sort(vCrates.begin(), vCrates.end());
63  return vCrates;
64  }

References HcalElectronicsMap::allElectronicsIdPrecision(), runTauDisplay::eid, and spr::find().

Referenced by hcaldqm::DQHarvester::beginRun(), hcaldqm::DQClient::beginRun(), and hcaldqm::quantity::CrateQuantity::setup().

◆ getFEDList()

std::vector< int > hcaldqm::utilities::getFEDList ( HcalElectronicsMap const *  emap)

Definition at line 83 of file Utilities.cc.

83  {
84  std::vector<int> vfeds;
85  std::vector<HcalElectronicsId> vids = emap->allElectronicsIdPrecision();
86  for (std::vector<HcalElectronicsId>::const_iterator it = vids.begin(); it != vids.end(); ++it) {
87  int fed = it->isVMEid() ? it->dccid() + FED_VME_MIN : crate2fed(it->crateId(), it->slot());
88  uint32_t n = 0;
89  for (std::vector<int>::const_iterator jt = vfeds.begin(); jt != vfeds.end(); ++jt)
90  if (fed == *jt)
91  break;
92  else
93  n++;
94  if (n == vfeds.size())
95  vfeds.push_back(fed);
96  }
97 
98  std::sort(vfeds.begin(), vfeds.end());
99  return vfeds;
100  }

References HcalElectronicsMap::allElectronicsIdPrecision(), crate2fed(), hcaldqm::constants::FED_VME_MIN, and dqmiodumpmetadata::n.

Referenced by hcaldqm::DQHarvester::beginRun(), hcaldqm::DQClient::beginRun(), DigiComparisonTask::bookHistograms(), TPComparisonTask::bookHistograms(), PedestalTask::bookHistograms(), TPTask::bookHistograms(), LaserTask::bookHistograms(), RawTask::bookHistograms(), RecHitTask::bookHistograms(), and DigiTask::bookHistograms().

◆ getFEDuTCAList()

std::vector< int > hcaldqm::utilities::getFEDuTCAList ( HcalElectronicsMap const *  emap)

Definition at line 121 of file Utilities.cc.

121  {
122  std::vector<int> vfeds;
123  std::vector<HcalElectronicsId> vids = emap->allElectronicsIdPrecision();
124  for (std::vector<HcalElectronicsId>::const_iterator it = vids.begin(); it != vids.end(); ++it) {
125  if (it->isVMEid())
126  continue;
127  int fed = it->isVMEid() ? it->dccid() + FED_VME_MIN : crate2fed(it->crateId(), it->slot());
128  uint32_t n = 0;
129  for (std::vector<int>::const_iterator jt = vfeds.begin(); jt != vfeds.end(); ++jt)
130  if (fed == *jt)
131  break;
132  else
133  n++;
134  if (n == vfeds.size())
135  vfeds.push_back(fed);
136  }
137 
138  std::sort(vfeds.begin(), vfeds.end());
139  return vfeds;
140  }

References HcalElectronicsMap::allElectronicsIdPrecision(), crate2fed(), hcaldqm::constants::FED_VME_MIN, and dqmiodumpmetadata::n.

Referenced by DigiComparisonTask::bookHistograms(), TPComparisonTask::bookHistograms(), PedestalTask::bookHistograms(), TPTask::bookHistograms(), RawTask::bookHistograms(), LaserTask::bookHistograms(), RecHitTask::bookHistograms(), and DigiTask::bookHistograms().

◆ getFEDVMEList()

std::vector< int > hcaldqm::utilities::getFEDVMEList ( HcalElectronicsMap const *  emap)

Definition at line 101 of file Utilities.cc.

101  {
102  std::vector<int> vfeds;
103  std::vector<HcalElectronicsId> vids = emap->allElectronicsIdPrecision();
104  for (std::vector<HcalElectronicsId>::const_iterator it = vids.begin(); it != vids.end(); ++it) {
105  if (!it->isVMEid())
106  continue;
107  int fed = it->isVMEid() ? it->dccid() + FED_VME_MIN : crate2fed(it->crateId(), it->slot());
108  uint32_t n = 0;
109  for (std::vector<int>::const_iterator jt = vfeds.begin(); jt != vfeds.end(); ++jt)
110  if (fed == *jt)
111  break;
112  else
113  n++;
114  if (n == vfeds.size())
115  vfeds.push_back(fed);
116  }
117 
118  std::sort(vfeds.begin(), vfeds.end());
119  return vfeds;
120  }

References HcalElectronicsMap::allElectronicsIdPrecision(), crate2fed(), hcaldqm::constants::FED_VME_MIN, and dqmiodumpmetadata::n.

Referenced by DigiComparisonTask::bookHistograms(), TPComparisonTask::bookHistograms(), PedestalTask::bookHistograms(), TPTask::bookHistograms(), RawTask::bookHistograms(), LaserTask::bookHistograms(), RecHitTask::bookHistograms(), and DigiTask::bookHistograms().

◆ getRBX()

int hcaldqm::utilities::getRBX ( uint32_t  iphi)

Definition at line 233 of file Utilities.cc.

233 { return (((iphi + 2) % 72) + 4 - 1) / 4; }

References LEDCalibrationChannels::iphi.

Referenced by LaserTask::_process().

◆ getTPSubDet()

int hcaldqm::utilities::getTPSubDet ( HcalTrigTowerDetId const &  )

◆ getTPSubDetPM()

int hcaldqm::utilities::getTPSubDetPM ( HcalTrigTowerDetId const &  )

◆ hash() [1/3]

uint32_t hcaldqm::utilities::hash ( HcalDetId const &  did)

◆ hash() [2/3]

uint32_t hcaldqm::utilities::hash ( HcalElectronicsId const &  eid)

Definition at line 49 of file Utilities.cc.

49 { return eid.rawId(); }

References runTauDisplay::eid.

◆ hash() [3/3]

uint32_t hcaldqm::utilities::hash ( HcalTrigTowerDetId const &  tid)

Definition at line 50 of file Utilities.cc.

50 { return tid.rawId(); }

References DetId::rawId().

◆ isFEDHBHE()

bool hcaldqm::utilities::isFEDHBHE ( HcalElectronicsId const &  eid)

Definition at line 142 of file Utilities.cc.

142  {
143  if (eid.isVMEid()) {
144  return false;
145  } else {
146  int fed = crate2fed(eid.crateId(), eid.slot());
147  if (fed >= 1100 && fed < 1118)
148  return true;
149  else
150  return false;
151  }
152 
153  return false;
154  }

References crate2fed(), and runTauDisplay::eid.

Referenced by PedestalTask::_dump(), LaserTask::_dump(), hcaldqm::RawRunSummary::endLuminosityBlock(), TPTask::globalEndLuminosityBlock(), RawTask::globalEndLuminosityBlock(), and DigiTask::globalEndLuminosityBlock().

◆ isFEDHF()

bool hcaldqm::utilities::isFEDHF ( HcalElectronicsId const &  eid)

Definition at line 156 of file Utilities.cc.

156  {
157  /*
158  if (eid.isVMEid())
159  {
160  int fed = eid.dccid()+FED_VME_MIN;
161  if (fed>=718 && fed<=723)
162  return true;
163  else
164  return false;
165  }*/
166  // else
167  // {
168  if (eid.isVMEid())
169  return false;
170  int fed = crate2fed(eid.crateId(), eid.slot());
171  if (fed >= 1118 && fed <= 1123)
172  return true;
173  else
174  return false;
175  // }
176 
177  return false;
178  }

References crate2fed(), and runTauDisplay::eid.

Referenced by PedestalTask::_dump(), LaserTask::_dump(), hcaldqm::RawRunSummary::endLuminosityBlock(), TPTask::globalEndLuminosityBlock(), RawTask::globalEndLuminosityBlock(), RecHitTask::globalEndLuminosityBlock(), and DigiTask::globalEndLuminosityBlock().

◆ isFEDHO()

bool hcaldqm::utilities::isFEDHO ( HcalElectronicsId const &  eid)

Definition at line 180 of file Utilities.cc.

180  {
181  if (!eid.isVMEid())
182  return false;
183 
184  int fed = eid.dccid() + FED_VME_MIN;
185  if (fed >= 724 && fed <= 731)
186  return true;
187  else
188  return false;
189 
190  return false;
191  }

References runTauDisplay::eid, and hcaldqm::constants::FED_VME_MIN.

Referenced by PedestalTask::_dump(), LaserTask::_dump(), hcaldqm::RawRunSummary::endLuminosityBlock(), RawTask::globalEndLuminosityBlock(), and DigiTask::globalEndLuminosityBlock().

◆ loadADC2fCDB()

template<class Digi >
CaloSamples hcaldqm::utilities::loadADC2fCDB ( const edm::ESHandle< HcalDbService > &  conditions,
const HcalDetId  did,
const Digi &  digi 
)

Definition at line 22 of file Utilities.h.

22  {
23  CaloSamples calo_samples;
24  const HcalQIECoder *channelCoder = conditions->getHcalCoder(did);
25  const HcalQIEShape *shape = conditions->getHcalShape(channelCoder);
26  HcalCoderDb coder(*channelCoder, *shape);
27  coder.adc2fC(digi, calo_samples);
28  return calo_samples;
29  }

References HcalCoderDb::adc2fC(), HcalDbService::getHcalCoder(), and HcalDbService::getHcalShape().

◆ maxTS()

template<typename DIGI >
int hcaldqm::utilities::maxTS ( DIGI const &  digi,
double  ped = 0 
)

Definition at line 102 of file Utilities.h.

102  {
103  int maxTS = -1;
104  double maxQ = -100;
105  for (int i = 0; i < digi.size(); i++)
106  if ((digi.sample(i).nominal_fC() - ped) > maxQ) {
107  maxQ = digi.sample(i).nominal_fC() - ped;
108  maxTS = i;
109  }
110  return maxTS;
111  }

References mps_fire::i.

Referenced by LaserTask::_process(), and HBHEPhase1Reconstructor::processData().

◆ ogtype2string()

std::string hcaldqm::utilities::ogtype2string ( constants::OrbitGapType  type)

Definition at line 196 of file Utilities.cc.

196  {
197  switch (type) {
198  case tNull:
199  return "Null";
200  case tPedestal:
201  return "Pedestal";
202  case tLED:
203  return "LED";
204  case tHFRaddam:
205  return "HFRaddam";
206  case tHBHEHPD:
207  return "HBHEHPD";
208  case tHO:
209  return "HO";
210  case tHF:
211  return "HF";
212  case tZDC:
213  return "ZDC";
214  case tHEPMega:
215  return "HEPMegatile";
216  case tHEMMega:
217  return "HEMMegatile";
218  case tHBPMega:
219  return "HBPMegatile";
220  case tHBMMega:
221  return "HBMMegatile";
222  case tCRF:
223  return "CRF";
224  case tCalib:
225  return "Calib";
226  case tSafe:
227  return "Safe";
228  default:
229  return "Unknown";
230  }
231  }

References hcaldqm::constants::tCalib, hcaldqm::constants::tCRF, hcaldqm::constants::tHBHEHPD, hcaldqm::constants::tHBMMega, hcaldqm::constants::tHBPMega, hcaldqm::constants::tHEMMega, hcaldqm::constants::tHEPMega, hcaldqm::constants::tHF, hcaldqm::constants::tHFRaddam, hcaldqm::constants::tHO, hcaldqm::constants::tLED, hcaldqm::constants::tNull, hcaldqm::constants::tPedestal, hcaldqm::constants::tSafe, and hcaldqm::constants::tZDC.

Referenced by hcaldqm::quantity::EventType::getLabels().

◆ sumADC()

template<typename DIGI >
double hcaldqm::utilities::sumADC ( DIGI const &  digi,
double  ped,
int  i = 0,
int  j = 3 
)

Definition at line 139 of file Utilities.h.

139  {
140  double sum = 0;
141  for (int ii = i; ii <= j; ii++)
142  sum += digi.sample(ii).adc() - ped;
143  return sum;
144  }

References mps_fire::i, cuy::ii, and dqmiolumiharvest::j.

◆ sumQ()

template<typename DIGI >
double hcaldqm::utilities::sumQ ( DIGI const &  digi,
double  ped,
int  i = 0,
int  j = 3 
)

Definition at line 126 of file Utilities.h.

126  {
127  double sum = 0;
128  for (int ii = i; ii <= j; ii++)
129  sum += (digi.sample(ii).nominal_fC() - ped);
130  return sum;
131  }

References mps_fire::i, cuy::ii, and dqmiolumiharvest::j.

Referenced by NoCQTask::_process(), QIE10Task::_process(), LEDTask::_process(), UMNioTask::_process(), DigiTask::_process(), LaserTask::_process(), aveTS(), aveTS_v10(), aveTSDB(), StripCPEgeometric::WrappedCluster::centroid(), StripCPEgeometric::WrappedCluster::eta(), sumQ_v10(), and sumQDB().

◆ sumQ_v10()

template<typename FRAME >
double hcaldqm::utilities::sumQ_v10 ( FRAME const &  frame,
double  ped,
int  i = 0,
int  j = 3 
)

Definition at line 91 of file Utilities.h.

91  {
92  double sumQ = 0;
93  for (int ii = i; ii <= j; ii++)
94  sumQ += constants::adc2fC[frame[ii].adc()] - ped;
95  return sumQ;
96  }

References ecalMGPA::adc(), hcaldqm::constants::adc2fC, amptDefault_cfi::frame, mps_fire::i, cuy::ii, dqmiolumiharvest::j, and sumQ().

◆ sumQDB()

template<class Digi >
double hcaldqm::utilities::sumQDB ( const edm::ESHandle< HcalDbService > &  conditions,
const CaloSamples calo_samples,
const HcalDetId  did,
const Digi &  digi,
unsigned int  i_start,
unsigned int  i_end 
)

Definition at line 61 of file Utilities.h.

66  {
67  double sumQ = 0;
68  for (unsigned int i = i_start; i <= i_end; ++i) {
69  sumQ += adc2fCDBMinusPedestal(conditions, calo_samples, did, digi, i);
70  }
71  return sumQ;
72  }

References adc2fCDBMinusPedestal(), mps_fire::i, and sumQ().

hcaldqm::constants::tCalib
Definition: Constants.h:307
hcaldqm::constants::fed2crate_map
const std::map< unsigned int, unsigned int > fed2crate_map
Definition: Constants.h:54
ecalMGPA::adc
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
Definition: EcalMGPASample.h:11
hcaldqm::constants::FED_VME_MIN
const int FED_VME_MIN
Definition: Constants.h:80
hcaldqm::constants::tHF
Definition: Constants.h:299
hcaldqm::constants::tHEPMega
Definition: Constants.h:301
mps_fire.i
i
Definition: mps_fire.py:355
hcaldqm::constants::crateListuTCA
const std::vector< unsigned int > crateListuTCA
Definition: Constants.h:72
funct::false
false
Definition: Factorize.h:34
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
hcaldqm::constants::GARBAGE_VALUE
const int GARBAGE_VALUE
Definition: Constants.h:244
hcaldqm::constants::tNull
Definition: Constants.h:293
utilities
Definition: utilities.py:1
cond::hash
Definition: Time.h:19
hcaldqm::constants::crate2fed_map
const std::map< unsigned int, unsigned int > crate2fed_map
Definition: Constants.h:28
gather_cfg.cout
cout
Definition: gather_cfg.py:144
hcaldqm::utilities::adc2fCDBMinusPedestal
double adc2fCDBMinusPedestal(const edm::ESHandle< HcalDbService > &conditions, const CaloSamples &calo_samples, const HcalDetId did, const Digi &digi, unsigned int n)
Definition: Utilities.h:33
data-class-funcs.q
q
Definition: data-class-funcs.py:169
hcaldqm::constants::SLOT_uTCA_MIN
const int SLOT_uTCA_MIN
Definition: Constants.h:105
hcaldqm::constants::FIBER_uTCA_MIN1
const int FIBER_uTCA_MIN1
Definition: Constants.h:126
AlignmentProducer_cff.calibrations
calibrations
Definition: AlignmentProducer_cff.py:59
hcaldqm::constants::tCRF
Definition: Constants.h:306
hcaldqm::utilities::maxTS
int maxTS(DIGI const &digi, double ped=0)
Definition: Utilities.h:102
hcaldqm::constants::crateListVME
const std::vector< unsigned int > crateListVME
Definition: Constants.h:73
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
adc2fC
static const float adc2fC[128]
Definition: CMTRawAnalyzer.h:410
hcaldqm::utilities::sumQ
double sumQ(DIGI const &digi, double ped, int i=0, int j=3)
Definition: Utilities.h:126
HcalDbService::getHcalShape
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:326
end
#define end
Definition: vmac.h:39
HcalDbService::getHcalCalibrations
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:65
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
HcalDbService::getHcalCoder
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:319
debug
#define debug
Definition: HDRShower.cc:19
hcaldqm::constants::tHFRaddam
Definition: Constants.h:296
hcaldqm::constants::tLED
Definition: Constants.h:295
vertices_cff.x
x
Definition: vertices_cff.py:29
hcaldqm::constants::tHBPMega
Definition: Constants.h:303
hcaldqm::constants::FIBER_VME_MIN
const int FIBER_VME_MIN
Definition: Constants.h:123
HcalElectronicsId
Readout chain identification for Hcal.
Definition: HcalElectronicsId.h:32
hcaldqm::constants::tSafe
Definition: Constants.h:308
hcaldqm::constants::tHO
Definition: Constants.h:298
hcaldqm::constants::FIBERCH_MIN
const int FIBERCH_MIN
Definition: Constants.h:132
HcalCalibrations
Definition: HcalCalibrations.h:9
hcaldqm::constants::tHBHEHPD
Definition: Constants.h:297
hcaldqm::constants::tZDC
Definition: Constants.h:300
hcaldqm::constants::tPedestal
Definition: Constants.h:294
hcaldqm::constants::FED_VME_MAX
const int FED_VME_MAX
Definition: Constants.h:81
runTauDisplay.eid
eid
Definition: runTauDisplay.py:298
CaloSamples
Definition: CaloSamples.h:14
hcaldqm::constants::tHEMMega
Definition: Constants.h:302
HcalQIECoder
Definition: HcalQIECoder.h:20
type
type
Definition: HCALResponse.h:21
amptDefault_cfi.frame
frame
Definition: amptDefault_cfi.py:12
hcaldqm::constants::tHBMMega
Definition: Constants.h:304
hcaldqm::utilities::crate2fed
uint16_t crate2fed(int crate, int slot)
Definition: Utilities.cc:27
HcalQIEShape
Definition: HcalQIEShape.h:17
HcalCoderDb
Definition: HcalCoderDb.h:15
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
cuy.ii
ii
Definition: cuy.py:590
begin
#define begin
Definition: vmac.h:32