60 edm::LogInfo(
"SiPixelLorentzAngle") <<
" There are "<<pDD->detUnits().size() <<
" detectors"<<std::endl;
62 for(TrackerGeometry::DetUnitContainer::const_iterator it = pDD->detUnits().begin(); it != pDD->detUnits().end(); it++){
64 if( dynamic_cast<PixelGeomDetUnit*>((*it))!=0){
71 cout <<
" hp:barrel:" <<
" layer=" << pxdetid.
layer() <<
" ladder=" << pxdetid.
ladder() <<
" module=" << pxdetid.
module() << endl;
81 if( it->getParameter<
unsigned int>(
"module") == pxdetid.
module() && it->getParameter<
unsigned int>(
"layer") == pxdetid.
layer() )
83 float lorentzangle = (float)it->getParameter<
double>(
"angle");
90 edm::LogError(
"SiPixelLorentzAngleDB")<<
"[SiPixelLorentzAngleDB::analyze] method for reading file not implemented yet" << std::endl;
98 cout <<
" hp:endcap:" <<
" side=" << pxdetid.
side() <<
" disk=" << pxdetid.
disk() <<
" blade=" << pxdetid.
blade() <<
" panel=" << pxdetid.
panel() <<
" module=" << pxdetid.
module() << endl;
106 if( it->getParameter<
unsigned int>(
"side") == pxdetid.
side() && it->getParameter<
unsigned int>(
"disk") == pxdetid.
disk() && it->getParameter<
unsigned int>(
"HVgroup") ==
HVgroup(pxdetid.
panel(),pxdetid.
module()) )
108 float lorentzangle = (float)it->getParameter<
double>(
"angle");
114 edm::LogError(
"SiPixelLorentzAngleDB")<<
"[SiPixelLorentzAngleDB::analyze] detid is Pixel but neither bpix nor fpix"<<std::endl;
138 edm::LogError(
"SiPixelLorentzAngleDB")<<
"caught std::exception "<<er.what()<<std::endl;
140 edm::LogError(
"SiPixelLorentzAngleDB")<<
"Funny error"<<std::endl;
143 edm::LogError(
"SiPixelLorentzAngleDB")<<
"Service is unavailable"<<std::endl;
152 if( 1 == panel && ( 1 == module || 2 == module )) {
155 else if( 1 == panel && ( 3 == module || 4 == module )) {
158 else if( 2 == panel && 1 == module ) {
161 else if( 2 == panel && ( 2 == module || 3 == module )) {
165 cout <<
" *** error *** in SiPixelLorentzAngleDB::HVgroup(...), panel = " << panel <<
", module = " << module << endl;
virtual char const * what() const
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
unsigned int panel() const
panel id
unsigned int ladder() const
ladder id
unsigned int layer() const
layer id
unsigned int blade() const
blade id
uint32_t rawId() const
get the raw id
Parameters BPixParameters_
Parameters FPixParameters_
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
bool isNewTagRequest(const std::string &recordName)
cond::Time_t beginOfTime() const
unsigned int module() const
det id
SiPixelLorentzAngleDB(const edm::ParameterSet &conf)
unsigned int module() const
det id
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool putLorentzAngle(const uint32_t &, float &)
unsigned int disk() const
disk id
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
cond::Time_t endOfTime() const
std::vector< edm::ParameterSet > Parameters
unsigned int HVgroup(unsigned int panel, unsigned int module)
cond::Time_t currentTime() const
unsigned int side() const
positive or negative id
virtual ~SiPixelLorentzAngleDB()