812 std::map<DetId,float>::const_iterator theIter;
813 std::map<DetId, float> badPedOnEB, badPedOnEE;
814 std::map<DetId, float> badPedOnRmsEB, badPedOnRmsEE;
815 std::map<DetId, float> badGainEB, badGainEE;
816 std::map<DetId, float> badLaserEB, badLaserEE;
817 std::map<DetId, float> badOccHighEB, badOccHighEE;
819 typedef std::map<EcalLogicID, MonPedestalsOnlineDat>::const_iterator CImonPedO;
820 typedef std::map<EcalLogicID, MonCrystalConsistencyDat>::const_iterator CImonCons;
821 typedef std::map<EcalLogicID, MonOccupancyDat>::const_iterator CImonOcc;
822 typedef std::map<EcalLogicID, MonLaserBlueDat>::const_iterator CImonLaser;
832 float totEntriesAboveHighThrEB=0.;
833 float totEntriesAboveHighThrEE=0.;
834 for (CImonOcc
p=occupancy_mon.begin();
p!=occupancy_mon.end();
p++) {
838 if (ecid_xt.
getName()==
"EB_crystal_number" && highOcc>-1) totEntriesAboveHighThrEB = totEntriesAboveHighThrEB + highOcc;
839 if (ecid_xt.
getName()==
"EE_crystal_number" && highOcc>-1) totEntriesAboveHighThrEE = totEntriesAboveHighThrEE + highOcc;
844 for (CImonPedO
p = pedestalO_mon.begin();
p != pedestalO_mon.end();
p++) {
846 bool isWrong =
false;
849 int sm_num=ecid_xt.
getID1();
850 int xt_num=ecid_xt.
getID2();
851 int yt_num=ecid_xt.
getID3();
858 if(ecid_xt.
getName()==
"EB_crystal_number") { lowerCut = 2.0; }
859 if(ecid_xt.
getName()==
"EE_crystal_number") { lowerCut = 2.5; }
867 if(ecid_xt.
getName()==
"EB_crystal_number") {
869 theIter = badPedOnEB.find(ebdetid);
870 if (theIter==badPedOnEB.end()) {
871 badPedOnEB.insert (std::pair<DetId, float>(ebdetid, rd_ped0.
getADCMeanG12()));
872 badPedOnRmsEB.insert(std::pair<DetId, float>(ebdetid, rd_ped0.
getADCRMSG12()));
876 EEDetId eedetid(xt_num,yt_num,sm_num);
877 theIter = badPedOnEE.find(eedetid);
878 if (theIter==badPedOnEE.end()) {
879 badPedOnEE.insert (std::pair<DetId, float>(eedetid, rd_ped0.
getADCMeanG12()));
880 badPedOnRmsEE.insert(std::pair<DetId, float>(eedetid, rd_ped0.
getADCRMSG12()));
889 for (CImonCons
p = wrongGain_mon.begin();
p != wrongGain_mon.end();
p++) {
891 bool isWrong =
false;
893 rd_wgain =
p->second;
894 int sm_num = ecid_xt.
getID1();
895 int xt_num = ecid_xt.
getID2();
896 int yt_num = ecid_xt.
getID3();
901 if(ecid_xt.
getName()==
"EB_crystal_number") {
903 theIter = badGainEB.find(ebdetid);
904 if (theIter==badGainEB.end()) badGainEB.insert(std::pair<DetId, float>(ebdetid, 999.));
907 EEDetId eedetid(xt_num,yt_num,sm_num);
908 theIter = badGainEE.find(eedetid);
909 if (theIter==badGainEE.end()) badGainEE.insert(std::pair<DetId, float>(eedetid, 999.));
917 for (CImonOcc
p=occupancy_mon.begin();
p!=occupancy_mon.end();
p++) {
921 int sm_num = ecid_xt.
getID1();
922 int xt_num = ecid_xt.
getID2();
923 int yt_num = ecid_xt.
getID3();
928 bool isWrong =
false;
929 float occAvg = -999.;
930 if ( ecid_xt.
getName()==
"EB_crystal_number" ) {
932 if (occAvg>0.001) isWrong=
true;
934 if ( ecid_xt.
getName()==
"EE_crystal_number" ) {
936 if (occAvg>0.001) isWrong=
true;
940 if(ecid_xt.
getName()==
"EB_crystal_number") {
942 theIter = badOccHighEB.find(ebdetid);
943 if (theIter==badOccHighEB.end()) badOccHighEB.insert(std::pair<DetId, float>(ebdetid, occAvg));
946 EEDetId eedetid(xt_num,yt_num,sm_num);
947 theIter = badOccHighEE.find(eedetid);
948 if (theIter==badOccHighEE.end()) badOccHighEE.insert(std::pair<DetId, float>(eedetid, occAvg));
956 for (CImonLaser
p=laser_mon.begin();
p!=laser_mon.end();
p++) {
960 int sm_num = ecid_xt.
getID1();
961 int xt_num = ecid_xt.
getID2();
962 int yt_num = ecid_xt.
getID3();
968 if(ecid_xt.
getName()==
"EB_crystal_number") {
971 theFed = 600+elecId.
dccId();
974 if(ecid_xt.
getName()==
"EE_crystal_number") {
976 EEDetId eedetid(xt_num,yt_num,sm_num);
978 theFed = 600+elecId.
dccId();
979 theIx = eedetid.ix();
985 if (ecid_xt.
getName()==
"EE_crystal_number") {
986 if (theFed>600 && theFed<610) thisFed = theFed -601;
987 if (theFed>645 && theFed<655) thisFed = theFed -646 + 9;
989 if (ecid_xt.
getName()==
"EB_crystal_number") { thisFed = theFed - 610; }
995 if(ecid_xt.
getName()==
"EB_crystal_number") {
996 theTTieta = (theTT-1)/4 +1;
997 theTTiphi = (theTT-1)%4 +1;
998 if (theTTieta==1 || theTTiphi==3 || theTTiphi==4) theLM=0;
999 if (theTTieta>1 && (theTTiphi==1 || theTTiphi==2)) theLM=1;
1001 if( (ecid_xt.
getName()==
"EE_crystal_number") && (thisFed==7 || thisFed==16) ) {
1002 if (theIx<=50) theLM=0;
1003 if (theIx>50) theLM=1;
1007 rd_blue =
p->second;
1010 bool isWrong =
false;
1011 if(ecid_xt.
getName()==
"EB_crystal_number") {
1012 if ( (myApdMean < 400) &&
isGoodLaserEBSm[thisFed][theLM] ) isWrong=
true;
1014 if(ecid_xt.
getName()==
"EE_crystal_number") {
1015 if ( myApdMean<100 ) {
1016 if ( thisFed!=7 && thisFed!=16 &&
isGoodLaserEESm[thisFed][0] ) isWrong=
true;
1017 if ( (thisFed==7 || thisFed==16) &&
isGoodLaserEESm[thisFed][theLM] ) isWrong=
true;
1022 if(ecid_xt.
getName()==
"EB_crystal_number") {
1024 theIter = badLaserEB.find(ebdetid);
1025 if (theIter==badLaserEB.end()) badLaserEB.insert(std::pair<DetId, float>(ebdetid, myApdMean));
1028 EEDetId eedetid(xt_num,yt_num,sm_num);
1029 theIter = badLaserEE.find(eedetid);
1030 if (theIter==badLaserEE.end()) badLaserEE.insert(std::pair<DetId, float>(eedetid, myApdMean));
1038 std::map<DetId, float>::const_iterator theIterPedOn;
1039 std::map<DetId, float>::const_iterator theIterPedOnRms;
1040 std::map<DetId, float>::const_iterator theIterGain;
1041 std::map<DetId, float>::const_iterator theIterLaser;
1042 std::map<DetId, float>::const_iterator theIterOccHigh;
1046 for(theIterPedOn=badPedOnEB.begin(); theIterPedOn!=badPedOnEB.end(); ++theIterPedOn) {
1047 float thePedOn = (*theIterPedOn).second;
1048 float thePedOnRms = 9999.;
1049 float theGain = 9999.;
1050 float theLaser = 9999.;
1051 float theOccHigh = 9999.;
1053 theIterPedOnRms = badPedOnRmsEB.find((*theIterPedOn).first);
1054 theIterGain = badGainEB.find ((*theIterPedOn).first);
1055 theIterLaser = badLaserEB.find ((*theIterPedOn).first);
1056 theIterOccHigh = badOccHighEB.find ((*theIterPedOn).first);
1058 if (theIterPedOnRms!=badPedOnRmsEB.end()) thePedOnRms = (*theIterPedOnRms).second;
1059 if (theIterLaser!=badLaserEB.end()) theLaser = (*theIterLaser).second;
1060 if (theIterOccHigh!=badOccHighEB.end()) theOccHigh = (*theIterOccHigh).second;
1063 EBDetId ebdetid((*theIterPedOn).first);
1065 thisFed = 600+elecId.
dccId();
1070 bool isNewLaser=
true;
1071 bool isNewPhysics=
true;
1074 for(theIter=
maskedLaserEB.begin(); theIter!=
maskedLaserEB.end(); ++theIter) {
if ((*theIter).first==ebdetid) isNewLaser=
false; }
1078 if ( isNewPed || (theLaser!=9999 && isNewLaser) || (theOccHigh!=9999 && isNewPhysics) ) isNew=
true;
1080 if (theIterGain!=badGainEB.end()) {
1081 *
ResFileEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t"
1082 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1083 <<
"gainZero" <<
"\t\t" << theLaser <<
"\t\t"
1084 << theOccHigh << std::endl;
1087 *
ResFileNewEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t"
1088 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1089 <<
"gainZero" <<
"\t\t" << theLaser <<
"\t\t"
1090 << theOccHigh << std::endl;
1092 float thisEtaFill=float(0);
1093 if (ebdetid.ieta()>0) thisEtaFill = ebdetid.ieta() - 0.5;
1094 if (ebdetid.ieta()<0) thisEtaFill = ebdetid.ieta();
1098 *
ResFileEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t"
1099 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1100 << theGain <<
"\t\t" << theLaser <<
"\t\t"
1101 << theOccHigh << std::endl;
1104 *
ResFileNewEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t"
1105 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1106 << theGain <<
"\t\t" << theLaser <<
"\t\t"
1107 << theOccHigh << std::endl;
1109 float thisEtaFill=float(0);
1110 if (ebdetid.ieta()>0) thisEtaFill = ebdetid.ieta() - 0.5;
1111 if (ebdetid.ieta()<0) thisEtaFill = ebdetid.ieta();
1120 for(theIterLaser=badLaserEB.begin(); theIterLaser!=badLaserEB.end(); ++theIterLaser) {
1123 theIterPedOnRms = badPedOnRmsEB.find((*theIterLaser).first);
1124 if (theIterPedOnRms!=badPedOnRmsEB.end())
continue;
1126 float thePedOn = 9999.;
1127 float thePedOnRms = 9999.;
1128 float theGain = 9999.;
1129 float theLaser = (*theIterLaser).second;
1130 float theOccHigh = 9999.;
1132 theIterGain = badGainEB.find ((*theIterLaser).first);
1133 theIterOccHigh = badOccHighEB.find ((*theIterLaser).first);
1134 if (theIterOccHigh!=badOccHighEB.end()) theOccHigh = (*theIterOccHigh).second;
1137 EBDetId ebdetid((*theIterLaser).first);
1139 thisFed = 600+elecId.
dccId();
1144 bool isNewLaser=
true;
1145 bool isNewPhysics=
true;
1148 for(theIter=
maskedLaserEB.begin(); theIter!=
maskedLaserEB.end(); ++theIter) {
if ((*theIter).first==ebdetid) isNewLaser=
false; }
1152 if ( (isNewPed && theIterGain!=badGainEB.end() ) || (isNewLaser) || (theOccHigh!=9999 && isNewPhysics) ) isNew=
true;
1154 if (theIterGain!=badGainEB.end()) {
1155 *
ResFileEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t"
1156 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1157 <<
"gainZero" <<
"\t\t" << theLaser <<
"\t\t"
1158 << theOccHigh << std::endl;
1161 *
ResFileNewEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t"
1162 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1163 <<
"gainZero" <<
"\t\t" << theLaser <<
"\t\t"
1164 << theOccHigh << std::endl;
1166 float thisEtaFill=float(0);
1167 if (ebdetid.ieta()>0) thisEtaFill = ebdetid.ieta() - 0.5;
1168 if (ebdetid.ieta()<0) thisEtaFill = ebdetid.ieta();
1172 *
ResFileEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t"
1173 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1174 << theGain <<
"\t\t" << theLaser <<
"\t\t"
1175 << theOccHigh << std::endl;
1178 *
ResFileNewEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t"
1179 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1180 << theGain <<
"\t\t" << theLaser <<
"\t\t"
1181 << theOccHigh << std::endl;
1183 float thisEtaFill=float(0);
1184 if (ebdetid.ieta()>0) thisEtaFill = ebdetid.ieta() - 0.5;
1185 if (ebdetid.ieta()<0) thisEtaFill = ebdetid.ieta();
1193 for(theIterOccHigh = badOccHighEB.begin(); theIterOccHigh != badOccHighEB.end(); ++theIterOccHigh) {
1196 theIterPedOnRms = badPedOnRmsEB.find((*theIterOccHigh).first);
1197 theIterLaser = badLaserEB.find ((*theIterOccHigh).first);
1198 if (theIterPedOnRms!=badPedOnRmsEB.end())
continue;
1199 if (theIterLaser!=badLaserEB.end())
continue;
1201 float thePedOn = 9999.;
1202 float thePedOnRms = 9999.;
1203 float theGain = 9999.;
1204 float theLaser = 9999.;
1205 float theOccHigh = (*theIterOccHigh).second;
1206 theIterGain = badGainEB.find ((*theIterOccHigh).first);
1209 EBDetId ebdetid((*theIterOccHigh).first);
1211 thisFed = 600+elecId.
dccId();
1216 bool isNewPhysics=
true;
1221 if ( (isNewPed && theIterGain!=badGainEB.end() ) || (isNewPhysics) ) isNew=
true;
1223 if (theIterGain!=badGainEB.end()) {
1224 *
ResFileEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t"
1225 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1226 <<
"gainZero" <<
"\t\t" << theLaser <<
"\t\t"
1227 << theOccHigh << std::endl;
1230 *
ResFileNewEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t"
1231 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1232 <<
"gainZero" <<
"\t\t" << theLaser <<
"\t\t"
1233 << theOccHigh << std::endl;
1235 float thisEtaFill=float(0);
1236 if (ebdetid.ieta()>0) thisEtaFill = ebdetid.ieta() - 0.5;
1237 if (ebdetid.ieta()<0) thisEtaFill = ebdetid.ieta();
1241 *
ResFileEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t"
1242 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1243 << theGain <<
"\t\t" << theLaser <<
"\t\t"
1244 << theOccHigh << std::endl;
1247 *
ResFileNewEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t"
1248 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1249 << theGain <<
"\t\t" << theLaser <<
"\t\t"
1250 << theOccHigh << std::endl;
1252 float thisEtaFill=float(0);
1253 if (ebdetid.ieta()>0) thisEtaFill = ebdetid.ieta() - 0.5;
1254 if (ebdetid.ieta()<0) thisEtaFill = ebdetid.ieta();
1261 for(theIterGain = badGainEB.begin(); theIterGain != badGainEB.end(); ++theIterGain) {
1264 theIterPedOnRms = badPedOnRmsEB.find((*theIterGain).first);
1265 theIterLaser = badLaserEB.find ((*theIterGain).first);
1266 theIterOccHigh = badOccHighEB.find ((*theIterGain).first);
1267 if (theIterPedOnRms!=badPedOnRmsEB.end())
continue;
1268 if (theIterLaser!=badLaserEB.end())
continue;
1269 if (theIterOccHigh!=badOccHighEB.end())
continue;
1271 float thePedOn = 9999.;
1272 float thePedOnRms = 9999.;
1273 float theLaser = 9999.;
1274 float theOccHigh = 9999.;
1277 EBDetId ebdetid((*theIterGain).first);
1279 thisFed = 600+elecId.
dccId();
1286 if ( isNewPed && theIterGain!=badGainEB.end() ) isNew=
true;
1288 *
ResFileEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t"
1289 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1290 <<
"gainZero" <<
"\t\t" << theLaser <<
"\t\t"
1291 << theOccHigh << std::endl;
1294 *
ResFileNewEB << thisFed <<
"\t\t" << ebdetid.ic() <<
"\t\t" << ebdetid.hashedIndex() <<
"\t\t"
1295 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1296 <<
"gainZero" <<
"\t\t" << theLaser <<
"\t\t"
1297 << theOccHigh << std::endl;
1299 float thisEtaFill=float(0);
1300 if (ebdetid.ieta()>0) thisEtaFill = ebdetid.ieta() - 0.5;
1301 if (ebdetid.ieta()<0) thisEtaFill = ebdetid.ieta();
1308 for(theIterPedOn = badPedOnEE.begin(); theIterPedOn != badPedOnEE.end(); ++theIterPedOn) {
1310 float thePedOn = (*theIterPedOn).second;
1311 float thePedOnRms = 9999.;
1312 float theGain = 9999.;
1313 float theLaser = 9999.;
1314 float theOccHigh = 9999.;
1316 theIterPedOnRms = badPedOnRmsEE.find((*theIterPedOn).first);
1317 theIterGain = badGainEE.find ((*theIterPedOn).first);
1318 theIterLaser = badLaserEE.find ((*theIterPedOn).first);
1319 theIterOccHigh = badOccHighEE.find ((*theIterPedOn).first);
1321 if (theIterPedOnRms!=badPedOnRmsEE.end()) thePedOnRms = (*theIterPedOnRms).second;
1322 if (theIterLaser !=badLaserEE.end()) theLaser = (*theIterLaser).second;
1323 if (theIterOccHigh !=badOccHighEE.end()) theOccHigh = (*theIterOccHigh).second;
1326 EEDetId eedetid((*theIterPedOn).first);
1328 thisFed = 600+elecId.
dccId();
1333 bool isNewLaser=
true;
1334 bool isNewPhysics=
true;
1337 for(theIter=
maskedLaserEE.begin(); theIter!=
maskedLaserEE.end(); ++theIter) {
if ((*theIter).first==eedetid) isNewLaser=
false; }
1341 if ( isNewPed || (theLaser!=9999 && isNewLaser) || (theOccHigh!=9999 && isNewPhysics) ) isNew=
true;
1343 if (theIterGain!=badGainEE.end()) {
1344 *
ResFileEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t"
1345 << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t"
1346 << eedetid.hashedIndex() <<
"\t\t"
1347 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1348 <<
"gainZero" <<
"\t\t" << theLaser <<
"\t\t"
1349 << theOccHigh << std::endl;
1352 *
ResFileNewEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t"
1353 << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t"
1354 << eedetid.hashedIndex() <<
"\t\t"
1355 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1356 <<
"gainZero" <<
"\t\t" << theLaser <<
"\t\t"
1357 << theOccHigh << std::endl;
1359 if (eedetid.zside()>0)
newBadEEP_ ->
Fill( (eedetid.ix()-0.5), (eedetid.iy()-0.5), 4);
1360 if (eedetid.zside()<0)
newBadEEM_ ->
Fill( (eedetid.ix()-0.5), (eedetid.iy()-0.5), 4);
1363 *
ResFileEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t"
1364 << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t"
1365 << eedetid.hashedIndex() <<
"\t\t"
1366 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1367 << theGain <<
"\t\t" << theLaser <<
"\t\t"
1368 << theOccHigh << std::endl;
1371 *
ResFileNewEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t"
1372 << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t"
1373 << eedetid.hashedIndex() <<
"\t\t"
1374 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1375 << theGain <<
"\t\t" << theLaser <<
"\t\t"
1376 << theOccHigh << std::endl;
1378 if (eedetid.zside()>0)
newBadEEP_ ->
Fill( (eedetid.ix()-0.5), (eedetid.iy()-0.5), 4);
1379 if (eedetid.zside()<0)
newBadEEM_ ->
Fill( (eedetid.ix()-0.5), (eedetid.iy()-0.5), 4);
1386 for(theIterLaser = badLaserEE.begin(); theIterLaser != badLaserEE.end(); ++theIterLaser) {
1389 theIterPedOnRms = badPedOnRmsEE.find((*theIterLaser).first);
1390 if (theIterPedOnRms!=badPedOnRmsEE.end())
continue;
1392 float thePedOn = 9999.;
1393 float thePedOnRms = 9999.;
1394 float theGain = 9999.;
1395 float theLaser = (*theIterLaser).second;
1396 float theOccHigh = 9999.;
1398 theIterGain = badGainEE.find ((*theIterLaser).first);
1399 theIterOccHigh = badOccHighEE.find ((*theIterLaser).first);
1400 if (theIterOccHigh!=badOccHighEE.end()) theOccHigh = (*theIterOccHigh).second;
1403 EEDetId eedetid((*theIterLaser).first);
1405 thisFed = 600+elecId.
dccId();
1410 bool isNewLaser=
true;
1411 bool isNewPhysics=
true;
1414 for(theIter=
maskedLaserEE.begin(); theIter!=
maskedLaserEE.end(); ++theIter) {
if ((*theIter).first==eedetid) isNewLaser=
false; }
1418 if ( (isNewPed && theIterGain!=badGainEE.end() ) || (isNewLaser) || (theOccHigh!=9999 && isNewPhysics) ) isNew=
true;
1420 if (theIterGain!=badGainEE.end()) {
1421 *
ResFileEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t"
1422 << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t"
1423 << eedetid.hashedIndex() <<
"\t\t"
1424 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1425 <<
"gainZero" <<
"\t\t" << theLaser <<
"\t\t"
1426 << theOccHigh << std::endl;
1429 *
ResFileNewEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t"
1430 << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t"
1431 << eedetid.hashedIndex() <<
"\t\t"
1432 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1433 <<
"gainZero" <<
"\t\t" << theLaser <<
"\t\t"
1434 << theOccHigh << std::endl;
1436 if (eedetid.zside()>0)
newBadEEP_ ->
Fill( (eedetid.ix()-0.5), (eedetid.iy()-0.5), 4);
1437 if (eedetid.zside()<0)
newBadEEM_ ->
Fill( (eedetid.ix()-0.5), (eedetid.iy()-0.5), 4);
1440 *
ResFileEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t"
1441 << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t"
1442 << eedetid.hashedIndex() <<
"\t\t"
1443 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1444 << theGain <<
"\t\t" << theLaser <<
"\t\t"
1445 << theOccHigh << std::endl;
1448 *
ResFileNewEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t"
1449 << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t"
1450 << eedetid.hashedIndex() <<
"\t\t"
1451 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1452 << theGain <<
"\t\t" << theLaser <<
"\t\t"
1453 << theOccHigh << std::endl;
1455 if (eedetid.zside()>0)
newBadEEP_ ->
Fill( (eedetid.ix()-0.5), (eedetid.iy()-0.5), 4);
1456 if (eedetid.zside()<0)
newBadEEM_ ->
Fill( (eedetid.ix()-0.5), (eedetid.iy()-0.5), 4);
1463 for(theIterOccHigh = badOccHighEE.begin(); theIterOccHigh != badOccHighEE.end(); ++theIterOccHigh) {
1466 theIterPedOnRms = badPedOnRmsEE.find((*theIterOccHigh).first);
1467 theIterLaser = badLaserEE.find ((*theIterOccHigh).first);
1468 if (theIterPedOnRms!=badPedOnRmsEE.end())
continue;
1469 if (theIterLaser!=badLaserEE.end())
continue;
1471 float thePedOn = 9999.;
1472 float thePedOnRms = 9999.;
1473 float theGain = 9999.;
1474 float theLaser = 9999.;
1475 float theOccHigh = (*theIterOccHigh).second;
1476 theIterGain = badGainEE.find ((*theIterOccHigh).first);
1479 EEDetId eedetid((*theIterOccHigh).first);
1481 thisFed = 600+elecId.
dccId();
1486 bool isNewPhysics=
true;
1491 if ( (isNewPed && theIterGain!=badGainEE.end() ) || (isNewPhysics) ) isNew=
true;
1493 if (theIterGain!=badGainEE.end()) {
1494 *
ResFileEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t"
1495 << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t"
1496 << eedetid.hashedIndex() <<
"\t\t"
1497 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1498 <<
"gainZero" <<
"\t\t" << theLaser <<
"\t\t"
1499 << theOccHigh << std::endl;
1502 *
ResFileNewEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t"
1503 << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t"
1504 << eedetid.hashedIndex() <<
"\t\t"
1505 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1506 <<
"gainZero" <<
"\t\t" << theLaser <<
"\t\t"
1507 << theOccHigh << std::endl;
1509 if (eedetid.zside()>0)
newBadEEP_ ->
Fill( (eedetid.ix()-0.5), (eedetid.iy()-0.5), 4);
1510 if (eedetid.zside()<0)
newBadEEM_ ->
Fill( (eedetid.ix()-0.5), (eedetid.iy()-0.5), 4);
1513 *
ResFileEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t"
1514 << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t"
1515 << eedetid.hashedIndex() <<
"\t\t"
1516 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1517 << theGain <<
"\t\t" << theLaser <<
"\t\t"
1518 << theOccHigh << std::endl;
1521 *
ResFileNewEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t"
1522 << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t"
1523 << eedetid.hashedIndex() <<
"\t\t"
1524 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1525 << theGain <<
"\t\t" << theLaser <<
"\t\t"
1526 << theOccHigh << std::endl;
1528 if (eedetid.zside()>0)
newBadEEP_ ->
Fill( (eedetid.ix()-0.5), (eedetid.iy()-0.5), 4);
1529 if (eedetid.zside()<0)
newBadEEM_ ->
Fill( (eedetid.ix()-0.5), (eedetid.iy()-0.5), 4);
1535 for(theIterGain = badGainEE.begin(); theIterGain != badGainEE.end(); ++theIterGain) {
1538 theIterPedOnRms = badPedOnRmsEE.find((*theIterGain).first);
1539 theIterLaser = badLaserEE.find ((*theIterGain).first);
1540 theIterOccHigh = badOccHighEE.find ((*theIterGain).first);
1541 if (theIterPedOnRms!=badPedOnRmsEE.end())
continue;
1542 if (theIterLaser!=badLaserEE.end())
continue;
1543 if (theIterOccHigh!=badOccHighEE.end())
continue;
1544 float thePedOn = 9999.;
1545 float thePedOnRms = 9999.;
1546 float theLaser = 9999.;
1547 float theOccHigh = 9999.;
1550 EEDetId eedetid((*theIterGain).first);
1552 thisFed = 600+elecId.
dccId();
1559 if ( isNewPed && theIterGain!=badGainEE.end() ) isNew=
true;
1561 *
ResFileEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t"
1562 << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t"
1563 << eedetid.hashedIndex() <<
"\t\t"
1564 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1565 <<
"gainZero" <<
"\t\t" << theLaser <<
"\t\t"
1566 << theOccHigh << std::endl;
1569 *
ResFileNewEE << thisFed <<
"\t\t" << eedetid.ix() <<
"\t\t"
1570 << eedetid.iy() <<
"\t\t" << eedetid.zside() <<
"\t\t"
1571 << eedetid.hashedIndex() <<
"\t\t"
1572 << thePedOn <<
"\t\t" << thePedOnRms <<
"\t\t"
1573 <<
"gainZero" <<
"\t\t" << theLaser <<
"\t\t"
1574 << theOccHigh << std::endl;
1576 if (eedetid.zside()>0)
newBadEEP_ ->
Fill( (eedetid.ix()-0.5), (eedetid.iy()-0.5), 4);
1577 if (eedetid.zside()<0)
newBadEEM_ ->
Fill( (eedetid.ix()-0.5), (eedetid.iy()-0.5), 4);
std::map< DetId, float > maskedLaserEB
std::map< DetId, float > maskedPhysicsEB
std::ofstream * ResFileEE
int getProblemsGainZero() const
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
int towerId() const
get the tower id
float checkPedestalValueGain12(EcalPedestals::Item *item)
int getEventsOverHighThreshold() const
std::map< DetId, float > maskedOnlinePedEE
std::map< DetId, float > maskedPhysicsEE
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
std::map< DetId, float > maskedLaserEE
std::string getName() const
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
float checkPedestalRMSGain12(EcalPedestals::Item *item)
EcalElectronicsMapping ecalElectronicsMap_
if(c.getParameter< edm::InputTag >("puppiValueMap").label().size()!=0)
bool isGoodLaserEBSm[36][2]
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
std::ofstream * ResFileNewEB
float getADCMeanG12() const
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
bool isGoodLaserEESm[18][2]
std::map< DetId, float > maskedOnlinePedEB
std::ofstream * ResFileEB
std::ofstream * ResFileNewEE
float getADCRMSG12() const
static const int SMCRYSTALMODE