1 #ifndef EcalEBTrigPrimTestAlgo_h 2 #define EcalEBTrigPrimTestAlgo_h 41 class ETPCoherenceTest;
88 void initStructures(std::vector<std::vector<std::pair<
int,std::vector<T> > > > & towMap);
90 void clean(std::vector<std::vector<std::pair<
int,std::vector<T> > > > &towerMap);
92 void fillMap(Coll
const * col, std::vector<std::vector<std::pair<
int,std::vector<typename Coll::Digi> > > > &towerMap);
100 int ind=(
id.ietaAbs()-18)*72 +
id.iphi();
101 if (
id.
zside()<0) ind+=792;
129 std::vector<std::vector<std::pair<int,std::vector<EBDataFrame> > > >
towerMapEB_;
130 std::vector<std::vector<std::pair<int,std::vector<EEDataFrame> > > >
towerMapEE_;
132 std::vector<EcalEBTriggerPrimitiveSample>
towtp_;
133 std::vector<EcalEBTriggerPrimitiveSample>
towtp2_;
192 template <
class Coll>
194 std::vector<std::vector<std::pair<
int,std::vector<typename Coll::Digi> > > > &towerMap)
201 if (
debug_)
std::cout <<
"Fill mapping, Collection size = "<< col->size() << std::endl;;
202 for(
unsigned int i = 0;
i < col->size() ; ++
i) {
209 for (
unsigned int ij=0;ij<towerMap[
index].size();++ij) filled+=towerMap[index][ij].
first;
215 int ncryst=towerMap[
index][stripnr-1].first;
217 edm::LogError(
"EcalTrigPrimFunctionAlgo")<<
"! Too many xtals for TT "<<coarser<<
" stripnr "<<stripnr<<
" xtalid "<<samples.id() ;
224 if (
debug_)
std::cout <<
"fillMap"<<
"[EcalTrigPrimFunctionalAlgo] (found " 225 << col->size() <<
" frames in "<< towerMap.size() <<
" towers) " << std::endl;
228 if (
debug_)
std::cout <<
"FillMap - FillMap Collection size=0 !!!!" << std::endl;;
238 for (
int i=0;i<nbMaxStrips_ ;++i) vec1[i]=std::pair<int,std::vector<T> >(0,vec0);
std::vector< EcalEBTriggerPrimitiveSample > towtp2_
std::vector< std::vector< std::pair< int, std::vector< EBDataFrame > > > > towerMapEB_
EcalFenixStripFormatEB * fenixFormatterEB_
static const unsigned int nrSamples_
EcalFenixPeakFinder * getPeakFinder() const
void fillMap(Coll const *col, std::vector< std::vector< std::pair< int, std::vector< typename Coll::Digi > > > > &towerMap)
std::vector< int > format_out_
static const unsigned int maxNrSamplesOut_
virtual ~EcalEBTrigPrimTestAlgo()
def setup(process, global_tag, zero_tesla=False)
const EcalTPGSlidingWindow * ecaltpgSlidW_
calculates the peak for Fenix strip, barrel input : 18 bits output: boolean
EcalFenixTcpFormat * getFormatter() const
EcalFenixLinearizer * getLinearizer(int i) const
EcalEBTrigPrimTestAlgo(const edm::EventSetup &setup, int nSamples, int binofmax, bool tcpFormat, bool barrelOnly, bool debug, bool famos)
std::tuple< unsigned int, int, int, DigiType, int, int, int, float > Digi
std::vector< std::vector< int > > striptp_
const EcalTPGSpike * ecaltpgSpike_
const EcalTPGCrystalStatus * ecaltpgBadX_
EcalFenixStripFormatEB * getFormatterEB() const
U second(std::pair< T, U > const &p)
const EcalTPGLinearizationConst * ecaltpLin_
std::vector< int > fgvb_out_
std::vector< double > vec1
Linearisation for Fenix strip input: 16 bits corresponding to input EBDataFrame output: 18 bits...
std::vector< std::pair< int, EcalTrigTowerDetId > > hitTowers_
EcalFenixAmplitudeFilter * getFilter() const
constexpr size_t nSamples
void initStructures(std::vector< std::vector< std::pair< int, std::vector< T > > > > &towMap)
calculates .... for Fenix strip, barrel input: 18 bits output: 18 bits
const EcalTPGWeightGroup * ecaltpgWeightGroup_
const EcalTPGTowerStatus * ecaltpgBadTT_
void run(const edm::EventSetup &, const EBDigiCollection *col, EcalEBTrigPrimDigiCollection &result, EcalEBTrigPrimDigiCollection &resultTcp)
std::vector< EcalFenixLinearizer * > linearizer_
int getIndex(const EEDigiCollection *, EcalTrigTowerDetId &id)
edm::ESHandle< CaloGeometry > theGeometry
int getIndex(const EBDigiCollection *, EcalTrigTowerDetId &id)
static const unsigned int maxNrTowers_
std::vector< int > fgvb_out_temp_
edm::ESHandle< EcalTrigTowerConstituentsMap > eTTmap_
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)
std::vector< int > tcpformat_out_
int findStripNr(const EBDetId &id)
const EcalElectronicsMapping * theMapping_
std::vector< int > filt_out_
EcalFenixAmplitudeFilter * amplitude_filter_
void clean(std::vector< std::vector< std::pair< int, std::vector< T > > > > &towerMap)
void init(const edm::EventSetup &)
const EcalTPGPedestals * ecaltpPed_
EcalFenixPeakFinder * peak_finder_
const EcalTPGLutIdMap * ecaltpgLut_
const EcalTPGLutGroup * ecaltpgLutGroup_
std::vector< std::vector< int > > lin_out_
EcalFenixTcpFormat * fenixTcpFormat_
std::vector< EcalEBTriggerPrimitiveSample > towtp_
std::vector< int > peak_out_
std::vector< std::vector< std::pair< int, std::vector< EEDataFrame > > > > towerMapEE_
const EcalTPGWeightIdMap * ecaltpgWeightMap_