1 #ifndef EcalEBTrigPrimTestAlgo_h 2 #define EcalEBTrigPrimTestAlgo_h 40 class ETPCoherenceTest;
87 void initStructures(std::vector<std::vector<std::pair<
int,std::vector<T> > > > & towMap);
89 void clean(std::vector<std::vector<std::pair<
int,std::vector<T> > > > &towerMap);
91 void fillMap(Coll
const * col, std::vector<std::vector<std::pair<
int,std::vector<typename Coll::Digi> > > > &towerMap);
99 int ind=(
id.ietaAbs()-18)*72 +
id.iphi();
100 if (
id.
zside()<0) ind+=792;
128 std::vector<std::vector<std::pair<int,std::vector<EBDataFrame> > > >
towerMapEB_;
129 std::vector<std::vector<std::pair<int,std::vector<EEDataFrame> > > >
towerMapEE_;
131 std::vector<EcalEBTriggerPrimitiveSample>
towtp_;
132 std::vector<EcalEBTriggerPrimitiveSample>
towtp2_;
191 template <
class Coll>
193 std::vector<std::vector<std::pair<
int,std::vector<typename Coll::Digi> > > > &towerMap)
200 if (
debug_)
std::cout <<
"Fill mapping, Collection size = "<< col->size() << std::endl;;
201 for(
unsigned int i = 0;
i < col->size() ; ++
i) {
208 for (
unsigned int ij=0;ij<towerMap[
index].size();++ij) filled+=towerMap[index][ij].
first;
214 int ncryst=towerMap[
index][stripnr-1].first;
216 edm::LogError(
"EcalTrigPrimFunctionAlgo")<<
"! Too many xtals for TT "<<coarser<<
" stripnr "<<stripnr<<
" xtalid "<<samples.id() ;
223 if (
debug_)
std::cout <<
"fillMap"<<
"[EcalTrigPrimFunctionalAlgo] (found " 224 << col->size() <<
" frames in "<< towerMap.size() <<
" towers) " << std::endl;
227 if (
debug_)
std::cout <<
"FillMap - FillMap Collection size=0 !!!!" << std::endl;;
237 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_