38 unsigned int HVgroup(
unsigned int panel,
unsigned int module);
40 std::vector<std::pair<uint32_t, float> >
detid_la;
84 <<
" There are " << pDD->
detUnits().size() <<
" detectors (old)" << std::endl;
86 for (
const auto& it : pDD->
detUnits()) {
87 if (dynamic_cast<PixelGeomDetUnit const*>(it) !=
nullptr) {
88 DetId detid = it->geographicalId();
89 const DetId detidc = it->geographicalId();
101 if (it->getParameter<
unsigned int>(
"rawid") == detidc.
rawId()) {
102 float lorentzangle = (
float)it->getParameter<
double>(
"angle");
105 <<
" individual value=" << lorentzangle <<
" put into rawid=" << detid.
rawId() << endl;
111 if (it->getParameter<
unsigned int>(
"module") == tTopo->
pxbModule(detidc.
rawId()) &&
112 it->getParameter<
unsigned int>(
"layer") == tTopo->
pxbLayer(detidc.
rawId())) {
113 float lorentzangle = (
float)it->getParameter<
double>(
"angle");
120 <<
"[SiPixelLorentzAngleDB::analyze] method for reading file not implemented yet" << std::endl;
133 if (it->getParameter<
unsigned int>(
"rawid") == detidc.
rawId()) {
134 float lorentzangle = (
float)it->getParameter<
double>(
"angle");
137 <<
" individual value=" << lorentzangle <<
" put into rawid=" << detid.
rawId() << endl;
143 if (it->getParameter<
unsigned int>(
"side") == tTopo->
pxfSide(detidc.
rawId()) &&
144 it->getParameter<
unsigned int>(
"disk") == tTopo->
pxfDisk(detidc.
rawId()) &&
145 it->getParameter<
unsigned int>(
"HVgroup") ==
147 float lorentzangle = (
float)it->getParameter<
double>(
"angle");
154 <<
"[SiPixelLorentzAngleDB::analyze] detid is Pixel but neither bpix nor fpix" << std::endl;
170 edm::LogError(
"SiPixelLorentzAngleDB") <<
"caught std::exception " << er.what() << std::endl;
172 edm::LogError(
"SiPixelLorentzAngleDB") <<
"Funny error" << std::endl;
175 edm::LogError(
"SiPixelLorentzAngleDB") <<
"Service is unavailable" << std::endl;
182 }
else if (1 == panel && (3 ==
module || 4 ==
module)) {
184 }
else if (2 == panel && 1 ==
module) {
186 }
else if (2 == panel && (2 ==
module || 3 ==
module)) {
189 edm::LogPrint(
"SiPixelLorentzAngleDB") <<
" *** error *** in SiPixelLorentzAngleDB::HVgroup(...), panel = " << panel
190 <<
", module = " <<
module << endl;
std::vector< std::pair< uint32_t, float > > detid_la
T getParameter(std::string const &) const
unsigned int pxbLayer(const DetId &id) const
Base exception class for the object to relational access.
Parameters ModuleParameters_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
unsigned int pxfBlade(const DetId &id) const
unsigned int pxfModule(const DetId &id) const
cond::Time_t beginOfTime() const
std::vector< edm::ParameterSet > Parameters
void analyze(const edm::Event &e, const edm::EventSetup &c) override
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
unsigned int pxbLadder(const DetId &id) const
Log< level::Error, false > LogError
void createOneIOV(const T &payload, cond::Time_t firstSinceTime, const std::string &recordName)
T getUntrackedParameter(std::string const &, T const &) const
Parameters BPixParameters_
void appendOneIOV(const T &payload, cond::Time_t sinceTime, const std::string &recordName)
Parameters FPixParameters_
bool isNewTagRequest(const std::string &recordName)
cond::Time_t currentTime() const
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
unsigned int pxfDisk(const DetId &id) const
SiPixelLorentzAngleDB(const edm::ParameterSet &conf)
#define DEFINE_FWK_MODULE(type)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Log< level::Warning, true > LogPrint
unsigned int pxfPanel(const DetId &id) const
Log< level::Info, false > LogInfo
unsigned int pxfSide(const DetId &id) const
constexpr uint32_t rawId() const
get the raw id
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tkTopoToken_
unsigned int HVgroup(unsigned int panel, unsigned int module)
unsigned int pxbModule(const DetId &id) const
char const * what() const noexcept override
~SiPixelLorentzAngleDB() override