1 #ifndef EcalTrigPrimFunctionalAlgo_h
2 #define EcalTrigPrimFunctionalAlgo_h
40 class ETPCoherenceTest;
62 std::vector<std::vector<std::pair<
int,std::vector<typename Coll::Digi> > > > &towerMap,
67 estrip_->
setPointers(ecaltpPed,ecaltpLin,ecaltpgWeightMap,ecaltpgWeightGroup,ecaltpgSlidW,ecaltpgFgStripEE,ecaltpgBadX);
77 etcp_->
setPointers(ecaltpgFgEBGroup,ecaltpgLutGroup,ecaltpgLut,ecaltpgFineGrainEB,ecaltpgFineGrainTowerEE,ecaltpgBadTT);
84 void initStructures(std::vector<std::vector<std::pair<
int,std::vector<T> > > > & towMap);
86 void clean(std::vector<std::vector<std::pair<
int,std::vector<T> > > > &towerMap);
88 void fillMap(Coll
const * col, std::vector<std::vector<std::pair<
int,std::vector<typename Coll::Digi> > > > &towerMap);
96 int ind=(
id.ietaAbs()-18)*72 +
id.iphi();
97 if (
id.zside()<0) ind+=792;
127 std::vector<std::vector<std::pair<int,std::vector<EBDataFrame> > > >
towerMapEB_;
128 std::vector<std::vector<std::pair<int,std::vector<EEDataFrame> > > >
towerMapEE_;
130 std::vector<EcalTriggerPrimitiveSample>
towtp_;
131 std::vector<EcalTriggerPrimitiveSample>
towtp2_;
139 template <
class Coll>
144 typedef typename Coll::Digi Digi;
151 std::vector<typename Coll::Digi> dummy;
163 for(
unsigned int i = 0;
i < towerMap[itow].size();++
i)
167 if ((towerMap[index])[
i].first > 0) {
172 bool isInInnerRings=
false;
182 int phi=2*((thisTower.
iphi()-1)/2);
197 for (
int nrt=0;nrt<nrTowers;nrt++) {
208 LogDebug(
"EcalTPG") <<
" For tower "<<itow<<
" created TP nr "<<nrTP<<
" with Et "<<tptow[nrt].
compressedEt();
214 for (
int nrt=0;nrt<nrTowers;nrt++) {
235 template <
class Coll>
237 std::vector<std::vector<std::pair<
int,std::vector<typename Coll::Digi> > > > &towerMap)
239 typedef typename Coll::Digi Digi;
245 LogDebug(
"EcalTPG") <<
"Fill mapping, Collection size = "<<col->size();
246 for(
unsigned int i = 0;
i < col->size() ; ++
i) {
247 Digi samples((*col)[
i]);
253 for (
unsigned int ij=0;ij<towerMap[
index].size();++ij) filled+=towerMap[index][ij].
first;
259 int ncryst=towerMap[
index][stripnr-1].first;
261 edm::LogError(
"EcalTrigPrimFunctionAlgo")<<
"! Too many xtals for TT "<<coarser<<
" stripnr "<<stripnr<<
" xtalid "<<samples.id() ;
264 ((towerMap[
index])[stripnr-1].
second)[ncryst]=samples;
268 LogDebug(
"EcalTPG")<<
"fillMap"<<
"[EcalTrigPrimFunctionalAlgo] (found "
269 << col->size() <<
" frames in "<< towerMap.size() <<
" towers) ";
272 LogDebug(
"EcalTPG")<<
"FillMap - FillMap Collection size=0 !!!!";
289 std::vector<std::pair<int,std::vector<T> > > vec1(
nbMaxStrips_);
290 for (
int i=0;i<nbMaxStrips_ ;++i) vec1[i]=std::pair<int,std::vector<T> >(0,vec0);
std::vector< std::vector< std::pair< int, std::vector< EBDataFrame > > > > towerMapEB_
void setPointers(const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup, const EcalTPGLutGroup *ecaltpgLutGroup, const EcalTPGLutIdMap *ecaltpgLut, const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB, const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE, const EcalTPGTowerStatus *ecaltpgBadTT)
const EcalElectronicsMapping * theMapping_
const CaloSubdetectorGeometry * theEndcapGeometry
std::vector< std::vector< int > > striptp_
std::vector< std::pair< int, EcalTrigTowerDetId > > hitTowers_
class representing the Fenix chip, format strip
void push_back(T const &t)
void setPointers(const EcalTPGPedestals *ecaltpPed, const EcalTPGLinearizationConst *ecaltpLin, const EcalTPGWeightIdMap *ecaltpgWeightMap, const EcalTPGWeightGroup *ecaltpgWeightGroup, const EcalTPGSlidingWindow *ecaltpgSlidW, const EcalTPGFineGrainStripEE *ecaltpgFgStripEE, const EcalTPGCrystalStatus *ecaltpgBadX)
static const unsigned int maxNrSamplesOut_
void setPointers(const EcalTPGLinearizationConst *ecaltpLin, const EcalTPGPedestals *ecaltpPed, const EcalTPGSlidingWindow *ecaltpgSlidW, const EcalTPGWeightIdMap *ecaltpgWeightMap, const EcalTPGWeightGroup *ecaltpgWeightGroup, const EcalTPGFineGrainStripEE *ecaltpgFgStripEE, const EcalTPGCrystalStatus *ecaltpgBadX)
edm::ESHandle< EcalTrigTowerConstituentsMap > eTTmap_
void process(const edm::EventSetup &, std::vector< const T > &, int nrxtals, std::vector< int > &out)
int zside() const
get the z-side of the tower (1/-1)
std::vector< EcalTriggerPrimitiveSample > towtp_
virtual ~EcalTrigPrimFunctionalAlgo()
U second(std::pair< T, U > const &p)
int compressedEt() const
get the encoded/compressed Et of interesting sample
static const unsigned int maxNrTowers_
void setPointers2(const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup, const EcalTPGLutGroup *ecaltpgLutGroup, const EcalTPGLutIdMap *ecaltpgLut, const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB, const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE, const EcalTPGTowerStatus *ecaltpgBadTT)
EcalTrigPrimFunctionalAlgo(const edm::EventSetup &setup, int binofmax, bool tcpFormat, bool barrelOnly, bool debug, bool famos)
void setSample(int i, const EcalTriggerPrimitiveSample &sam)
int ietaAbs() const
get the absolute value of the tower ieta
void fillMap(Coll const *col, std::vector< std::vector< std::pair< int, std::vector< typename Coll::Digi > > > > &towerMap)
void run(const edm::EventSetup &, const EBDigiCollection *col, EcalTrigPrimDigiCollection &result, EcalTrigPrimDigiCollection &resultTcp)
void run_part2(const edm::EventSetup &, Coll const *col, std::vector< std::vector< std::pair< int, std::vector< typename Coll::Digi > > > > &towerMap, EcalTrigPrimDigiCollection &result, EcalTrigPrimDigiCollection &resultTcp)
std::vector< std::vector< std::pair< int, std::vector< EEDataFrame > > > > towerMapEE_
int getIndex(const EBDigiCollection *, EcalTrigTowerDetId &id)
int getIndex(const EEDigiCollection *, EcalTrigTowerDetId &id)
int iphi() const
get the tower iphi
void init(const edm::EventSetup &)
void initStructures(std::vector< std::vector< std::pair< int, std::vector< T > > > > &towMap)
static const unsigned int maxNrTPs_
EcalSubdetector subDet() const
get the subDetector associated to the Trigger Tower
std::vector< EcalTriggerPrimitiveSample > towtp2_
void run_part1_EB(EBDigiCollection const *col)
class representing the Fenix chip, format strip
void clean(std::vector< std::vector< std::pair< int, std::vector< T > > > > &towerMap)
static const unsigned int nrSamples_
void run_part1_EE(EEDigiCollection const *col)
void process(const edm::EventSetup &setup, std::vector< EBDataFrame > &bid, std::vector< std::vector< int > > &tpframetow, int nStr, std::vector< EcalTriggerPrimitiveSample > &tptow, std::vector< EcalTriggerPrimitiveSample > &tptow2, bool isInInnerRings, EcalTrigTowerDetId thisTower)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
int findStripNr(const EBDetId &id)