|
|
Go to the documentation of this file. 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) {
203 std::cout <<
"+++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
211 for (
unsigned int i = 0;
i < towerMap[itow].size(); ++
i) {
215 if ((towerMap[
index])[
i].first > 0) {
217 std::cout <<
"-------------------------------------------------" << std::endl;
218 std::cout <<
"on Strip index " <<
i << std::endl;
224 bool isInInnerRings =
false;
226 isInInnerRings =
true;
232 if (isInInnerRings) {
234 int phi = 2 * ((thisTower.
iphi() - 1) / 2);
254 for (
int nrt = 0; nrt < nrTowers; nrt++) {
265 LogDebug(
"EcalTPG") <<
" For tower " << itow <<
" created TP nr " << nrTP <<
" with Et "
267 result.push_back(tptow[nrt]);
271 for (
int nrt = 0; nrt < nrTowers; nrt++) {
294 template <
class Coll>
303 LogDebug(
"EcalTPG") <<
"Fill mapping, Collection size = " <<
col->size();
304 for (
unsigned int i = 0;
i <
col->size(); ++
i) {
311 for (
unsigned int ij = 0; ij < towerMap[
index].size(); ++ij)
318 int ncryst = towerMap[
index][stripnr - 1].first;
321 <<
"! Too many xtals for TT " << coarser <<
" stripnr " << stripnr <<
" xtalid " <<
samples.id();
329 <<
"[EcalTrigPrimFunctionalAlgo] (found " <<
col->size() <<
" frames in " << towerMap.size()
332 LogDebug(
"EcalTPG") <<
"FillMap - FillMap Collection size=0 !!!!";
341 (towMap[
i])[
j].first = 0;
352 vec1[
i] = std::pair<
int, std::vector<T>>(0, vec0);
static const unsigned int maxNrTPs_
int iphi() const
get the tower iphi
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 initStructures(std::vector< std::vector< std::pair< int, std::vector< T >>>> &towMap)
static const unsigned int maxNrTowers_
const EcalTrigTowerConstituentsMap * eTTmap_
std::vector< double > vec1
EcalTrigPrimFunctionalAlgo(const EcalTrigTowerConstituentsMap *eTTmap, const CaloSubdetectorGeometry *endcapGeometry, const EcalElectronicsMapping *theMapping, int binofmax, bool tcpFormat, bool debug, bool famos, bool TPinfoPrintout)
int ietaAbs() const
get the absolute value of the tower ieta
void run_part1_EB(EBDigiCollection const *col)
std::vector< std::vector< std::pair< int, std::vector< EEDataFrame > > > > towerMapEE_
void run_part2(Coll const *col, std::vector< std::vector< std::pair< int, std::vector< typename Coll::Digi >>>> &towerMap, EcalTrigPrimDigiCollection &result, EcalTrigPrimDigiCollection &resultTcp)
U second(std::pair< T, U > const &p)
void clean(std::vector< std::vector< std::pair< int, std::vector< T >>>> &towerMap)
std::vector< std::pair< int, EcalTrigTowerDetId > > hitTowers_
std::unique_ptr< EcalFenixTcp > etcp_
int zside() const
get the z-side of the tower (1/-1)
void push_back(T const &t)
Log< level::Warning, false > LogWarning
std::vector< EcalTriggerPrimitiveSample > towtp2_
static const unsigned int nrSamples_
const CaloSubdetectorGeometry * theEndcapGeometry_
int getIndex(const EBDigiCollection *, EcalTrigTowerDetId &id)
virtual ~EcalTrigPrimFunctionalAlgo()
std::unique_ptr< EcalFenixStrip > estrip_
void run(const EBDigiCollection *col, EcalTrigPrimDigiCollection &result, EcalTrigPrimDigiCollection &resultTcp)
void setSample(int i, const EcalTriggerPrimitiveSample &sam)
int findStripNr(const EBDetId &id)
Log< level::Error, false > LogError
EcalSubdetector subDet() const
get the subDetector associated to the Trigger Tower
std::vector< std::vector< std::pair< int, std::vector< EBDataFrame > > > > towerMapEB_
void fillMap(Coll const *col, std::vector< std::vector< std::pair< int, std::vector< typename Coll::Digi >>>> &towerMap)
int getIndex(const EEDigiCollection *, EcalTrigTowerDetId &id)
std::vector< EcalTriggerPrimitiveSample > towtp_
int compressedEt() const
get the encoded/compressed Et of interesting sample
void run_part1_EE(EEDigiCollection const *col)
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)
std::vector< std::vector< int > > striptp_
const EcalElectronicsMapping * theMapping_
static const unsigned int maxNrSamplesOut_