828 std::map<DetId, float>::const_iterator theIter;
829 std::map<DetId, float> badPedOnEB, badPedOnEE;
830 std::map<DetId, float> badPedOnRmsEB, badPedOnRmsEE;
831 std::map<DetId, float> badGainEB, badGainEE;
832 std::map<DetId, float> badLaserEB, badLaserEE;
833 std::map<DetId, float> badOccHighEB, badOccHighEE;
835 typedef std::map<EcalLogicID, MonPedestalsOnlineDat>::const_iterator CImonPedO;
836 typedef std::map<EcalLogicID, MonCrystalConsistencyDat>::const_iterator CImonCons;
837 typedef std::map<EcalLogicID, MonOccupancyDat>::const_iterator CImonOcc;
838 typedef std::map<EcalLogicID, MonLaserBlueDat>::const_iterator CImonLaser;
848 float totEntriesAboveHighThrEB = 0.;
849 float totEntriesAboveHighThrEE = 0.;
850 for (CImonOcc
p = occupancy_mon.begin();
p != occupancy_mon.end();
p++) {
854 if (ecid_xt.
getName() ==
"EB_crystal_number" && highOcc > -1)
855 totEntriesAboveHighThrEB = totEntriesAboveHighThrEB + highOcc;
856 if (ecid_xt.
getName() ==
"EE_crystal_number" && highOcc > -1)
857 totEntriesAboveHighThrEE = totEntriesAboveHighThrEE + highOcc;
861 for (CImonPedO
p = pedestalO_mon.begin();
p != pedestalO_mon.end();
p++) {
862 bool isWrong =
false;
865 int sm_num = ecid_xt.
getID1();
866 int xt_num = ecid_xt.
getID2();
867 int yt_num = ecid_xt.
getID3();
873 float lowerCut = 999.;
874 if (ecid_xt.
getName() ==
"EB_crystal_number") {
877 if (ecid_xt.
getName() ==
"EE_crystal_number") {
891 if (ecid_xt.
getName() ==
"EB_crystal_number") {
893 theIter = badPedOnEB.find(ebdetid);
894 if (theIter == badPedOnEB.end()) {
895 badPedOnEB.insert(std::pair<DetId, float>(ebdetid, rd_ped0.
getADCMeanG12()));
896 badPedOnRmsEB.insert(std::pair<DetId, float>(ebdetid, rd_ped0.
getADCRMSG12()));
900 EEDetId eedetid(xt_num, yt_num, sm_num);
901 theIter = badPedOnEE.find(eedetid);
902 if (theIter == badPedOnEE.end()) {
903 badPedOnEE.insert(std::pair<DetId, float>(eedetid, rd_ped0.
getADCMeanG12()));
904 badPedOnRmsEE.insert(std::pair<DetId, float>(eedetid, rd_ped0.
getADCRMSG12()));
912 for (CImonCons
p = wrongGain_mon.begin();
p != wrongGain_mon.end();
p++) {
913 bool isWrong =
false;
915 rd_wgain =
p->second;
916 int sm_num = ecid_xt.
getID1();
917 int xt_num = ecid_xt.
getID2();
918 int yt_num = ecid_xt.
getID3();
925 if (ecid_xt.
getName() ==
"EB_crystal_number") {
927 theIter = badGainEB.find(ebdetid);
928 if (theIter == badGainEB.end())
929 badGainEB.insert(std::pair<DetId, float>(ebdetid, 999.));
932 EEDetId eedetid(xt_num, yt_num, sm_num);
933 theIter = badGainEE.find(eedetid);
934 if (theIter == badGainEE.end())
935 badGainEE.insert(std::pair<DetId, float>(eedetid, 999.));
942 for (CImonOcc
p = occupancy_mon.begin();
p != occupancy_mon.end();
p++) {
945 int sm_num = ecid_xt.
getID1();
946 int xt_num = ecid_xt.
getID2();
947 int yt_num = ecid_xt.
getID3();
952 bool isWrong =
false;
953 float occAvg = -999.;
954 if (ecid_xt.
getName() ==
"EB_crystal_number") {
959 if (ecid_xt.
getName() ==
"EE_crystal_number") {
966 if (ecid_xt.
getName() ==
"EB_crystal_number") {
968 theIter = badOccHighEB.find(ebdetid);
969 if (theIter == badOccHighEB.end())
970 badOccHighEB.insert(std::pair<DetId, float>(ebdetid, occAvg));
973 EEDetId eedetid(xt_num, yt_num, sm_num);
974 theIter = badOccHighEE.find(eedetid);
975 if (theIter == badOccHighEE.end())
976 badOccHighEE.insert(std::pair<DetId, float>(eedetid, occAvg));
983 for (CImonLaser
p = laser_mon.begin();
p != laser_mon.end();
p++) {
986 int sm_num = ecid_xt.
getID1();
987 int xt_num = ecid_xt.
getID2();
988 int yt_num = ecid_xt.
getID3();
994 if (ecid_xt.
getName() ==
"EB_crystal_number") {
997 theFed = 600 + elecId.
dccId();
1000 if (ecid_xt.
getName() ==
"EE_crystal_number") {
1002 EEDetId eedetid(xt_num, yt_num, sm_num);
1004 theFed = 600 + elecId.
dccId();
1005 theIx = eedetid.ix();
1011 if (ecid_xt.
getName() ==
"EE_crystal_number") {
1012 if (theFed > 600 && theFed < 610)
1013 thisFed = theFed - 601;
1014 if (theFed > 645 && theFed < 655)
1015 thisFed = theFed - 646 + 9;
1017 if (ecid_xt.
getName() ==
"EB_crystal_number") {
1018 thisFed = theFed - 610;
1022 int theTTieta = -100;
1023 int theTTiphi = -100;
1025 if (ecid_xt.
getName() ==
"EB_crystal_number") {
1026 theTTieta = (theTT - 1) / 4 + 1;
1027 theTTiphi = (theTT - 1) % 4 + 1;
1028 if (theTTieta == 1 || theTTiphi == 3 || theTTiphi == 4)
1030 if (theTTieta > 1 && (theTTiphi == 1 || theTTiphi == 2))
1033 if ((ecid_xt.
getName() ==
"EE_crystal_number") && (thisFed == 7 || thisFed == 16)) {
1041 rd_blue =
p->second;
1044 bool isWrong =
false;
1045 if (ecid_xt.
getName() ==
"EB_crystal_number") {
1049 if (ecid_xt.
getName() ==
"EE_crystal_number") {
1050 if (myApdMean < 100) {
1053 if ((thisFed == 7 || thisFed == 16) &&
isGoodLaserEESm[thisFed][theLM])
1059 if (ecid_xt.
getName() ==
"EB_crystal_number") {
1061 theIter = badLaserEB.find(ebdetid);
1062 if (theIter == badLaserEB.end())
1063 badLaserEB.insert(std::pair<DetId, float>(ebdetid, myApdMean));
1066 EEDetId eedetid(xt_num, yt_num, sm_num);
1067 theIter = badLaserEE.find(eedetid);
1068 if (theIter == badLaserEE.end())
1069 badLaserEE.insert(std::pair<DetId, float>(eedetid, myApdMean));
1076 std::map<DetId, float>::const_iterator theIterPedOn;
1077 std::map<DetId, float>::const_iterator theIterPedOnRms;
1078 std::map<DetId, float>::const_iterator theIterGain;
1079 std::map<DetId, float>::const_iterator theIterLaser;
1080 std::map<DetId, float>::const_iterator theIterOccHigh;
1083 for (theIterPedOn = badPedOnEB.begin(); theIterPedOn != badPedOnEB.end(); ++theIterPedOn) {
1084 float thePedOn = (*theIterPedOn).second;
1085 float thePedOnRms = 9999.;
1086 float theGain = 9999.;
1087 float theLaser = 9999.;
1088 float theOccHigh = 9999.;
1090 theIterPedOnRms = badPedOnRmsEB.find((*theIterPedOn).first);
1091 theIterGain = badGainEB.find((*theIterPedOn).first);
1092 theIterLaser = badLaserEB.find((*theIterPedOn).first);
1093 theIterOccHigh = badOccHighEB.find((*theIterPedOn).first);
1095 if (theIterPedOnRms != badPedOnRmsEB.end())
1096 thePedOnRms = (*theIterPedOnRms).second;
1097 if (theIterLaser != badLaserEB.end())
1098 theLaser = (*theIterLaser).second;
1099 if (theIterOccHigh != badOccHighEB.end())
1100 theOccHigh = (*theIterOccHigh).second;
1103 EBDetId ebdetid((*theIterPedOn).first);
1105 thisFed = 600 + elecId.
dccId();
1109 bool isNewPed =
true;
1110 bool isNewLaser =
true;
1111 bool isNewPhysics =
true;
1113 if ((*theIter).first == ebdetid)
1118 if ((*theIter).first == ebdetid)
1123 if ((*theIter).first == ebdetid)
1124 isNewPhysics =
false;
1127 if (isNewPed || (theLaser != 9999 && isNewLaser) || (theOccHigh != 9999 && isNewPhysics))
1130 if (theIterGain != badGainEB.end()) {
1131 *
ResFileEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" 1132 << thePedOnRms <<
"\t\t" 1134 <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1137 *
ResFileNewEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t" << thePedOn
1138 <<
"\t\t" << thePedOnRms <<
"\t\t" 1140 <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1142 float thisEtaFill =
float(0);
1143 if (ebdetid.ieta() > 0)
1144 thisEtaFill = ebdetid.ieta() - 0.5;
1145 if (ebdetid.ieta() < 0)
1146 thisEtaFill = ebdetid.ieta();
1147 newBadEB_->Fill((ebdetid.iphi() - 0.5), thisEtaFill, 2);
1150 *
ResFileEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" 1151 << thePedOnRms <<
"\t\t" << theGain <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1154 *
ResFileNewEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t" << thePedOn
1155 <<
"\t\t" << thePedOnRms <<
"\t\t" << theGain <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh
1158 float thisEtaFill =
float(0);
1159 if (ebdetid.ieta() > 0)
1160 thisEtaFill = ebdetid.ieta() - 0.5;
1161 if (ebdetid.ieta() < 0)
1162 thisEtaFill = ebdetid.ieta();
1163 newBadEB_->Fill((ebdetid.iphi() - 0.5), thisEtaFill, 2);
1169 for (theIterLaser = badLaserEB.begin(); theIterLaser != badLaserEB.end(); ++theIterLaser) {
1171 theIterPedOnRms = badPedOnRmsEB.find((*theIterLaser).first);
1172 if (theIterPedOnRms != badPedOnRmsEB.end())
1175 float thePedOn = 9999.;
1176 float thePedOnRms = 9999.;
1177 float theGain = 9999.;
1178 float theLaser = (*theIterLaser).second;
1179 float theOccHigh = 9999.;
1181 theIterGain = badGainEB.find((*theIterLaser).first);
1182 theIterOccHigh = badOccHighEB.find((*theIterLaser).first);
1183 if (theIterOccHigh != badOccHighEB.end())
1184 theOccHigh = (*theIterOccHigh).second;
1187 EBDetId ebdetid((*theIterLaser).first);
1189 thisFed = 600 + elecId.
dccId();
1193 bool isNewPed =
true;
1194 bool isNewLaser =
true;
1195 bool isNewPhysics =
true;
1197 if ((*theIter).first == ebdetid)
1202 if ((*theIter).first == ebdetid)
1207 if ((*theIter).first == ebdetid)
1208 isNewPhysics =
false;
1211 if ((isNewPed && theIterGain != badGainEB.end()) || (isNewLaser) || (theOccHigh != 9999 && isNewPhysics))
1214 if (theIterGain != badGainEB.end()) {
1215 *
ResFileEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" 1216 << thePedOnRms <<
"\t\t" 1218 <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1221 *
ResFileNewEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t" << thePedOn
1222 <<
"\t\t" << thePedOnRms <<
"\t\t" 1224 <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1226 float thisEtaFill =
float(0);
1227 if (ebdetid.ieta() > 0)
1228 thisEtaFill = ebdetid.ieta() - 0.5;
1229 if (ebdetid.ieta() < 0)
1230 thisEtaFill = ebdetid.ieta();
1231 newBadEB_->Fill((ebdetid.iphi() - 0.5), thisEtaFill, 2);
1234 *
ResFileEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" 1235 << thePedOnRms <<
"\t\t" << theGain <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1238 *
ResFileNewEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t" << thePedOn
1239 <<
"\t\t" << thePedOnRms <<
"\t\t" << theGain <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh
1242 float thisEtaFill =
float(0);
1243 if (ebdetid.ieta() > 0)
1244 thisEtaFill = ebdetid.ieta() - 0.5;
1245 if (ebdetid.ieta() < 0)
1246 thisEtaFill = ebdetid.ieta();
1247 newBadEB_->Fill((ebdetid.iphi() - 0.5), thisEtaFill, 2);
1253 for (theIterOccHigh = badOccHighEB.begin(); theIterOccHigh != badOccHighEB.end(); ++theIterOccHigh) {
1255 theIterPedOnRms = badPedOnRmsEB.find((*theIterOccHigh).first);
1256 theIterLaser = badLaserEB.find((*theIterOccHigh).first);
1257 if (theIterPedOnRms != badPedOnRmsEB.end())
1259 if (theIterLaser != badLaserEB.end())
1262 float thePedOn = 9999.;
1263 float thePedOnRms = 9999.;
1264 float theGain = 9999.;
1265 float theLaser = 9999.;
1266 float theOccHigh = (*theIterOccHigh).second;
1267 theIterGain = badGainEB.find((*theIterOccHigh).first);
1270 EBDetId ebdetid((*theIterOccHigh).first);
1272 thisFed = 600 + elecId.
dccId();
1276 bool isNewPed =
true;
1277 bool isNewPhysics =
true;
1279 if ((*theIter).first == ebdetid)
1284 if ((*theIter).first == ebdetid)
1285 isNewPhysics =
false;
1288 if ((isNewPed && theIterGain != badGainEB.end()) || (isNewPhysics))
1291 if (theIterGain != badGainEB.end()) {
1292 *
ResFileEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" 1293 << thePedOnRms <<
"\t\t" 1295 <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1298 *
ResFileNewEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t" << thePedOn
1299 <<
"\t\t" << thePedOnRms <<
"\t\t" 1301 <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1303 float thisEtaFill =
float(0);
1304 if (ebdetid.ieta() > 0)
1305 thisEtaFill = ebdetid.ieta() - 0.5;
1306 if (ebdetid.ieta() < 0)
1307 thisEtaFill = ebdetid.ieta();
1308 newBadEB_->Fill((ebdetid.iphi() - 0.5), thisEtaFill, 2);
1311 *
ResFileEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" 1312 << thePedOnRms <<
"\t\t" << theGain <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1315 *
ResFileNewEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t" << thePedOn
1316 <<
"\t\t" << thePedOnRms <<
"\t\t" << theGain <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh
1319 float thisEtaFill =
float(0);
1320 if (ebdetid.ieta() > 0)
1321 thisEtaFill = ebdetid.ieta() - 0.5;
1322 if (ebdetid.ieta() < 0)
1323 thisEtaFill = ebdetid.ieta();
1324 newBadEB_->Fill((ebdetid.iphi() - 0.5), thisEtaFill, 2);
1330 for (theIterGain = badGainEB.begin(); theIterGain != badGainEB.end(); ++theIterGain) {
1332 theIterPedOnRms = badPedOnRmsEB.find((*theIterGain).first);
1333 theIterLaser = badLaserEB.find((*theIterGain).first);
1334 theIterOccHigh = badOccHighEB.find((*theIterGain).first);
1335 if (theIterPedOnRms != badPedOnRmsEB.end())
1337 if (theIterLaser != badLaserEB.end())
1339 if (theIterOccHigh != badOccHighEB.end())
1342 float thePedOn = 9999.;
1343 float thePedOnRms = 9999.;
1344 float theLaser = 9999.;
1345 float theOccHigh = 9999.;
1348 EBDetId ebdetid((*theIterGain).first);
1350 thisFed = 600 + elecId.
dccId();
1354 bool isNewPed =
true;
1356 if ((*theIter).first == ebdetid)
1360 if (isNewPed && theIterGain != badGainEB.end())
1363 *
ResFileEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" 1364 << thePedOnRms <<
"\t\t" 1366 <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1369 *
ResFileNewEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t" << thePedOn
1370 <<
"\t\t" << thePedOnRms <<
"\t\t" 1372 <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1374 float thisEtaFill =
float(0);
1375 if (ebdetid.ieta() > 0)
1376 thisEtaFill = ebdetid.ieta() - 0.5;
1377 if (ebdetid.ieta() < 0)
1378 thisEtaFill = ebdetid.ieta();
1379 newBadEB_->Fill((ebdetid.iphi() - 0.5), thisEtaFill, 2);
1384 for (theIterPedOn = badPedOnEE.begin(); theIterPedOn != badPedOnEE.end(); ++theIterPedOn) {
1385 float thePedOn = (*theIterPedOn).second;
1386 float thePedOnRms = 9999.;
1387 float theGain = 9999.;
1388 float theLaser = 9999.;
1389 float theOccHigh = 9999.;
1391 theIterPedOnRms = badPedOnRmsEE.find((*theIterPedOn).first);
1392 theIterGain = badGainEE.find((*theIterPedOn).first);
1393 theIterLaser = badLaserEE.find((*theIterPedOn).first);
1394 theIterOccHigh = badOccHighEE.find((*theIterPedOn).first);
1396 if (theIterPedOnRms != badPedOnRmsEE.end())
1397 thePedOnRms = (*theIterPedOnRms).second;
1398 if (theIterLaser != badLaserEE.end())
1399 theLaser = (*theIterLaser).second;
1400 if (theIterOccHigh != badOccHighEE.end())
1401 theOccHigh = (*theIterOccHigh).second;
1404 EEDetId eedetid((*theIterPedOn).first);
1406 thisFed = 600 + elecId.
dccId();
1410 bool isNewPed =
true;
1411 bool isNewLaser =
true;
1412 bool isNewPhysics =
true;
1414 if ((*theIter).first == eedetid)
1419 if ((*theIter).first == eedetid)
1424 if ((*theIter).first == eedetid)
1425 isNewPhysics =
false;
1428 if (isNewPed || (theLaser != 9999 && isNewLaser) || (theOccHigh != 9999 && isNewPhysics))
1431 if (theIterGain != badGainEE.end()) {
1432 *
ResFileEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t" << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t" 1433 << eedetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t" 1435 <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1438 *
ResFileNewEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t" << eedetid.iy() <<
"\t\t" << eedetid.zside()
1439 <<
"\t\t" << eedetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t" 1441 <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1443 if (eedetid.zside() > 0)
1444 newBadEEP_->Fill((eedetid.ix() - 0.5), (eedetid.iy() - 0.5), 4);
1445 if (eedetid.zside() < 0)
1446 newBadEEM_->Fill((eedetid.ix() - 0.5), (eedetid.iy() - 0.5), 4);
1449 *
ResFileEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t" << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t" 1450 << eedetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t" << theGain <<
"\t\t" 1451 << theLaser <<
"\t\t" << theOccHigh << std::endl;
1454 *
ResFileNewEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t" << eedetid.iy() <<
"\t\t" << eedetid.zside()
1455 <<
"\t\t" << eedetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t" 1456 << theGain <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1458 if (eedetid.zside() > 0)
1459 newBadEEP_->Fill((eedetid.ix() - 0.5), (eedetid.iy() - 0.5), 4);
1460 if (eedetid.zside() < 0)
1461 newBadEEM_->Fill((eedetid.ix() - 0.5), (eedetid.iy() - 0.5), 4);
1467 for (theIterLaser = badLaserEE.begin(); theIterLaser != badLaserEE.end(); ++theIterLaser) {
1469 theIterPedOnRms = badPedOnRmsEE.find((*theIterLaser).first);
1470 if (theIterPedOnRms != badPedOnRmsEE.end())
1473 float thePedOn = 9999.;
1474 float thePedOnRms = 9999.;
1475 float theGain = 9999.;
1476 float theLaser = (*theIterLaser).second;
1477 float theOccHigh = 9999.;
1479 theIterGain = badGainEE.find((*theIterLaser).first);
1480 theIterOccHigh = badOccHighEE.find((*theIterLaser).first);
1481 if (theIterOccHigh != badOccHighEE.end())
1482 theOccHigh = (*theIterOccHigh).second;
1485 EEDetId eedetid((*theIterLaser).first);
1487 thisFed = 600 + elecId.
dccId();
1491 bool isNewPed =
true;
1492 bool isNewLaser =
true;
1493 bool isNewPhysics =
true;
1495 if ((*theIter).first == eedetid)
1500 if ((*theIter).first == eedetid)
1505 if ((*theIter).first == eedetid)
1506 isNewPhysics =
false;
1509 if ((isNewPed && theIterGain != badGainEE.end()) || (isNewLaser) || (theOccHigh != 9999 && isNewPhysics))
1512 if (theIterGain != badGainEE.end()) {
1513 *
ResFileEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t" << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t" 1514 << eedetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t" 1516 <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1519 *
ResFileNewEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t" << eedetid.iy() <<
"\t\t" << eedetid.zside()
1520 <<
"\t\t" << eedetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t" 1522 <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1524 if (eedetid.zside() > 0)
1525 newBadEEP_->Fill((eedetid.ix() - 0.5), (eedetid.iy() - 0.5), 4);
1526 if (eedetid.zside() < 0)
1527 newBadEEM_->Fill((eedetid.ix() - 0.5), (eedetid.iy() - 0.5), 4);
1530 *
ResFileEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t" << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t" 1531 << eedetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t" << theGain <<
"\t\t" 1532 << theLaser <<
"\t\t" << theOccHigh << std::endl;
1535 *
ResFileNewEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t" << eedetid.iy() <<
"\t\t" << eedetid.zside()
1536 <<
"\t\t" << eedetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t" 1537 << theGain <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1539 if (eedetid.zside() > 0)
1540 newBadEEP_->Fill((eedetid.ix() - 0.5), (eedetid.iy() - 0.5), 4);
1541 if (eedetid.zside() < 0)
1542 newBadEEM_->Fill((eedetid.ix() - 0.5), (eedetid.iy() - 0.5), 4);
1548 for (theIterOccHigh = badOccHighEE.begin(); theIterOccHigh != badOccHighEE.end(); ++theIterOccHigh) {
1550 theIterPedOnRms = badPedOnRmsEE.find((*theIterOccHigh).first);
1551 theIterLaser = badLaserEE.find((*theIterOccHigh).first);
1552 if (theIterPedOnRms != badPedOnRmsEE.end())
1554 if (theIterLaser != badLaserEE.end())
1557 float thePedOn = 9999.;
1558 float thePedOnRms = 9999.;
1559 float theGain = 9999.;
1560 float theLaser = 9999.;
1561 float theOccHigh = (*theIterOccHigh).second;
1562 theIterGain = badGainEE.find((*theIterOccHigh).first);
1565 EEDetId eedetid((*theIterOccHigh).first);
1567 thisFed = 600 + elecId.
dccId();
1571 bool isNewPed =
true;
1572 bool isNewPhysics =
true;
1574 if ((*theIter).first == eedetid)
1579 if ((*theIter).first == eedetid)
1580 isNewPhysics =
false;
1583 if ((isNewPed && theIterGain != badGainEE.end()) || (isNewPhysics))
1586 if (theIterGain != badGainEE.end()) {
1587 *
ResFileEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t" << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t" 1588 << eedetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t" 1590 <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1593 *
ResFileNewEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t" << eedetid.iy() <<
"\t\t" << eedetid.zside()
1594 <<
"\t\t" << eedetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t" 1596 <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1598 if (eedetid.zside() > 0)
1599 newBadEEP_->Fill((eedetid.ix() - 0.5), (eedetid.iy() - 0.5), 4);
1600 if (eedetid.zside() < 0)
1601 newBadEEM_->Fill((eedetid.ix() - 0.5), (eedetid.iy() - 0.5), 4);
1604 *
ResFileEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t" << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t" 1605 << eedetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t" << theGain <<
"\t\t" 1606 << theLaser <<
"\t\t" << theOccHigh << std::endl;
1609 *
ResFileNewEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t" << eedetid.iy() <<
"\t\t" << eedetid.zside()
1610 <<
"\t\t" << eedetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t" 1611 << theGain <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1613 if (eedetid.zside() > 0)
1614 newBadEEP_->Fill((eedetid.ix() - 0.5), (eedetid.iy() - 0.5), 4);
1615 if (eedetid.zside() < 0)
1616 newBadEEM_->Fill((eedetid.ix() - 0.5), (eedetid.iy() - 0.5), 4);
1622 for (theIterGain = badGainEE.begin(); theIterGain != badGainEE.end(); ++theIterGain) {
1624 theIterPedOnRms = badPedOnRmsEE.find((*theIterGain).first);
1625 theIterLaser = badLaserEE.find((*theIterGain).first);
1626 theIterOccHigh = badOccHighEE.find((*theIterGain).first);
1627 if (theIterPedOnRms != badPedOnRmsEE.end())
1629 if (theIterLaser != badLaserEE.end())
1631 if (theIterOccHigh != badOccHighEE.end())
1633 float thePedOn = 9999.;
1634 float thePedOnRms = 9999.;
1635 float theLaser = 9999.;
1636 float theOccHigh = 9999.;
1639 EEDetId eedetid((*theIterGain).first);
1641 thisFed = 600 + elecId.
dccId();
1645 bool isNewPed =
true;
1647 if ((*theIter).first == eedetid)
1651 if (isNewPed && theIterGain != badGainEE.end())
1654 *
ResFileEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t" << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t" 1655 << eedetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t" 1657 <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1660 *
ResFileNewEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t" << eedetid.iy() <<
"\t\t" << eedetid.zside()
1661 <<
"\t\t" << eedetid.hashedIndex() <<
"\t\t" << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t" 1663 <<
"\t\t" << theLaser <<
"\t\t" << theOccHigh << std::endl;
1665 if (eedetid.zside() > 0)
1666 newBadEEP_->Fill((eedetid.ix() - 0.5), (eedetid.iy() - 0.5), 4);
1667 if (eedetid.zside() < 0)
1668 newBadEEM_->Fill((eedetid.ix() - 0.5), (eedetid.iy() - 0.5), 4);
std::map< DetId, float > maskedLaserEB
std::map< DetId, float > maskedPhysicsEB
int getProblemsGainZero() const
int getEventsOverHighThreshold() const
std::ofstream * ResFileEE
std::string getName() const
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
float checkPedestalValueGain12(EcalPedestals::Item *item)
std::map< DetId, float > maskedOnlinePedEE
std::map< DetId, float > maskedPhysicsEE
std::map< DetId, float > maskedLaserEE
float checkPedestalRMSGain12(EcalPedestals::Item *item)
int towerId() const
get the tower id
float getADCMeanG12() const
EcalElectronicsMapping ecalElectronicsMap_
bool isGoodLaserEBSm[36][2]
std::ofstream * ResFileNewEB
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
float getADCRMSG12() const
bool isGoodLaserEESm[18][2]
std::map< DetId, float > maskedOnlinePedEB
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
std::ofstream * ResFileEB
std::ofstream * ResFileNewEE
static const int SMCRYSTALMODE