CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
HcalTriggerPrimitiveAlgo Class Reference

#include <HcalTriggerPrimitiveAlgo.h>

Classes

struct  HFDetails
 
struct  HFUpgradeDetails
 

Public Member Functions

template<typename T , typename... Args>
void addDigis (const T &collection, const Args &...digis)
 
template<typename T >
void addDigis (const T &collection)
 
template<typename D >
void addDigis (const HcalDataFrameContainer< D > &collection)
 
 HcalTriggerPrimitiveAlgo (bool pf, const std::vector< double > &w, int latency, uint32_t FG_threshold, const std::vector< uint32_t > &FG_HF_thresholds, uint32_t ZS_threshold, int numberOfSamples, int numberOfPresamples, int numberOfSamplesHF, int numberOfPresamplesHF, bool useTDCInMinBiasBits, uint32_t minSignalThreshold=0, uint32_t PMT_NoiseThreshold=0)
 
void overrideParameters (const edm::ParameterSet &ps)
 
template<typename... Digis>
void run (const HcalTPGCoder *incoder, const HcalTPGCompressor *outcoder, const HcalDbService *conditions, HcalTrigPrimDigiCollection &result, const HcalTrigTowerGeometry *trigTowerGeometry, float rctlsb, const HcalFeatureBit *LongvrsShortCut, const Digis &...digis)
 
void runFEFormatError (const FEDRawDataCollection *rawraw, const HcalElectronicsMap *emap, HcalTrigPrimDigiCollection &result)
 
void runZS (HcalTrigPrimDigiCollection &tp)
 
void setNCTScaleShift (int)
 
void setPeakFinderAlgorithm (int algo)
 
void setRCTScaleShift (int)
 
void setUpgradeFlags (bool hb, bool he, bool hf)
 
 ~HcalTriggerPrimitiveAlgo ()
 

Private Types

typedef std::map< HcalTrigTowerDetId, std::vector< bool > > FGbitMap
 
typedef std::vector< HcalFinegrainBit::TowerFGUpgradeContainer
 
typedef std::map< HcalTrigTowerDetId, FGUpgradeContainerFGUpgradeMap
 
typedef std::map< HcalTrigTowerDetId, std::map< uint32_t, HFDetails > > HFDetailMap
 
typedef std::map< HcalTrigTowerDetId, std::map< uint32_t, std::array< HFUpgradeDetails, 4 > > > HFUpgradeDetailMap
 
typedef std::vector< IntegerCaloSamplesSumFGContainer
 
typedef std::map< HcalTrigTowerDetId, IntegerCaloSamplesSumMap
 
typedef std::map< HcalTrigTowerDetId, SumFGContainerTowerMapFGSum
 
typedef std::map< uint32_t, std::vector< bool > > TowerMapVeto
 

Private Member Functions

void addFG (const HcalTrigTowerDetId &id, std::vector< bool > &msb)
 
void addSignal (const HBHEDataFrame &frame)
 adds the signal to the map More...
 
void addSignal (const HFDataFrame &frame)
 
void addSignal (const QIE10DataFrame &frame)
 
void addSignal (const QIE11DataFrame &frame)
 
void addSignal (const IntegerCaloSamples &samples)
 
void addUpgradeFG (const HcalTrigTowerDetId &id, int depth, const std::vector< std::bitset< 2 >> &bits)
 
void analyze (IntegerCaloSamples &samples, HcalTriggerPrimitiveDigi &result)
 adds the actual digis More...
 
void analyzeHF (IntegerCaloSamples &samples, HcalTriggerPrimitiveDigi &result, const int hf_lumi_shift)
 
void analyzeHF2016 (const IntegerCaloSamples &SAMPLES, HcalTriggerPrimitiveDigi &result, const int HF_LUMI_SHIFT, const HcalFeatureBit *HCALFEM)
 
void analyzeHFQIE10 (const IntegerCaloSamples &SAMPLES, HcalTriggerPrimitiveDigi &result, const int HF_LUMI_SHIFT, const HcalFeatureBit *HCALFEM)
 
void analyzeQIE11 (IntegerCaloSamples &samples, HcalTriggerPrimitiveDigi &result, const HcalFinegrainBit &fg_algo)
 
bool needLegacyFG (const HcalTrigTowerDetId &id) const
 
bool passTDC (const QIE10DataFrame &digi, int ts) const
 
bool validChannel (const QIE10DataFrame &digi, int ts) const
 
bool validUpgradeFG (const HcalTrigTowerDetId &id, int depth) const
 

Private Attributes

const HcalDbServiceconditions_
 
std::vector< uint32_t > FG_HF_thresholds_
 
uint32_t FG_threshold_
 
FGbitMap fgMap_
 
FGUpgradeMap fgUpgradeMap_
 
TowerMapVeto HF_Veto
 
const HcaluLUTTPGCoderincoder_
 
int latency_
 
HcalFeatureBitLongvrsShortCut
 
uint32_t minSignalThreshold_
 
int NCTScaleShift
 
int numberOfPresamples_
 
int numberOfPresamplesHF_
 
int numberOfSamples_
 
int numberOfSamplesHF_
 
const HcalTPGCompressoroutcoder_
 
bool override_adc_hf_ = false
 
uint32_t override_adc_hf_value_
 
edm::ParameterSet override_parameters_
 
bool override_tdc_hf_ = false
 
unsigned long long override_tdc_hf_value_
 
int peak_finder_algorithm_
 
bool peakfind_
 
uint32_t PMT_NoiseThreshold_
 
int RCTScaleShift
 
HFDetailMap theHFDetailMap
 
HFUpgradeDetailMap theHFUpgradeDetailMap
 
SumMap theSumMap
 
double theThreshold
 
TowerMapFGSum theTowerMapFGSum
 
const HcalTrigTowerGeometrytheTrigTowerGeometry
 
bool upgrade_hb_ = false
 
bool upgrade_he_ = false
 
bool upgrade_hf_ = false
 
bool useTDCInMinBiasBits_
 
std::vector< double > weights_
 
uint32_t ZS_threshold_
 
int ZS_threshold_I_
 

Static Private Attributes

static const int FIRST_FINEGRAIN_TOWER = 30
 
static const int HBHE_OVERLAP_TOWER = 16
 
static const int LAST_FINEGRAIN_DEPTH = 6
 
static const int LAST_FINEGRAIN_TOWER = 28
 
static const int QIE10_LINEARIZATION_ET = HcaluLUTTPGCoder::QIE10_LUT_BITMASK
 
static const int QIE10_MAX_LINEARIZATION_ET = 0x7FF
 
static const int QIE11_LINEARIZATION_ET = HcaluLUTTPGCoder::QIE11_LUT_BITMASK
 
static const int QIE11_MAX_LINEARIZATION_ET = 0x7FF
 
static const int QIE8_LINEARIZATION_ET = HcaluLUTTPGCoder::QIE8_LUT_BITMASK
 

Detailed Description

Definition at line 25 of file HcalTriggerPrimitiveAlgo.h.

Member Typedef Documentation

typedef std::map<HcalTrigTowerDetId, std::vector<bool> > HcalTriggerPrimitiveAlgo::FGbitMap
private

Definition at line 188 of file HcalTriggerPrimitiveAlgo.h.

Definition at line 191 of file HcalTriggerPrimitiveAlgo.h.

Definition at line 192 of file HcalTriggerPrimitiveAlgo.h.

typedef std::map<HcalTrigTowerDetId, std::map<uint32_t, HFDetails> > HcalTriggerPrimitiveAlgo::HFDetailMap
private

Definition at line 158 of file HcalTriggerPrimitiveAlgo.h.

typedef std::map<HcalTrigTowerDetId, std::map<uint32_t, std::array<HFUpgradeDetails, 4> > > HcalTriggerPrimitiveAlgo::HFUpgradeDetailMap
private

Definition at line 168 of file HcalTriggerPrimitiveAlgo.h.

Definition at line 171 of file HcalTriggerPrimitiveAlgo.h.

Definition at line 149 of file HcalTriggerPrimitiveAlgo.h.

Definition at line 172 of file HcalTriggerPrimitiveAlgo.h.

typedef std::map<uint32_t, std::vector<bool> > HcalTriggerPrimitiveAlgo::TowerMapVeto
private

Definition at line 185 of file HcalTriggerPrimitiveAlgo.h.

Constructor & Destructor Documentation

HcalTriggerPrimitiveAlgo::HcalTriggerPrimitiveAlgo ( bool  pf,
const std::vector< double > &  w,
int  latency,
uint32_t  FG_threshold,
const std::vector< uint32_t > &  FG_HF_thresholds,
uint32_t  ZS_threshold,
int  numberOfSamples,
int  numberOfPresamples,
int  numberOfSamplesHF,
int  numberOfPresamplesHF,
bool  useTDCInMinBiasBits,
uint32_t  minSignalThreshold = 0,
uint32_t  PMT_NoiseThreshold = 0 
)

Definition at line 23 of file HcalTriggerPrimitiveAlgo.cc.

References numberOfPresamples_, numberOfPresamplesHF_, numberOfSamples_, numberOfSamplesHF_, peakfind_, ZS_threshold_, and ZS_threshold_I_.

36  : incoder_(nullptr),
37  outcoder_(nullptr),
38  theThreshold(0),
39  peakfind_(pf),
40  weights_(w),
50  minSignalThreshold_(minSignalThreshold),
51  PMT_NoiseThreshold_(PMT_NoiseThreshold),
52  NCTScaleShift(0),
53  RCTScaleShift(0),
56  //No peak finding setting (for Fastsim)
57  if (!peakfind_) {
58  numberOfSamples_ = 1;
62  }
63  // Switch to integer for comparisons - remove compiler warning
65 }
std::vector< uint32_t > FG_HF_thresholds_
const double w
Definition: UKUtility.cc:23
const HcalTPGCompressor * outcoder_
const HcaluLUTTPGCoder * incoder_
HcalTriggerPrimitiveAlgo::~HcalTriggerPrimitiveAlgo ( )

Definition at line 67 of file HcalTriggerPrimitiveAlgo.cc.

67 {}

Member Function Documentation

template<typename T , typename... Args>
void HcalTriggerPrimitiveAlgo::addDigis ( const T collection,
const Args &...  digis 
)
inline

Definition at line 53 of file HcalTriggerPrimitiveAlgo.h.

Referenced by run().

53  {
55  addDigis(digis...);
56  };
void addDigis(const T &collection, const Args &...digis)
template<typename T >
void HcalTriggerPrimitiveAlgo::addDigis ( const T collection)
inline

Definition at line 59 of file HcalTriggerPrimitiveAlgo.h.

References addSignal().

59  {
60  for (const auto& digi : collection) {
61  addSignal(digi);
62  }
63  };
void addSignal(const HBHEDataFrame &frame)
adds the signal to the map
template<typename D >
void HcalTriggerPrimitiveAlgo::addDigis ( const HcalDataFrameContainer< D > &  collection)
inline
void HcalTriggerPrimitiveAlgo::addFG ( const HcalTrigTowerDetId id,
std::vector< bool > &  msb 
)
private

Definition at line 762 of file HcalTriggerPrimitiveAlgo.cc.

References fgMap_, mps_fire::i, and triggerObjects_cff::id.

Referenced by addDigis(), addSignal(), and addUpgradeFG().

762  {
763  FGbitMap::iterator itr = fgMap_.find(id);
764  if (itr != fgMap_.end()) {
765  std::vector<bool>& _msb = itr->second;
766  for (size_t i = 0; i < msb.size(); ++i)
767  _msb[i] = _msb[i] || msb[i];
768  } else
769  fgMap_[id] = msb;
770 }
void HcalTriggerPrimitiveAlgo::addSignal ( const HBHEDataFrame frame)
private

adds the signal to the map

Definition at line 88 of file HcalTriggerPrimitiveAlgo.cc.

References HcaluLUTTPGCoder::adc2Linear(), addFG(), HcalDetId::depth(), mps_fire::i, HBHEDataFrame::id(), photons_cff::ids, incoder_, HcaluLUTTPGCoder::lookupMSB(), HBHEDataFrame::presamples(), HBHEDataFrame::size(), theTrigTowerGeometry, and HcalTrigTowerGeometry::towerIds().

Referenced by addDigis(), and addSignal().

88  {
89  // TODO: Need to add support for seperate 28, 29 in HE
90  //Hack for 300_pre10, should be removed.
91  if (frame.id().depth() == 5)
92  return;
93 
94  std::vector<HcalTrigTowerDetId> ids = theTrigTowerGeometry->towerIds(frame.id());
95  assert(ids.size() == 1 || ids.size() == 2);
96  IntegerCaloSamples samples1(ids[0], int(frame.size()));
97 
98  samples1.setPresamples(frame.presamples());
99  incoder_->adc2Linear(frame, samples1);
100 
101  std::vector<bool> msb;
102  incoder_->lookupMSB(frame, msb);
103 
104  if (ids.size() == 2) {
105  // make a second trigprim for the other one, and split the energy
106  IntegerCaloSamples samples2(ids[1], samples1.size());
107  for (int i = 0; i < samples1.size(); ++i) {
108  samples1[i] = uint32_t(samples1[i] * 0.5);
109  samples2[i] = samples1[i];
110  }
111  samples2.setPresamples(frame.presamples());
112  addSignal(samples2);
113  addFG(ids[1], msb);
114  }
115  addSignal(samples1);
116  addFG(ids[0], msb);
117 }
void adc2Linear(const HBHEDataFrame &df, IntegerCaloSamples &ics) const override
std::vector< HcalTrigTowerDetId > towerIds(const HcalDetId &cellId) const
the mapping to and from DetIds
int size() const
total number of samples in the digi
Definition: HBHEDataFrame.h:27
void addFG(const HcalTrigTowerDetId &id, std::vector< bool > &msb)
int depth() const
get the tower depth
Definition: HcalDetId.h:164
const HcalTrigTowerGeometry * theTrigTowerGeometry
void lookupMSB(const HBHEDataFrame &df, std::vector< bool > &msb) const
int presamples() const
number of samples before the sample from the triggered beam crossing (according to the hardware) ...
Definition: HBHEDataFrame.h:29
const HcaluLUTTPGCoder * incoder_
const HcalDetId & id() const
Definition: HBHEDataFrame.h:23
void addSignal(const HBHEDataFrame &frame)
adds the signal to the map
void HcalTriggerPrimitiveAlgo::addSignal ( const HFDataFrame frame)
private

Definition at line 119 of file HcalTriggerPrimitiveAlgo.cc.

References HcaluLUTTPGCoder::adc2Linear(), addSignal(), HcalDetId::depth(), amptDefault_cfi::frame, HF_Veto, mps_fire::i, HFDataFrame::id(), photons_cff::ids, incoder_, HcalTriggerPrimitiveAlgo::HFDetails::long_fiber, HcalTriggerPrimitiveAlgo::HFDetails::LongDigi, HcalDetId::maskDepth(), minSignalThreshold_, HFDataFrame::presamples(), EgammaValidation_cff::samples, IntegerCaloSamples::setPresamples(), HcalTriggerPrimitiveAlgo::HFDetails::short_fiber, HcalTriggerPrimitiveAlgo::HFDetails::ShortDigi, HFDataFrame::size(), theHFDetailMap, theTowerMapFGSum, theTrigTowerGeometry, HcalTrigTowerGeometry::towerIds(), and HcalTrigTowerDetId::version().

119  {
120  if (frame.id().depth() == 1 || frame.id().depth() == 2) {
121  std::vector<HcalTrigTowerDetId> ids = theTrigTowerGeometry->towerIds(frame.id());
122  std::vector<HcalTrigTowerDetId>::const_iterator it;
123  for (it = ids.begin(); it != ids.end(); ++it) {
124  HcalTrigTowerDetId trig_tower_id = *it;
125  IntegerCaloSamples samples(trig_tower_id, frame.size());
126  samples.setPresamples(frame.presamples());
127  incoder_->adc2Linear(frame, samples);
128 
129  // Don't add to final collection yet
130  // HF PMT veto sum is calculated in analyzerHF()
131  IntegerCaloSamples zero_samples(trig_tower_id, frame.size());
132  zero_samples.setPresamples(frame.presamples());
133  addSignal(zero_samples);
134 
135  // Pre-LS1 Configuration
136  if (trig_tower_id.version() == 0) {
137  // Mask off depths: fgid is the same for both depths
138  uint32_t fgid = (frame.id().maskDepth());
139 
140  if (theTowerMapFGSum.find(trig_tower_id) == theTowerMapFGSum.end()) {
141  SumFGContainer sumFG;
142  theTowerMapFGSum.insert(std::pair<HcalTrigTowerDetId, SumFGContainer>(trig_tower_id, sumFG));
143  }
144 
145  SumFGContainer& sumFG = theTowerMapFGSum[trig_tower_id];
146  SumFGContainer::iterator sumFGItr;
147  for (sumFGItr = sumFG.begin(); sumFGItr != sumFG.end(); ++sumFGItr) {
148  if (sumFGItr->id() == fgid) {
149  break;
150  }
151  }
152  // If find
153  if (sumFGItr != sumFG.end()) {
154  for (int i = 0; i < samples.size(); ++i) {
155  (*sumFGItr)[i] += samples[i];
156  }
157  } else {
158  //Copy samples (change to fgid)
159  IntegerCaloSamples sumFGSamples(DetId(fgid), samples.size());
160  sumFGSamples.setPresamples(samples.presamples());
161  for (int i = 0; i < samples.size(); ++i) {
162  sumFGSamples[i] = samples[i];
163  }
164  sumFG.push_back(sumFGSamples);
165  }
166 
167  // set veto to true if Long or Short less than threshold
168  if (HF_Veto.find(fgid) == HF_Veto.end()) {
169  vector<bool> vetoBits(samples.size(), false);
170  HF_Veto[fgid] = vetoBits;
171  }
172  for (int i = 0; i < samples.size(); ++i) {
173  if (samples[i] < minSignalThreshold_) {
174  HF_Veto[fgid][i] = true;
175  }
176  }
177  }
178  // HF 1x1
179  else if (trig_tower_id.version() == 1) {
180  uint32_t fgid = (frame.id().maskDepth());
181  HFDetails& details = theHFDetailMap[trig_tower_id][fgid];
182  // Check the frame type to determine long vs short
183  if (frame.id().depth() == 1) { // Long
184  details.long_fiber = samples;
185  details.LongDigi = frame;
186  } else if (frame.id().depth() == 2) { // Short
187  details.short_fiber = samples;
188  details.ShortDigi = frame;
189  } else {
190  // Neither long nor short... So we have no idea what to do
191  edm::LogWarning("HcalTPAlgo") << "Unable to figure out what to do with data frame for " << frame.id();
192  return;
193  }
194  }
195  // Uh oh, we are in a bad/unknown state! Things will start crashing.
196  else {
197  return;
198  }
199  }
200  }
201 }
void adc2Linear(const HBHEDataFrame &df, IntegerCaloSamples &ics) const override
std::vector< HcalTrigTowerDetId > towerIds(const HcalDetId &cellId) const
the mapping to and from DetIds
void setPresamples(int pre)
set presample information
uint32_t maskDepth() const
get the tower depth
Definition: HcalDetId.h:180
std::vector< IntegerCaloSamples > SumFGContainer
int depth() const
get the tower depth
Definition: HcalDetId.h:164
const HcalTrigTowerGeometry * theTrigTowerGeometry
HcalDetId const & id() const
Definition: HFDataFrame.h:23
Definition: helper.h:70
Definition: DetId.h:17
int size() const
total number of samples in the digi
Definition: HFDataFrame.h:27
int version() const
get the version code for the trigger tower
const HcaluLUTTPGCoder * incoder_
int presamples() const
number of samples before the sample from the triggered beam crossing (according to the hardware) ...
Definition: HFDataFrame.h:29
void addSignal(const HBHEDataFrame &frame)
adds the signal to the map
void HcalTriggerPrimitiveAlgo::addSignal ( const QIE10DataFrame frame)
private

Definition at line 203 of file HcalTriggerPrimitiveAlgo.cc.

References HcaluLUTTPGCoder::adc2Linear(), addSignal(), QIE10DataFrame::detid(), amptDefault_cfi::frame, HcalForward, triggerObjects_cff::id, QIE10DataFrame::id(), photons_cff::ids, training_settings::idx, incoder_, HcaluLUTTPGCoder::lookupMSB(), passTDC(), QIE10DataFrame::presamples(), EgammaValidation_cff::samples, QIE10DataFrame::samples(), IntegerCaloSamples::setPresamples(), HcalDetId::subdet(), theHFUpgradeDetailMap, theTrigTowerGeometry, HcalTrigTowerGeometry::towerIds(), validChannel(), and BeamSplash_cfg::version.

203  {
204  HcalDetId detId = frame.detid();
205  // prevent QIE10 calibration channels from entering TP emulation
206  if (detId.subdet() != HcalForward)
207  return;
208 
209  auto ids = theTrigTowerGeometry->towerIds(frame.id());
210  for (const auto& id : ids) {
211  if (id.version() == 0) {
212  edm::LogError("HcalTPAlgo") << "Encountered QIE10 data frame mapped to TP version 0:" << id;
213  continue;
214  }
215 
216  int nsamples = frame.samples();
217 
218  IntegerCaloSamples samples(id, nsamples);
219  samples.setPresamples(frame.presamples());
220  incoder_->adc2Linear(frame, samples);
221 
222  // Don't add to final collection yet
223  // HF PMT veto sum is calculated in analyzerHF()
224  IntegerCaloSamples zero_samples(id, nsamples);
225  zero_samples.setPresamples(frame.presamples());
226  addSignal(zero_samples);
227 
228  auto fid = HcalDetId(frame.id());
229  auto& details = theHFUpgradeDetailMap[id][fid.maskDepth()];
230  auto& detail = details[fid.depth() - 1];
231  detail.samples = samples;
232  detail.digi = frame;
233  detail.validity.resize(nsamples);
234  detail.passTDC.resize(nsamples);
235  incoder_->lookupMSB(frame, detail.fgbits);
236  for (int idx = 0; idx < nsamples; ++idx) {
237  detail.validity[idx] = validChannel(frame, idx);
238  detail.passTDC[idx] = passTDC(frame, idx);
239  }
240  }
241 }
int samples() const
total number of samples in the digi
void adc2Linear(const HBHEDataFrame &df, IntegerCaloSamples &ics) const override
HFUpgradeDetailMap theHFUpgradeDetailMap
bool passTDC(const QIE10DataFrame &digi, int ts) const
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
std::vector< HcalTrigTowerDetId > towerIds(const HcalDetId &cellId) const
the mapping to and from DetIds
int presamples() const
for backward compatibility
edm::DataFrame::id_type id() const
bool validChannel(const QIE10DataFrame &digi, int ts) const
const HcalTrigTowerGeometry * theTrigTowerGeometry
void lookupMSB(const HBHEDataFrame &df, std::vector< bool > &msb) const
Definition: helper.h:70
DetId detid() const
Get the detector id.
const HcaluLUTTPGCoder * incoder_
void addSignal(const HBHEDataFrame &frame)
adds the signal to the map
void HcalTriggerPrimitiveAlgo::addSignal ( const QIE11DataFrame frame)
private

Definition at line 243 of file HcalTriggerPrimitiveAlgo.cc.

References HcaluLUTTPGCoder::adc2Linear(), addSignal(), addUpgradeFG(), HcalBarrel, HcalEndcap, mps_fire::i, QIE11DataFrame::id(), photons_cff::ids, incoder_, HcaluLUTTPGCoder::lookupMSB(), QIE11DataFrame::presamples(), QIE11DataFrame::samples(), theTrigTowerGeometry, and HcalTrigTowerGeometry::towerIds().

243  {
244  HcalDetId detId(frame.id());
245  // prevent QIE11 calibration channels from entering TP emulation
246  if (detId.subdet() != HcalEndcap && detId.subdet() != HcalBarrel)
247  return;
248 
249  std::vector<HcalTrigTowerDetId> ids = theTrigTowerGeometry->towerIds(detId);
250  assert(ids.size() == 1 || ids.size() == 2);
251  IntegerCaloSamples samples1(ids[0], int(frame.samples()));
252 
253  samples1.setPresamples(frame.presamples());
254  incoder_->adc2Linear(frame, samples1);
255 
256  std::vector<std::bitset<2>> msb(frame.samples(), 0);
257  incoder_->lookupMSB(frame, msb);
258 
259  if (ids.size() == 2) {
260  // make a second trigprim for the other one, and share the energy
261  IntegerCaloSamples samples2(ids[1], samples1.size());
262  for (int i = 0; i < samples1.size(); ++i) {
263  samples1[i] = uint32_t(samples1[i]);
264  samples2[i] = samples1[i];
265  }
266  samples2.setPresamples(frame.presamples());
267  addSignal(samples2);
268  addUpgradeFG(ids[1], detId.depth(), msb);
269  }
270  addSignal(samples1);
271  addUpgradeFG(ids[0], detId.depth(), msb);
272 }
void adc2Linear(const HBHEDataFrame &df, IntegerCaloSamples &ics) const override
std::vector< HcalTrigTowerDetId > towerIds(const HcalDetId &cellId) const
the mapping to and from DetIds
const HcalTrigTowerGeometry * theTrigTowerGeometry
void lookupMSB(const HBHEDataFrame &df, std::vector< bool > &msb) const
edm::DataFrame::id_type id() const
void addUpgradeFG(const HcalTrigTowerDetId &id, int depth, const std::vector< std::bitset< 2 >> &bits)
int presamples() const
for backward compatibility
const HcaluLUTTPGCoder * incoder_
int samples() const
total number of samples in the digi
void addSignal(const HBHEDataFrame &frame)
adds the signal to the map
void HcalTriggerPrimitiveAlgo::addSignal ( const IntegerCaloSamples samples)
private

Definition at line 274 of file HcalTriggerPrimitiveAlgo.cc.

References mps_fire::i, IntegerCaloSamples::id(), triggerObjects_cff::id, IntegerCaloSamples::size(), and theSumMap.

274  {
275  HcalTrigTowerDetId id(samples.id());
276  SumMap::iterator itr = theSumMap.find(id);
277  if (itr == theSumMap.end()) {
278  theSumMap.insert(std::make_pair(id, samples));
279  } else {
280  // wish CaloSamples had a +=
281  for (int i = 0; i < samples.size(); ++i) {
282  (itr->second)[i] += samples[i];
283  }
284  }
285 }
int size() const
get the size
DetId id() const
get the (generic) id
void HcalTriggerPrimitiveAlgo::addUpgradeFG ( const HcalTrigTowerDetId id,
int  depth,
const std::vector< std::bitset< 2 >> &  bits 
)
private

Definition at line 791 of file HcalTriggerPrimitiveAlgo.cc.

References addFG(), bits, fgUpgradeMap_, mps_fire::i, needLegacyFG(), and validUpgradeFG().

Referenced by addDigis(), and addSignal().

793  {
794  if (not validUpgradeFG(id, depth)) {
795  if (needLegacyFG(id)) {
796  std::vector<bool> pseudo(bits.size(), false);
797  addFG(id, pseudo);
798  }
799  return;
800  }
801 
802  auto it = fgUpgradeMap_.find(id);
803  if (it == fgUpgradeMap_.end()) {
804  FGUpgradeContainer element;
805  element.resize(bits.size());
806  it = fgUpgradeMap_.insert(std::make_pair(id, element)).first;
807  }
808  for (unsigned int i = 0; i < bits.size(); ++i) {
809  it->second[i][0][depth - 1] = bits[i][0];
810  it->second[i][1][depth - 1] = bits[i][1];
811  }
812 }
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
void addFG(const HcalTrigTowerDetId &id, std::vector< bool > &msb)
bool needLegacyFG(const HcalTrigTowerDetId &id) const
std::vector< HcalFinegrainBit::Tower > FGUpgradeContainer
bool validUpgradeFG(const HcalTrigTowerDetId &id, int depth) const
void HcalTriggerPrimitiveAlgo::analyze ( IntegerCaloSamples samples,
HcalTriggerPrimitiveDigi result 
)
private

adds the actual digis

Definition at line 287 of file HcalTriggerPrimitiveAlgo.cc.

References HcalTPGCompressor::compress(), fgMap_, mps_fire::i, IntegerCaloSamples::id(), training_settings::idx, createfilelist::int, numberOfPresamples_, numberOfSamples_, outcoder_, convertSQLitetoXML_cfg::output, peak_finder_algorithm_, peakfind_, IntegerCaloSamples::presamples(), QIE8_LINEARIZATION_ET, edm::shift, IntegerCaloSamples::size(), theThreshold, and weights_.

Referenced by addDigis(), and run().

287  {
288  int shrink = weights_.size() - 1;
289  std::vector<bool>& msb = fgMap_[samples.id()];
290  IntegerCaloSamples sum(samples.id(), samples.size());
291 
292  //slide algo window
293  for (int ibin = 0; ibin < int(samples.size()) - shrink; ++ibin) {
294  int algosumvalue = 0;
295  for (unsigned int i = 0; i < weights_.size(); i++) {
296  //add up value * scale factor
297  algosumvalue += int(samples[ibin + i] * weights_[i]);
298  }
299  if (algosumvalue < 0)
300  sum[ibin] = 0; // low-side
301  //high-side
302  //else if (algosumvalue>QIE8_LINEARIZATION_ET) sum[ibin]=QIE8_LINEARIZATION_ET;
303  else
304  sum[ibin] = algosumvalue; //assign value to sum[]
305  }
306 
307  // Align digis and TP
308  int dgPresamples = samples.presamples();
309  int tpPresamples = numberOfPresamples_;
310  int shift = dgPresamples - tpPresamples;
311  int dgSamples = samples.size();
312  int tpSamples = numberOfSamples_;
313  if (peakfind_) {
314  if ((shift < shrink) || (shift + tpSamples + shrink > dgSamples - (peak_finder_algorithm_ - 1))) {
315  edm::LogInfo("HcalTriggerPrimitiveAlgo::analyze")
316  << "TP presample or size from the configuration file is out of the accessible range. Using digi values from "
317  "data instead...";
318  shift = shrink;
319  tpPresamples = dgPresamples - shrink;
320  tpSamples = dgSamples - (peak_finder_algorithm_ - 1) - shrink - shift;
321  }
322  }
323 
324  std::vector<int> finegrain(tpSamples, false);
325 
326  IntegerCaloSamples output(samples.id(), tpSamples);
327  output.setPresamples(tpPresamples);
328 
329  for (int ibin = 0; ibin < tpSamples; ++ibin) {
330  // ibin - index for output TP
331  // idx - index for samples + shift
332  int idx = ibin + shift;
333 
334  //Peak finding
335  if (peakfind_) {
336  bool isPeak = false;
337  switch (peak_finder_algorithm_) {
338  case 1:
339  isPeak = (samples[idx] > samples[idx - 1] && samples[idx] >= samples[idx + 1] && samples[idx] > theThreshold);
340  break;
341  case 2:
342  isPeak = (sum[idx] > sum[idx - 1] && sum[idx] >= sum[idx + 1] && sum[idx] > theThreshold);
343  break;
344  default:
345  break;
346  }
347 
348  if (isPeak) {
349  output[ibin] = std::min<unsigned int>(sum[idx], QIE8_LINEARIZATION_ET);
350  finegrain[ibin] = msb[idx];
351  }
352  // Not a peak
353  else
354  output[ibin] = 0;
355  } else { // No peak finding, just output running sum
356  output[ibin] = std::min<unsigned int>(sum[idx], QIE8_LINEARIZATION_ET);
357  finegrain[ibin] = msb[idx];
358  }
359 
360  // Only Pegged for 1-TS algo.
361  if (peak_finder_algorithm_ == 1) {
362  if (samples[idx] >= QIE8_LINEARIZATION_ET)
364  }
365  }
366  outcoder_->compress(output, finegrain, result);
367 }
int presamples() const
access presample information
const HcalTPGCompressor * outcoder_
int size() const
get the size
void compress(const IntegerCaloSamples &ics, const std::vector< int > &fineGrain, HcalTriggerPrimitiveDigi &digi) const
static unsigned int const shift
DetId id() const
get the (generic) id
void HcalTriggerPrimitiveAlgo::analyzeHF ( IntegerCaloSamples samples,
HcalTriggerPrimitiveDigi result,
const int  hf_lumi_shift 
)
private

Definition at line 439 of file HcalTriggerPrimitiveAlgo.cc.

References HcalTPGCompressor::compress(), FG_threshold_, HF_Veto, IntegerCaloSamples::id(), training_settings::idx, createfilelist::int, numberOfPresamplesHF_, numberOfSamplesHF_, outcoder_, convertSQLitetoXML_cfg::output, PMT_NoiseThreshold_, IntegerCaloSamples::presamples(), QIE8_LINEARIZATION_ET, edm::shift, IntegerCaloSamples::size(), theTowerMapFGSum, and PbPb_ZMuSkimMuonDPG_cff::veto.

Referenced by addDigis(), and run().

441  {
442  HcalTrigTowerDetId detId(samples.id());
443 
444  // Align digis and TP
445  int dgPresamples = samples.presamples();
446  int tpPresamples = numberOfPresamplesHF_;
447  int shift = dgPresamples - tpPresamples;
448  int dgSamples = samples.size();
449  int tpSamples = numberOfSamplesHF_;
450  if (shift < 0 || shift + tpSamples > dgSamples) {
451  edm::LogInfo("HcalTriggerPrimitiveAlgo::analyzeHF")
452  << "TP presample or size from the configuration file is out of the accessible range. Using digi values from "
453  "data instead...";
454  tpPresamples = dgPresamples;
455  shift = 0;
456  tpSamples = dgSamples;
457  }
458 
459  std::vector<int> finegrain(tpSamples, false);
460 
461  TowerMapFGSum::const_iterator tower2fg = theTowerMapFGSum.find(detId);
462  assert(tower2fg != theTowerMapFGSum.end());
463 
464  const SumFGContainer& sumFG = tower2fg->second;
465  // Loop over all L+S pairs that mapped from samples.id()
466  // Note: 1 samples.id() = 6 x (L+S) without noZS
467  for (SumFGContainer::const_iterator sumFGItr = sumFG.begin(); sumFGItr != sumFG.end(); ++sumFGItr) {
468  const std::vector<bool>& veto = HF_Veto[sumFGItr->id().rawId()];
469  for (int ibin = 0; ibin < tpSamples; ++ibin) {
470  int idx = ibin + shift;
471  // if not vetod, add L+S to total sum and calculate FG
472  bool vetoed = idx < int(veto.size()) && veto[idx];
473  if (!(vetoed && (*sumFGItr)[idx] > PMT_NoiseThreshold_)) {
474  samples[idx] += (*sumFGItr)[idx];
475  finegrain[ibin] = (finegrain[ibin] || (*sumFGItr)[idx] >= FG_threshold_);
476  }
477  }
478  }
479 
480  IntegerCaloSamples output(samples.id(), tpSamples);
481  output.setPresamples(tpPresamples);
482 
483  for (int ibin = 0; ibin < tpSamples; ++ibin) {
484  int idx = ibin + shift;
485  output[ibin] = samples[idx] >> hf_lumi_shift;
486  static const int MAX_OUTPUT = QIE8_LINEARIZATION_ET; // QIE8_LINEARIZATION_ET = 1023
487  if (output[ibin] > MAX_OUTPUT)
488  output[ibin] = MAX_OUTPUT;
489  }
490  outcoder_->compress(output, finegrain, result);
491 }
int presamples() const
access presample information
const HcalTPGCompressor * outcoder_
std::vector< IntegerCaloSamples > SumFGContainer
int size() const
get the size
void compress(const IntegerCaloSamples &ics, const std::vector< int > &fineGrain, HcalTriggerPrimitiveDigi &digi) const
static unsigned int const shift
DetId id() const
get the (generic) id
void HcalTriggerPrimitiveAlgo::analyzeHF2016 ( const IntegerCaloSamples SAMPLES,
HcalTriggerPrimitiveDigi result,
const int  HF_LUMI_SHIFT,
const HcalFeatureBit HCALFEM 
)
private

Definition at line 493 of file HcalTriggerPrimitiveAlgo.cc.

References newFWLiteAna::bin, HcalTPGCompressor::compress(), FG_HF_thresholds_, HcalFeatureBit::fineGrainbit(), FIRST_FINEGRAIN_TOWER, IntegerCaloSamples::id(), B2GTnPMonitor_cfi::item, min(), numberOfPresamplesHF_, numberOfSamplesHF_, outcoder_, convertSQLitetoXML_cfg::output, IntegerCaloSamples::presamples(), QIE8_LINEARIZATION_ET, IntegerCaloSamples::size(), and theHFDetailMap.

Referenced by addDigis(), and run().

496  {
497  // Align digis and TP
498  const int SHIFT = samples.presamples() - numberOfPresamplesHF_;
499  assert(SHIFT >= 0);
500  assert((SHIFT + numberOfSamplesHF_) <= samples.size());
501 
502  // Try to find the HFDetails from the map corresponding to our samples
503  const HcalTrigTowerDetId detId(samples.id());
504  HFDetailMap::const_iterator it = theHFDetailMap.find(detId);
505  // Missing values will give an empty digi
506  if (it == theHFDetailMap.end()) {
507  return;
508  }
509 
510  std::vector<std::bitset<2>> finegrain(numberOfSamplesHF_, false);
511 
512  // Set up out output of IntergerCaloSamples
514  output.setPresamples(numberOfPresamplesHF_);
515 
516  for (const auto& item : it->second) {
517  auto& details = item.second;
518  for (int ibin = 0; ibin < numberOfSamplesHF_; ++ibin) {
519  const int IDX = ibin + SHIFT;
520  int long_fiber_val = 0;
521  if (IDX < details.long_fiber.size()) {
522  long_fiber_val = details.long_fiber[IDX];
523  }
524  int short_fiber_val = 0;
525  if (IDX < details.short_fiber.size()) {
526  short_fiber_val = details.short_fiber[IDX];
527  }
528  output[ibin] += (long_fiber_val + short_fiber_val);
529 
530  uint32_t ADCLong = details.LongDigi[ibin].adc();
531  uint32_t ADCShort = details.ShortDigi[ibin].adc();
532 
533  if (details.LongDigi.id().ietaAbs() >= FIRST_FINEGRAIN_TOWER) {
534  finegrain[ibin][1] = (ADCLong > FG_HF_thresholds_[0] || ADCShort > FG_HF_thresholds_[0]);
535 
536  if (embit != nullptr)
537  finegrain[ibin][0] = embit->fineGrainbit(details.ShortDigi, details.LongDigi, ibin);
538  }
539  }
540  }
541 
542  for (int bin = 0; bin < numberOfSamplesHF_; ++bin) {
543  static const unsigned int MAX_OUTPUT = QIE8_LINEARIZATION_ET; // QIE8_LINEARIZATION_ET = 1023
544  output[bin] = min({MAX_OUTPUT, output[bin] >> hf_lumi_shift});
545  }
546 
547  std::vector<int> finegrain_converted;
548  for (const auto& fg : finegrain)
549  finegrain_converted.push_back(fg.to_ulong());
550  outcoder_->compress(output, finegrain_converted, result);
551 }
std::vector< uint32_t > FG_HF_thresholds_
const HcalTPGCompressor * outcoder_
Definition: helper.h:70
T min(T a, T b)
Definition: MathUtil.h:58
void compress(const IntegerCaloSamples &ics, const std::vector< int > &fineGrain, HcalTriggerPrimitiveDigi &digi) const
void HcalTriggerPrimitiveAlgo::analyzeHFQIE10 ( const IntegerCaloSamples SAMPLES,
HcalTriggerPrimitiveDigi result,
const int  HF_LUMI_SHIFT,
const HcalFeatureBit HCALFEM 
)
private

Definition at line 581 of file HcalTriggerPrimitiveAlgo.cc.

References newFWLiteAna::bin, HcalTPGCompressor::compress(), FG_HF_thresholds_, HcalFeatureBit::fineGrainbit(), FIRST_FINEGRAIN_TOWER, mps_fire::i, IntegerCaloSamples::id(), training_settings::idx, createfilelist::int, B2GTnPMonitor_cfi::item, min(), numberOfPresamplesHF_, numberOfSamplesHF_, or, outcoder_, convertSQLitetoXML_cfg::output, IntegerCaloSamples::presamples(), QIE10_LINEARIZATION_ET, QIE10_MAX_LINEARIZATION_ET, edm::shift, IntegerCaloSamples::size(), theHFUpgradeDetailMap, and useTDCInMinBiasBits_.

Referenced by addDigis(), and run().

584  {
585  // Align digis and TP
586  const int shift = samples.presamples() - numberOfPresamplesHF_;
587  assert(shift >= 0);
588  assert((shift + numberOfSamplesHF_) <= samples.size());
589  assert(hf_lumi_shift >= 2);
590 
591  // Try to find the HFDetails from the map corresponding to our samples
592  const HcalTrigTowerDetId detId(samples.id());
593  auto it = theHFUpgradeDetailMap.find(detId);
594  // Missing values will give an empty digi
595  if (it == theHFUpgradeDetailMap.end()) {
596  return;
597  }
598 
599  std::vector<std::bitset<2>> finegrain(numberOfSamplesHF_, false);
600 
601  // Set up out output of IntergerCaloSamples
603  output.setPresamples(numberOfPresamplesHF_);
604 
605  for (const auto& item : it->second) {
606  auto& details = item.second;
607  for (int ibin = 0; ibin < numberOfSamplesHF_; ++ibin) {
608  const int idx = ibin + shift;
609 
610  int long_fiber_val = 0;
611  int long_fiber_count = 0;
612  int short_fiber_val = 0;
613  int short_fiber_count = 0;
614 
615  bool saturated = false;
616 
617  for (auto i : {0, 2}) {
618  if (idx < details[i].samples.size() and details[i].validity[idx] and details[i].passTDC[idx]) {
619  long_fiber_val += details[i].samples[idx];
620  saturated = saturated || (details[i].samples[idx] == QIE10_LINEARIZATION_ET);
621  ++long_fiber_count;
622  }
623  }
624  for (auto i : {1, 3}) {
625  if (idx < details[i].samples.size() and details[i].validity[idx] and details[i].passTDC[idx]) {
626  short_fiber_val += details[i].samples[idx];
627  saturated = saturated || (details[i].samples[idx] == QIE10_LINEARIZATION_ET);
628  ++short_fiber_count;
629  }
630  }
631 
632  if (saturated) {
634  } else {
635  // For details of the energy handling, see:
636  // https://cms-docdb.cern.ch/cgi-bin/DocDB/ShowDocument?docid=12306
637  // If both readouts are valid, average of the two energies is taken
638  // division by 2 is compensated by adjusting the total scale shift in the end
639  if (long_fiber_count == 2)
640  long_fiber_val >>= 1;
641  if (short_fiber_count == 2)
642  short_fiber_val >>= 1;
643 
644  auto sum = long_fiber_val + short_fiber_val;
645  // Similar to above, if both channels are valid,
646  // average of the two energies is calculated
647  // division by 2 here is also compensated by adjusting the total scale shift in the end
648  if (long_fiber_count > 0 and short_fiber_count > 0)
649  sum >>= 1;
650 
651  output[ibin] += sum;
652  }
653 
654  for (const auto& detail : details) {
655  if (idx < int(detail.digi.size()) and detail.validity[idx] and
656  HcalDetId(detail.digi.id()).ietaAbs() >= FIRST_FINEGRAIN_TOWER) {
657  if (useTDCInMinBiasBits_ && !detail.passTDC[idx])
658  continue;
659  finegrain[ibin][1] = finegrain[ibin][1] or detail.fgbits[idx][0];
660  // what is commonly called the "second" HF min-bias bit is
661  // actually the 0-th bit, which can also be used instead for the EM bit
662  // (called finegrain[ibin][0] below) in non-HI running
663  finegrain[ibin][0] = finegrain[ibin][0] or detail.fgbits[idx][1];
664  }
665  }
666  // the EM bit is only used if the "second" FG bit is disabled
667  if (embit != nullptr and FG_HF_thresholds_.at(1) != 255) {
668  finegrain[ibin][0] = embit->fineGrainbit(details[1].digi,
669  details[3].digi,
670  details[0].digi,
671  details[2].digi,
672  details[1].validity[idx],
673  details[3].validity[idx],
674  details[0].validity[idx],
675  details[2].validity[idx],
676  idx);
677  }
678  }
679  }
680 
681  for (int bin = 0; bin < numberOfSamplesHF_; ++bin) {
682  output[bin] = min({(unsigned int)QIE10_MAX_LINEARIZATION_ET, output[bin] >> (hf_lumi_shift - 2)});
683  }
684  std::vector<int> finegrain_converted;
685  for (const auto& fg : finegrain)
686  finegrain_converted.push_back(fg.to_ulong());
687  outcoder_->compress(output, finegrain_converted, result);
688 }
std::vector< uint32_t > FG_HF_thresholds_
HFUpgradeDetailMap theHFUpgradeDetailMap
static const int QIE10_MAX_LINEARIZATION_ET
const HcalTPGCompressor * outcoder_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
Definition: helper.h:70
T min(T a, T b)
Definition: MathUtil.h:58
void compress(const IntegerCaloSamples &ics, const std::vector< int > &fineGrain, HcalTriggerPrimitiveDigi &digi) const
static unsigned int const shift
void HcalTriggerPrimitiveAlgo::analyzeQIE11 ( IntegerCaloSamples samples,
HcalTriggerPrimitiveDigi result,
const HcalFinegrainBit fg_algo 
)
private

Definition at line 369 of file HcalTriggerPrimitiveAlgo.cc.

References HcalTPGCompressor::compress(), HcalFinegrainBit::compute(), fgUpgradeMap_, mps_fire::i, IntegerCaloSamples::id(), photons_cff::ids, training_settings::idx, createfilelist::int, numberOfPresamples_, numberOfSamples_, outcoder_, convertSQLitetoXML_cfg::output, peak_finder_algorithm_, IntegerCaloSamples::presamples(), QIE11_MAX_LINEARIZATION_ET, simplePhotonAnalyzer_cfi::sample, edm::shift, IntegerCaloSamples::size(), theThreshold, theTrigTowerGeometry, HcalTrigTowerGeometry::towerIds(), and weights_.

Referenced by addDigis(), and run().

371  {
372  int shrink = weights_.size() - 1;
373  auto& msb = fgUpgradeMap_[samples.id()];
374  IntegerCaloSamples sum(samples.id(), samples.size());
375 
376  HcalDetId detId(samples.id());
377  std::vector<HcalTrigTowerDetId> ids = theTrigTowerGeometry->towerIds(detId);
378  //slide algo window
379  for (int ibin = 0; ibin < int(samples.size()) - shrink; ++ibin) {
380  int algosumvalue = 0;
381  for (unsigned int i = 0; i < weights_.size(); i++) {
382  //add up value * scale factor
383  // In addition, divide by two in the 10 degree phi segmentation region
384  // to mimic 5 degree segmentation for the trigger
385  unsigned int sample = samples[ibin + i];
386  if (sample > QIE11_MAX_LINEARIZATION_ET)
388  if (ids.size() == 2)
389  algosumvalue += int(sample * 0.5 * weights_[i]);
390  else
391  algosumvalue += int(sample * weights_[i]);
392  }
393  if (algosumvalue < 0)
394  sum[ibin] = 0; // low-side
395  //high-side
396  //else if (algosumvalue>QIE11_LINEARIZATION_ET) sum[ibin]=QIE11_LINEARIZATION_ET;
397  else
398  sum[ibin] = algosumvalue; //assign value to sum[]
399  }
400 
401  // Align digis and TP
402  int dgPresamples = samples.presamples();
403  int tpPresamples = numberOfPresamples_;
404  int shift = dgPresamples - tpPresamples;
405  int dgSamples = samples.size();
406  int tpSamples = numberOfSamples_;
407 
408  if ((shift < shrink) || (shift + tpSamples + shrink > dgSamples - (peak_finder_algorithm_ - 1))) {
409  edm::LogInfo("HcalTriggerPrimitiveAlgo::analyze") << "TP presample or size from the configuration file is out of "
410  "the accessible range. Using digi values from data instead...";
411  shift = shrink;
412  tpPresamples = dgPresamples - shrink;
413  tpSamples = dgSamples - (peak_finder_algorithm_ - 1) - shrink - shift;
414  }
415 
416  std::vector<int> finegrain(tpSamples, false);
417 
418  IntegerCaloSamples output(samples.id(), tpSamples);
419  output.setPresamples(tpPresamples);
420 
421  for (int ibin = 0; ibin < tpSamples; ++ibin) {
422  // ibin - index for output TP
423  // idx - index for samples + shift
424  int idx = ibin + shift;
425  bool isPeak = (sum[idx] > sum[idx - 1] && sum[idx] >= sum[idx + 1] && sum[idx] > theThreshold);
426 
427  if (isPeak) {
428  output[ibin] = std::min<unsigned int>(sum[idx], QIE11_MAX_LINEARIZATION_ET);
429  } else {
430  // Not a peak
431  output[ibin] = 0;
432  }
433  // peak-finding is not applied for FG bits
434  finegrain[ibin] = fg_algo.compute(msb[idx]).to_ulong();
435  }
436  outcoder_->compress(output, finegrain, result);
437 }
int presamples() const
access presample information
std::vector< HcalTrigTowerDetId > towerIds(const HcalDetId &cellId) const
the mapping to and from DetIds
const HcalTPGCompressor * outcoder_
int size() const
get the size
const HcalTrigTowerGeometry * theTrigTowerGeometry
std::bitset< 4 > compute(const Tower &) const
void compress(const IntegerCaloSamples &ics, const std::vector< int > &fineGrain, HcalTriggerPrimitiveDigi &digi) const
static const int QIE11_MAX_LINEARIZATION_ET
static unsigned int const shift
DetId id() const
get the (generic) id
bool HcalTriggerPrimitiveAlgo::needLegacyFG ( const HcalTrigTowerDetId id) const
private

Definition at line 782 of file HcalTriggerPrimitiveAlgo.cc.

References HBHE_OVERLAP_TOWER, and upgrade_hb_.

Referenced by addDigis(), and addUpgradeFG().

782  {
783  // This tower (ietaAbs == 16) does not accept upgraded FG bits,
784  // but needs pseudo legacy ones to ensure that the tower is processed
785  // even when the QIE8 depths in front of it do not have energy deposits.
786  if (id.ietaAbs() == HBHE_OVERLAP_TOWER and not upgrade_hb_)
787  return true;
788  return false;
789 }
void HcalTriggerPrimitiveAlgo::overrideParameters ( const edm::ParameterSet ps)

Definition at line 75 of file HcalTriggerPrimitiveAlgo.cc.

References edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), override_adc_hf_, override_adc_hf_value_, override_parameters_, override_tdc_hf_, and override_tdc_hf_value_.

Referenced by addDigis(), and HcalTrigPrimDigiProducer::HcalTrigPrimDigiProducer().

75  {
77 
78  if (override_parameters_.exists("ADCThresholdHF")) {
79  override_adc_hf_ = true;
80  override_adc_hf_value_ = override_parameters_.getParameter<uint32_t>("ADCThresholdHF");
81  }
82  if (override_parameters_.exists("TDCMaskHF")) {
83  override_tdc_hf_ = true;
84  override_tdc_hf_value_ = override_parameters_.getParameter<unsigned long long>("TDCMaskHF");
85  }
86 }
T getParameter(std::string const &) const
bool exists(std::string const &parameterName) const
checks if a parameter exists
unsigned long long override_tdc_hf_value_
bool HcalTriggerPrimitiveAlgo::passTDC ( const QIE10DataFrame digi,
int  ts 
) const
private

Definition at line 553 of file HcalTriggerPrimitiveAlgo.cc.

References ecalMGPA::adc(), conditions_, HcalTPParameters::getADCThresholdHF(), HcalDbService::getHcalTPParameters(), override_adc_hf_, override_adc_hf_value_, override_tdc_hf_, and override_tdc_hf_value_.

Referenced by addDigis(), and addSignal().

553  {
555  auto adc_threshold = parameters->getADCThresholdHF();
556  auto tdc_mask = parameters->getTDCMaskHF();
557 
558  if (override_adc_hf_)
559  adc_threshold = override_adc_hf_value_;
560  if (override_tdc_hf_)
561  tdc_mask = override_tdc_hf_value_;
562 
563  if (digi[ts].adc() < adc_threshold)
564  return true;
565 
566  return (1ul << digi[ts].le_tdc()) & tdc_mask;
567 }
const HcalDbService * conditions_
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
unsigned long long override_tdc_hf_value_
const HcalTPParameters * getHcalTPParameters() const
int getADCThresholdHF() const
get ADC threshold fof TDC mask of HF
template<typename... Digis>
void HcalTriggerPrimitiveAlgo::run ( const HcalTPGCoder incoder,
const HcalTPGCompressor outcoder,
const HcalDbService conditions,
HcalTrigPrimDigiCollection result,
const HcalTrigTowerGeometry trigTowerGeometry,
float  rctlsb,
const HcalFeatureBit LongvrsShortCut,
const Digis &...  digis 
)

Definition at line 223 of file HcalTriggerPrimitiveAlgo.h.

References addDigis(), analyze(), analyzeHF(), analyzeHF2016(), analyzeHFQIE10(), analyzeQIE11(), edm::SortedCollection< T, SORT >::back(), conditions_, edm::ParameterSet::exists(), fgMap_, fgUpgradeMap_, HcalTrigTowerGeometry::firstHFTower(), HcalTPParameters::getFGVersionHBHE(), HcalDbService::getHcalTPParameters(), edm::ParameterSet::getParameter(), HF_Veto, incoder_, B2GTnPMonitor_cfi::item, LongvrsShortCut, NCTScaleShift, or, outcoder_, override_parameters_, edm::SortedCollection< T, SORT >::push_back(), RCTScaleShift, theHFDetailMap, theHFUpgradeDetailMap, theSumMap, theTowerMapFGSum, theTrigTowerGeometry, upgrade_hb_, upgrade_he_, upgrade_hf_, and BeamSplash_cfg::version.

Referenced by HcalTrigPrimDigiProducer::produce().

230  {
231  theTrigTowerGeometry = trigTowerGeometry;
232 
233  incoder_ = dynamic_cast<const HcaluLUTTPGCoder*>(incoder);
234  outcoder_ = outcoder;
235  conditions_ = conditions;
236 
237  theSumMap.clear();
238  theTowerMapFGSum.clear();
239  HF_Veto.clear();
240  fgMap_.clear();
241  fgUpgradeMap_.clear();
242  theHFDetailMap.clear();
243  theHFUpgradeDetailMap.clear();
244 
245  // Add all digi collections
246  addDigis(digis...);
247 
248  // Prepare the fine-grain calculation algorithm for HB/HE
249  int version = 0;
252  if (override_parameters_.exists("FGVersionHBHE"))
253  version = override_parameters_.getParameter<uint32_t>("FGVersionHBHE");
254  HcalFinegrainBit fg_algo(version);
255 
256  // VME produces additional bits on the front used by lumi but not the
257  // trigger, this shift corrects those out by right shifting over them.
258  for (auto& item : theSumMap) {
259  result.push_back(HcalTriggerPrimitiveDigi(item.first));
260  HcalTrigTowerDetId detId(item.second.id());
261  if (detId.ietaAbs() >= theTrigTowerGeometry->firstHFTower(detId.version())) {
262  if (detId.version() == 0) {
263  analyzeHF(item.second, result.back(), RCTScaleShift);
264  } else if (detId.version() == 1) {
265  if (upgrade_hf_)
267  else
269  } else {
270  // Things are going to go poorly
271  }
272  } else {
273  // Determine which energy reconstruction path to take based on the
274  // fine-grain availability:
275  // * QIE8 TP add entries into fgMap_
276  // * QIE11 TP add entries into fgUpgradeMap_
277  // (not for tower 16 unless HB is upgraded, too)
278  if (fgMap_.find(item.first) != fgMap_.end()) {
279  analyze(item.second, result.back());
280  } else if (fgUpgradeMap_.find(item.first) != fgUpgradeMap_.end()) {
281  analyzeQIE11(item.second, result.back(), fg_algo);
282  }
283  }
284  }
285 
286  // Free up some memory
287  theSumMap.clear();
288  theTowerMapFGSum.clear();
289  HF_Veto.clear();
290  fgMap_.clear();
291  fgUpgradeMap_.clear();
292  theHFDetailMap.clear();
293  theHFUpgradeDetailMap.clear();
294 
295  return;
296 }
T getParameter(std::string const &) const
void analyze(IntegerCaloSamples &samples, HcalTriggerPrimitiveDigi &result)
adds the actual digis
HFUpgradeDetailMap theHFUpgradeDetailMap
void analyzeHF(IntegerCaloSamples &samples, HcalTriggerPrimitiveDigi &result, const int hf_lumi_shift)
void analyzeHF2016(const IntegerCaloSamples &SAMPLES, HcalTriggerPrimitiveDigi &result, const int HF_LUMI_SHIFT, const HcalFeatureBit *HCALFEM)
void analyzeHFQIE10(const IntegerCaloSamples &SAMPLES, HcalTriggerPrimitiveDigi &result, const int HF_LUMI_SHIFT, const HcalFeatureBit *HCALFEM)
bool exists(std::string const &parameterName) const
checks if a parameter exists
void push_back(T const &t)
const HcalTPGCompressor * outcoder_
void analyzeQIE11(IntegerCaloSamples &samples, HcalTriggerPrimitiveDigi &result, const HcalFinegrainBit &fg_algo)
const HcalTrigTowerGeometry * theTrigTowerGeometry
const HcalDbService * conditions_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
int getFGVersionHBHE() const
get FineGrain Algorithm Version for HBHE
void addDigis(const T &collection, const Args &...digis)
const HcalTPParameters * getHcalTPParameters() const
const HcaluLUTTPGCoder * incoder_
const_reference back() const
int firstHFTower(int version) const
void HcalTriggerPrimitiveAlgo::runFEFormatError ( const FEDRawDataCollection rawraw,
const HcalElectronicsMap emap,
HcalTrigPrimDigiCollection result 
)

Definition at line 706 of file HcalTriggerPrimitiveAlgo.cc.

References edm::SortedCollection< T, SORT >::begin(), HcalHTRData::check(), FEDRawData::data(), DetId::det(), runTauDisplay::eid, edm::SortedCollection< T, SORT >::end(), FEDRawDataCollection::FEDData(), HcalHTRData::getErrorsWord(), HcalDCCHeader::getSourceId(), HcalDCCHeader::getSpigotData(), HcalDCCHeader::getSpigotPresent(), HcalBarrel, HcalEndcap, HcalForward, HcalHTRData::htrSlot(), HcalHTRData::htrTopBottom(), mps_fire::i, photons_cff::ids, HcalHTRData::isHistogramEvent(), HcalElectronicsMap::lookup(), FEDNumbering::MAXHCALFEDID, FEDNumbering::MINHCALFEDID, DetId::null(), HcalHTRData::readoutVMECrateId(), HcalElectronicsId::setHTR(), FEDRawData::size(), HcalDCCHeader::SPIGOT_COUNT, DetId::subdetId(), theTrigTowerGeometry, HcalTrigTowerGeometry::towerIds(), and validateGeometry_cfg::valid.

Referenced by addDigis(), and HcalTrigPrimDigiProducer::produce().

708  {
709  std::set<uint32_t> FrontEndErrors;
710 
712  const FEDRawData& raw = rawraw->FEDData(i);
713  if (raw.size() < 12)
714  continue;
715  const HcalDCCHeader* dccHeader = (const HcalDCCHeader*)(raw.data());
716  if (!dccHeader)
717  continue;
718  HcalHTRData htr;
719  for (int spigot = 0; spigot < HcalDCCHeader::SPIGOT_COUNT; spigot++) {
720  if (!dccHeader->getSpigotPresent(spigot))
721  continue;
722  dccHeader->getSpigotData(spigot, htr, raw.size());
723  int dccid = dccHeader->getSourceId();
724  int errWord = htr.getErrorsWord() & 0x1FFFF;
725  bool HTRError = (!htr.check() || htr.isHistogramEvent() || (errWord & 0x800) != 0);
726 
727  if (HTRError) {
728  bool valid = false;
729  for (int fchan = 0; fchan < 3 && !valid; fchan++) {
730  for (int fib = 0; fib < 9 && !valid; fib++) {
731  HcalElectronicsId eid(fchan, fib, spigot, dccid - FEDNumbering::MINHCALFEDID);
732  eid.setHTR(htr.readoutVMECrateId(), htr.htrSlot(), htr.htrTopBottom());
733  DetId detId = emap->lookup(eid);
734  if (detId.null())
735  continue;
736  HcalSubdetector subdet = (HcalSubdetector(detId.subdetId()));
737  if (detId.det() != 4 || (subdet != HcalBarrel && subdet != HcalEndcap && subdet != HcalForward))
738  continue;
739  std::vector<HcalTrigTowerDetId> ids = theTrigTowerGeometry->towerIds(detId);
740  for (std::vector<HcalTrigTowerDetId>::const_iterator triggerId = ids.begin(); triggerId != ids.end();
741  ++triggerId) {
742  FrontEndErrors.insert(triggerId->rawId());
743  }
744  //valid = true;
745  }
746  }
747  }
748  }
749  }
750 
751  // Loop over TP collection
752  // Set TP to zero if there is FE Format Error
753  HcalTriggerPrimitiveSample zeroSample(0);
754  for (HcalTrigPrimDigiCollection::iterator tp = result.begin(); tp != result.end(); ++tp) {
755  if (FrontEndErrors.find(tp->id().rawId()) != FrontEndErrors.end()) {
756  for (int i = 0; i < tp->size(); ++i)
757  tp->setSample(i, zeroSample);
758  }
759  }
760 }
bool check() const
Check for a good event Requires a minimum length, matching wordcount and length, not an empty event...
Definition: HcalHTRData.cc:63
std::vector< HcalTrigTowerDetId > towerIds(const HcalDetId &cellId) const
the mapping to and from DetIds
unsigned int htrTopBottom() const
HcalElectronicsId-style HTR top/bottom (1=top/0=bottom)
Definition: HcalHTRData.cc:369
constexpr bool null() const
is this a null id ?
Definition: DetId.h:59
int getSpigotData(int nspigot, HcalHTRData &decodeTool, int validSize) const
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:45
unsigned int htrSlot() const
HcalElectronicsId-style HTR slot.
Definition: HcalHTRData.cc:365
const HcalTrigTowerGeometry * theTrigTowerGeometry
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
HcalSubdetector
Definition: HcalAssistant.h:31
bool getSpigotPresent(unsigned int nspigot) const
Read the "PRESENT" bit for this spigot.
std::vector< T >::iterator iterator
const_iterator end() const
int getSourceId() const
Definition: HcalDCCHeader.h:32
Definition: DetId.h:17
unsigned int getErrorsWord() const
Get the errors word.
Definition: HcalHTRData.h:162
unsigned int readoutVMECrateId() const
HcalElectronicsId-style VME crate number.
Definition: HcalHTRData.cc:373
static const int SPIGOT_COUNT
Definition: HcalDCCHeader.h:19
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:24
Readout chain identification for Hcal.
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
bool isHistogramEvent() const
Is this event a histogram event? (do not call standard unpack in this case!!!!!)
Definition: HcalHTRData.cc:409
const_iterator begin() const
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
void HcalTriggerPrimitiveAlgo::runZS ( HcalTrigPrimDigiCollection tp)

Definition at line 690 of file HcalTriggerPrimitiveAlgo.cc.

References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), mps_fire::i, CaloTPGTranscoder_cfi::ZS, and ZS_threshold_I_.

Referenced by addDigis(), and HcalTrigPrimDigiProducer::produce().

690  {
691  for (HcalTrigPrimDigiCollection::iterator tp = result.begin(); tp != result.end(); ++tp) {
692  bool ZS = true;
693  for (int i = 0; i < tp->size(); ++i) {
694  if (tp->sample(i).compressedEt() > ZS_threshold_I_) {
695  ZS = false;
696  break;
697  }
698  }
699  if (ZS)
700  tp->setZSInfo(false, true);
701  else
702  tp->setZSInfo(true, false);
703  }
704 }
std::vector< T >::iterator iterator
size_type size() const
void HcalTriggerPrimitiveAlgo::setNCTScaleShift ( int  shift)

Definition at line 820 of file HcalTriggerPrimitiveAlgo.cc.

References NCTScaleShift, and edm::shift.

Referenced by addDigis(), and HcalTrigPrimDigiProducer::HcalTrigPrimDigiProducer().

820 { NCTScaleShift = shift; }
static unsigned int const shift
void HcalTriggerPrimitiveAlgo::setPeakFinderAlgorithm ( int  algo)

Definition at line 814 of file HcalTriggerPrimitiveAlgo.cc.

References ecalcalib_dqm_sourceclient-live_cfg::algo, Exception, and peak_finder_algorithm_.

Referenced by addDigis(), and HcalTrigPrimDigiProducer::HcalTrigPrimDigiProducer().

814  {
815  if (algo <= 0 && algo > 2)
816  throw cms::Exception("ERROR: Only algo 1 & 2 are supported.") << std::endl;
818 }
void HcalTriggerPrimitiveAlgo::setRCTScaleShift ( int  shift)

Definition at line 822 of file HcalTriggerPrimitiveAlgo.cc.

References RCTScaleShift, and edm::shift.

Referenced by addDigis(), and HcalTrigPrimDigiProducer::HcalTrigPrimDigiProducer().

822 { RCTScaleShift = shift; }
static unsigned int const shift
void HcalTriggerPrimitiveAlgo::setUpgradeFlags ( bool  hb,
bool  he,
bool  hf 
)
bool HcalTriggerPrimitiveAlgo::validChannel ( const QIE10DataFrame digi,
int  ts 
) const
private

Definition at line 569 of file HcalTriggerPrimitiveAlgo.cc.

References conditions_, HcalDbService::getHcalTPChannelParameter(), HcalTPChannelParameter::getMask(), QIE10DataFrame::id(), QIE10DataFrame::linkError(), and QIE10DataFrame::samples().

Referenced by addDigis(), and addSignal().

569  {
570  // channels with invalid data should not contribute to the sum
571  if (digi.linkError() || ts >= digi.samples() || !digi[ts].ok())
572  return false;
573 
574  auto mask = conditions_->getHcalTPChannelParameter(HcalDetId(digi.id()))->getMask();
575  if (mask)
576  return false;
577 
578  return true;
579 }
int samples() const
total number of samples in the digi
const HcalTPChannelParameter * getHcalTPChannelParameter(const HcalGenericDetId &fId) const
bool linkError() const
edm::DataFrame::id_type id() const
const HcalDbService * conditions_
uint32_t getMask() const
get mask for channel validity and self trigger information
bool HcalTriggerPrimitiveAlgo::validUpgradeFG ( const HcalTrigTowerDetId id,
int  depth 
) const
private

Definition at line 772 of file HcalTriggerPrimitiveAlgo.cc.

References HBHE_OVERLAP_TOWER, LAST_FINEGRAIN_DEPTH, LAST_FINEGRAIN_TOWER, and upgrade_hb_.

Referenced by addDigis(), and addUpgradeFG().

772  {
774  return false;
775  if (id.ietaAbs() > LAST_FINEGRAIN_TOWER)
776  return false;
777  if (id.ietaAbs() == HBHE_OVERLAP_TOWER and not upgrade_hb_)
778  return false;
779  return true;
780 }

Member Data Documentation

const HcalDbService* HcalTriggerPrimitiveAlgo::conditions_
private

Definition at line 119 of file HcalTriggerPrimitiveAlgo.h.

Referenced by passTDC(), run(), and validChannel().

std::vector<uint32_t> HcalTriggerPrimitiveAlgo::FG_HF_thresholds_
private

Definition at line 125 of file HcalTriggerPrimitiveAlgo.h.

Referenced by analyzeHF2016(), and analyzeHFQIE10().

uint32_t HcalTriggerPrimitiveAlgo::FG_threshold_
private

Definition at line 124 of file HcalTriggerPrimitiveAlgo.h.

Referenced by analyzeHF().

FGbitMap HcalTriggerPrimitiveAlgo::fgMap_
private

Definition at line 189 of file HcalTriggerPrimitiveAlgo.h.

Referenced by addFG(), analyze(), and run().

FGUpgradeMap HcalTriggerPrimitiveAlgo::fgUpgradeMap_
private

Definition at line 193 of file HcalTriggerPrimitiveAlgo.h.

Referenced by addUpgradeFG(), analyzeQIE11(), and run().

const int HcalTriggerPrimitiveAlgo::FIRST_FINEGRAIN_TOWER = 30
staticprivate

Definition at line 212 of file HcalTriggerPrimitiveAlgo.h.

Referenced by analyzeHF2016(), and analyzeHFQIE10().

const int HcalTriggerPrimitiveAlgo::HBHE_OVERLAP_TOWER = 16
staticprivate

Definition at line 207 of file HcalTriggerPrimitiveAlgo.h.

Referenced by needLegacyFG(), and validUpgradeFG().

TowerMapVeto HcalTriggerPrimitiveAlgo::HF_Veto
private

Definition at line 186 of file HcalTriggerPrimitiveAlgo.h.

Referenced by addSignal(), analyzeHF(), and run().

const HcaluLUTTPGCoder* HcalTriggerPrimitiveAlgo::incoder_
private

Definition at line 117 of file HcalTriggerPrimitiveAlgo.h.

Referenced by addSignal(), and run().

const int HcalTriggerPrimitiveAlgo::LAST_FINEGRAIN_DEPTH = 6
staticprivate

Definition at line 208 of file HcalTriggerPrimitiveAlgo.h.

Referenced by validUpgradeFG().

const int HcalTriggerPrimitiveAlgo::LAST_FINEGRAIN_TOWER = 28
staticprivate

Definition at line 209 of file HcalTriggerPrimitiveAlgo.h.

Referenced by validUpgradeFG().

int HcalTriggerPrimitiveAlgo::latency_
private

Definition at line 123 of file HcalTriggerPrimitiveAlgo.h.

HcalFeatureBit* HcalTriggerPrimitiveAlgo::LongvrsShortCut
private

Definition at line 184 of file HcalTriggerPrimitiveAlgo.h.

Referenced by run().

uint32_t HcalTriggerPrimitiveAlgo::minSignalThreshold_
private

Definition at line 133 of file HcalTriggerPrimitiveAlgo.h.

Referenced by addSignal().

int HcalTriggerPrimitiveAlgo::NCTScaleShift
private

Definition at line 135 of file HcalTriggerPrimitiveAlgo.h.

Referenced by run(), and setNCTScaleShift().

int HcalTriggerPrimitiveAlgo::numberOfPresamples_
private

Definition at line 129 of file HcalTriggerPrimitiveAlgo.h.

Referenced by analyze(), analyzeQIE11(), and HcalTriggerPrimitiveAlgo().

int HcalTriggerPrimitiveAlgo::numberOfPresamplesHF_
private
int HcalTriggerPrimitiveAlgo::numberOfSamples_
private

Definition at line 128 of file HcalTriggerPrimitiveAlgo.h.

Referenced by analyze(), analyzeQIE11(), and HcalTriggerPrimitiveAlgo().

int HcalTriggerPrimitiveAlgo::numberOfSamplesHF_
private
const HcalTPGCompressor* HcalTriggerPrimitiveAlgo::outcoder_
private
bool HcalTriggerPrimitiveAlgo::override_adc_hf_ = false
private

Definition at line 201 of file HcalTriggerPrimitiveAlgo.h.

Referenced by overrideParameters(), and passTDC().

uint32_t HcalTriggerPrimitiveAlgo::override_adc_hf_value_
private

Definition at line 202 of file HcalTriggerPrimitiveAlgo.h.

Referenced by overrideParameters(), and passTDC().

edm::ParameterSet HcalTriggerPrimitiveAlgo::override_parameters_
private

Definition at line 199 of file HcalTriggerPrimitiveAlgo.h.

Referenced by overrideParameters(), and run().

bool HcalTriggerPrimitiveAlgo::override_tdc_hf_ = false
private

Definition at line 203 of file HcalTriggerPrimitiveAlgo.h.

Referenced by overrideParameters(), and passTDC().

unsigned long long HcalTriggerPrimitiveAlgo::override_tdc_hf_value_
private

Definition at line 204 of file HcalTriggerPrimitiveAlgo.h.

Referenced by overrideParameters(), and passTDC().

int HcalTriggerPrimitiveAlgo::peak_finder_algorithm_
private

Definition at line 142 of file HcalTriggerPrimitiveAlgo.h.

Referenced by analyze(), analyzeQIE11(), and setPeakFinderAlgorithm().

bool HcalTriggerPrimitiveAlgo::peakfind_
private

Definition at line 121 of file HcalTriggerPrimitiveAlgo.h.

Referenced by analyze(), and HcalTriggerPrimitiveAlgo().

uint32_t HcalTriggerPrimitiveAlgo::PMT_NoiseThreshold_
private

Definition at line 134 of file HcalTriggerPrimitiveAlgo.h.

Referenced by analyzeHF().

const int HcalTriggerPrimitiveAlgo::QIE10_LINEARIZATION_ET = HcaluLUTTPGCoder::QIE10_LUT_BITMASK
staticprivate

Definition at line 215 of file HcalTriggerPrimitiveAlgo.h.

Referenced by analyzeHFQIE10().

const int HcalTriggerPrimitiveAlgo::QIE10_MAX_LINEARIZATION_ET = 0x7FF
staticprivate

Definition at line 218 of file HcalTriggerPrimitiveAlgo.h.

Referenced by analyzeHFQIE10().

const int HcalTriggerPrimitiveAlgo::QIE11_LINEARIZATION_ET = HcaluLUTTPGCoder::QIE11_LUT_BITMASK
staticprivate

Definition at line 216 of file HcalTriggerPrimitiveAlgo.h.

const int HcalTriggerPrimitiveAlgo::QIE11_MAX_LINEARIZATION_ET = 0x7FF
staticprivate

Definition at line 219 of file HcalTriggerPrimitiveAlgo.h.

Referenced by analyzeQIE11().

const int HcalTriggerPrimitiveAlgo::QIE8_LINEARIZATION_ET = HcaluLUTTPGCoder::QIE8_LUT_BITMASK
staticprivate

Definition at line 214 of file HcalTriggerPrimitiveAlgo.h.

Referenced by analyze(), analyzeHF(), and analyzeHF2016().

int HcalTriggerPrimitiveAlgo::RCTScaleShift
private

Definition at line 136 of file HcalTriggerPrimitiveAlgo.h.

Referenced by run(), and setRCTScaleShift().

HFDetailMap HcalTriggerPrimitiveAlgo::theHFDetailMap
private

Definition at line 159 of file HcalTriggerPrimitiveAlgo.h.

Referenced by addSignal(), analyzeHF2016(), and run().

HFUpgradeDetailMap HcalTriggerPrimitiveAlgo::theHFUpgradeDetailMap
private

Definition at line 169 of file HcalTriggerPrimitiveAlgo.h.

Referenced by addSignal(), analyzeHFQIE10(), and run().

SumMap HcalTriggerPrimitiveAlgo::theSumMap
private

Definition at line 150 of file HcalTriggerPrimitiveAlgo.h.

Referenced by addSignal(), and run().

double HcalTriggerPrimitiveAlgo::theThreshold
private

Definition at line 120 of file HcalTriggerPrimitiveAlgo.h.

Referenced by analyze(), and analyzeQIE11().

TowerMapFGSum HcalTriggerPrimitiveAlgo::theTowerMapFGSum
private

Definition at line 173 of file HcalTriggerPrimitiveAlgo.h.

Referenced by addSignal(), analyzeHF(), and run().

const HcalTrigTowerGeometry* HcalTriggerPrimitiveAlgo::theTrigTowerGeometry
private

Definition at line 147 of file HcalTriggerPrimitiveAlgo.h.

Referenced by addSignal(), analyzeQIE11(), run(), and runFEFormatError().

bool HcalTriggerPrimitiveAlgo::upgrade_hb_ = false
private

Definition at line 195 of file HcalTriggerPrimitiveAlgo.h.

Referenced by needLegacyFG(), run(), setUpgradeFlags(), and validUpgradeFG().

bool HcalTriggerPrimitiveAlgo::upgrade_he_ = false
private

Definition at line 196 of file HcalTriggerPrimitiveAlgo.h.

Referenced by run(), and setUpgradeFlags().

bool HcalTriggerPrimitiveAlgo::upgrade_hf_ = false
private

Definition at line 197 of file HcalTriggerPrimitiveAlgo.h.

Referenced by run(), and setUpgradeFlags().

bool HcalTriggerPrimitiveAlgo::useTDCInMinBiasBits_
private

Definition at line 132 of file HcalTriggerPrimitiveAlgo.h.

Referenced by analyzeHFQIE10().

std::vector<double> HcalTriggerPrimitiveAlgo::weights_
private

Definition at line 122 of file HcalTriggerPrimitiveAlgo.h.

Referenced by analyze(), and analyzeQIE11().

uint32_t HcalTriggerPrimitiveAlgo::ZS_threshold_
private

Definition at line 126 of file HcalTriggerPrimitiveAlgo.h.

Referenced by HcalTriggerPrimitiveAlgo().

int HcalTriggerPrimitiveAlgo::ZS_threshold_I_
private

Definition at line 127 of file HcalTriggerPrimitiveAlgo.h.

Referenced by HcalTriggerPrimitiveAlgo(), and runZS().