102 if (pgdu ==
nullptr)
continue;
103 DetId detId = (*it)->geographicalId();
104 int detid = detId.
rawId();
113 unsigned int nrocs = nROCrows*nROCcolumns;
116 std::map<int, std::pair<int,int> > rocToOfflinePixel;
119 typedef std::vector<sipixelobjects::CablingPathToDetUnit>::const_iterator
IT;
120 for(IT it = path.begin(); it != path.end(); ++it) {
129 rocToOfflinePixel[idInDetUnit] = std::pair<int,int>(global.
row, global.
col);
151 std::vector<int> vDetId;
155 for(
unsigned int i = 0;
i<badComponentList.size();
i++){
159 uint32_t detId = badComponentList[
i].DetID;
160 int detid =
int(detId);
163 for(
int iroc = 0; iroc<
int(nroc); iroc++){
165 std::map<int, std::pair<int,int> > rocToOfflinePixel =
pixelO2O_[detid];
166 int row = rocToOfflinePixel[iroc].first;
167 int column = rocToOfflinePixel[iroc].second;
179 std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t> finalIOV;
180 std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t> fedError25IOV;
181 std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t> pclIOV;
186 std::map<int, SiPixelQuality*> siPixelQualityStuckTBM_Tag;
198 if(nextIt!=FEDerror25Map.end()) interval =
int(nextIt->first - it->first);
204 std::map<int, std::vector<int> > tmpFEDerror25 = it->second;
205 for(
std::map<
int, std::vector<int> >::iterator ilist = tmpFEDerror25.begin(); ilist!=tmpFEDerror25.end();ilist++){
207 int detid = ilist->first;
208 uint32_t detId = uint32_t(detid);
212 BadModule_stuckTBM.
DetID = uint32_t(detid); BadModule_FEDerror25.
DetID = uint32_t(detid);
216 std::vector<uint32_t> BadRocList_stuckTBM, BadRocList_FEDerror25;
217 std::vector<int>
list = ilist->second;
219 for(
unsigned int i=0; i<list.size();i++){
222 std::map<int, std::pair<int,int> > rocToOfflinePixel =
pixelO2O_[detid];
223 int row = rocToOfflinePixel[iroc].first;
224 int column = rocToOfflinePixel[iroc].second;
226 BadRocList_FEDerror25.push_back(uint32_t(iroc));
227 for (
int iLumi = 0; iLumi<interval;iLumi++){
233 BadRocList_stuckTBM.push_back(uint32_t(iroc));
234 for (
int iLumi = 0; iLumi<interval;iLumi++){
245 short badrocs_stuckTBM = 0;
246 for(std::vector<uint32_t>::iterator iter = BadRocList_stuckTBM.begin(); iter != BadRocList_stuckTBM.end(); ++iter){
247 badrocs_stuckTBM += 1 << *iter;
250 if(badrocs_stuckTBM!=0){
251 BadModule_stuckTBM.
BadRocs = badrocs_stuckTBM;
256 if(BadRocList_FEDerror25.size()==
sensorSize_[detid])
259 short badrocs_FEDerror25 = 0;
260 for(std::vector<uint32_t>::iterator iter = BadRocList_FEDerror25.begin(); iter != BadRocList_FEDerror25.end(); ++iter){
261 badrocs_FEDerror25 += 1 << *iter;
264 if(badrocs_FEDerror25!=0){
265 BadModule_FEDerror25.
BadRocs = badrocs_FEDerror25;
271 siPixelQualityStuckTBM_Tag[it->first] = siPixelQuality_stuckTBM;
273 finalIOV[it->first] = it->first;
274 fedError25IOV[it->first] = it->first;
279 delete siPixelQuality_FEDerror25;
285 finalIOV[it->first] = it->first;
286 pclIOV[it->first] = it->first;
290 std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t>::iterator itIOV;
293 std::map<int, SiPixelQuality*> siPixelQualityPCL_Tag;
294 std::map<int, SiPixelQuality*> siPixelQualityPrompt_Tag;
295 std::map<int, SiPixelQuality*> siPixelQualityOther_Tag;
297 for(itIOV=finalIOV.begin();itIOV!=finalIOV.end();itIOV++){
300 std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t>::iterator nextItIOV =
std::next(itIOV);
301 if(nextItIOV!=finalIOV.end()) interval =
int(nextItIOV->first - itIOV->first);
308 std::map<int, std::vector<int> > tmpFEDerror25 = FEDerror25Map[lumiFEDerror25];
319 <<
"Tag requested for prompt in low statistics IOV in the "<<
outputBase_<<
" harvester"<< std::endl;
320 siPixelQualityPCL_Tag[itIOV->first] = siPixelQualityPermBad;
321 siPixelQualityPrompt_Tag[itIOV->first] = siPixelQualityPermBad;
324 std::map<int, SiPixelModuleStatus> detectorStatus = tmpSiPixelStatus.
getDetectorStatus();
325 std::map<int, SiPixelModuleStatus>::iterator itModEnd = detectorStatus.end();
326 for (std::map<int, SiPixelModuleStatus>::iterator itMod = detectorStatus.begin(); itMod != itModEnd; ++itMod) {
328 int detid = itMod->first;
329 uint32_t detId = uint32_t(detid);
332 for (
int iroc = 0; iroc < modStatus.
nrocs(); ++iroc) {
335 std::map<int, std::pair<int,int> > rocToOfflinePixel =
pixelO2O_[detid];
336 int row = rocToOfflinePixel[iroc].first;
337 int column = rocToOfflinePixel[iroc].second;
for (
int iLumi = 0; iLumi<interval;iLumi++){
349 <<
"Tag requested for other in low statistics IOV in the "<<
outputBase_<<
" harvester"<< std::endl;
366 std::map<int, SiPixelModuleStatus> detectorStatus = tmpSiPixelStatus.
getDetectorStatus();
367 std::map<int, SiPixelModuleStatus>::iterator itModEnd = detectorStatus.end();
368 for (std::map<int, SiPixelModuleStatus>::iterator itMod = detectorStatus.begin(); itMod != itModEnd; ++itMod) {
373 int detid = itMod->first;
374 uint32_t detId = uint32_t(detid);
376 BadModulePCL.
DetID = uint32_t(detid); BadModuleOther.
DetID = uint32_t(detid);
380 std::vector<uint32_t> BadRocListPCL, BadRocListOther;
384 std::vector<int> listFEDerror25 = tmpFEDerror25[detid];
386 for (
int iroc = 0; iroc < modStatus.
nrocs(); ++iroc) {
388 unsigned int rocOccupancy = modStatus.
digiOccROC(iroc);
391 if(rocOccupancy<1.
e-4*DetAverage){
393 std::map<int, std::pair<int,int> > rocToOfflinePixel =
pixelO2O_[detid];
394 int row = rocToOfflinePixel[iroc].first;
395 int column = rocToOfflinePixel[iroc].second;
398 BadRocListPCL.push_back(uint32_t(iroc));
399 for (
int iLumi = 0; iLumi<interval;iLumi++){
404 std::vector<int>::iterator it =
std::find(listFEDerror25.begin(), listFEDerror25.end(),iroc);
409 BadRocListOther.push_back(uint32_t(iroc));
410 for (
int iLumi = 0; iLumi<interval;iLumi++){
424 short badrocsPCL = 0;
425 for(std::vector<uint32_t>::iterator iterPCL = BadRocListPCL.begin(); iterPCL != BadRocListPCL.end(); ++iterPCL){
426 badrocsPCL += 1 << *iterPCL;
429 BadModulePCL.
BadRocs = badrocsPCL;
434 short badrocsOther = 0;
435 for(std::vector<uint32_t>::iterator iterOther = BadRocListOther.begin(); iterOther != BadRocListOther.end(); ++iterOther){
436 badrocsOther += 1 << *iterOther;
439 BadModuleOther.
BadRocs = badrocsOther;
445 BadModulePrompt.
DetID = uint32_t(detid);
449 std::vector<uint32_t> BadRocListPrompt;
450 for (
int iroc = 0; iroc < modStatus.
nrocs(); ++iroc) {
453 BadRocListPrompt.push_back(uint32_t(iroc));
455 std::map<int, std::pair<int,int> > rocToOfflinePixel =
pixelO2O_[detid];
456 int row = rocToOfflinePixel[iroc].first;
457 int column = rocToOfflinePixel[iroc].second;
458 for (
int iLumi = 0; iLumi<interval;iLumi++){
467 short badrocsPrompt = 0;
468 for(std::vector<uint32_t>::iterator iterPrompt = BadRocListPrompt.begin(); iterPrompt != BadRocListPrompt.end(); ++iterPrompt){
469 badrocsPrompt += 1 << *iterPrompt;
471 if(badrocsPrompt!=0){
472 BadModulePrompt.
BadRocs = badrocsPrompt;
479 siPixelQualityPCL_Tag[itIOV->first] = siPixelQualityPCL;
481 siPixelQualityPrompt_Tag[itIOV->first] = siPixelQualityPrompt;
483 siPixelQualityOther_Tag[itIOV->first] = siPixelQualityOther;
510 delete siPixelQualityDummy;
513 delete siPixelQualityPermBad;
void addDisabledModule(disabledModuleType module)
virtual int nrows() const =0
virtual int rowsperroc() const =0
std::map< int, unsigned int > sensorSize_
void constructTag(std::map< int, SiPixelQuality * >siPixelQualityTag, edm::Service< cond::service::PoolDBOutputService > &poolDbService, std::string tagName, edm::Run &iRun)
const std::map< edm::LuminosityBlockNumber_t, std::map< int, std::vector< int > > > & getFEDerror25Rocs()
edm::LuminosityBlockNumber_t endLumiBlock_
constexpr uint32_t rawId() const
get the raw id
virtual std::map< uint32_t, std::vector< sipixelobjects::CablingPathToDetUnit > > det2PathMap() const =0
bool IsRocBad(const uint32_t &detid, const short &rocNb) const
edm::LuminosityBlockNumber_t stepIOV(edm::LuminosityBlockNumber_t pin, std::map< edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t > IOV)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
unsigned int LuminosityBlockNumber_t
SiPixelStatusManager siPixelStatusManager_
identify pixel inside single ROC
global coordinates (row and column in DetUnit, as in PixelDigi)
U second(std::pair< T, U > const &p)
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
unsigned long long Time_t
virtual int colsperroc() const =0
const SiPixelQuality * badPixelInfo_
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
const std::vector< disabledModuleType > getBadComponentList() const
const SiPixelFedCabling * cablingMap_
std::vector< LinkConnSpec >::const_iterator IT
const TrackerGeometry * trackerGeometry_
std::map< int, SiPixelModuleStatus > getDetectorStatus()
std::map< edm::LuminosityBlockNumber_t, std::map< int, std::vector< int > > >::iterator FEDerror25Map_iterator
virtual const sipixelobjects::PixelROC * findItem(const sipixelobjects::CablingPathToDetUnit &) const =0
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
row and collumn in ROC representation
std::map< int, std::map< int, std::pair< int, int > > > pixelO2O_
std::map< edm::LuminosityBlockNumber_t, SiPixelDetectorStatus >::iterator siPixelStatusMap_iterator
std::vector< HistogramManager > histo
virtual int ncolumns() const =0
unsigned int digiOccROC(int iroc)
return ROC status (= hits on ROC iroc)
const std::map< edm::LuminosityBlockNumber_t, SiPixelDetectorStatus > & getBadComponents()
T const * product() const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
GlobalPixel toGlobal(const LocalPixel &loc) const