CMS 3D CMS Logo

Functions | Variables
generateQIEShapes.cc File Reference
#include <iostream>
#include <sstream>
#include <vector>
#include <cstdint>

Go to the source code of this file.

Functions

void dump (std::vector< float > const &vec, std::string const &name)
 
void generate (uint32_t const nbins, float const *initValues, std::vector< float > &values)
 
int main (int argc, char *argv[])
 

Variables

const float binMin [32]
 
const float binMin2 [64]
 
constexpr uint32_t nbins_qie11 = 64
 
constexpr uint32_t nbins_qie8 = 32
 

Function Documentation

◆ dump()

void dump ( std::vector< float > const &  vec,
std::string const &  name 
)

Definition at line 32 of file generateQIEShapes.cc.

References gather_cfg::cout, Skims_PA_cff::name, and str.

Referenced by main().

32  {
33  std::stringstream str;
34  str << "float const " << name << "[" << vec.size() << "] = {";
35  uint32_t counter = 0;
36  for (auto const& value : vec) {
37  if (counter % 8 == 0)
38  str << std::endl;
39  if (counter == vec.size() - 1)
40  str << value;
41  else
42  str << value << ", ";
43  counter++;
44  }
45  str << "};";
46  std::cout << str.str() << std::endl;
47 }
Definition: value.py:1
#define str(s)

◆ generate()

void generate ( uint32_t const  nbins,
float const *  initValues,
std::vector< float > &  values 
)

Definition at line 49 of file generateQIEShapes.cc.

References gpuClustering::adc, mps_fire::i, LaserClient_cfi::nbins, hltL1SingleMuFiltered5_cfi::overlap, FastTimerService_cff::range, l1tEGammaCrystalsEmulatorProducer_cfi::scale, and contentValuesCheck::values.

Referenced by l1t::stage2::CaloLayer1Collections::CaloLayer1Collections(), l1t::stage2::GMTCollections::GMTCollections(), l1t::stage2::GTCollections::GTCollections(), main(), and condformats_serialization_generate::main().

49  {
50  // preset the first range
51  for (uint32_t adc = 0; adc < nbins; adc++)
52  values[adc] = initValues[adc];
53 
54  // do the rest
55  int scale = 1;
56  for (uint32_t range = 1; range < 4; range++) {
57  int factor = nbins == 32 ? 5 : 8;
58  scale *= factor;
59 
60  auto const index_offset = range * nbins;
61  uint32_t const overlap = nbins == 32 ? 2 : 3;
62  values[index_offset] = values[index_offset - overlap];
63 
64  for (uint32_t i = 1; i < nbins; i++)
65  values[index_offset + i] = values[index_offset + i - 1] + scale * (values[i] - values[i - 1]);
66  }
67 
68  values[nbins * 4] = 2 * values[nbins * 4 - 1] - values[nbins * 4 - 2];
69 }
uint16_t *__restrict__ uint16_t const *__restrict__ adc

◆ main()

int main ( int  argc,
char *  argv[] 
)

===============================================================================================================================================================================================


variant2: for each run define phi-averaged A for normalization channel (Dref,16) and then, divide Rijk on it, i.e. get RRijk




















































































eta=27

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=19

eta=17

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=20

eta=19

eta=18

eta=27 L1=1

eta=25 L1=1

eta=23 L1=1

eta=22 L1=1

eta=21 L1=1

eta=29 L1=1

eta=26 L1=1

eta=24 L1=1

eta=20 L1=1

eta=19 L1=1

eta=18 L1=1

eta=17 L1=1

eta=28 L7=1

eta=27 L7=1

eta=25 L7=1

eta=23 L7=1

eta=22 L7=1

eta=21 L7=1

eta=26 L7=1

eta=24 L7=1

eta=20 L7=1

eta=19 L7=1

eta=18 L7=1

eta=17 L7=1

eta=27

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=19

eta=17

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=20

eta=19

eta=18

eta=27 L1=1

eta=25 L1=1

eta=23 L1=1

eta=22 L1=1

eta=21 L1=1

eta=26 L1=1

eta=24 L1=1

eta=20 L1=1

eta=19 L1=1

eta=18 L1=1

eta=17 L1=1

eta=28 L7=1

eta=27 L7=1

eta=25 L7=1

eta=23 L7=1

eta=22 L7=1

eta=21 L7=1

eta=26 L7=1

eta=24 L7=1

eta=20 L7=1

eta=19 L7=1

eta=18 L7=1

eta=17 L7=1

eta=27

eta=28

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:





Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:





Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:





Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

Prepare maps of good/bad channels:

Prepare maps of good/bad channels:

Prepare maps of good/bad channels:

Prepare maps of good/bad channels:


CALO JETS


PF JETS

Definition at line 71 of file generateQIEShapes.cc.

References binMin, binMin2, dump(), generate(), nbins_qie11, nbins_qie8, and AlCaHLTBitMon_QueryRunRegistry::string.

71  {
72  //
73  // run 128 bins
74  //
75  std::vector<float> valuesqie8(nbins_qie8 * 4 + 1), valuesqie11(nbins_qie11 * 4 + 1);
76  generate(nbins_qie8, binMin, valuesqie8);
77  generate(nbins_qie11, binMin2, valuesqie11);
78 
79  dump(valuesqie8, std::string{"qie8shape"});
80  dump(valuesqie11, std::string{"qie11shape"});
81 
82  return 0;
83 }
constexpr uint32_t nbins_qie8
void dump(std::vector< float > const &vec, std::string const &name)
void generate(uint32_t const nbins, float const *initValues, std::vector< float > &values)
constexpr uint32_t nbins_qie11
const float binMin2[64]
const float binMin[32]

Variable Documentation

◆ binMin

const float binMin[32]
Initial value:
= {-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
16, 18, 20, 22, 24, 26, 28, 31, 34, 37, 40, 44, 48, 52, 57, 62}

Definition at line 18 of file generateQIEShapes.cc.

Referenced by CastorQIEShape::CastorQIEShape(), SideBandSubtract::doFastSubtraction(), main(), HcalQIEData::setupShape(), and tmtt::HTrphi::store().

◆ binMin2

const float binMin2[64]
Initial value:
= {-0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5,
10.5, 11.5, 12.5, 13.5, 14.5,
15.5, 17.5, 19.5, 21.5, 23.5, 25.5, 27.5, 29.5, 31.5, 33.5, 35.5,
37.5, 39.5, 41.5, 43.5, 45.5, 47.5, 49.5, 51.5, 53.5,
55.5, 59.5, 63.5, 67.5, 71.5, 75.5, 79.5, 83.5, 87.5, 91.5, 95.5,
99.5, 103.5, 107.5, 111.5, 115.5, 119.5, 123.5, 127.5, 131.5, 135.5,
139.5, 147.5, 155.5, 163.5, 171.5, 179.5, 187.5}

Definition at line 21 of file generateQIEShapes.cc.

Referenced by main(), and HcalQIEData::setupShape().

◆ nbins_qie11

constexpr uint32_t nbins_qie11 = 64

Definition at line 30 of file generateQIEShapes.cc.

Referenced by main().

◆ nbins_qie8

constexpr uint32_t nbins_qie8 = 32

Definition at line 29 of file generateQIEShapes.cc.

Referenced by main().