17 : m_hcaltopo(hcaltopo),
24 m_reverseItems(nullptr) {}
56 <<
" is already mapped to a CaloTower " <<
m_items.find(cell)->tower
71 std::cout <<
"Get constituent of " << std::hex <<
id.rawId() <<
std::dec <<
" ID " <<
id <<
" ieta " <<
id.ieta()
74 std::vector<DetId>
items;
80 std::unique_ptr<std::multimap<CaloTowerDetId, DetId>> ptr{
new std::multimap<CaloTowerDetId, DetId>};
82 ptr->insert(std::pair<CaloTowerDetId, DetId>(m_item.tower, m_item.cell));
83 std::multimap<CaloTowerDetId, DetId>* expected =
nullptr;
84 if (
m_reverseItems.compare_exchange_strong(expected, ptr.get(), std::memory_order_acq_rel)) {
90 std::multimap<CaloTowerDetId, DetId>::const_iterator
j;
93 items.emplace_back(j->second);
103 for (
int i = 0;
i < nd;
i++) {
107 if (
std::find(items.begin(), items.end(), hid) == items.end()) {
108 items.emplace_back(hid);
110 std::cout <<
id <<
" Depth " <<
i <<
":" <<
i + sd <<
" " << hid <<
"\n";
115 items.emplace_back(hid);
117 std::cout <<
id <<
" Depth " <<
i <<
":" <<
i + sd <<
" " << hid <<
"\n";
126 for (
int i = 0;
i < nd;
i++) {
128 items.emplace_back(hid);
130 std::cout <<
id <<
" Depth " <<
i <<
":" <<
i + sd <<
" " << hid <<
"\n";
138 for (
int i = 0;
i < nd;
i++) {
142 if (
std::find(items.begin(), items.end(), hid) == items.end()) {
143 items.emplace_back(hid);
145 std::cout <<
id <<
" Depth " <<
i <<
":" <<
i + sd <<
" " << hid <<
"\n";
150 items.emplace_back(hid);
152 std::cout <<
id <<
" Depth " <<
i <<
":" <<
i + sd <<
" " << hid <<
"\n";
161 for (
int i = 0;
i < nd;
i++) {
163 items.emplace_back(hid);
165 std::cout <<
id <<
" Depth " <<
i <<
":" <<
i + sd <<
" " << hid <<
"\n";
170 int hcal_ieta2 = hcal_ieta - 1;
172 for (
int i = 0;
i < nd;
i++) {
174 items.emplace_back(hid);
176 std::cout <<
id <<
" Depth " <<
i <<
":" <<
i + sd <<
" " << hid <<
"\n";
185 if (hid.
zside() == -1) {
192 for (
int ie = etaMin; ie <=
etaMax; ie++)
194 items.emplace_back(
EBDetId(ie, ip));
void useStandardHE(bool use=true)
add standard (hardcoded) HE items?
constexpr int ietaAbs() const
get the absolute value of the cell ieta
int convertHcaltoCT(int hcal_ieta, HcalSubdetector subdet) const
constexpr int zside() const
get the z-side of the cell (1/-1)
constexpr bool null() const
is this a null id ?
int tower_ieta() const
get the HCAL/trigger ieta of this crystal
int tower_iphi() const
get the HCAL/trigger iphi of this crystal
constexpr uint32_t rawId() const
get the raw id
std::vector< T >::const_iterator const_iterator
void useStandardEB(bool use=true)
add standard (hardcoded) EB items?
const CaloTowerTopology * m_cttopo
void sort()
done adding to the association
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
bool getMergePositionFlag() const
void useStandardHB(bool use=true)
add standard (hardcoded) HB items?
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) ...
std::vector< DetId > constituentsOf(const CaloTowerDetId &id) const
Get the constituent detids for this tower id ( not yet implemented )
HcalDetId mergedDepthDetId(const HcalDetId &id) const
const uint16_t range(const Frame &aFrame)
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) ...
constexpr HcalSubdetector subdet() const
get the subdetector
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
CaloTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
constexpr int iphi() const
get the cell iphi
const HcalTopology * m_hcaltopo
~CaloTowerConstituentsMap()
if(conf_.getParameter< bool >("UseStripCablingDB"))
CaloTowerConstituentsMap()=delete
void assign(const DetId &cell, const CaloTowerDetId &tower)
set the association between a DetId and a tower
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) ...
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 useStandardHO(bool use=true)
add standard (hardcoded) HO items?
static const int MAX_IETA
int convertCTtoHcal(int ct_ieta) const
void useStandardHF(bool use=true)
add standard (hardcoded) HF items?
std::atomic< std::multimap< CaloTowerDetId, DetId > * > m_reverseItems
edm::SortedCollection< MapItem > m_items