36 mapFile_(iConfig.getUntrackedParameter<std::
string>(
"MapFile",
"")) {
57 descriptions.
add(
"caloTowerConstituents", desc );
79 prod->useStandardHB(
true);
80 prod->useStandardHE(
true);
81 prod->useStandardHF(
true);
82 prod->useStandardHO(
true);
83 prod->useStandardEB(
true);
100 gzFile gzed = gzopen( eff.
fullPath().c_str(),
"rb" );
102 while( !gzeof( gzed )) {
104 int ieta, iphi, rawid;
105 if( 0 != gzgets( gzed, line, 1023 )) {
106 if(
index( line,
'#' ) != 0 )*(
index( line,
'#' )) = 0;
107 int ct = sscanf( line,
"%i %d %d", &rawid, &ieta, &iphi );
109 DetId detid( rawid );
111 theMap.
assign( detid, tid );
122 if(geomEE==
NULL)
return;
127 const std::vector<DetId>& vec(geomEE->getValidDetIds());
129 for(std::vector<DetId>::const_iterator detId_itr =vec.begin();
130 detId_itr != vec.end(); detId_itr++){
136 const HcalDetId closestCell ( geomHE->getClosestCell( gp ) ) ;
140 theMap.
assign(*detId_itr,tid);
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
int convertHcaltoCT(int hcal_ieta, HcalSubdetector subdet) const
CaloTowerConstituentsMapBuilder(const edm::ParameterSet &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
const DepRecordT & getRecord() const
std::auto_ptr< CaloTowerConstituentsMap > ReturnType
void get(HolderT &iHolder) const
void assign(const DetId &cell, const CaloTowerDetId &tower)
set the association between a DetId and a tower
ReturnType produce(const CaloGeometryRecord &)
T const * product() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
~CaloTowerConstituentsMapBuilder()
ESHandle< TrackerGeometry > geometry
void assignEEtoHE(const CaloGeometry *geometry, CaloTowerConstituentsMap &theMap, const CaloTowerTopology *cttopo)
std::string fullPath() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
void parseTextMap(const std::string &filename, CaloTowerConstituentsMap &theMap)