CMS 3D CMS Logo

Classes | Functions
gctpf Namespace Reference

Classes

struct  GCTEtaStrip_t
 
struct  GCTEtaStripPeak_t
 
struct  GCTint_t
 
struct  GCTpfcluster_t
 
struct  PFcluster_t
 
struct  Region_t
 

Functions

GCTint_t bestOf2 (const GCTint_t &t0, const GCTint_t &t1)
 
float getEt (float temp[nTowerEtaSLR][nTowerPhiSLR], int eta, int phi)
 
GCTint_t getPeakBin (const GCTEtaStripPeak_t &etaStripPeak)
 
GCTint_t getPeakOfStrip (const GCTEtaStrip_t &etaStrip)
 
GCTint_t getPeakPosition (const Region_t &region)
 
Region_t initStructure (float temp[nTowerEtaSLR][nTowerPhiSLR])
 
PFcluster_t pfcluster (float temporary[nTowerEtaSLR][nTowerPhiSLR], int etaoffset, int phioffset)
 
GCTpfcluster_t recoPfcluster (float temporary[nTowerEtaSLR][nTowerPhiSLR], int etaoffset, int phioffset)
 
void RemoveTmp (float temp[nTowerEtaSLR][nTowerPhiSLR], int eta, int phi)
 

Function Documentation

◆ bestOf2()

GCTint_t gctpf::bestOf2 ( const GCTint_t t0,
const GCTint_t t1 
)
inline

Definition at line 57 of file Phase2L1CaloPFClusterEmulator.h.

References FrontierCondition_GT_autoExpress_cfi::t0, RandomServiceHelper::t1, and x.

Referenced by getPeakBin(), and getPeakOfStrip().

57  {
58  GCTint_t x;
59  x = (t0.et > t1.et) ? t0 : t1;
60 
61  return x;
62  }
float x

◆ getEt()

float gctpf::getEt ( float  temp[nTowerEtaSLR][nTowerPhiSLR],
int  eta,
int  phi 
)
inline

Definition at line 121 of file Phase2L1CaloPFClusterEmulator.h.

References PVValHelper::eta, mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, nTowerEtaSLR, nTowerPhiSLR, and groupFilesInBlocks::temp.

Referenced by ReflectedIterator::calculatePedestal(), HLTGenericFilter< T1 >::hltFilter(), recoPfcluster(), and ReflectedIterator::subtractPedestal().

121  {
122  float et_sumEta[3] = {0., 0., 0.};
123 
124  for (int i = 0; i < (nTowerEtaSLR - 2); i++) {
125  for (int j = 0; j < (nTowerPhiSLR - 2); j++) {
126  if (i + 1 == eta && j + 1 == phi) {
127  for (int k = 0; k < 3; k++) {
128  et_sumEta[k] = temp[i + k][j] + temp[i + k][j + 1] + temp[i + k][j + 2];
129  }
130  }
131  }
132  }
133 
134  float pfcluster_et = et_sumEta[0] + et_sumEta[1] + et_sumEta[2];
135 
136  return pfcluster_et;
137  }
static constexpr int nTowerEtaSLR
static constexpr int nTowerPhiSLR

◆ getPeakBin()

GCTint_t gctpf::getPeakBin ( const GCTEtaStripPeak_t etaStripPeak)
inline

Definition at line 74 of file Phase2L1CaloPFClusterEmulator.h.

References bestOf2(), and gctpf::GCTEtaStripPeak_t::p.

Referenced by getPeakPosition().

74  {
75  GCTint_t best01 = bestOf2(etaStripPeak.p[0], etaStripPeak.p[1]);
76  GCTint_t best23 = bestOf2(etaStripPeak.p[2], etaStripPeak.p[3]);
77  GCTint_t best45 = bestOf2(etaStripPeak.p[4], etaStripPeak.p[5]);
78  GCTint_t best67 = bestOf2(etaStripPeak.p[6], etaStripPeak.p[7]);
79  GCTint_t best89 = bestOf2(etaStripPeak.p[8], etaStripPeak.p[9]);
80  GCTint_t best1011 = bestOf2(etaStripPeak.p[10], etaStripPeak.p[11]);
81  GCTint_t best1213 = bestOf2(etaStripPeak.p[12], etaStripPeak.p[13]);
82  GCTint_t best1415 = bestOf2(etaStripPeak.p[14], etaStripPeak.p[15]);
83  GCTint_t best1617 = bestOf2(etaStripPeak.p[16], etaStripPeak.p[17]);
84  GCTint_t best0123 = bestOf2(best01, best23);
85  GCTint_t best4567 = bestOf2(best45, best67);
86  GCTint_t best891011 = bestOf2(best89, best1011);
87  GCTint_t best12131415 = bestOf2(best1213, best1415);
88  GCTint_t best01234567 = bestOf2(best0123, best4567);
89  GCTint_t best01234567891011 = bestOf2(best01234567, best891011);
90  GCTint_t best121314151617 = bestOf2(best12131415, best1617);
91  GCTint_t best12131415161718 = bestOf2(best121314151617, etaStripPeak.p[18]);
92  GCTint_t bestAll = bestOf2(best01234567891011, best12131415161718);
93 
94  return bestAll;
95  }
GCTint_t bestOf2(const GCTint_t &t0, const GCTint_t &t1)

◆ getPeakOfStrip()

GCTint_t gctpf::getPeakOfStrip ( const GCTEtaStrip_t etaStrip)
inline

Definition at line 64 of file Phase2L1CaloPFClusterEmulator.h.

References bestOf2(), and gctpf::GCTEtaStrip_t::t.

Referenced by getPeakPosition().

64  {
65  GCTint_t best12 = bestOf2(etaStrip.t[1], etaStrip.t[2]);
66  GCTint_t best34 = bestOf2(etaStrip.t[3], etaStrip.t[4]);
67  GCTint_t best56 = bestOf2(etaStrip.t[5], etaStrip.t[6]);
68  GCTint_t best1234 = bestOf2(best12, best34);
69  GCTint_t bestAll = bestOf2(best1234, best56);
70 
71  return bestAll;
72  }
GCTint_t bestOf2(const GCTint_t &t0, const GCTint_t &t1)

◆ getPeakPosition()

GCTint_t gctpf::getPeakPosition ( const Region_t region)
inline

Definition at line 97 of file Phase2L1CaloPFClusterEmulator.h.

References getPeakBin(), getPeakOfStrip(), mps_fire::i, SiStripPI::max, nTowerEtaSLR, gctpf::GCTEtaStripPeak_t::p, and nano_mu_digi_cff::region.

Referenced by recoPfcluster().

97  {
98  GCTEtaStripPeak_t etaPeak;
99  for (int i = 0; i < nTowerEtaSLR - 2; i++) {
100  etaPeak.p[i] = getPeakOfStrip(region.s[i + 1]);
101  }
102  GCTint_t max = getPeakBin(etaPeak);
103 
104  return max;
105  }
GCTint_t getPeakBin(const GCTEtaStripPeak_t &etaStripPeak)
GCTint_t getPeakOfStrip(const GCTEtaStrip_t &etaStrip)
static constexpr int nTowerEtaSLR

◆ initStructure()

Region_t gctpf::initStructure ( float  temp[nTowerEtaSLR][nTowerPhiSLR])
inline

Definition at line 107 of file Phase2L1CaloPFClusterEmulator.h.

References mps_fire::i, dqmiolumiharvest::j, nTowerEtaSLR, nTowerPhiSLR, and groupFilesInBlocks::temp.

Referenced by recoPfcluster().

107  {
108  Region_t r;
109 
110  for (int i = 0; i < nTowerPhiSLR; i++) {
111  for (int j = 0; j < nTowerEtaSLR; j++) {
112  r.s[j].t[i].et = temp[j][i];
113  r.s[j].t[i].eta = j;
114  r.s[j].t[i].phi = i;
115  }
116  }
117 
118  return r;
119  }
static constexpr int nTowerEtaSLR
static constexpr int nTowerPhiSLR

◆ pfcluster()

PFcluster_t gctpf::pfcluster ( float  temporary[nTowerEtaSLR][nTowerPhiSLR],
int  etaoffset,
int  phioffset 
)
inline

Definition at line 177 of file Phase2L1CaloPFClusterEmulator.h.

References gctpf::GCTpfcluster_t::et, gctpf::GCTpfcluster_t::eta, gctpf::PFcluster_t::GCTpfclusters, mps_fire::i, nPFClusterSLR, gctpf::GCTpfcluster_t::phi, and recoPfcluster().

Referenced by cms::PFClusterMETProducer::produce(), and Phase2L1CaloPFClusterEmulator::produce().

177  {
178  GCTpfcluster_t pfcluster[nPFClusterSLR];
179 
180  for (int i = 0; i < nPFClusterSLR; i++) {
181  pfcluster[i] = recoPfcluster(temporary, etaoffset, phioffset);
182  }
183 
184  PFcluster_t GCTPfclusters;
185 
186  for (int i = 0; i < nPFClusterSLR; i++) {
187  GCTPfclusters.GCTpfclusters[i].et = pfcluster[i].et;
188  GCTPfclusters.GCTpfclusters[i].eta = pfcluster[i].eta;
189  GCTPfclusters.GCTpfclusters[i].phi = pfcluster[i].phi;
190  }
191 
192  return GCTPfclusters;
193  }
GCTpfcluster_t recoPfcluster(float temporary[nTowerEtaSLR][nTowerPhiSLR], int etaoffset, int phioffset)
static constexpr int nPFClusterSLR
GCTpfcluster_t GCTpfclusters[nPFClusterSLR]
PFcluster_t pfcluster(float temporary[nTowerEtaSLR][nTowerPhiSLR], int etaoffset, int phioffset)

◆ recoPfcluster()

GCTpfcluster_t gctpf::recoPfcluster ( float  temporary[nTowerEtaSLR][nTowerPhiSLR],
int  etaoffset,
int  phioffset 
)
inline

Definition at line 153 of file Phase2L1CaloPFClusterEmulator.h.

References gctpf::GCTpfcluster_t::et, gctpf::GCTpfcluster_t::eta, gctpf::GCTint_t::eta, getEt(), getPeakPosition(), initStructure(), nTowerEtaSLR, nTowerPhiSLR, gctpf::GCTpfcluster_t::phi, gctpf::GCTint_t::phi, nano_mu_digi_cff::region, and RemoveTmp().

Referenced by pfcluster().

153  {
154  GCTpfcluster_t pfclusterReturn;
155 
156  Region_t region;
157 
158  region = initStructure(temporary);
159 
160  GCTint_t regionMax = getPeakPosition(region);
161 
162  float pfcluster_et = getEt(temporary, regionMax.eta, regionMax.phi);
163 
164  RemoveTmp(temporary, regionMax.eta, regionMax.phi);
165 
166  if (!(regionMax.eta >= 2 && regionMax.eta < (nTowerEtaSLR - 2) && regionMax.phi >= 2 &&
167  regionMax.phi < (nTowerPhiSLR - 2)))
168  pfcluster_et = 0;
169 
170  pfclusterReturn.et = pfcluster_et;
171  pfclusterReturn.eta = regionMax.eta - 2 + etaoffset;
172  pfclusterReturn.phi = regionMax.phi - 2 + phioffset;
173 
174  return pfclusterReturn;
175  }
GCTint_t getPeakPosition(const Region_t &region)
Region_t initStructure(float temp[nTowerEtaSLR][nTowerPhiSLR])
float getEt(float temp[nTowerEtaSLR][nTowerPhiSLR], int eta, int phi)
void RemoveTmp(float temp[nTowerEtaSLR][nTowerPhiSLR], int eta, int phi)
static constexpr int nTowerEtaSLR
static constexpr int nTowerPhiSLR

◆ RemoveTmp()

void gctpf::RemoveTmp ( float  temp[nTowerEtaSLR][nTowerPhiSLR],
int  eta,
int  phi 
)
inline

Definition at line 139 of file Phase2L1CaloPFClusterEmulator.h.

References PVValHelper::eta, mps_fire::i, dqmiolumiharvest::j, nTowerEtaSLR, nTowerPhiSLR, and groupFilesInBlocks::temp.

Referenced by recoPfcluster().

139  {
140  for (int i = 0; i < nTowerEtaSLR; i++) {
141  if (i + 1 >= eta && i <= eta + 1) {
142  for (int j = 0; j < nTowerPhiSLR; j++) {
143  if (j + 1 >= phi && j <= phi + 1) {
144  temp[i][j] = 0;
145  }
146  }
147  }
148  }
149 
150  return;
151  }
static constexpr int nTowerEtaSLR
static constexpr int nTowerPhiSLR