1 #ifndef SIMCALORIMETRY_ECALTRIGPRIMALGOS_ECALTRIGPRIMFUNCTIONALALGO_h 2 #define SIMCALORIMETRY_ECALTRIGPRIMALGOS_ECALTRIGPRIMFUNCTIONALALGO_h 39 class ETPCoherenceTest;
94 ecaltpgOddWeightGroup,
109 etcp_->setPointers(ecaltpgFgEBGroup,
113 ecaltpgFineGrainTowerEE,
125 template <
class Coll>
134 int ind = (
id.ietaAbs() - 18) * 72 +
id.
iphi();
141 std::unique_ptr<EcalFenixTcp>
etcp_;
169 std::vector<std::vector<std::pair<int, std::vector<EBDataFrame>>>>
towerMapEB_;
170 std::vector<std::vector<std::pair<int, std::vector<EEDataFrame>>>>
towerMapEE_;
172 std::vector<EcalTriggerPrimitiveSample>
towtp_;
173 std::vector<EcalTriggerPrimitiveSample>
towtp2_;
182 template <
class Coll>
195 std::vector<typename Coll::Digi>
dummy;
199 estrip_->getFGVB()->setbadStripMissing(
false);
201 for (
int itow = 0; itow <
nrTowers_; ++itow) {
206 edm::LogVerbatim(
"EcalTPG") <<
"+++++++++++++++++++++++++++++++++++++++++++++++++";
213 for (
unsigned int i = 0;
i < towerMap[itow].size(); ++
i) {
217 if ((towerMap[
index])[
i].first > 0) {
219 edm::LogVerbatim(
"EcalTPG") <<
"-------------------------------------------------";
226 bool isInInnerRings =
false;
228 isInInnerRings =
true;
234 if (isInInnerRings) {
236 int phi = 2 * ((thisTower.
iphi() - 1) / 2);
256 for (
int nrt = 0; nrt < nrTowers; nrt++) {
267 LogDebug(
"EcalTPG") <<
" For tower " << itow <<
" created TP nr " << nrTP <<
" with Et " 269 result.push_back(tptow[nrt]);
273 for (
int nrt = 0; nrt < nrTowers; nrt++) {
296 template <
class Coll>
305 LogDebug(
"EcalTPG") <<
"Fill mapping, Collection size = " <<
col->size();
306 for (
unsigned int i = 0;
i <
col->size(); ++
i) {
314 for (
unsigned int ij = 0; ij < towerMap[
index].size(); ++ij)
321 int ncryst = towerMap[
index][stripnr - 1].first;
324 <<
"! Too many xtals for TT " << coarser <<
" stripnr " << stripnr <<
" xtalid " <<
samples.id();
332 <<
"[EcalTrigPrimFunctionalAlgo] (found " <<
col->size() <<
" frames in " << towerMap.size()
335 LogDebug(
"EcalTPG") <<
"FillMap - FillMap Collection size=0 !!!!";
344 (towMap[
i])[
j].first = 0;
355 vec1[
i] = std::pair<
int, std::vector<T>>(0, vec0);
Log< level::Info, true > LogVerbatim
const EcalElectronicsMapping * theMapping_
void setPointers2(const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup, const EcalTPGLutGroup *ecaltpgLutGroup, const EcalTPGLutIdMap *ecaltpgLut, const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB, const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE, const EcalTPGTowerStatus *ecaltpgBadTT, const EcalTPGSpike *ecaltpgSpike, const EcalTPGTPMode *ecaltpgTPMode)
int ieta() const
get the tower ieta
EcalTrigPrimFunctionalAlgo(const EcalTrigTowerConstituentsMap *eTTmap, const CaloSubdetectorGeometry *endcapGeometry, const EcalElectronicsMapping *theMapping, int binofmax, bool tcpFormat, bool debug, bool famos, bool TPinfoPrintout)
std::vector< std::vector< int > > striptp_
EcalSubdetector subDet() const
get the subDetector associated to the Trigger Tower
void fillMap(Coll const *col, std::vector< std::vector< std::pair< int, std::vector< typename Coll::Digi >>>> &towerMap)
std::unique_ptr< EcalFenixTcp > etcp_
const CaloSubdetectorGeometry * theEndcapGeometry_
void push_back(T const &t)
void run_part2(Coll const *col, std::vector< std::vector< std::pair< int, std::vector< typename Coll::Digi >>>> &towerMap, EcalTrigPrimDigiCollection &result, EcalTrigPrimDigiCollection &resultTcp)
std::vector< std::pair< int, EcalTrigTowerDetId > > hitTowers_
static const unsigned int maxNrSamplesOut_
Log< level::Error, false > LogError
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
std::vector< EcalTriggerPrimitiveSample > towtp_
virtual ~EcalTrigPrimFunctionalAlgo()
U second(std::pair< T, U > const &p)
static const unsigned int maxNrTowers_
void initStructures(std::vector< std::vector< std::pair< int, std::vector< T >>>> &towMap)
int zside() const
get the z-side of the tower (1/-1)
void setSample(int i, const EcalTriggerPrimitiveSample &sam)
std::vector< double > vec1
std::vector< std::vector< std::pair< int, std::vector< EBDataFrame > > > > towerMapEB_
void setPointers(const EcalTPGLinearizationConst *ecaltpLin, const EcalTPGPedestals *ecaltpPed, const EcalTPGSlidingWindow *ecaltpgSlidW, const EcalTPGWeightIdMap *ecaltpgWeightMap, const EcalTPGWeightGroup *ecaltpgWeightGroup, const EcalTPGOddWeightIdMap *ecaltpgOddWeightMap, const EcalTPGOddWeightGroup *ecaltpgOddWeightGroup, const EcalTPGFineGrainStripEE *ecaltpgFgStripEE, const EcalTPGCrystalStatus *ecaltpgBadX, const EcalTPGStripStatus *ecaltpgStripStatus, const EcalTPGTPMode *ecaltpgTPMode)
void clean(std::vector< std::vector< std::pair< int, std::vector< T >>>> &towerMap)
int getIndex(const EBDigiCollection *, EcalTrigTowerDetId &id)
int getIndex(const EEDigiCollection *, EcalTrigTowerDetId &id)
int compressedEt() const
get the encoded/compressed Et of interesting sample
int ietaAbs() const
get the absolute value of the tower ieta
static const unsigned int maxNrTPs_
std::vector< std::vector< std::pair< int, std::vector< EEDataFrame > > > > towerMapEE_
std::unique_ptr< EcalFenixStrip > estrip_
std::vector< EcalTriggerPrimitiveSample > towtp2_
void run_part1_EB(EBDigiCollection const *col)
const EcalTrigTowerConstituentsMap * eTTmap_
Log< level::Warning, false > LogWarning
static const unsigned int nrSamples_
void run_part1_EE(EEDigiCollection const *col)
int iphi() const
get the tower iphi
void run(const EBDigiCollection *col, EcalTrigPrimDigiCollection &result, EcalTrigPrimDigiCollection &resultTcp)
static EcalTrigTowerDetId barrelTowerOf(const DetId &id)
int findStripNr(const EBDetId &id)