diff --git a/CondCore/GEMPlugins/src/plugins.cc b/CondCore/GEMPlugins/src/plugins.cc index d3c9fa7d709ed..73add4bce47ce 100644 --- a/CondCore/GEMPlugins/src/plugins.cc +++ b/CondCore/GEMPlugins/src/plugins.cc @@ -7,15 +7,12 @@ */ #include "CondCore/ESSources/interface/registration_macros.h" -#include "CondFormats/GEMObjects/interface/GEMELMap.h" -#include "CondFormats/DataRecord/interface/GEMELMapRcd.h" #include "CondFormats/GEMObjects/interface/GEMeMap.h" #include "CondFormats/DataRecord/interface/GEMeMapRcd.h" #include "CondFormats/GEMObjects/interface/GEMMaskedStrips.h" #include "CondFormats/DataRecord/interface/GEMMaskedStripsRcd.h" #include "CondFormats/GEMObjects/interface/GEMDeadStrips.h" #include "CondFormats/DataRecord/interface/GEMDeadStripsRcd.h" -REGISTER_PLUGIN(GEMELMapRcd, GEMELMap); REGISTER_PLUGIN(GEMeMapRcd, GEMeMap); REGISTER_PLUGIN(GEMMaskedStripsRcd, GEMMaskedStrips); REGISTER_PLUGIN(GEMDeadStripsRcd, GEMDeadStrips); diff --git a/CondFormats/DataRecord/interface/GEMELMapRcd.h b/CondFormats/DataRecord/interface/GEMELMapRcd.h deleted file mode 100644 index 7311bbfd3edb1..0000000000000 --- a/CondFormats/DataRecord/interface/GEMELMapRcd.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef CondFormats_DataRecord_GEMELMapRcd_h -#define CondFormats_DataRecord_GEMELMapRcd_h -// -*- C++ -*- -// -// Package: CondFormats/DataRecord -// Class : GEMELMapRcd -// -/**\class GEMELMapRcd GEMELMapRcd.h CondFormats/DataRecord/interface/GEMELMapRcd.h - - Description: [one line class summary] - - Usage: - - -*/ -// -// Author: Simranjit Singh Chhibra -// Created: Sun, 06 Nov 2016 22:44:57 GMT -// - -#include "FWCore/Framework/interface/EventSetupRecordImplementation.h" - -class GEMELMapRcd : public edm::eventsetup::EventSetupRecordImplementation {}; - -#endif diff --git a/CondFormats/DataRecord/src/GEMELMapRcd.cc b/CondFormats/DataRecord/src/GEMELMapRcd.cc deleted file mode 100644 index f51343ad13ab1..0000000000000 --- a/CondFormats/DataRecord/src/GEMELMapRcd.cc +++ /dev/null @@ -1,15 +0,0 @@ -// -*- C++ -*- -// -// Package: CondFormats/DataRecord -// Class : GEMELMapRcd -// -// Implementation: -// [Notes on implementation] -// -// Author: Simranjit Singh Chhibra -// Created: Sun, 06 Nov 2016 22:44:57 GMT - -#include "CondFormats/DataRecord/interface/GEMELMapRcd.h" -#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h" - -EVENTSETUP_RECORD_REG(GEMELMapRcd); diff --git a/CondFormats/GEMObjects/interface/GEMELMap.h b/CondFormats/GEMObjects/interface/GEMELMap.h deleted file mode 100644 index 3fed6444d638a..0000000000000 --- a/CondFormats/GEMObjects/interface/GEMELMap.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef CondFormats_GEMObjects_GEMELMap_h -#define CondFormats_GEMObjects_GEMELMap_h - -#include "CondFormats/Serialization/interface/Serializable.h" -#include -#include - -class GEMROmap; - -class GEMELMap { -public: - GEMELMap(); - explicit GEMELMap(const std::string& version); - - virtual ~GEMELMap(); - - const std::string& version() const; - void convert(GEMROmap& romap); - void convertDummy(GEMROmap& romap); - - struct GEMVFatMap { - int VFATmapTypeId; - std::vector vfat_position; - std::vector z_direction; - std::vector iEta; - std::vector iPhi; - std::vector depth; - std::vector vfatType; - std::vector vfatId; - std::vector amcId; - std::vector gebId; - std::vector sec; - - COND_SERIALIZABLE; - }; - struct GEMStripMap { - std::vector vfatType; - std::vector vfatCh; - std::vector vfatStrip; - - COND_SERIALIZABLE; - }; - - std::vector theVFatMap_; - std::vector theStripMap_; - -private: - std::string theVersion; - - COND_SERIALIZABLE; - -public: - // size of ID bits - static const int chipIdBits_ = 12; // ID size from VFat - static const int chipIdMask_ = 0xfff; // chipId mask for 12 bits - static const int gebIdBits_ = 5; // ID size from GEB - static const int maxGEBs_ = 24; // 24 gebs per amc - static const int maxVFatGE0_ = 12; // vFat per eta partition, not known yet for ME0 - static const int maxVFatGE11_ = 3; // vFat per eta partition in GE11 - static const int maxVFatGE21_ = 6; // vFat per eta partition in GE21 - static const int maxChan_ = 128; // channels per vFat - static const int amcBX_ = 25; // amc BX to get strip bx -}; -#endif // GEMELMap_H diff --git a/CondFormats/GEMObjects/interface/GEMROmap.h b/CondFormats/GEMObjects/interface/GEMROmap.h deleted file mode 100644 index fec6b4bdbf65e..0000000000000 --- a/CondFormats/GEMObjects/interface/GEMROmap.h +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef CondFormats_GEMObjects_GEMROmap_h -#define CondFormats_GEMObjects_GEMROmap_h -#include "DataFormats/MuonDetId/interface/GEMDetId.h" -#include - -class GEMROmap { -public: - struct eCoord { - uint16_t amcId; - uint16_t gebId; - uint16_t vfatId; - bool operator<(const eCoord& r) const { - if (amcId == r.amcId) { - if (gebId == r.gebId) { - return vfatId < r.vfatId; - } else { - return gebId < r.gebId; - } - } else { - return amcId < r.amcId; - } - } - }; - - struct dCoord { - int vfatType; - GEMDetId gemDetId; - int iPhi; - bool operator<(const dCoord& r) const { - if (vfatType == r.vfatType) { - if (gemDetId == r.gemDetId) { - return iPhi < r.iPhi; - } else { - return gemDetId < r.gemDetId; - } - } else { - return vfatType < r.vfatType; - } - } - }; - - struct channelNum { - int vfatType; - int chNum; - bool operator<(const channelNum& c) const { - if (vfatType == c.vfatType) - return chNum < c.chNum; - else - return vfatType < c.vfatType; - } - }; - - struct stripNum { - int vfatType; - int stNum; - bool operator<(const stripNum& s) const { - if (vfatType == s.vfatType) - return stNum < s.stNum; - else - return vfatType < s.vfatType; - } - }; - - GEMROmap(){}; - - bool isValidChipID(const eCoord& r) const { return roMapED_.find(r) != roMapED_.end(); } - const dCoord& hitPosition(const eCoord& r) const { return roMapED_.at(r); } - const eCoord& hitPosition(const dCoord& r) const { return roMapDE_.at(r); } - - void add(eCoord e, dCoord d) { roMapED_[e] = d; } - void add(dCoord d, eCoord e) { roMapDE_[d] = e; } - - const std::map* getRoMap() const { return &roMapED_; } - - void add(channelNum c, stripNum s) { chStMap_[c] = s; } - void add(stripNum s, channelNum c) { stChMap_[s] = c; } - - const channelNum& hitPosition(const stripNum& s) const { return stChMap_.at(s); } - const stripNum& hitPosition(const channelNum& c) const { return chStMap_.at(c); } - -private: - std::map roMapED_; - std::map roMapDE_; - - std::map chStMap_; - std::map stChMap_; -}; -#endif diff --git a/CondFormats/GEMObjects/src/GEMELMap.cc b/CondFormats/GEMObjects/src/GEMELMap.cc deleted file mode 100644 index 34c241f680f8a..0000000000000 --- a/CondFormats/GEMObjects/src/GEMELMap.cc +++ /dev/null @@ -1,110 +0,0 @@ -#include "CondFormats/GEMObjects/interface/GEMELMap.h" -#include "CondFormats/GEMObjects/interface/GEMROmap.h" -#include "DataFormats/MuonDetId/interface/GEMDetId.h" - -GEMELMap::GEMELMap() : theVersion("") {} - -GEMELMap::GEMELMap(const std::string& version) : theVersion(version) {} - -GEMELMap::~GEMELMap() {} - -const std::string& GEMELMap::version() const { return theVersion; } - -void GEMELMap::convert(GEMROmap& romap) { - for (auto imap : theVFatMap_) { - for (unsigned int ix = 0; ix < imap.vfatId.size(); ix++) { - GEMROmap::eCoord ec; - ec.vfatId = imap.vfatId[ix] & chipIdMask_; - ec.gebId = imap.gebId[ix]; - ec.amcId = imap.amcId[ix]; - - int st = std::abs(imap.z_direction[ix]); - GEMROmap::dCoord dc; - dc.gemDetId = GEMDetId(imap.z_direction[ix], 1, st, imap.depth[ix], imap.sec[ix], imap.iEta[ix]); - dc.vfatType = imap.vfatType[ix]; - dc.iPhi = imap.iPhi[ix]; - - romap.add(ec, dc); - romap.add(dc, ec); - } - } - - for (auto imap : theStripMap_) { - for (unsigned int ix = 0; ix < imap.vfatType.size(); ix++) { - GEMROmap::channelNum cMap; - cMap.vfatType = imap.vfatType[ix]; - cMap.chNum = imap.vfatCh[ix]; - - GEMROmap::stripNum sMap; - sMap.vfatType = imap.vfatType[ix]; - sMap.stNum = imap.vfatStrip[ix]; - - romap.add(cMap, sMap); - romap.add(sMap, cMap); - } - } -} - -void GEMELMap::convertDummy(GEMROmap& romap) { - // 12 bits for vfat, 5 bits for geb, 8 bit long GLIB serial number - uint16_t amcId = 1; //amc - uint16_t gebId = 0; - - for (int re = -1; re <= 1; re = re + 2) { - for (int st = GEMDetId::minStationId; st <= GEMDetId::maxStationId; ++st) { - int maxVFat = maxVFatGE11_; - if (st == 2) - maxVFat = maxVFatGE21_; - if (st == 0) - maxVFat = maxVFatGE0_; - - for (int ch = 1; ch <= GEMDetId::maxChamberId; ++ch) { - for (int ly = 1; ly <= GEMDetId::maxLayerId; ++ly) { - // 1 geb per chamber - gebId++; - uint16_t chipId = 0; - for (int roll = 1; roll <= GEMDetId::maxRollId; ++roll) { - GEMDetId gemId(re, 1, st, ly, ch, roll); - - for (int nphi = 1; nphi <= maxVFat; ++nphi) { - chipId++; - - GEMROmap::eCoord ec; - ec.vfatId = chipId; - ec.gebId = gebId; - ec.amcId = amcId; - - GEMROmap::dCoord dc; - dc.gemDetId = gemId; - dc.vfatType = 1; - dc.iPhi = nphi; - - romap.add(ec, dc); - romap.add(dc, ec); - } - } - // 5 bits for geb - if (gebId == maxGEBs_) { - // 24 gebs per amc - gebId = 0; - amcId++; - } - } - } - } - } - - for (int i = 0; i < maxChan_; ++i) { - // only 1 vfat type for dummy map - GEMROmap::channelNum cMap; - cMap.vfatType = 1; - cMap.chNum = i; - - GEMROmap::stripNum sMap; - sMap.vfatType = 1; - sMap.stNum = i + 1; - - romap.add(cMap, sMap); - romap.add(sMap, cMap); - } -} diff --git a/CondFormats/GEMObjects/src/T_EventSetup_GEMELMap.cc b/CondFormats/GEMObjects/src/T_EventSetup_GEMELMap.cc deleted file mode 100644 index e8a277c9a1e94..0000000000000 --- a/CondFormats/GEMObjects/src/T_EventSetup_GEMELMap.cc +++ /dev/null @@ -1,4 +0,0 @@ -#include "CondFormats/GEMObjects/interface/GEMELMap.h" -#include "FWCore/Utilities/interface/typelookup.h" - -TYPELOOKUP_DATA_REG(GEMELMap); diff --git a/CondFormats/GEMObjects/src/classes_def.xml b/CondFormats/GEMObjects/src/classes_def.xml index e0de267a9d950..60401cfbb467c 100644 --- a/CondFormats/GEMObjects/src/classes_def.xml +++ b/CondFormats/GEMObjects/src/classes_def.xml @@ -1,11 +1,5 @@ - - - - - - diff --git a/CondFormats/GEMObjects/src/headers.h b/CondFormats/GEMObjects/src/headers.h index 522fe53f938d0..4e436a368d64b 100644 --- a/CondFormats/GEMObjects/src/headers.h +++ b/CondFormats/GEMObjects/src/headers.h @@ -1,4 +1,3 @@ -#include "CondFormats/GEMObjects/interface/GEMELMap.h" #include "CondFormats/GEMObjects/interface/GEMeMap.h" #include "CondFormats/GEMObjects/interface/GEMDeadStrips.h" #include "CondFormats/GEMObjects/interface/GEMMaskedStrips.h" diff --git a/CondFormats/GEMObjects/test/test_serialization.cpp b/CondFormats/GEMObjects/test/test_serialization.cpp index 15ce8a2eb4cc1..460d2f68ba79e 100644 --- a/CondFormats/GEMObjects/test/test_serialization.cpp +++ b/CondFormats/GEMObjects/test/test_serialization.cpp @@ -2,12 +2,6 @@ #include "CondFormats/GEMObjects/src/headers.h" int main() { - testSerialization(); - testSerialization(); - testSerialization>(); - testSerialization(); - testSerialization>(); - testSerialization(); testSerialization(); testSerialization>();