Go to the documentation of this file.
33 : mapFile_(iConfig.getUntrackedParameter<
std::
string>(
"MapFile",
"")),
34 mapAuto_(iConfig.getUntrackedParameter<
bool>(
"MapAuto",
false)),
35 skipHE_(iConfig.getUntrackedParameter<
bool>(
"SkipHE",
false)) {
56 desc.addUntracked<
bool>(
"MapAuto",
false);
57 desc.addUntracked<
bool>(
"SkipHE",
false);
58 descriptions.
add(
"caloTowerConstituents",
desc);
66 auto prod = std::make_unique<CaloTowerConstituentsMap>(&hcaltopo, &cttopo);
73 prod->useStandardHB(
true);
75 prod->useStandardHE(
true);
76 prod->useStandardHF(
true);
77 prod->useStandardHO(
true);
78 prod->useStandardEB(
true);
93 gzFile gzed = gzopen(eff.
fullPath().c_str(),
"rb");
95 while (!gzeof(gzed)) {
98 if (
nullptr != gzgets(gzed,
line, 1023)) {
101 int ct = sscanf(
line,
"%i %d %d", &rawid, &
ieta, &
iphi);
105 theMap.
assign(detid, tid);
118 if (geomEE ==
nullptr)
126 for (
auto detId_itr : vec) {
128 auto cellGeometry = geomEE->
getGeometry(detId_itr);
137 theMap.
assign(detId_itr, tid);
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void parseTextMap(const std::string &filename, CaloTowerConstituentsMap &theMap)
CaloTowerConstituentsMapBuilder(const edm::ParameterSet &)
void assign(const DetId &cell, const CaloTowerDetId &tower)
set the association between a DetId and a tower
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geometryToken_
void assignEEtoHE(const CaloGeometry *geometry, CaloTowerConstituentsMap &theMap, const CaloTowerTopology *cttopo)
edm::ESGetToken< CaloTowerTopology, HcalRecNumberingRecord > cttopoToken_
int convertHcaltoCT(int hcal_ieta, HcalSubdetector subdet) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::unique_ptr< CaloTowerConstituentsMap > ReturnType
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
virtual const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const
Get a list of valid detector ids (for the given subdetector)
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
virtual DetId getClosestCell(const GlobalPoint &r) const
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > hcaltopoToken_
ReturnType produce(const CaloGeometryRecord &)
~CaloTowerConstituentsMapBuilder() override
std::string fullPath() const