CMS 3D CMS Logo

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

#include <EcalEBPhase2TrigPrimAlgo.h>

Public Member Functions

 EcalEBPhase2TrigPrimAlgo (const EcalTrigTowerConstituentsMap *eTTmap, const CaloGeometry *theGeometry, int binofmax, bool debug)
 
void run (const EBDigiCollectionPh2 *col, EcalEBPhase2TrigPrimDigiCollection &result)
 
void setPointers (const EcalLiteDTUPedestalsMap *ecaltpPed, const EcalEBPhase2TPGLinearizationConstMap *ecaltpLin, const EcalTPGCrystalStatus *ecaltpgBadX, const EcalEBPhase2TPGAmplWeightIdMap *ecaltpgAmplWeightMap, const EcalEBPhase2TPGTimeWeightIdMap *ecaltpgTimeWeightMap, const EcalTPGWeightGroup *ecaltpgWeightGroup)
 
virtual ~EcalEBPhase2TrigPrimAlgo ()
 

Private Types

enum  { nbMaxStrips_ = 5 }
 
enum  { nbMaxXtals_ = 5 }
 

Private Member Functions

template<class T >
void clean (std::vector< std::vector< std::pair< int, std::vector< T > > > > &towerMap)
 
void fillMap (EBDigiCollectionPh2 const *col, std::vector< std::vector< std::pair< int, std::vector< EBDataFrame_Ph2 > > > > &towerMap)
 
int findStripNr (const EBDetId &id)
 
EcalEBPhase2AmplitudeReconstructorgetAmplitudeFinder () const
 
int getIndex (const EBDigiCollectionPh2 *, EcalTrigTowerDetId &id)
 
EcalEBPhase2LinearizergetLinearizer () const
 
EcalEBPhase2SpikeTaggergetSpikeTagger () const
 
EcalEBPhase2TimeReconstructorgetTimeFinder () const
 
EcalEBPhase2TPFormattergetTPFormatter () const
 
void init ()
 
template<class T >
void initStructures (std::vector< std::vector< std::pair< int, std::vector< T > > > > &towMap)
 

Private Attributes

std::vector< int > amp_out_
 
EcalEBPhase2AmplitudeReconstructoramplitude_reconstructor_
 
int binOfMaximum_
 
bool debug_
 
const EcalEBPhase2TPGAmplWeightIdMapecaltpgAmplWeightMap_
 
const EcalTPGCrystalStatusecaltpgBadX_
 
const EcalEBPhase2TPGTimeWeightIdMapecaltpgTimeWeightMap_
 
const EcalTPGWeightGroupecaltpgWeightGroup_
 
const EcalEBPhase2TPGLinearizationConstMapecaltpLin_
 
const EcalLiteDTUPedestalsMapecaltpPed_
 
const EcalTrigTowerConstituentsMapeTTmap_ = nullptr
 
std::vector< int > filt_out_
 
std::vector< std::pair< int, EcalTrigTowerDetId > > hitTowers_
 
std::vector< int > lin_out_
 
EcalEBPhase2Linearizerlinearizer_
 
int maxNrSamples_
 
int nrTowers_
 
std::vector< int > outEt_
 
std::vector< int64_t > outTime_
 
EcalEBPhase2SpikeTaggerspike_tagger_
 
std::vector< std::vector< int > > striptp_
 
const CaloGeometrytheGeometry_ = nullptr
 
const EcalElectronicsMappingtheMapping_
 
std::vector< int64_t > time_out_
 
EcalEBPhase2TimeReconstructortime_reconstructor_
 
std::vector< std::vector< std::pair< int, std::vector< EBDataFrame_Ph2 > > > > towerMapEB_
 
std::vector< EcalEBPhase2TriggerPrimitiveSampletowtp2_
 
std::vector< EcalEBPhase2TriggerPrimitiveSampletowtp_
 
EcalEBPhase2TPFormattertpFormatter_
 

Static Private Attributes

static const unsigned int maxNrTowers_ = 2448
 
static const unsigned int nrSamples_
 

Detailed Description

Author
L. Lutton, N. Marinelli - Univ. of Notre Dame Description: forPhase II
It uses the new Phase2 digis based onthe new EB electronics
This is the main algo which plugs in all the subcomponents for the amplitude and time measurement and the spike flagging

Definition at line 46 of file EcalEBPhase2TrigPrimAlgo.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
nbMaxStrips_ 

Definition at line 110 of file EcalEBPhase2TrigPrimAlgo.h.

◆ anonymous enum

anonymous enum
private
Enumerator
nbMaxXtals_ 

Definition at line 111 of file EcalEBPhase2TrigPrimAlgo.h.

Constructor & Destructor Documentation

◆ EcalEBPhase2TrigPrimAlgo()

EcalEBPhase2TrigPrimAlgo::EcalEBPhase2TrigPrimAlgo ( const EcalTrigTowerConstituentsMap eTTmap,
const CaloGeometry theGeometry,
int  binofmax,
bool  debug 
)
explicit

Definition at line 33 of file EcalEBPhase2TrigPrimAlgo.cc.

References init(), maxNrSamples_, and ecalPh2::sampleSize.

37  : eTTmap_(eTTmap),
38  theGeometry_(theGeometry),
39  binOfMaximum_(binofmax),
40  debug_(debug)
41 
42 {
44  this->init();
45 }
const EcalTrigTowerConstituentsMap * eTTmap_
static constexpr unsigned int sampleSize
Definition: EcalConstants.h:36
#define debug
Definition: HDRShower.cc:19
const CaloGeometry * theGeometry_

◆ ~EcalEBPhase2TrigPrimAlgo()

EcalEBPhase2TrigPrimAlgo::~EcalEBPhase2TrigPrimAlgo ( )
virtual

Definition at line 71 of file EcalEBPhase2TrigPrimAlgo.cc.

References amplitude_reconstructor_, linearizer_, spike_tagger_, theMapping_, time_reconstructor_, and tpFormatter_.

71  {
72  delete linearizer_;
74  delete time_reconstructor_;
75  delete spike_tagger_;
76  delete tpFormatter_;
77  delete theMapping_;
78 }
EcalEBPhase2AmplitudeReconstructor * amplitude_reconstructor_
EcalEBPhase2TimeReconstructor * time_reconstructor_
EcalEBPhase2Linearizer * linearizer_
EcalEBPhase2SpikeTagger * spike_tagger_
const EcalElectronicsMapping * theMapping_
EcalEBPhase2TPFormatter * tpFormatter_

Member Function Documentation

◆ clean()

template<class T >
void EcalEBPhase2TrigPrimAlgo::clean ( std::vector< std::vector< std::pair< int, std::vector< T > > > > &  towerMap)
private

Definition at line 150 of file EcalEBPhase2TrigPrimAlgo.h.

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

Referenced by run().

150  {
151  // clean internal data structures
152  for (unsigned int i = 0; i < maxNrTowers_; ++i)
153  for (int j = 0; j < nbMaxStrips_; ++j)
154  (towMap[i])[j].first = 0;
155  return;
156 }
static const unsigned int maxNrTowers_

◆ fillMap()

void EcalEBPhase2TrigPrimAlgo::fillMap ( EBDigiCollectionPh2 const *  col,
std::vector< std::vector< std::pair< int, std::vector< EBDataFrame_Ph2 > > > > &  towerMap 
)
inlineprivate

Definition at line 158 of file EcalEBPhase2TrigPrimAlgo.h.

References cuy::col, debug_, findStripNr(), dqmdumpme::first, getIndex(), hitTowers_, mps_fire::i, LogDebug, nbMaxXtals_, nrTowers_, EgammaValidation_cff::samples, and edm::second().

Referenced by run().

161 {
162  // implementation for Barrel
163  if (col) {
164  nrTowers_ = 0;
165  for (unsigned int i = 0; i < col->size(); ++i) {
167  EcalTrigTowerDetId coarser = (*eTTmap_).towerOf(samples.id());
168  int index = getIndex(col, coarser);
169  EBDetId id = samples.id();
170  int stripnr = findStripNr(id);
171 
172  int filled = 0;
173  for (unsigned int ij = 0; ij < towerMap[index].size(); ++ij)
174  filled += towerMap[index][ij].first;
175  if (!filled) {
176  hitTowers_[nrTowers_++] = std::pair<int, EcalTrigTowerDetId>(index, coarser);
177  }
178 
179  //FIXME: temporary protection
180  int ncryst = towerMap[index][stripnr - 1].first;
181  if (ncryst >= nbMaxXtals_) {
182  continue;
183  }
184  ((towerMap[index])[stripnr - 1].second)[ncryst] = samples;
185  (towerMap[index])[stripnr - 1].first++;
186  }
187 
188  if (debug_)
189  LogDebug("") << "fillMap"
190  << "[EcalEBPhase2TrigPrimAlgo] (found " << col->size() << " frames in " << towerMap.size()
191  << " towers) " << std::endl;
192  } else {
193  if (debug_)
194  LogDebug("EcalEBPhase2TrigPrimAlgo") << "FillMap - FillMap Collection size=0 !!!!" << std::endl;
195  ;
196  }
197 }
int findStripNr(const EBDetId &id)
int getIndex(const EBDigiCollectionPh2 *, EcalTrigTowerDetId &id)
std::vector< std::pair< int, EcalTrigTowerDetId > > hitTowers_
U second(std::pair< T, U > const &p)
col
Definition: cuy.py:1009
#define LogDebug(id)

◆ findStripNr()

int EcalEBPhase2TrigPrimAlgo::findStripNr ( const EBDetId id)
private

Definition at line 286 of file EcalEBPhase2TrigPrimAlgo.cc.

References hcalRecHitTable_cff::ieta, dqmiodumpmetadata::n, and nbMaxStrips_.

Referenced by fillMap().

286  {
287  int stripnr;
288  int n = ((id.ic() - 1) % 100) / 20; //20 corresponds to 4 * ecal_barrel_crystals_per_strip FIXME!!
289  if (id.ieta() < 0)
290  stripnr = n + 1;
291  else
292  stripnr = nbMaxStrips_ - n;
293  return stripnr;
294 }

◆ getAmplitudeFinder()

EcalEBPhase2AmplitudeReconstructor* EcalEBPhase2TrigPrimAlgo::getAmplitudeFinder ( ) const
inlineprivate

Definition at line 135 of file EcalEBPhase2TrigPrimAlgo.h.

References amplitude_reconstructor_.

Referenced by run().

135 { return amplitude_reconstructor_; }
EcalEBPhase2AmplitudeReconstructor * amplitude_reconstructor_

◆ getIndex()

int EcalEBPhase2TrigPrimAlgo::getIndex ( const EBDigiCollectionPh2 ,
EcalTrigTowerDetId id 
)
inlineprivate

Definition at line 84 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by fillMap().

84 { return id.hashedIndex(); }

◆ getLinearizer()

EcalEBPhase2Linearizer* EcalEBPhase2TrigPrimAlgo::getLinearizer ( ) const
inlineprivate

Definition at line 132 of file EcalEBPhase2TrigPrimAlgo.h.

References linearizer_.

Referenced by run().

132 { return linearizer_; }
EcalEBPhase2Linearizer * linearizer_

◆ getSpikeTagger()

EcalEBPhase2SpikeTagger* EcalEBPhase2TrigPrimAlgo::getSpikeTagger ( ) const
inlineprivate

Definition at line 143 of file EcalEBPhase2TrigPrimAlgo.h.

References spike_tagger_.

Referenced by run().

143 { return spike_tagger_; }
EcalEBPhase2SpikeTagger * spike_tagger_

◆ getTimeFinder()

EcalEBPhase2TimeReconstructor* EcalEBPhase2TrigPrimAlgo::getTimeFinder ( ) const
inlineprivate

Definition at line 142 of file EcalEBPhase2TrigPrimAlgo.h.

References time_reconstructor_.

Referenced by run().

142 { return time_reconstructor_; }
EcalEBPhase2TimeReconstructor * time_reconstructor_

◆ getTPFormatter()

EcalEBPhase2TPFormatter* EcalEBPhase2TrigPrimAlgo::getTPFormatter ( ) const
inlineprivate

Definition at line 144 of file EcalEBPhase2TrigPrimAlgo.h.

References tpFormatter_.

Referenced by run().

144 { return tpFormatter_; }
EcalEBPhase2TPFormatter * tpFormatter_

◆ init()

void EcalEBPhase2TrigPrimAlgo::init ( void  )
private

Definition at line 47 of file EcalEBPhase2TrigPrimAlgo.cc.

References amplitude_reconstructor_, debug_, filt_out_, hitTowers_, initStructures(), lin_out_, linearizer_, maxNrSamples_, maxNrTowers_, outEt_, outTime_, spike_tagger_, theMapping_, time_out_, time_reconstructor_, towerMapEB_, and tpFormatter_.

Referenced by EcalEBPhase2TrigPrimAlgo().

47  {
49  // initialise data structures
51  hitTowers_.resize(maxNrTowers_);
52 
54  lin_out_.resize(maxNrSamples_);
55 
57  filt_out_.resize(maxNrSamples_);
58 
60  outEt_.resize(maxNrSamples_);
61  outTime_.resize(maxNrSamples_);
62 
63  //
64 
66  time_out_.resize(maxNrSamples_);
68 }
EcalEBPhase2AmplitudeReconstructor * amplitude_reconstructor_
std::vector< std::pair< int, EcalTrigTowerDetId > > hitTowers_
static const unsigned int maxNrTowers_
EcalEBPhase2TimeReconstructor * time_reconstructor_
std::vector< int64_t > outTime_
EcalEBPhase2Linearizer * linearizer_
std::vector< std::vector< std::pair< int, std::vector< EBDataFrame_Ph2 > > > > towerMapEB_
EcalEBPhase2SpikeTagger * spike_tagger_
std::vector< int64_t > time_out_
const EcalElectronicsMapping * theMapping_
void initStructures(std::vector< std::vector< std::pair< int, std::vector< T > > > > &towMap)
EcalEBPhase2TPFormatter * tpFormatter_

◆ initStructures()

template<class T >
void EcalEBPhase2TrigPrimAlgo::initStructures ( std::vector< std::vector< std::pair< int, std::vector< T > > > > &  towMap)
private

Definition at line 200 of file EcalEBPhase2TrigPrimAlgo.h.

References mps_fire::i, maxNrSamples_, maxNrTowers_, nbMaxStrips_, nbMaxXtals_, and striptp_.

Referenced by init().

200  {
201  //initialise internal data structures
202 
203  std::vector<T> vec0(nbMaxXtals_);
204  std::vector<std::pair<int, std::vector<T> > > vec1(nbMaxStrips_);
205  for (int i = 0; i < nbMaxStrips_; ++i)
206  vec1[i] = std::pair<int, std::vector<T> >(0, vec0);
207  towMap.resize(maxNrTowers_);
208  for (unsigned int i = 0; i < maxNrTowers_; ++i)
209  towMap[i] = vec1;
210 
211  std::vector<int> vecint(maxNrSamples_);
212  striptp_.resize(nbMaxStrips_);
213  for (int i = 0; i < nbMaxStrips_; ++i)
214  striptp_[i] = vecint;
215 }
std::vector< double > vec1
Definition: HCALResponse.h:15
static const unsigned int maxNrTowers_
std::vector< std::vector< int > > striptp_

◆ run()

void EcalEBPhase2TrigPrimAlgo::run ( const EBDigiCollectionPh2 col,
EcalEBPhase2TrigPrimDigiCollection result 
)

Definition at line 80 of file EcalEBPhase2TrigPrimAlgo.cc.

References binOfMaximum_, clean(), debug_, TauDecayModes::dec, ecaltpgAmplWeightMap_, ecaltpgBadX_, ecaltpgTimeWeightMap_, ecaltpgWeightGroup_, ecaltpLin_, ecaltpPed_, fillMap(), filt_out_, dqmdumpme::first, castor_dqm_sourceclient-live_cfg::firstSample, getAmplitudeFinder(), getLinearizer(), getSpikeTagger(), getTimeFinder(), getTPFormatter(), hitTowers_, mps_fire::i, EcalTrigTowerDetId::ieta(), EBDetId::ieta(), EBDetId::iphi(), EcalTrigTowerDetId::iphi(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::ix(), CastorRawToDigi_cfi::lastSample, lin_out_, LogDebug, nrSamples_, nrTowers_, outEt_, outTime_, EcalEBPhase2TPFormatter::process(), EcalEBPhase2AmplitudeReconstructor::process(), EcalEBPhase2TimeReconstructor::process(), EcalEBPhase2SpikeTagger::process(), EcalEBPhase2Linearizer::process(), DetId::rawId(), mps_fire::result, edm::second(), EcalEBPhase2SpikeTagger::setParameters(), EcalEBPhase2AmplitudeReconstructor::setParameters(), EcalEBPhase2Linearizer::setParameters(), EcalEBPhase2TimeReconstructor::setParameters(), edm::DataFrameContainer::size(), hcalRecHitTable_cff::time, time_out_, towerMapEB_, cmsswSequenceInfo::tp, and EcalTrigTowerDetId::zside().

80  {
81  if (debug_)
82  LogDebug("") << " EcalEBPhase2TrigPrimAlgo: digi size " << digi->size() << std::endl;
83 
85  int firstSample = binOfMaximum_ - 1 - nrSamples_ / 2;
86  int lastSample = binOfMaximum_ - 1 + nrSamples_ / 2;
87 
88  if (debug_) {
89  LogDebug("") << " binOfMaximum_ " << binOfMaximum_ << " nrSamples_" << nrSamples_ << std::endl;
90  LogDebug("") << " first sample " << firstSample << " last " << lastSample << std::endl;
91  }
92 
94  fillMap(digi, towerMapEB_);
95 
96  int iChannel = 0;
97  int nXinBCP = 0;
98  for (int itow = 0; itow < nrTowers_; ++itow) {
99  int index = hitTowers_[itow].first;
100  const EcalTrigTowerDetId &thisTower = hitTowers_[itow].second;
101  if (debug_)
102  LogDebug("") << " Data for TOWER num " << itow << " index " << index << " TowerId " << thisTower << " zside "
103  << thisTower.zside() << " ieta " << thisTower.ieta() << " iphi " << thisTower.iphi() << " size "
104  << towerMapEB_[itow].size() << std::endl;
105 
106  // loop over all strips assigned to this trigger tower
107  int nxstals = 0;
108  for (unsigned int iStrip = 0; iStrip < towerMapEB_[itow].size(); ++iStrip) {
109  if (debug_)
110  LogDebug("") << " Data for STRIP num " << iStrip << std::endl;
111  std::vector<EBDataFrame_Ph2> &dataFrames =
112  (towerMapEB_[index])[iStrip].second; //vector of dataframes for this strip, size; nr of crystals/strip
113 
114  nxstals = (towerMapEB_[index])[iStrip].first;
115  if (nxstals <= 0)
116  continue;
117  if (debug_)
118  LogDebug("") << " Number of xTals " << nxstals << std::endl;
119 
120  //const EcalTriggerElectronicsId elId = theMapping_->getTriggerElectronicsId(dataFrames[0].id());
121 
122  // loop over the xstals in a strip
123 
124  for (int iXstal = 0; iXstal < nxstals; iXstal++) {
125  const EBDetId &myid = dataFrames[iXstal].id();
126 
127  nXinBCP++;
128  if (debug_) {
129  LogDebug("") << " Data for TOWER num " << itow << " index " << index << " TowerId " << thisTower << " size "
130  << towerMapEB_[itow].size() << std::endl;
131  LogDebug("") << "nXinBCP " << nXinBCP << " myid rawId " << myid.rawId() << " xTal iEta " << myid.ieta()
132  << " iPhi " << myid.iphi() << std::endl;
133  }
134 
136  tp.setSize(nrSamples_);
137 
138  iChannel++;
139  if (debug_) {
140  LogDebug("") << " " << std::endl;
141  LogDebug("") << " ****** iChannel " << iChannel << std::endl;
142  for (int i = 0; i < dataFrames[iXstal].size(); i++) {
143  LogDebug("") << " " << dataFrames[iXstal][i].adc();
144  }
145  LogDebug("") << " " << std::endl;
146  }
147 
148  if (debug_) {
149  LogDebug("") << std::endl;
150  EBDetId id = dataFrames[iXstal].id();
151  LogDebug("") << "iXstal= " << iXstal << std::endl;
152  LogDebug("") << "iXstal= " << iXstal << " id " << id << " EcalDataFrame_Ph2 is: " << std::endl;
153  for (int i = 0; i < dataFrames[iXstal].size(); i++) {
154  LogDebug("") << " " << std::dec << dataFrames[iXstal][i].adc();
155  }
156  LogDebug("") << std::endl;
157  }
158 
159  // Call the linearizer
160  this->getLinearizer()->setParameters(dataFrames[iXstal].id(), ecaltpPed_, ecaltpLin_, ecaltpgBadX_);
161  this->getLinearizer()->process(dataFrames[iXstal], lin_out_);
162 
163  for (unsigned int i = 0; i < lin_out_.size(); i++) {
164  if (lin_out_[i] > 0X3FFF)
165  lin_out_[i] = 0X3FFF;
166  }
167 
168  if (debug_) {
169  LogDebug("") << "EcalEBPhase2TrigPrimAlgo output of linearize for channel " << iXstal << std::endl;
170  for (unsigned int i = 0; i < lin_out_.size(); i++) {
171  LogDebug("") << " " << std::dec << lin_out_[i];
172  }
173  LogDebug("") << std::endl;
174  }
175 
176  // call spike finder right after the linearizer
177  this->getSpikeTagger()->setParameters(dataFrames[iXstal].id(), ecaltpPed_, ecaltpLin_, ecaltpgBadX_);
178  bool isASpike = this->getSpikeTagger()->process(lin_out_);
179 
180  //if (!isASpike) {
181 
182  // Call the amplitude reconstructor
185 
186  if (debug_) {
187  LogDebug("") << "EcalEBPhase2TrigPrimAlgo output of amp finder is a vector of size: " << std::dec
188  << time_out_.size() << std::endl;
189  for (unsigned int ix = 0; ix < filt_out_.size(); ix++) {
190  LogDebug("") << std::dec << filt_out_[ix] << " ";
191  }
192  LogDebug("") << std::endl;
193  }
194 
195  if (debug_) {
196  LogDebug("") << " Ampl "
197  << " ";
198  for (unsigned int ix = 0; ix < filt_out_.size(); ix++) {
199  LogDebug("") << std::dec << filt_out_[ix] << " ";
200  }
201  LogDebug("") << std::endl;
202  }
203 
204  // call time finder
207 
208  if (debug_) {
209  LogDebug("") << " Time "
210  << " ";
211  for (unsigned int ix = 0; ix < time_out_.size(); ix++) {
212  LogDebug("") << std::dec << time_out_[ix] << " ";
213  }
214  LogDebug("") << std::endl;
215  }
216 
217  if (debug_) {
218  LogDebug("") << "EcalEBPhase2TrigPrimAlgo output of timefinder is a vector of size: " << std::dec
219  << time_out_.size() << std::endl;
220  for (unsigned int ix = 0; ix < time_out_.size(); ix++) {
221  LogDebug("") << std::dec << time_out_[ix] << " ";
222  }
223  LogDebug("") << std::endl;
224  }
225 
227 
228  if (debug_) {
229  LogDebug("") << " compressed Et "
230  << " ";
231  for (unsigned int iSample = 0; iSample < outEt_.size(); ++iSample) {
232  LogDebug("") << outEt_[iSample] << " ";
233  }
234  LogDebug("") << std::endl;
235 
236  LogDebug("") << " compressed time "
237  << " ";
238  for (unsigned int iSample = 0; iSample < outEt_.size(); ++iSample) {
239  LogDebug("") << outTime_[iSample] << " ";
240  }
241  LogDebug("") << std::endl;
242  }
243 
244  if (debug_) {
245  LogDebug("") << " EcalEBPhase2TrigPrimAlgo after getting the formatter " << std::endl;
246  for (unsigned int iSample = 0; iSample < outEt_.size(); ++iSample) {
247  LogDebug("") << " outEt " << outEt_[iSample] << " outTime " << outTime_[iSample] << " ";
248  }
249  LogDebug("") << std::endl;
250  }
251 
252  // } not a spike
253 
254  // create the final TP samples
255  int etInADC = 0;
256  ;
257  int64_t time = -999;
258  int nSam = 0;
259  for (int iSample = 0; iSample < 16; ++iSample) {
260  etInADC = outEt_[iSample];
261  time = outTime_[iSample];
262  if (debug_) {
263  LogDebug("") << "TrigPrimAlgo outEt " << outEt_[iSample] << " outTime " << outTime_[iSample] << std::endl;
264  LogDebug("") << "TrigPrimAlgo etInADCt " << outEt_[iSample] << " outTime " << time << std::endl;
265  }
266 
267  tp.setSample(nSam, EcalEBPhase2TriggerPrimitiveSample(etInADC, isASpike, time));
268  nSam++;
269  }
270 
271  result.push_back(tp);
272 
273  } // Loop over the xStals
274 
275  } //loop over strips in one tower
276 
277  if (debug_) {
278  if (nXinBCP > 0)
279  LogDebug("") << " Accepted xTals " << nXinBCP << std::endl;
280  }
281  }
282 }
const EcalEBPhase2TPGTimeWeightIdMap * ecaltpgTimeWeightMap_
int ieta() const
get the tower ieta
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
void process(const EBDigiCollectionPh2::Digi &df, std::vector< int > &output_percry)
bool process(const std::vector< int > &linInput)
virtual void process(std::vector< int > &ampl, std::vector< int64_t > &time, std::vector< int > &outampl, std::vector< int64_t > &outtime)
std::vector< std::pair< int, EcalTrigTowerDetId > > hitTowers_
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
static const unsigned int nrSamples_
U second(std::pair< T, U > const &p)
EcalEBPhase2TimeReconstructor * getTimeFinder() const
int zside() const
get the z-side of the tower (1/-1)
const EcalTPGWeightGroup * ecaltpgWeightGroup_
std::vector< int64_t > outTime_
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
const EcalTPGCrystalStatus * ecaltpgBadX_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
EcalEBPhase2Linearizer * getLinearizer() const
std::vector< std::vector< std::pair< int, std::vector< EBDataFrame_Ph2 > > > > towerMapEB_
void setParameters(EBDetId id, const EcalLiteDTUPedestalsMap *peds, const EcalEBPhase2TPGLinearizationConstMap *ecaltplin, const EcalTPGCrystalStatus *ecaltpBadX)
const EcalEBPhase2TPGLinearizationConstMap * ecaltpLin_
void setParameters(uint32_t raw, const EcalEBPhase2TPGAmplWeightIdMap *ecaltpgWeightMap, const EcalTPGWeightGroup *ecaltpgWeightGroup)
std::vector< int64_t > time_out_
const EcalLiteDTUPedestalsMap * ecaltpPed_
EcalEBPhase2AmplitudeReconstructor * getAmplitudeFinder() const
void clean(std::vector< std::vector< std::pair< int, std::vector< T > > > > &towerMap)
void setParameters(EBDetId id, const EcalLiteDTUPedestalsMap *peds, const EcalEBPhase2TPGLinearizationConstMap *ecaltplin, const EcalTPGCrystalStatus *ecaltpBadX)
void setParameters(uint32_t raw, const EcalEBPhase2TPGTimeWeightIdMap *ecaltpgTimeWeightMap, const EcalTPGWeightGroup *ecaltpgWeightGroup)
int iphi() const
get the tower iphi
EcalEBPhase2SpikeTagger * getSpikeTagger() const
const EcalEBPhase2TPGAmplWeightIdMap * ecaltpgAmplWeightMap_
EcalEBPhase2TPFormatter * getTPFormatter() const
void fillMap(EBDigiCollectionPh2 const *col, std::vector< std::vector< std::pair< int, std::vector< EBDataFrame_Ph2 > > > > &towerMap)
#define LogDebug(id)

◆ setPointers()

void EcalEBPhase2TrigPrimAlgo::setPointers ( const EcalLiteDTUPedestalsMap ecaltpPed,
const EcalEBPhase2TPGLinearizationConstMap ecaltpLin,
const EcalTPGCrystalStatus ecaltpgBadX,
const EcalEBPhase2TPGAmplWeightIdMap ecaltpgAmplWeightMap,
const EcalEBPhase2TPGTimeWeightIdMap ecaltpgTimeWeightMap,
const EcalTPGWeightGroup ecaltpgWeightGroup 
)
inline

Definition at line 57 of file EcalEBPhase2TrigPrimAlgo.h.

References ecaltpgAmplWeightMap_, ecaltpgBadX_, ecaltpgTimeWeightMap_, ecaltpgWeightGroup_, ecaltpLin_, and ecaltpPed_.

62  {
63  ecaltpPed_ = ecaltpPed;
64  ecaltpgBadX_ = ecaltpgBadX;
65  ecaltpLin_ = ecaltpLin;
66  ecaltpgAmplWeightMap_ = ecaltpgAmplWeightMap;
67  ecaltpgTimeWeightMap_ = ecaltpgTimeWeightMap;
68  ecaltpgWeightGroup_ = ecaltpgWeightGroup;
69  }
const EcalEBPhase2TPGTimeWeightIdMap * ecaltpgTimeWeightMap_
const EcalTPGWeightGroup * ecaltpgWeightGroup_
const EcalTPGCrystalStatus * ecaltpgBadX_
const EcalEBPhase2TPGLinearizationConstMap * ecaltpLin_
const EcalLiteDTUPedestalsMap * ecaltpPed_
const EcalEBPhase2TPGAmplWeightIdMap * ecaltpgAmplWeightMap_

Member Data Documentation

◆ amp_out_

std::vector<int> EcalEBPhase2TrigPrimAlgo::amp_out_
private

Definition at line 138 of file EcalEBPhase2TrigPrimAlgo.h.

◆ amplitude_reconstructor_

EcalEBPhase2AmplitudeReconstructor* EcalEBPhase2TrigPrimAlgo::amplitude_reconstructor_
private

Definition at line 117 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by getAmplitudeFinder(), init(), and ~EcalEBPhase2TrigPrimAlgo().

◆ binOfMaximum_

int EcalEBPhase2TrigPrimAlgo::binOfMaximum_
private

Definition at line 95 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by run().

◆ debug_

bool EcalEBPhase2TrigPrimAlgo::debug_
private

Definition at line 97 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by fillMap(), init(), and run().

◆ ecaltpgAmplWeightMap_

const EcalEBPhase2TPGAmplWeightIdMap* EcalEBPhase2TrigPrimAlgo::ecaltpgAmplWeightMap_
private

Definition at line 129 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by run(), and setPointers().

◆ ecaltpgBadX_

const EcalTPGCrystalStatus* EcalEBPhase2TrigPrimAlgo::ecaltpgBadX_
private

Definition at line 125 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by run(), and setPointers().

◆ ecaltpgTimeWeightMap_

const EcalEBPhase2TPGTimeWeightIdMap* EcalEBPhase2TrigPrimAlgo::ecaltpgTimeWeightMap_
private

Definition at line 130 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by run(), and setPointers().

◆ ecaltpgWeightGroup_

const EcalTPGWeightGroup* EcalEBPhase2TrigPrimAlgo::ecaltpgWeightGroup_
private

Definition at line 127 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by run(), and setPointers().

◆ ecaltpLin_

const EcalEBPhase2TPGLinearizationConstMap* EcalEBPhase2TrigPrimAlgo::ecaltpLin_
private

Definition at line 128 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by run(), and setPointers().

◆ ecaltpPed_

const EcalLiteDTUPedestalsMap* EcalEBPhase2TrigPrimAlgo::ecaltpPed_
private

Definition at line 124 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by run(), and setPointers().

◆ eTTmap_

const EcalTrigTowerConstituentsMap* EcalEBPhase2TrigPrimAlgo::eTTmap_ = nullptr
private

Definition at line 92 of file EcalEBPhase2TrigPrimAlgo.h.

◆ filt_out_

std::vector<int> EcalEBPhase2TrigPrimAlgo::filt_out_
private

Definition at line 136 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by init(), and run().

◆ hitTowers_

std::vector<std::pair<int, EcalTrigTowerDetId> > EcalEBPhase2TrigPrimAlgo::hitTowers_
private

Definition at line 106 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by fillMap(), init(), and run().

◆ lin_out_

std::vector<int> EcalEBPhase2TrigPrimAlgo::lin_out_
private

Definition at line 133 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by init(), and run().

◆ linearizer_

EcalEBPhase2Linearizer* EcalEBPhase2TrigPrimAlgo::linearizer_
private

Definition at line 115 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by getLinearizer(), init(), and ~EcalEBPhase2TrigPrimAlgo().

◆ maxNrSamples_

int EcalEBPhase2TrigPrimAlgo::maxNrSamples_
private

Definition at line 96 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by EcalEBPhase2TrigPrimAlgo(), init(), and initStructures().

◆ maxNrTowers_

const unsigned int EcalEBPhase2TrigPrimAlgo::maxNrTowers_ = 2448
staticprivate

Definition at line 100 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by clean(), init(), and initStructures().

◆ nrSamples_

const unsigned int EcalEBPhase2TrigPrimAlgo::nrSamples_
staticprivate
Initial value:

Definition at line 101 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by run().

◆ nrTowers_

int EcalEBPhase2TrigPrimAlgo::nrTowers_
private

Definition at line 99 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by fillMap(), and run().

◆ outEt_

std::vector<int> EcalEBPhase2TrigPrimAlgo::outEt_
private

Definition at line 139 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by init(), and run().

◆ outTime_

std::vector<int64_t> EcalEBPhase2TrigPrimAlgo::outTime_
private

Definition at line 140 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by init(), and run().

◆ spike_tagger_

EcalEBPhase2SpikeTagger* EcalEBPhase2TrigPrimAlgo::spike_tagger_
private

Definition at line 119 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by getSpikeTagger(), init(), and ~EcalEBPhase2TrigPrimAlgo().

◆ striptp_

std::vector<std::vector<int> > EcalEBPhase2TrigPrimAlgo::striptp_
private

Definition at line 104 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by initStructures().

◆ theGeometry_

const CaloGeometry* EcalEBPhase2TrigPrimAlgo::theGeometry_ = nullptr
private

Definition at line 93 of file EcalEBPhase2TrigPrimAlgo.h.

◆ theMapping_

const EcalElectronicsMapping* EcalEBPhase2TrigPrimAlgo::theMapping_
private

Definition at line 113 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by init(), and ~EcalEBPhase2TrigPrimAlgo().

◆ time_out_

std::vector<int64_t> EcalEBPhase2TrigPrimAlgo::time_out_
private

Definition at line 137 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by init(), and run().

◆ time_reconstructor_

EcalEBPhase2TimeReconstructor* EcalEBPhase2TrigPrimAlgo::time_reconstructor_
private

Definition at line 118 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by getTimeFinder(), init(), and ~EcalEBPhase2TrigPrimAlgo().

◆ towerMapEB_

std::vector<std::vector<std::pair<int, std::vector<EBDataFrame_Ph2> > > > EcalEBPhase2TrigPrimAlgo::towerMapEB_
private

Definition at line 105 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by init(), and run().

◆ towtp2_

std::vector<EcalEBPhase2TriggerPrimitiveSample> EcalEBPhase2TrigPrimAlgo::towtp2_
private

Definition at line 108 of file EcalEBPhase2TrigPrimAlgo.h.

◆ towtp_

std::vector<EcalEBPhase2TriggerPrimitiveSample> EcalEBPhase2TrigPrimAlgo::towtp_
private

Definition at line 107 of file EcalEBPhase2TrigPrimAlgo.h.

◆ tpFormatter_

EcalEBPhase2TPFormatter* EcalEBPhase2TrigPrimAlgo::tpFormatter_
private

Definition at line 120 of file EcalEBPhase2TrigPrimAlgo.h.

Referenced by getTPFormatter(), init(), and ~EcalEBPhase2TrigPrimAlgo().