36 mapFile_(iConfig.getUntrackedParameter<
std::
string>(
"MapFile",
"")),
37 mapAuto_(iConfig.getUntrackedParameter<
bool>(
"MapAuto",
false)),
38 skipHE_(iConfig.getUntrackedParameter<
bool>(
"SkipHE",
false)) {
61 descriptions.
add(
"caloTowerConstituents", desc );
74 auto prod = std::make_unique<CaloTowerConstituentsMap>( &*hcaltopo, &*cttopo );
83 prod->useStandardHB(
true);
85 prod->useStandardHF(
true);
86 prod->useStandardHO(
true);
87 prod->useStandardEB(
true);
104 gzFile gzed = gzopen( eff.
fullPath().c_str(),
"rb" );
106 while( !gzeof( gzed )) {
108 int ieta, iphi, rawid;
109 if(
nullptr != gzgets( gzed, line, 1023 )) {
111 int ct = sscanf( line,
"%i %d %d", &rawid, &ieta, &iphi );
113 DetId detid( rawid );
115 theMap.
assign( detid, tid );
126 if(geomEE==
nullptr)
return;
133 for(
auto detId_itr : vec){
135 auto cellGeometry = geomEE->
getGeometry(detId_itr);
143 theMap.
assign(detId_itr,tid);
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
~CaloTowerConstituentsMapBuilder() override
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
int convertHcaltoCT(int hcal_ieta, HcalSubdetector subdet) const
CaloTowerConstituentsMapBuilder(const edm::ParameterSet &)
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)
const DepRecordT getRecord() const
void assign(const DetId &cell, const CaloTowerDetId &tower)
set the association between a DetId and a tower
ReturnType produce(const CaloGeometryRecord &)
virtual DetId getClosestCell(const GlobalPoint &r) const
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.
std::unique_ptr< CaloTowerConstituentsMap > ReturnType
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::string fullPath() const
void assignEEtoHE(const CaloGeometry *geometry, CaloTowerConstituentsMap &theMap, const CaloTowerTopology *cttopo)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool get(HolderT &iHolder) const
void parseTextMap(const std::string &filename, CaloTowerConstituentsMap &theMap)