21 : theTriggerMap(nullptr), theElecMap(nullptr),
dEta(dEta_),
dPhi(dPhi_) {}
25 for (
size_t iCap = 0; iCap <
nEndcaps; ++iCap) {
26 for (
int iDccPhi = 0; iDccPhi <
nDccPerEe; ++iDccPhi) {
27 for (
int iDccCh = 0; iDccCh <
maxDccChs; ++iDccCh) {
41 int nTriggerTowerE[] = {0, 0, 0, 0, 0, 0, 0, 0};
42 int nTriggerTowerB[] = {0, 0, 0, 0, 0, 0, 0, 0};
43 static std::atomic<int> ncall{0};
58 edm::LogInfo(
"EcalSelectiveReadout") <<
"without forced bit + with forced bit set:\n" 61 <<
" low interest TT(s) in barrel\n" 63 <<
" single TT(s) in barrel\n" 66 <<
" neighbor interest TT(s) in barrel\n" 68 <<
" centre interest TT(s) in barrel\n" 71 <<
" low interest TT(s) in endcap\n" 73 <<
" single TT(s) in endcap\n" 77 <<
" center TT(s) in endcap\n";
84 #ifndef ECALSELECTIVEREADOUT_NOGEOM 86 for (std::vector<DetId>::const_iterator eeDetIdItr = endcapDetIds.begin(); eeDetIdItr != endcapDetIds.end();
95 int iz = (eeDetId.zside() > 0) ? 1 : 0;
101 #else //ECALSELECTIVEREADOUT_NOGEOM defined 103 for (
int iZ0 = 0; iZ0 < 2; ++iZ0) {
106 if (!(xtal.
validDetId(iX0 + 1, iY0 + 1, (iZ0 > 0 ? 1 : -1)))) {
109 xtal =
EEDetId(iX0 + 1, iY0 + 1, (iZ0 > 0 ? 1 : -1));
111 if (39 <= iX0 && iX0 <= 60 && 45 <= iY0 && iY0 <= 54) {
128 #endif //ECALSELECTIVEREADOUT_NOGEOM not defined 150 const int iZ0 =
id.
zside() > 0 ? 1 : 0;
151 const int iDcc0 =
id.dccId() - 1;
152 const int iDccPhi0 = (iDcc0 < 9) ? iDcc0 : (iDcc0 - 45);
153 const int iDccCh0 =
id.towerId() - 1;
165 const int iZ0 = (scDetId.
zside() > 0) ? 1 : 0;
166 const int iDcc0 = dccAndDccCh.first - 1;
167 const int iDccPhi0 = (iDcc0 < 9) ? iDcc0 : (iDcc0 - 45);
168 const int iDccCh0 = dccAndDccCh.second - 1;
180 int iPhi =
tower.iphi() - 1;
203 for (
int iEtaNeigh = std::max<int>(0,
iEta -
dEta);
206 for (
int iPhiNeigh = iPhi -
dPhi; iPhiNeigh <= iPhi +
dPhi; ++iPhiNeigh) {
210 if (iPhiNeigh_ < 0) {
227 for (
size_t i = 0;
i < 4; ++
i) {
228 size_t iEta = innerEtas[
i];
238 os <<
"#SRP flag map\n#\n" 241 <<
": low interest\n" 253 <<
": forced low interest\n" 256 <<
": forced single\n" 259 <<
": forced neighbout\n" 262 <<
": forced center\n" 312 for (
int i = -1;
i <= 68; ++
i) {
313 if ((
i + 1) % 10 == 0)
315 os << std::setw(2) <<
i <<
": " << (char)(
'0' +
i);
325 os <<
"Sc2DCCch0: " << (
endcap ?
"EE+" :
"EE-") <<
"\n";
332 os << (char)(
'0' - 1);
static bool validDetId(int ix, int iy, int iz)
void printEndcap(int endcap, std::ostream &s) const
std::pair< int, int > getDCCandSC(EcalScDetId id) const
void printHeader(std::ostream &os) const
print out header for the map: see print(std::ostream&)
int zside() const
zside = +1 or -1
static const int FORCED_MASK
static const size_t nEndcapXBins
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
towerInterest_t getCrystalInterest(const EBDetId &ebDetId) const
static const size_t nSupercrystalXBins
static const size_t nEndcaps
static const int nDccPerEe
void classifyTriggerTowers(const ttFlag_t ttFlags[nTriggerTowersInEta][nTriggerTowersInPhi])
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
towerInterest_t & eeRuInterest(const EEDetId &id)
static const size_t nEndcapYBins
static const size_t nSupercrystalYBins
void printBarrel(std::ostream &os) const
EcalSelectiveReadout(int dEta=1, int dPhi=1)
static const int maxDccChs
static const size_t nEndcapTriggerTowersInEta
std::ostream & operator<<(std::ostream &os, const EcalSelectiveReadout &selectiveReadout)
const EcalElectronicsMapping * theElecMap
Log< level::Info, false > LogInfo
towerInterest_t eeRuInterest_[nEndcaps][nDccPerEe][maxDccChs]
const EcalTrigTowerConstituentsMap * theTriggerMap
towerInterest_t getTowerInterest(const EcalTrigTowerDetId &towerId) const
constexpr uint32_t rawId() const
get the raw id
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
void combineFlags(T &var, T val) const
static const size_t nTriggerTowersInEta
static const size_t nTriggerTowersInPhi
void print(std::ostream &os) const
print out the map
static const char srpFlagMarker[]
void runSelectiveReadout0(const ttFlag_t towerFlags[nTriggerTowersInEta][nTriggerTowersInPhi])
towerInterest_t towerInterest[nTriggerTowersInEta][nTriggerTowersInPhi]
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
static const size_t nBarrelTriggerTowersInEta
towerInterest_t getSuperCrystalInterest(const EcalScDetId &scDetId) const
void printDccChMap(std::ostream &os) const