|
|
#include <EcalEBTrigPrimTestAlgo.h>
|
| EcalEBTrigPrimTestAlgo (const edm::EventSetup &setup, int nSamples, int binofmax, bool tcpFormat, bool barrelOnly, bool debug, bool famos) |
|
void | run (const edm::EventSetup &, const EBDigiCollection *col, EcalEBTrigPrimDigiCollection &result, EcalEBTrigPrimDigiCollection &resultTcp) |
|
void | setPointers (const EcalTPGLinearizationConst *ecaltpLin, const EcalTPGPedestals *ecaltpPed, const EcalTPGCrystalStatus *ecaltpgBadX, const EcalTPGWeightIdMap *ecaltpgWeightMap, const EcalTPGWeightGroup *ecaltpgWeightGroup, const EcalTPGSlidingWindow *ecaltpgSlidW, const EcalTPGLutGroup *ecaltpgLutGroup, const EcalTPGLutIdMap *ecaltpgLut, const EcalTPGTowerStatus *ecaltpgBadTT, const EcalTPGSpike *ecaltpgSpike) |
|
virtual | ~EcalEBTrigPrimTestAlgo () |
|
- Author
- N. Marinelli - Univ. of Notre Dame forPhase II While the new digitization is not yet implemented, we use the old Digis to make TP per crystal
EcalEBTrigPrimTestAlgo starting point for Phase II: build TPs out of Phase I digis to start building the infrastructures
Definition at line 43 of file EcalEBTrigPrimTestAlgo.h.
◆ anonymous enum
◆ anonymous enum
◆ EcalEBTrigPrimTestAlgo()
EcalEBTrigPrimTestAlgo::EcalEBTrigPrimTestAlgo |
( |
const edm::EventSetup & |
setup, |
|
|
int |
nSamples, |
|
|
int |
binofmax, |
|
|
bool |
tcpFormat, |
|
|
bool |
barrelOnly, |
|
|
bool |
debug, |
|
|
bool |
famos |
|
) |
| |
|
explicit |
◆ ~EcalEBTrigPrimTestAlgo()
EcalEBTrigPrimTestAlgo::~EcalEBTrigPrimTestAlgo |
( |
| ) |
|
|
virtual |
◆ clean()
template<class T >
void EcalEBTrigPrimTestAlgo::clean |
( |
std::vector< std::vector< std::pair< int, std::vector< T > > > > & |
towerMap | ) |
|
|
private |
◆ fillMap()
template<class Coll >
void EcalEBTrigPrimTestAlgo::fillMap |
( |
Coll const * |
col, |
|
|
std::vector< std::vector< std::pair< int, std::vector< typename Coll::Digi > > > > & |
towerMap |
|
) |
| |
|
private |
Definition at line 179 of file EcalEBTrigPrimTestAlgo.h.
187 std::cout <<
"Fill mapping, Collection size = " <<
col->size() << std::endl;
189 for (
unsigned int i = 0;
i <
col->size(); ++
i) {
196 for (
unsigned int ij = 0; ij < towerMap[
index].size(); ++ij)
203 int ncryst = towerMap[
index][stripnr - 1].first;
206 <<
"! Too many xtals for TT " << coarser <<
" stripnr " << stripnr <<
" xtalid " <<
samples.id();
215 <<
"[EcalTrigPrimFunctionalAlgo] (found " <<
col->size() <<
" frames in " << towerMap.size()
216 <<
" towers) " << std::endl;
219 std::cout <<
"FillMap - FillMap Collection size=0 !!!!" << std::endl;
References cuy::col, gather_cfg::cout, debug_, TrendClient_cfi::Digi, findStripNr(), dqmdumpme::first, getIndex(), hitTowers_, mps_fire::i, nbMaxXtals_, nrTowers_, EgammaValidation_cff::samples, and edm::second().
Referenced by run().
◆ findStripNr() [1/2]
int EcalEBTrigPrimTestAlgo::findStripNr |
( |
const EBDetId & |
id | ) |
|
|
private |
◆ findStripNr() [2/2]
int EcalEBTrigPrimTestAlgo::findStripNr |
( |
const EEDetId & |
id | ) |
|
|
private |
◆ getFilter()
◆ getFormatter()
◆ getFormatterEB()
◆ getIndex() [1/2]
◆ getIndex() [2/2]
◆ getLinearizer()
◆ getPeakFinder()
◆ init()
Definition at line 57 of file EcalEBTrigPrimTestAlgo.cc.
77 for (
int i = 0;
i < 5;
i++)
References amplitude_filter_, barrelOnly_, binOfMaximum_, debug_, eTTmap_, famos_, fenixFormatterEB_, fenixTcpFormat_, fgvb_out_, fgvb_out_temp_, filt_out_, format_out_, get, hitTowers_, mps_fire::i, initStructures(), lin_out_, linearizer_, maxNrSamples_, maxNrTowers_, nbMaxXtals_, peak_finder_, peak_out_, singleTopDQM_cfi::setup, tcpFormat_, tcpformat_out_, theGeometry, towerMapEB_, and findQualityFiles::v.
Referenced by EcalEBTrigPrimTestAlgo().
◆ initStructures()
template<class T >
void EcalEBTrigPrimTestAlgo::initStructures |
( |
std::vector< std::vector< std::pair< int, std::vector< T > > > > & |
towMap | ) |
|
|
private |
◆ run()
Definition at line 105 of file EcalEBTrigPrimTestAlgo.cc.
111 std::cout <<
" EcalEBTrigPrimTestAlgo: Testing that the algorythm with digis is well plugged " << std::endl;
112 std::cout <<
" EcalEBTrigPrimTestAlgo: digi size " << digi->size() << std::endl;
128 for (
int itow = 0; itow <
nrTowers_; ++itow) {
132 std::cout <<
" Data for TOWER num " << itow <<
" index " <<
index <<
" TowerId " << thisTower <<
" size "
136 for (
unsigned int iStrip = 0; iStrip <
towerMapEB_[itow].size(); ++iStrip) {
138 std::cout <<
" Data for STRIP num " << iStrip << std::endl;
139 std::vector<EBDataFrame> &dataFrames =
146 std::cout <<
" Number of xTals " << nxstals << std::endl;
149 uint32_t stripid = elId.
rawId() & 0xfffffff8;
152 for (
int iXstal = 0; iXstal < nxstals; iXstal++) {
153 const EBDetId &myid = dataFrames[iXstal].id();
159 std::cout <<
"iXstal= " << iXstal <<
" id " << dataFrames[iXstal].id() <<
" EBDataFrame is: " << std::endl;
160 for (
int i = 0;
i < dataFrames[iXstal].size();
i++) {
170 for (
unsigned int i = 0;
i <
lin_out_[iXstal].size();
i++) {
176 std::cout <<
"output of linearizer for channel " << iXstal << std::endl;
178 for (
unsigned int i = 0;
i <
lin_out_[iXstal].size();
i++) {
190 for (
unsigned int ix = 0; ix <
filt_out_.size(); ix++) {
201 for (
unsigned int ix = 0; ix <
peak_out_.size(); ix++) {
230 bool isASpike =
false;
237 <<
" tp size " <<
tp.size() << std::endl;
References binOfMaximum_, clean(), gather_cfg::cout, debug_, TauDecayModes::dec, ecaltpgBadTT_, ecaltpgBadX_, ecaltpgLut_, ecaltpgLutGroup_, ecaltpgSlidW_, ecaltpgSpike_, ecaltpgWeightGroup_, ecaltpgWeightMap_, ecaltpLin_, ecaltpPed_, fgvb_out_, fgvb_out_temp_, fillMap(), filt_out_, dqmdumpme::first, castor_dqm_sourceclient-live_cfg::firstSample, format_out_, getFilter(), getFormatter(), getFormatterEB(), getLinearizer(), getPeakFinder(), EcalElectronicsMapping::getTriggerElectronicsId(), hitTowers_, mps_fire::i, CastorRawToDigi_cfi::lastSample, lin_out_, nrSamples_, nrTowers_, peak_out_, EcalFenixPeakFinder::process(), EcalFenixAmplitudeFilter::process(), EcalFenixStripFormatEB::process(), EcalFenixTcpFormat::process(), EcalFenixLinearizer::process(), edm::SortedCollection< T, SORT >::push_back(), EcalTriggerElectronicsId::rawId(), DetId::rawId(), mps_fire::result, edm::second(), EcalFenixStripFormatEB::setParameters(), EcalFenixTcpFormat::setParameters(), EcalFenixAmplitudeFilter::setParameters(), EcalFenixLinearizer::setParameters(), edm::DataFrameContainer::size(), tcpFormat_, tcpformat_out_, theMapping_, ecalMatacq_cfi::timing, towerMapEB_, and cmsswSequenceInfo::tp.
◆ setPointers()
◆ amplitude_filter_
◆ barrelOnly_
bool EcalEBTrigPrimTestAlgo::barrelOnly_ |
|
private |
◆ binOfMaximum_
int EcalEBTrigPrimTestAlgo::binOfMaximum_ |
|
private |
◆ debug_
bool EcalEBTrigPrimTestAlgo::debug_ |
|
private |
◆ ecaltpgBadTT_
◆ ecaltpgBadX_
◆ ecaltpgLut_
◆ ecaltpgLutGroup_
◆ ecaltpgSlidW_
◆ ecaltpgSpike_
◆ ecaltpgWeightGroup_
◆ ecaltpgWeightMap_
◆ ecaltpLin_
◆ ecaltpPed_
◆ eTTmap_
◆ famos_
bool EcalEBTrigPrimTestAlgo::famos_ |
|
private |
◆ fenixFormatterEB_
◆ fenixTcpFormat_
◆ fgvb_out_
std::vector<int> EcalEBTrigPrimTestAlgo::fgvb_out_ |
|
private |
◆ fgvb_out_temp_
std::vector<int> EcalEBTrigPrimTestAlgo::fgvb_out_temp_ |
|
private |
◆ filt_out_
std::vector<int> EcalEBTrigPrimTestAlgo::filt_out_ |
|
private |
◆ format_out_
std::vector<int> EcalEBTrigPrimTestAlgo::format_out_ |
|
private |
◆ hitTowers_
◆ lin_out_
std::vector<std::vector<int> > EcalEBTrigPrimTestAlgo::lin_out_ |
|
private |
◆ linearizer_
◆ maxNrSamples_
int EcalEBTrigPrimTestAlgo::maxNrSamples_ |
|
private |
◆ maxNrSamplesOut_
const unsigned int EcalEBTrigPrimTestAlgo::maxNrSamplesOut_ = 10 |
|
staticprivate |
◆ maxNrTowers_
const unsigned int EcalEBTrigPrimTestAlgo::maxNrTowers_ = 2448 |
|
staticprivate |
◆ nrSamples_
const unsigned int EcalEBTrigPrimTestAlgo::nrSamples_ = 5 |
|
staticprivate |
◆ nrTowers_
int EcalEBTrigPrimTestAlgo::nrTowers_ |
|
private |
◆ nSamples_
int EcalEBTrigPrimTestAlgo::nSamples_ |
|
private |
◆ peak_finder_
◆ peak_out_
std::vector<int> EcalEBTrigPrimTestAlgo::peak_out_ |
|
private |
◆ striptp_
std::vector<std::vector<int> > EcalEBTrigPrimTestAlgo::striptp_ |
|
private |
◆ tcpFormat_
bool EcalEBTrigPrimTestAlgo::tcpFormat_ |
|
private |
◆ tcpformat_out_
std::vector<int> EcalEBTrigPrimTestAlgo::tcpformat_out_ |
|
private |
◆ theGeometry
◆ theMapping_
◆ threshold
float EcalEBTrigPrimTestAlgo::threshold |
|
private |
◆ towerMapEB_
std::vector<std::vector<std::pair<int, std::vector<EBDataFrame> > > > EcalEBTrigPrimTestAlgo::towerMapEB_ |
|
private |
◆ towerMapEE_
std::vector<std::vector<std::pair<int, std::vector<EEDataFrame> > > > EcalEBTrigPrimTestAlgo::towerMapEE_ |
|
private |
◆ towtp2_
◆ towtp_
static const unsigned int maxNrTowers_
const EcalTPGTowerStatus * ecaltpgBadTT_
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
std::vector< double > vec1
calculates the peak for Fenix strip, barrel input : 18 bits output: boolean
U second(std::pair< T, U > const &p)
std::vector< int > fgvb_out_temp_
int findStripNr(const EBDetId &id)
edm::ESHandle< EcalTrigTowerConstituentsMap > eTTmap_
edm::ESHandle< CaloGeometry > theGeometry
void initStructures(std::vector< std::vector< std::pair< int, std::vector< T > > > > &towMap)
EcalFenixStripFormatEB * getFormatterEB() const
int getIndex(const EBDigiCollection *, EcalTrigTowerDetId &id)
const EcalElectronicsMapping * theMapping_
std::vector< int > filt_out_
void push_back(T const &t)
void clean(std::vector< std::vector< std::pair< int, std::vector< T > > > > &towerMap)
const EcalTPGPedestals * ecaltpPed_
const EcalTPGLutIdMap * ecaltpgLut_
EcalFenixPeakFinder * getPeakFinder() const
std::vector< std::vector< int > > lin_out_
std::vector< EcalFenixLinearizer * > linearizer_
std::vector< int > tcpformat_out_
EcalFenixTcpFormat * fenixTcpFormat_
EcalFenixPeakFinder * peak_finder_
const EcalTPGWeightIdMap * ecaltpgWeightMap_
const EcalTPGLutGroup * ecaltpgLutGroup_
EcalFenixAmplitudeFilter * amplitude_filter_
void setParameters(uint32_t raw, const EcalTPGPedestals *ecaltpPed, const EcalTPGLinearizationConst *ecaltpLin, const EcalTPGCrystalStatus *ecaltpBadX)
static const unsigned int nrSamples_
void fillMap(Coll const *col, std::vector< std::vector< std::pair< int, std::vector< typename Coll::Digi > > > > &towerMap)
std::vector< int > peak_out_
void init(const edm::EventSetup &)
const EcalTPGSlidingWindow * ecaltpgSlidW_
Linearisation for Fenix strip input: 16 bits corresponding to input EBDataFrame output: 18 bits.
EcalTriggerElectronicsId getTriggerElectronicsId(const DetId &id) const
Get the trigger electronics id for this det id.
EcalFenixStripFormatEB * fenixFormatterEB_
EcalFenixTcpFormat * getFormatter() const
std::vector< int > format_out_
std::vector< std::vector< int > > striptp_
Log< level::Error, false > LogError
const EcalTPGLinearizationConst * ecaltpLin_
constexpr uint32_t rawId() const
get the raw id
std::vector< std::pair< int, EcalTrigTowerDetId > > hitTowers_
void setParameters(uint32_t raw, const EcalTPGWeightIdMap *ecaltpgWeightMap, const EcalTPGWeightGroup *ecaltpgWeightGroup)
EcalFenixLinearizer * getLinearizer(int i) const
calculates .... for Fenix strip, barrel input: 18 bits output: 18 bits
std::vector< int > fgvb_out_
std::vector< std::vector< std::pair< int, std::vector< EBDataFrame > > > > towerMapEB_
EcalFenixAmplitudeFilter * getFilter() const
const EcalTPGSpike * ecaltpgSpike_
const EcalTPGCrystalStatus * ecaltpgBadX_
const EcalTPGWeightGroup * ecaltpgWeightGroup_