18 : m_hcaltopo(hcaltopo),
25 m_reverseItems(nullptr) {}
57 <<
" is already mapped to a CaloTower " <<
m_items.find(cell)->tower
73 <<
" ieta " <<
id.ieta();
75 std::vector<DetId>
items;
81 std::unique_ptr<std::multimap<CaloTowerDetId, DetId>> ptr{
new std::multimap<CaloTowerDetId, DetId>};
83 ptr->insert(std::pair<CaloTowerDetId, DetId>(m_item.tower, m_item.cell));
84 std::multimap<CaloTowerDetId, DetId>* expected =
nullptr;
85 if (
m_reverseItems.compare_exchange_strong(expected, ptr.get(), std::memory_order_acq_rel)) {
91 std::multimap<CaloTowerDetId, DetId>::const_iterator
j;
94 items.emplace_back(
j->second);
104 for (
int i = 0;
i < nd;
i++) {
109 items.emplace_back(hid);
116 items.emplace_back(hid);
127 for (
int i = 0;
i < nd;
i++) {
129 items.emplace_back(hid);
139 for (
int i = 0;
i < nd;
i++) {
144 items.emplace_back(hid);
151 items.emplace_back(hid);
162 for (
int i = 0;
i < nd;
i++) {
164 items.emplace_back(hid);
171 int hcal_ieta2 = hcal_ieta - 1;
173 for (
int i = 0;
i < nd;
i++) {
175 items.emplace_back(hid);
186 if (hid.
zside() == -1) {
Log< level::Info, true > LogVerbatim
bool getMergePositionFlag() const
void useStandardHE(bool use=true)
add standard (hardcoded) HE items?
constexpr int zside() const
get the z-side of the cell (1/-1)
constexpr int ietaAbs() const
get the absolute value of the cell ieta
CaloTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
std::vector< T >::const_iterator const_iterator
void useStandardEB(bool use=true)
add standard (hardcoded) EB items?
const CaloTowerTopology * m_cttopo
constexpr int crystal_iphi_high() const
get the largest crystal_iphi of the crystal in front of this tower (HB and HE tower 17 only) ...
void sort()
done adding to the association
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void useStandardHB(bool use=true)
add standard (hardcoded) HB items?
int tower_ieta() const
get the HCAL/trigger ieta of this crystal
constexpr bool null() const
is this a null id ?
constexpr HcalSubdetector subdet() const
get the subdetector
const HcalTopology * m_hcaltopo
~CaloTowerConstituentsMap()
int convertCTtoHcal(int ct_ieta) const
CaloTowerConstituentsMap()=delete
int convertHcaltoCT(int hcal_ieta, HcalSubdetector subdet) const
void assign(const DetId &cell, const CaloTowerDetId &tower)
set the association between a DetId and a tower
int tower_iphi() const
get the HCAL/trigger iphi of this crystal
constexpr int crystal_ieta_high() const
get the largest crystal_ieta of the crystal in front of this tower (HB and HE tower 17 only) ...
constexpr int crystal_ieta_low() const
get the smallest crystal_ieta of the crystal in front of this tower (HB and HE tower 17 only) ...
void useStandardHO(bool use=true)
add standard (hardcoded) HO items?
void depthBinInformation(HcalSubdetector subdet, int etaRing, int iphi, int zside, int &nDepthBins, int &startingBin) const
finds the number of depth bins and which is the number to start with
constexpr uint32_t rawId() const
get the raw id
static const int MAX_IETA
HcalDetId mergedDepthDetId(const HcalDetId &id) const
constexpr int iphi() const
get the cell iphi
std::vector< DetId > constituentsOf(const CaloTowerDetId &id) const
Get the constituent detids for this tower id ( not yet implemented )
void useStandardHF(bool use=true)
add standard (hardcoded) HF items?
constexpr int crystal_iphi_low() const
get the smallest crystal_iphi of the crystal in front of this tower (HB and HE tower 17 only) ...
std::atomic< std::multimap< CaloTowerDetId, DetId > * > m_reverseItems
edm::SortedCollection< MapItem > m_items