|
|
Go to the documentation of this file.
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++) {
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++) {
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) {
void useStandardEB(bool use=true)
add standard (hardcoded) EB 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< T >::const_iterator const_iterator
void sort()
done adding to the association
std::vector< DetId > constituentsOf(const CaloTowerDetId &id) const
Get the constituent detids for this tower id ( not yet implemented )
constexpr int iphi() const
get the cell iphi
void useStandardHB(bool use=true)
add standard (hardcoded) HB items?
void assign(const DetId &cell, const CaloTowerDetId &tower)
set the association between a DetId and a tower
void useStandardHO(bool use=true)
add standard (hardcoded) HO 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)
void useStandardHE(bool use=true)
add standard (hardcoded) HE items?
constexpr bool null() const
is this a null id ?
HcalDetId mergedDepthDetId(const HcalDetId &id) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
bool getMergePositionFlag() const
const HcalTopology * m_hcaltopo
int convertHcaltoCT(int hcal_ieta, HcalSubdetector subdet) const
int tower_ieta() const
get the HCAL/trigger ieta of this crystal
const CaloTowerTopology * m_cttopo
void useStandardHF(bool use=true)
add standard (hardcoded) HF items?
int tower_iphi() const
get the HCAL/trigger iphi of this crystal
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 crystal_ieta_low() const
get the smallest crystal_ieta of the crystal in front of this tower (HB and HE tower 17 only)
int convertCTtoHcal(int ct_ieta) const
constexpr uint32_t rawId() const
get the raw id
std::atomic< std::multimap< CaloTowerDetId, DetId > * > m_reverseItems
edm::SortedCollection< MapItem > m_items
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)
constexpr int ietaAbs() const
get the absolute value of the cell ieta
constexpr int zside() const
get the z-side of the cell (1/-1)
~CaloTowerConstituentsMap()
static const int MAX_IETA
CaloTowerConstituentsMap()=delete