128 if (pgdu ==
nullptr)
continue;
129 DetId detId = (*it)->geographicalId();
130 int detid = detId.
rawId();
139 unsigned int nrocs = nROCrows*nROCcolumns;
142 std::map<int, std::pair<int,int> > rocToOfflinePixel;
145 typedef std::vector<sipixelobjects::CablingPathToDetUnit>::const_iterator
IT;
146 for(IT it = path.begin(); it != path.end(); ++it) {
155 rocToOfflinePixel[idInDetUnit] = std::pair<int,int>(global.
row, global.
col);
180 for(
unsigned int i = 0;
i<badComponentList.size();
i++){
184 uint32_t detId = badComponentList[
i].DetID;
185 int detid =
int(detId);
188 for(
int iroc = 0; iroc<
int(nroc); iroc++){
190 std::map<int, std::pair<int,int> > rocToOfflinePixel =
pixelO2O_[detid];
191 int row = rocToOfflinePixel[iroc].first;
192 int column = rocToOfflinePixel[iroc].second;
204 std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t> finalIOV;
205 std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t> fedError25IOV;
206 std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t> pclIOV;
209 std::map<int, SiPixelQuality*> siPixelQualityStuckTBM_Tag;
221 if(nextIt!=FEDerror25Map.end()) interval =
int(nextIt->first - it->first);
227 std::map<int, std::vector<int> > tmpFEDerror25 = it->second;
228 for(
std::map<
int, std::vector<int> >::iterator ilist = tmpFEDerror25.begin(); ilist!=tmpFEDerror25.end();ilist++){
230 int detid = ilist->first;
231 uint32_t detId = uint32_t(detid);
235 BadModule_stuckTBM.
DetID = uint32_t(detid); BadModule_FEDerror25.
DetID = uint32_t(detid);
239 std::vector<uint32_t> BadRocList_stuckTBM, BadRocList_FEDerror25;
240 std::vector<int>
list = ilist->second;
242 for(
unsigned int i=0; i<list.size();i++){
245 std::map<int, std::pair<int,int> > rocToOfflinePixel =
pixelO2O_[detid];
246 int row = rocToOfflinePixel[iroc].first;
247 int column = rocToOfflinePixel[iroc].second;
249 BadRocList_FEDerror25.push_back(uint32_t(iroc));
250 for (
int iLumi = 0; iLumi<interval;iLumi++){
256 BadRocList_stuckTBM.push_back(uint32_t(iroc));
257 for (
int iLumi = 0; iLumi<interval;iLumi++){
268 short badrocs_stuckTBM = 0;
269 for(std::vector<uint32_t>::iterator iter = BadRocList_stuckTBM.begin(); iter != BadRocList_stuckTBM.end(); ++iter){
270 badrocs_stuckTBM += 1 << *iter;
273 if(badrocs_stuckTBM!=0){
274 BadModule_stuckTBM.
BadRocs = badrocs_stuckTBM;
279 if(BadRocList_FEDerror25.size()==
sensorSize_[detid])
282 short badrocs_FEDerror25 = 0;
283 for(std::vector<uint32_t>::iterator iter = BadRocList_FEDerror25.begin(); iter != BadRocList_FEDerror25.end(); ++iter){
284 badrocs_FEDerror25 += 1 << *iter;
287 if(badrocs_FEDerror25!=0){
288 BadModule_FEDerror25.
BadRocs = badrocs_FEDerror25;
294 siPixelQualityStuckTBM_Tag[it->first] = siPixelQuality_stuckTBM;
296 finalIOV[it->first] = it->first;
297 fedError25IOV[it->first] = it->first;
302 delete siPixelQuality_FEDerror25;
308 finalIOV[it->first] = it->first;
309 pclIOV[it->first] = it->first;
313 std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t>::iterator itIOV;
316 std::map<int, SiPixelQuality*> siPixelQualityPCL_Tag;
317 std::map<int, SiPixelQuality*> siPixelQualityPrompt_Tag;
318 std::map<int, SiPixelQuality*> siPixelQualityOther_Tag;
320 for(itIOV=finalIOV.begin();itIOV!=finalIOV.end();itIOV++){
323 std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t>::iterator nextItIOV =
std::next(itIOV);
324 if(nextItIOV!=finalIOV.end()) interval =
int(nextItIOV->first - itIOV->first);
331 std::map<int, std::vector<int> > tmpFEDerror25 = FEDerror25Map[lumiFEDerror25];
342 <<
"Tag requested for prompt in low statistics IOV in the "<<
outputBase_<<
" harvester"<< std::endl;
343 siPixelQualityPCL_Tag[itIOV->first] = siPixelQualityPermBad;
344 siPixelQualityPrompt_Tag[itIOV->first] = siPixelQualityPermBad;
347 std::map<int, SiPixelModuleStatus> detectorStatus = tmpSiPixelStatus.
getDetectorStatus();
348 std::map<int, SiPixelModuleStatus>::iterator itModEnd = detectorStatus.end();
349 for (std::map<int, SiPixelModuleStatus>::iterator itMod = detectorStatus.begin(); itMod != itModEnd; ++itMod) {
351 int detid = itMod->first;
352 uint32_t detId = uint32_t(detid);
355 for (
int iroc = 0; iroc < modStatus.
nrocs(); ++iroc) {
358 std::map<int, std::pair<int,int> > rocToOfflinePixel =
pixelO2O_[detid];
359 int row = rocToOfflinePixel[iroc].first;
360 int column = rocToOfflinePixel[iroc].second;
361 for (
int iLumi = 0; iLumi<interval;iLumi++){
374 <<
"Tag requested for other in low statistics IOV in the "<<
outputBase_<<
" harvester"<< std::endl;
389 std::map<int, SiPixelModuleStatus> detectorStatus = tmpSiPixelStatus.
getDetectorStatus();
390 std::map<int, SiPixelModuleStatus>::iterator itModEnd = detectorStatus.end();
391 for (std::map<int, SiPixelModuleStatus>::iterator itMod = detectorStatus.begin(); itMod != itModEnd; ++itMod) {
396 int detid = itMod->first;
397 uint32_t detId = uint32_t(detid);
400 double local_threshold = 0.0;
413 BadModulePCL.
DetID = uint32_t(detid); BadModuleOther.
DetID = uint32_t(detid);
417 std::vector<uint32_t> BadRocListPCL, BadRocListOther;
421 std::vector<int> listFEDerror25 = tmpFEDerror25[detid];
423 std::map<int, std::pair<int,int> > rocToOfflinePixel =
pixelO2O_[detid];
424 for (
int iroc = 0; iroc < modStatus.
nrocs(); ++iroc) {
426 unsigned int rocOccupancy = modStatus.
digiOccROC(iroc);
428 int row = rocToOfflinePixel[iroc].first;
429 int column = rocToOfflinePixel[iroc].second;
432 if(rocOccupancy<local_threshold*DetAverage_local){
435 BadRocListPCL.push_back(uint32_t(iroc));
436 for (
int iLumi = 0; iLumi<interval;iLumi++){
441 std::vector<int>::iterator it =
std::find(listFEDerror25.begin(), listFEDerror25.end(),iroc);
446 BadRocListOther.push_back(uint32_t(iroc));
447 for (
int iLumi = 0; iLumi<interval;iLumi++){
461 short badrocsPCL = 0;
462 for(std::vector<uint32_t>::iterator iterPCL = BadRocListPCL.begin(); iterPCL != BadRocListPCL.end(); ++iterPCL){
463 badrocsPCL += 1 << *iterPCL;
466 BadModulePCL.
BadRocs = badrocsPCL;
471 short badrocsOther = 0;
472 for(std::vector<uint32_t>::iterator iterOther = BadRocListOther.begin(); iterOther != BadRocListOther.end(); ++iterOther){
473 badrocsOther += 1 << *iterOther;
476 BadModuleOther.
BadRocs = badrocsOther;
482 BadModulePrompt.
DetID = uint32_t(detid);
486 std::vector<uint32_t> BadRocListPrompt;
487 for (
int iroc = 0; iroc < modStatus.
nrocs(); ++iroc) {
490 BadRocListPrompt.push_back(uint32_t(iroc));
492 std::map<int, std::pair<int,int> > rocToOfflinePixel =
pixelO2O_[detid];
493 int row = rocToOfflinePixel[iroc].first;
494 int column = rocToOfflinePixel[iroc].second;
495 for (
int iLumi = 0; iLumi<interval;iLumi++){
504 short badrocsPrompt = 0;
505 for(std::vector<uint32_t>::iterator iterPrompt = BadRocListPrompt.begin(); iterPrompt != BadRocListPrompt.end(); ++iterPrompt)
507 badrocsPrompt += 1 << *iterPrompt;
509 if(badrocsPrompt!=0){
510 BadModulePrompt.
BadRocs = badrocsPrompt;
517 siPixelQualityPCL_Tag[itIOV->first] = siPixelQualityPCL;
519 siPixelQualityPrompt_Tag[itIOV->first] = siPixelQualityPrompt;
521 siPixelQualityOther_Tag[itIOV->first] = siPixelQualityOther;
541 itIOV=std::prev(finalIOV.end());
542 SiPixelQuality* lastPrompt = siPixelQualityPrompt_Tag[itIOV->first];
543 SiPixelQuality* lastOther = siPixelQualityOther_Tag[itIOV->first];
556 delete siPixelQualityDummy;
559 delete siPixelQualityPermBad;
void addDisabledModule(disabledModuleType module)
SiPixelCoordinates coord_
virtual int nrows() const =0
virtual int rowsperroc() const =0
bool equal(SiPixelQuality *a, SiPixelQuality *b)
std::map< int, unsigned int > sensorSize_
void init(edm::EventSetup const &)
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
void constructTag(std::map< int, SiPixelQuality * > siPixelQualityTag, edm::Service< cond::service::PoolDBOutputService > &poolDbService, std::string tagName, edm::Run &iRun)
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
double perLayerRingAverage(int detid, SiPixelDetectorStatus tmpSiPixelStatus)
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