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;
180 if (1 == panel && (1 == module || 2 == module)) {
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 getUntrackedParameter(std::string const &, T const &) const
const edm::EventSetup & c
Base exception class for the object to relational access.
Parameters ModuleParameters_
#define DEFINE_FWK_MODULE(type)
unsigned int pxfDisk(const DetId &id) const
std::vector< edm::ParameterSet > Parameters
unsigned int pxbLadder(const DetId &id) const
constexpr uint32_t rawId() const
get the raw id
void analyze(const edm::Event &e, const edm::EventSetup &c) override
unsigned int pxbModule(const DetId &id) const
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Log< level::Error, false > LogError
void createOneIOV(const T &payload, cond::Time_t firstSinceTime, const std::string &recordName)
bool getData(T &iHolder) const
Parameters BPixParameters_
void appendOneIOV(const T &payload, cond::Time_t sinceTime, const std::string &recordName)
Parameters FPixParameters_
bool isNewTagRequest(const std::string &recordName)
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
cond::Time_t beginOfTime() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
char const * what() const noexceptoverride
SiPixelLorentzAngleDB(const edm::ParameterSet &conf)
Log< level::Warning, true > LogPrint
bool putLorentzAngle(const uint32_t &, float &)
unsigned int pxfModule(const DetId &id) const
unsigned int pxbLayer(const DetId &id) const
Log< level::Info, false > LogInfo
T getParameter(std::string const &) const
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tkTopoToken_
unsigned int HVgroup(unsigned int panel, unsigned int module)
cond::Time_t currentTime() const
unsigned int pxfSide(const DetId &id) const
unsigned int pxfPanel(const DetId &id) const
unsigned int pxfBlade(const DetId &id) const
~SiPixelLorentzAngleDB() override