CMS 3D CMS Logo

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

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 31 of file generateQIEShapes.cc.

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

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

Referenced by main().

◆ generate()

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

Definition at line 48 of file generateQIEShapes.cc.

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

References gpuClustering::adc, DQMScaleToClient_cfi::factor, mps_fire::i, LaserClient_cfi::nbins, muon::overlap(), FastTimerService_cff::range, L1EGammaCrystalsEmulatorProducer_cfi::scale, and contentValuesCheck::values.

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

◆ 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:


CALO JETS


PF JETS

Definition at line 70 of file generateQIEShapes.cc.

70  {
71  //
72  // run 128 bins
73  //
74  std::vector<float> valuesqie8(nbins_qie8 * 4 + 1), valuesqie11(nbins_qie11 * 4 + 1);
75  generate(nbins_qie8, binMin, valuesqie8);
76  generate(nbins_qie11, binMin2, valuesqie11);
77 
78  dump(valuesqie8, std::string{"qie8shape"});
79  dump(valuesqie11, std::string{"qie11shape"});
80 
81  return 0;
82 }

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

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 17 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 20 of file generateQIEShapes.cc.

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

◆ nbins_qie11

constexpr uint32_t nbins_qie11 = 64
constexpr

Definition at line 29 of file generateQIEShapes.cc.

Referenced by main().

◆ nbins_qie8

constexpr uint32_t nbins_qie8 = 32
constexpr

Definition at line 28 of file generateQIEShapes.cc.

Referenced by main().

counter
Definition: counter.py:1
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
mps_fire.i
i
Definition: mps_fire.py:428
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
gpuClustering::adc
uint16_t *__restrict__ uint16_t const *__restrict__ adc
Definition: gpuClusterChargeCut.h:20
gather_cfg.cout
cout
Definition: gather_cfg.py:144
nbins_qie8
constexpr uint32_t nbins_qie8
Definition: generateQIEShapes.cc:28
generate
void generate(uint32_t const nbins, float const *initValues, std::vector< float > &values)
Definition: generateQIEShapes.cc:48
nbins_qie11
constexpr uint32_t nbins_qie11
Definition: generateQIEShapes.cc:29
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
str
#define str(s)
Definition: TestProcessor.cc:53
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
DQMScaleToClient_cfi.factor
factor
Definition: DQMScaleToClient_cfi.py:8
muon::overlap
bool overlap(const reco::Muon &muon1, const reco::Muon &muon2, double pullX=1.0, double pullY=1.0, bool checkAdjacentChambers=false)
Definition: MuonSelectors.cc:791
value
Definition: value.py:1
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
binMin2
const float binMin2[64]
Definition: generateQIEShapes.cc:20
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
dump
void dump(std::vector< float > const &vec, std::string const &name)
Definition: generateQIEShapes.cc:31
binMin
const float binMin[32]
Definition: generateQIEShapes.cc:17