21 bool operator () (
DetId fFirst,
DetId fSecond)
const {
24 if (
first.genericSubdet () !=
second.genericSubdet ())
return first.genericSubdet () <
second.genericSubdet ();
25 if (
first.isHcalDetId ()) {
28 return f1.zside () != s1.zside () ?
f1.zside () < s1.zside () :
29 f1.iphi () != s1.iphi () ?
f1.iphi () < s1.iphi () :
30 f1.ietaAbs () != s1.ietaAbs () ?
f1.ietaAbs () < s1.ietaAbs () :
31 f1.depth () < s1.depth ();
38 class HcalElectronicsIdLess {
54 std::vector <std::string>
result;
57 for (
unsigned i = 0;
i <= fLine.size ();
i++) {
58 if (fLine [
i] ==
' ' ||
i == fLine.size ()) {
61 result.push_back (item);
67 if (empty) empty =
false;
74 std::vector <unsigned int>
result;
77 for (
unsigned i = 0;
i <= fLine.size ();
i++) {
78 if (fLine [
i] ==
',' ||
i == fLine.size ()) {
81 result.push_back (atoi (itemString.c_str()) );
87 if (empty) empty =
false;
94 std::vector <float>
result;
97 for (
unsigned i = 0;
i <= fLine.size ();
i++) {
98 if (fLine [
i] ==
',' ||
i == fLine.size ()) {
101 result.push_back (atof (itemString.c_str()) );
107 if (empty) empty =
false;
114 std::vector <double>
result;
117 for (
unsigned i = 0;
i <= fLine.size ();
i++) {
118 if (fLine [
i] ==
',' ||
i == fLine.size ()) {
121 result.push_back (atof (itemString.c_str()) );
127 if (empty) empty =
false;
135 return converter.
getId ();
141 sprintf (buffer,
" %15s %15s %15s %15s",
149 sprintf (buffer,
" %5s %4s %4s %10s",
159 std::istringstream iss(s);
160 return !(iss >>
f >>
t).
fail();
163 template <
class T,
class S>
165 if (!fObject)
return false;
167 while (fInput.getline(buffer, 1024)) {
168 if (buffer [0] ==
'#')
continue;
170 if (items.size()==0)
continue;
171 if (items.size () < 8) {
172 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 8 items: eta, phi, depth, subdet, 4x values" << std::endl;
181 fCondObject =
new S(
id, atof (items [4].c_str()), atof (items [5].c_str()),
182 atof (items [6].c_str()), atof (items [7].c_str()));
183 fObject->addValues(*fCondObject);
194 sprintf (buffer,
"# %15s %15s %15s %15s %8s %8s %8s %8s %10s\n",
"eta",
"phi",
"dep",
"det",
"cap0",
"cap1",
"cap2",
"cap3",
"DetId");
196 std::vector<DetId> channels = fObject.getAllChannels ();
197 std::sort (channels.begin(), channels.end(), DetIdLess ());
198 for (std::vector<DetId>::iterator channel = channels.begin ();
199 channel != channels.end ();
201 const float*
values = fObject.getValues (*channel)->getValues ();
204 sprintf (buffer,
" %8.5f %8.5f %8.5f %8.5f %10X\n",
205 values[0], values[1], values[2], values[3], channel->rawId ());
212 template <
class T,
class S>
214 if (!fObject)
return false;
216 while (fInput.getline(buffer, 1024)) {
217 if (buffer [0] ==
'#')
continue;
219 if (items.size()==0)
continue;
220 if (items.size () < 5) {
221 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 5 items: eta, phi, depth, subdet, value" << std::endl;
230 fCondObject =
new S(
id, atof (items [4].c_str()) );
231 fObject->addValues(*fCondObject);
241 sprintf (buffer,
"# %15s %15s %15s %15s %8s %10s\n",
"eta",
"phi",
"dep",
"det",
"value",
"DetId");
243 std::vector<DetId> channels = fObject.getAllChannels ();
244 std::sort (channels.begin(), channels.end(), DetIdLess ());
245 for (std::vector<DetId>::iterator channel = channels.begin ();
246 channel != channels.end ();
248 const float value = fObject.getValues (*channel)->getValue ();
250 sprintf (buffer,
" %8.5f %10X\n",
251 value, channel->rawId ());
257 template <
class T,
class S>
259 if (!fObject)
return false;
261 while (fInput.getline(buffer, 1024)) {
262 if (buffer [0] ==
'#')
continue;
264 if (items.size()==0)
continue;
265 if (items.size () < 5) {
266 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 5 items: eta, phi, depth, subdet, value" << std::endl;
275 fCondObject =
new S(
id, atoi (items [4].c_str()) );
276 fObject->addValues(*fCondObject);
286 sprintf (buffer,
"# %15s %15s %15s %15s %8s %10s\n",
"eta",
"phi",
"dep",
"det",
"value",
"DetId");
288 std::vector<DetId> channels = fObject.getAllChannels ();
289 std::sort (channels.begin(), channels.end(), DetIdLess ());
290 for (std::vector<DetId>::iterator channel = channels.begin ();
291 channel != channels.end ();
293 const int value = fObject.getValues (*channel)->getValue ();
295 sprintf (buffer,
" %15d %10X\n",
296 value, channel->rawId ());
302 template <
class T,
class S>
304 if (!fObject)
return false;
306 while (fInput.getline(buffer, 1024)) {
307 if (buffer [0] ==
'#')
continue;
309 if (items.size()==0)
continue;
311 fCondObject =
new S(firstid.
rawId());
312 for(
int j = 0; j != 10; j++) fCondObject->setValue(atoi(items[4].c_str()), 0, j, atof(items[j+5].c_str()));
313 for(
int i = 1;
i != 40;
i++){
314 fInput.getline(buffer, 1024);
317 if(
id.rawId() != firstid.
rawId())
break;
318 for(
int j = 0; j != 10; j++) fCondObject->setValue(atoi(items[4].c_str()),
i%10, j, atof(items[j+5].c_str()));
320 fObject->addValues(*fCondObject);
329 sprintf (buffer,
"# %5s %5s %5s %5s %5s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %10s\n",
330 "eta",
"phi",
"dep",
"det",
"capid",
"c0",
"c1",
"c2",
"c3",
"c4",
"c5",
"c6",
"c7",
"c8",
"c9",
"DetId");
332 std::vector<DetId> channels = fObject.getAllChannels ();
333 std::sort (channels.begin(), channels.end(), DetIdLess ());
334 for (std::vector<DetId>::iterator channel = channels.begin ();
335 channel != channels.end ();
338 for(
int m = 0;
m != 4;
m++){
339 for(
int i = 0;
i != 10;
i++){
340 for(
int j = 0; j != 10; j++){
342 thisline[j] = fObject.getValues(*channel)->getValue(
m,
i,j);
346 sprintf(buffer,
" %5i %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %10X\n",
347 m, thisline[0], thisline[1], thisline[2], thisline[3], thisline[4], thisline[5], thisline[6], thisline[7],
348 thisline[8], thisline[9], channel->rawId());
391 if (!fObject)
return false;
393 while (fInput.getline(buffer, 1024)) {
394 if (buffer [0] ==
'#')
continue;
396 if (items.size()==0)
continue;
397 if (items.size () < 6) {
398 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 6 items: eta, phi, depth, subdet, param1, param2" << std::endl;
403 int packingScheme =0;
404 if(items.size ()>22) {
405 packingScheme = atoi (items [22].c_str());
410 if(packingScheme==0) {
411 param1=atoi (items [4].c_str());
412 param2=atoi (items [5].c_str());
415 if(packingScheme==1) {
417 int aabits[6]= {1,1, 8, 4, 4, 9};
418 int aamax[ 6]= {1,1,255,15,15,511};
420 int bbbits[10]={1, 4,1, 4,1, 4, 4, 4, 4, 4};
421 int bbmax [10]={1,15,1,15,1,15,15,15,15,15};
427 for(
int i=0;
i<6;
i++) {
430 float phase=atof (items [j].c_str());
431 float xphase=(phase+32.0)*4.0;
434 aa=atoi (items [j].c_str());
436 if(aa>aamax[
i] || aa<0) {
437 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n value for a"<<
i<<
" should be less than"<<aamax[
i]<< std::endl;
439 param1=param1|aa<<aashift;
440 aashift=aashift+aabits[
i];
446 for(
int i=0;
i<10;
i++) {
448 bb=atoi (items [j].c_str());
450 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n value for b"<<i<<
" should be less than"<<bbmax[
i]<< std::endl;
452 param2=param2|bb<<bbshift;
453 bbshift=bbshift+bbbits[
i];
474 std::sort (channels.begin(), channels.end(), DetIdLess ());
476 for (std::vector<DetId>::iterator channel = channels.begin ();
477 channel != channels.end ();
486 if(packingScheme==0) {
489 sprintf (buffer,
"# %15s %15s %15s %15s %18s %15s %10s\n",
"eta",
"phi",
"dep",
"det",
"firstSample",
"samplesToAdd",
"DetId");
492 sprintf (buffer,
" %15d %15d %16X\n",
497 if(packingScheme==1) {
500 char lineT[100],lineA[200],lineB[200];
502 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
503 sprintf (lineA,
" %31s",
"a0: correctForPhaseContainment"); fOutput << lineA;
504 sprintf (lineB,
" %36s",
"b0: useLeakCorrection\n"); fOutput << lineB;
506 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
507 sprintf (lineA,
" %31s",
"a1: correctForLeadingEdge"); fOutput << lineA;
508 sprintf (lineB,
" %36s",
"b1: leakCorrectionID\n"); fOutput << lineB;
510 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
511 sprintf (lineA,
" %31s",
"a2: correctionPhaseNS"); fOutput << lineA;
512 sprintf (lineB,
" %36s",
"b2: correctForTimeslew\n"); fOutput << lineB;
514 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
515 sprintf (lineA,
" %31s",
"a3: firstSample"); fOutput << lineA;
516 sprintf (lineB,
" %36s",
"b3: timeslewCorrectionID\n"); fOutput << lineB;
518 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
519 sprintf (lineA,
" %31s",
"a4: samplesToAdd"); fOutput << lineA;
520 sprintf (lineB,
" %36s",
"b4: correctTiming\n"); fOutput << lineB;
522 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
523 sprintf (lineA,
" %31s",
"a5: pulseShapeID"); fOutput << lineA;
524 sprintf (lineB,
" %36s",
"b5: firstAuxTS\n"); fOutput << lineB;
526 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
527 sprintf (lineA,
" %31s",
" "); fOutput << lineA;
528 sprintf (lineB,
" %36s",
"b6: specialCaseID\n"); fOutput << lineB;
530 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
531 sprintf (lineA,
" %31s",
" "); fOutput << lineA;
532 sprintf (lineB,
" %36s",
"b7: noiseFlaggingID\n"); fOutput << lineB;
534 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
535 sprintf (lineA,
" %31s",
" "); fOutput << lineA;
536 sprintf (lineB,
" %36s",
"b8: pileupCleaningID\n"); fOutput << lineB;
538 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
539 sprintf (lineA,
" %31s",
" "); fOutput << lineA;
540 sprintf (lineB,
" %36s",
"b9: packingScheme\n"); fOutput << lineB;
543 sprintf (lineT,
"# %5s %4s %4s %10s %11s %10s %10s",
"eta",
"phi",
"dep",
"det",
"param1",
"param2",
"DetId");
546 sprintf (lineA,
" %6s %4s %6s %4s %4s %4s",
"a0",
"a1",
"a2",
"a3",
"a4",
"a5");
549 sprintf (lineB,
" %6s %3s %3s %3s %3s %3s %3s %3s %3s\n",
"b0",
"b1",
"b2",
"b3",
"b4",
"b5",
"b6",
"b7",
"b8");
554 sprintf (buffer,
" %11d %10d %10X", param1, param2, channel->rawId ());
563 sprintf (buffer,
" %6d %4d %6.1f %4d %4d %4d",aa0,aa1,aa2,aa3,aa4,aa5);
576 sprintf(buffer,
" %6d %3d %3d %3d %3d %3d %3d %3d %3d %3d\n",bb0,bb1,bb2,bb3,bb4,bb5,bb6,bb7,bb8,bb9);
586 if (!fObject)
return false;
588 while (fInput.getline(buffer, 1024)) {
589 if (buffer [0] ==
'#')
continue;
591 if (items.size()==0)
continue;
592 if (items.size() < 5) {
593 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 6 items: eta, phi, depth, subdet, signalTSs, noiseTSs" << std::endl;
596 if (items.size() > 7) {
597 edm::LogWarning(
"Format Error") <<
"Check line: " << buffer <<
"\n line must contain 6 items: eta, phi, depth, subdet, signalTSs, noiseTSs. " 598 <<
"\n ! signalTS and noiseTS must be of format <ts1,ts2,ts3,...> withOUT spaces. Ignoring line for safety" << std::endl;
615 if (!fObject)
return false;
617 while (fInput.getline(buffer, 1024)) {
618 if (buffer [0] ==
'#')
continue;
620 if (items.size()==0)
continue;
621 if (items.size () < 7) {
622 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 7 items: eta, phi, depth, subdet, nhit, phase, rms,detid" << std::endl;
644 sprintf (buffer,
"# %15s %15s %15s %15s %15s %15s %15s %15s\n",
"eta",
"phi",
"dep",
"det",
"nhit",
"mean",
"rms" ,
"DetId");
647 std::sort (channels.begin(), channels.end(), DetIdLess ());
648 for (std::vector<DetId>::iterator channel = channels.begin ();
649 channel != channels.end ();
652 sprintf (buffer,
" %15d %8.5f %8.5f %16X\n",
662 sprintf (buffer,
"# %15s %15s %15s %15s %10s %10s %10s\n",
"eta",
"phi",
"dep",
"det",
"signalTSs",
"noiseTSs",
"DetId");
665 std::sort (channels.begin(), channels.end(), DetIdLess ());
666 for (std::vector<DetId>::iterator channel = channels.begin ();
667 channel != channels.end ();
673 std::vector<unsigned int> vNoiseTS = fObject.
getValues (*channel)->
noiseTS();
675 sprintf (buffer,
" ");
677 for (
unsigned int i=0;
i<vSignalTS.size();
i++)
679 if (
i>0) {sprintf (buffer,
","); fOutput << buffer;}
680 sprintf (buffer,
"%u", vSignalTS.at(
i));
683 sprintf (buffer,
" ");
685 for (
unsigned int i=0;
i<vNoiseTS.size();
i++)
687 if (
i>0) { sprintf (buffer,
","); fOutput << buffer;}
688 sprintf (buffer,
"%u", vNoiseTS.at(
i));
691 sprintf (buffer,
" %10X\n", channel->rawId ());
700 if (!fObject)
return false;
702 while (fInput.getline(buffer, 1024)) {
703 if (buffer [0] ==
'#')
continue;
705 if (items.size()==0)
continue;
706 if (items.size () < 5) {
707 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 5 items: eta, phi, depth, subdet, signalShape" << std::endl;
713 if(items.size ()>11) {
714 packingScheme = atoi (items [11].c_str());
718 if(packingScheme==0) {
719 param1=atoi (items [4].c_str());
722 if(packingScheme==1) {
723 int aabits[6]={ 9,1, 4, 8,5, 4};
724 int aamax [6]={511,1,15,255,1,16};
728 for(
int i=0;
i<6;
i++) {
731 float phase=atof (items [j].c_str());
732 float xphase=(phase+32.0)*4.0;
735 aa=atoi (items [j].c_str());
737 if(aa>aamax[
i] || aa<0) {
738 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n value for a"<<
i<<
" should be less than"<<aamax[
i]<< std::endl;
741 param1=param1|aa<<aashift;
742 aashift=aashift+aabits[
i];
759 std::sort (channels.begin(), channels.end(), DetIdLess ());
761 for (std::vector<DetId>::iterator channel = channels.begin ();
762 channel != channels.end ();
766 if(packingScheme==0) {
768 sprintf (buffer,
"# %15s %15s %15s %15s %14s %10s\n",
"eta",
"phi",
"dep",
"det",
"signalShape",
"DetId");
773 sprintf (buffer,
" %10d %17X\n", value, channel->rawId ());
776 if(packingScheme==1) {
778 char lineT[100],lineA[200];
780 sprintf (lineT,
"#%40s",
" "); fOutput << lineT;
781 sprintf (lineA,
" %31s",
"a0: signalShape\n"); fOutput << lineA;
782 sprintf (lineT,
"#%40s",
" "); fOutput << lineT;
783 sprintf (lineA,
" %31s",
"a1: syncPhase\n"); fOutput << lineA;
784 sprintf (lineT,
"#%40s",
" "); fOutput << lineT;
785 sprintf (lineA,
" %31s",
"a2: binOfMaximum\n"); fOutput << lineA;
786 sprintf (lineT,
"#%40s",
" "); fOutput << lineT;
787 sprintf (lineA,
" %31s",
"a3: timePhase\n"); fOutput << lineA;
788 sprintf (lineT,
"#%40s",
" "); fOutput << lineT;
789 sprintf (lineA,
" %31s",
"a4: timeSmearing\n"); fOutput << lineA;
790 sprintf (lineT,
"#%40s",
" "); fOutput << lineT;
791 sprintf (lineA,
" %31s",
"a5: packingScheme\n"); fOutput << lineA;
792 sprintf (lineT,
"# %5s %4s %4s %10s %11s %10s",
"eta",
"phi",
"dep",
"det",
"param1",
"DetId");
794 sprintf (lineA,
" %6s %4s %4s %6s %4s %4s\n",
"a0",
"a1",
"a2",
"a3",
"a4",
"a5");
799 sprintf (buffer,
" %11d %10X", param1, channel->rawId ());
807 sprintf (buffer,
"%6d %4d %4d %6.1f %4d %4d\n",aa0,aa1,aa2,aa3,aa4,aa5);
817 while (fInput.getline(buffer, 1024)) {
819 if (items.size()==0)
continue;
821 if (items[0] ==
"#U")
827 edm::LogWarning(
"Pedestal Unit Error") <<
"Unrecognized unit for pedestals. Assuming fC." << std::endl;
834 edm::LogWarning(
"Pedestal Unit Missing") <<
"The unit for the pedestals is missing in the txt file." << std::endl;
839 while (fInput.getline(buffer, 1024)) {
840 if (buffer [0] ==
'#')
continue;
842 if (items.size()==0)
continue;
843 if (items.size () < 8) {
844 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 8 items: eta, phi, depth, subdet, 4x values" 845 <<
" or 12 items: eta, phi, depth, subdet, 4x values for mean, 4x values for width" 856 if (items.size() < 12)
859 atof (items [6].c_str()), atof (items [7].c_str()),
867 atof (items [6].c_str()), atof (items [7].c_str()),
868 atof (items [8].c_str()), atof (items [9].c_str()),
869 atof (items [10].c_str()), atof (items [11].c_str()) );
882 if (fObject.
isADC() ) sprintf (buffer,
"#U ADC << this is the unit \n");
883 else sprintf (buffer,
"#U fC << this is the unit \n");
886 sprintf (buffer,
"# %15s %15s %15s %15s %8s %8s %8s %8s %8s %8s %8s %8s %10s\n",
"eta",
"phi",
"dep",
"det",
"cap0",
"cap1",
"cap2",
"cap3",
"widthcap0",
"widthcap1",
"widthcap2",
"widthcap3",
"DetId");
890 std::sort (channels.begin(), channels.end(), DetIdLess ());
891 for (std::vector<DetId>::iterator channel = channels.begin ();
892 channel != channels.end ();
896 dumpId (fOutput, *channel);
897 sprintf (buffer,
" %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %10X\n",
898 values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], channel->rawId ());
909 if (!fObject)
return false;
911 while (fInput.getline(buffer, 1024)) {
912 if (buffer [0] ==
'#')
continue;
914 if (items.size()==0)
continue;
915 if (items.size () < 6) {
916 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 6 items: eta, phi, depth, subdet, base - either (hex) or (dec), value" << std::endl;
926 if (items[4] ==
"(hex)")
927 sscanf(items[5].c_str(),
"%X", &mystatus);
928 else if (items[4] ==
"(dec)")
929 sscanf(items[5].c_str(),
"%u", &mystatus);
932 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n value field must contain the base: one of (hex), (dec)" << std::endl;
947 sprintf (buffer,
"# %15s %15s %15s %15s %15s %10s\n",
"eta",
"phi",
"dep",
"det",
"(base) value",
"DetId");
950 std::sort (channels.begin(), channels.end(), DetIdLess ());
951 for (std::vector<DetId>::iterator channel = channels.begin ();
952 channel != channels.end ();
955 dumpId (fOutput, *channel);
956 sprintf (buffer,
"%6s %15X %10X\n",
"(hex)",
957 value, channel->rawId ());
969 while (fInput.getline(buffer, 1024)) {
970 if (buffer [0] ==
'#')
972 if (buffer [1] ==
'T')
978 if (buffer [1] ==
'A')
987 if (items.size()==0)
continue;
988 if (items.size () < 7) {
989 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 7 items: eta, phi, depth, subdet, pedestal, resp.corr.gain, flag" << std::endl;
1006 sprintf (buffer,
"#T %s << this is the tag name \n", fObject.
getTagString().c_str() );
1008 sprintf (buffer,
"#A %s << this is the algorithm name \n", fObject.
getAlgoString().c_str() );
1012 sprintf (buffer,
"# %15s %15s %15s %15s %8s %13s %8s %10s\n",
1013 "eta",
"phi",
"dep",
"det",
"ped",
"respcorrgain",
"flag",
1018 for (std::vector<DetId>::iterator channel = channels.begin ();
1019 channel != channels.end ();
1023 dumpId (fOutput, *channel);
1024 sprintf (buffer,
" %10.7f %10.7f %12d %10X\n",
1037 int linecounter = 0;
1039 while (fInput.getline(buffer, 1024)) {
1042 if (items.size()==0)
continue;
1050 edm::LogWarning(
"Pedestal Width Unit Error") <<
"Unrecognized unit for pedestal widths. Assuming fC." << std::endl;
1057 edm::LogWarning(
"Pedestal Width Unit Missing") <<
"The unit for the pedestal widths is missing in the txt file." << std::endl;
1063 while (fInput.getline(buffer, 1024)) {
1065 if (buffer [0] ==
'#')
continue;
1067 if (items.size()==0)
continue;
1068 if (items.size () < 14) {
1069 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line number: " << linecounter <<
"\n line must contain 14 items: eta, phi, depth, subdet, 10x correlations" 1070 <<
" or 20 items: eta, phi, depth, subdet, 16x correlations" 1081 if (items.size() < 20)
1084 values.
setSigma (0, 0, atof (items [4].c_str()));
1085 values.
setSigma (1, 0, atof (items [5].c_str()));
1086 values.
setSigma (1, 1, atof (items [6].c_str()));
1087 values.
setSigma (2, 0, atof (items [7].c_str()));
1088 values.
setSigma (2, 1, atof (items [8].c_str()));
1089 values.
setSigma (2, 2, atof (items [9].c_str()));
1090 values.
setSigma (3, 0, atof (items [10].c_str()));
1091 values.
setSigma (3, 1, atof (items [11].c_str()));
1092 values.
setSigma (3, 2, atof (items [12].c_str()));
1093 values.
setSigma (3, 3, atof (items [13].c_str()));
1105 values.
setSigma (0, 0, atof (items [4].c_str()) );
1106 values.
setSigma (0, 1, atof (items [5].c_str()) );
1107 values.
setSigma (0, 2, atof (items [6].c_str()) );
1108 values.
setSigma (0, 3, atof (items [7].c_str()) );
1109 values.
setSigma (1, 0, atof (items [8].c_str()) );
1110 values.
setSigma (1, 1, atof (items [9].c_str()) );
1111 values.
setSigma (1, 2, atof (items [10].c_str()) );
1112 values.
setSigma (1, 3, atof (items [11].c_str()) );
1113 values.
setSigma (2, 0, atof (items [12].c_str()) );
1114 values.
setSigma (2, 1, atof (items [13].c_str()) );
1115 values.
setSigma (2, 2, atof (items [14].c_str()) );
1116 values.
setSigma (2, 3, atof (items [15].c_str()) );
1117 values.
setSigma (3, 0, atof (items [16].c_str()) );
1118 values.
setSigma (3, 1, atof (items [17].c_str()) );
1119 values.
setSigma (3, 2, atof (items [18].c_str()) );
1120 values.
setSigma (3, 3, atof (items [19].c_str()) );
1131 if (fObject.
isADC() ) sprintf (buffer,
"#U ADC << this is the unit \n");
1132 else sprintf (buffer,
"#U fC << this is the unit \n");
1135 sprintf (buffer,
"# %15s %15s %15s %15s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %10s\n",
1136 "eta",
"phi",
"dep",
"det",
1137 "cov_0_0",
"cov_0_1",
"cov_0_2",
"cov_0_3",
"cov_1_0",
"cov_1_1",
"cov_1_2",
"cov_1_3",
"cov_2_0",
"cov_2_1",
"cov_2_2",
"cov_2_3",
"cov_3_0",
"cov_3_1",
"cov_3_2",
"cov_3_3",
1141 std::sort (channels.begin(), channels.end(), DetIdLess ());
1142 for (std::vector<DetId>::iterator channel = channels.begin ();
1143 channel != channels.end ();
1147 dumpId (fOutput, *channel);
1148 sprintf (buffer,
" %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %10X\n",
1163 while (fInput.getline(buffer, 1024)) {
1164 if (buffer [0] ==
'#')
continue;
1166 if (items.size()<1)
continue;
1167 if (items [0] ==
"SHAPE") {
1171 if (items.size () < 36) {
1172 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 36 items: eta, phi, depth, subdet, 4 capId x 4 Ranges x offsets, 4 capId x 4 Ranges x slopes" << std::endl;
1184 for (
unsigned capid = 0; capid < 4; capid++) {
1185 for (
unsigned range = 0; range < 4; range++) {
1186 coder.
setOffset (capid, range, atof (items [index++].c_str ()));
1189 for (
unsigned capid = 0; capid < 4; capid++) {
1190 for (
unsigned range = 0; range < 4; range++) {
1191 coder.
setSlope (capid, range, atof (items [index++].c_str ()));
1207 fOutput <<
"# QIE data" << std::endl;
1208 sprintf (buffer,
"# %15s %15s %15s %15s %36s %36s %36s %36s %36s %36s %36s %36s\n",
1209 "eta",
"phi",
"dep",
"det",
1210 "4 x offsets cap0",
"4 x offsets cap1",
"4 x offsets cap2",
"4 x offsets cap3",
1211 "4 x slopes cap0",
"4 x slopes cap1",
"4 x slopes cap2",
"4 x slopes cap3");
1214 std::sort (channels.begin(), channels.end(), DetIdLess ());
1215 for (std::vector<DetId>::iterator channel = channels.begin ();
1216 channel != channels.end ();
1219 dumpId (fOutput, *channel);
1220 for (
unsigned capid = 0; capid < 4; capid++) {
1221 for (
unsigned range = 0; range < 4; range++) {
1222 sprintf (buffer,
" %8.5f", coder->
offset (capid, range));
1226 for (
unsigned capid = 0; capid < 4; capid++) {
1227 for (
unsigned range = 0; range < 4; range++) {
1228 sprintf (buffer,
" %8.5f", coder->
slope (capid, range));
1232 fOutput << std::endl;
1240 while (fInput.getline(buffer, 1024)) {
1241 if (buffer [0] ==
'#')
continue;
1243 if (items.size () < 36) {
1244 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 36 items: eta, phi, depth, subdet, 32 bin values" << std::endl;
1257 for (
unsigned bin = 0;
bin < 32;
bin++) {
1258 values[
bin] = atof (items [index++].c_str ());
1270 fOutput <<
"# QIE data in calibration mode" << std::endl;
1271 sprintf (buffer,
"# %15s %15s %15s %15s %288s\n",
1272 "eta",
"phi",
"dep",
"det",
"32 x charges");
1275 std::sort (channels.begin(), channels.end(), DetIdLess ());
1276 for (std::vector<DetId>::iterator channel = channels.begin ();
1277 channel != channels.end ();
1281 dumpId (fOutput, *channel);
1283 for (
unsigned bin = 0;
bin < 32;
bin++) {
1284 sprintf (buffer,
" %8.5f", lowEdge [
bin]);
1287 fOutput << std::endl;
1297 while (fInput.getline(buffer, 1024)) {
1298 if (buffer [0] ==
'#')
continue;
1300 if (items.size () < 12) {
1301 if (items.size()==0)
continue;
1302 if (items.size()<9) {
1303 edm::LogError(
"MapFormat") <<
"HcalElectronicsMap-> line too short: " << buffer;
1306 if (items[8]==
"NA" || items[8]==
"NT") {
1307 while (items.size()<12) items.push_back(
"");
1308 }
else if (items[8]==
"HT") {
1309 if (items.size()==11) items.push_back(
"");
1311 edm::LogError(
"MapFormat") <<
"HcalElectronicsMap-> Bad line: " << buffer
1312 <<
"\n HT line must contain at least 11 items: i cr sl tb dcc spigot fiber fiberchan subdet=HT ieta iphi";
1316 edm::LogError(
"MapFormat") <<
"HcalElectronicsMap-> Bad line: " << buffer
1317 <<
"\n line must contain 12 items: i cr sl tb dcc spigot fiber fiberchan subdet ieta iphi depth";
1322 int crate = atoi (items [1].c_str());
1323 int slot = atoi (items [2].c_str());
1325 if (items [3] ==
"b") top = 0;
1326 int dcc = atoi (items [4].c_str());
1327 int spigot = atoi (items [5].c_str());
1329 if (items[3][0] ==
'u') {
1330 int fiber = atoi (items [6].c_str());
1331 int fiberCh = atoi (items [7].c_str());
1332 bool isTrig=(items[8] ==
"HT" || items[8] ==
"NT");
1334 }
else if (items[8] ==
"HT" || items[8] ==
"NT") {
1335 int slb = atoi (items [6].c_str());
1336 int slbCh = atoi (items [7].c_str());
1339 int fiber = atoi (items [6].c_str());
1340 int fiberCh = atoi (items [7].c_str());
1343 elId.
setHTR (crate, slot, top);
1347 if (items [8] ==
"NA") {
1349 }
else if (items [8] ==
"NT") {
1366 edm::LogWarning(
"Format Error") <<
"HcalElectronicsMap-> Unknown subdetector: " 1367 << items [8] <<
'/' << items [9] <<
'/' << items [10] <<
'/' << items [11] << std::endl;
1380 sprintf (buf,
"# %7s %3s %3s %3s %4s %7s %10s %14s %7s %5s %5s %6s",
1381 "i",
"cr",
"sl",
"tb",
"dcc",
"spigot",
"fiber/slb",
"fibcha/slbcha",
"subdet",
"ieta",
"iphi",
"depth");
1382 fOutput << buf << std::endl;
1384 for (
unsigned i = 0;
i < eids.size ();
i++) {
1388 if (trigger.
rawId ()) {
1393 sprintf (buf,
" %7X %3d %3d %3c %4d %7d %10d %14d %7s %5s %5s %6s",
1401 fOutput << buf << std::endl;
1403 sprintf (buf,
" %7X %3d %3d u %4d %7d %10d %14d %7s %5s %5s %6s",
1409 fOutput << buf << std::endl;
1411 sprintf (buf,
"NOT SUPPORTED!");
1412 fOutput << buf << std::endl;
1417 if (channel.
rawId()) {
1422 sprintf (buf,
" %7X %3d %3d %3c %4d %7d %10d %14d %7s %5s %5s %6s",
1429 sprintf (buf,
" %7X %3d %3d u %4d %7d %10d %14d %7s %5s %5s %6s",
1437 fOutput << buf << std::endl;
1446 if (!fObject)
return false;
1448 while (fInput.getline(buffer, 1024)) {
1449 if (buffer [0] ==
'#')
continue;
1451 if (items.size()==0)
continue;
1453 if (items.size() > 1 &&
1454 items[0].find(
"RctLsb")!=std::string::npos){
1455 fObject->
setRctLsb( atof( items[1].c_str() ) );
1458 if (items.size() > 1 &&
1459 items[0].find(
"Gain")!=std::string::npos){
1464 if (items.size () < 7) {
1465 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 7 items: eta, phi, depth, subdet, Rcalib, LutGranularity, OutputLutThreshold" << std::endl;
1471 atof (items [4].c_str()),
1472 atoi (items [5].c_str()),
1473 atoi (items [6].c_str()));
1483 const float _rctLsb = fObject.
getRctLsb();
1485 sprintf (buffer,
"# %20s\n",
"Non-channel data");
1487 sprintf (buffer,
"%8s %8.5f\n",
"RctLsb", _rctLsb);
1489 sprintf (buffer,
"%8s %8.5f\n",
"Gain", _gain);
1491 sprintf (buffer,
"# %15s %15s %15s %15s %8s %15s %19s %10s\n",
"eta",
"phi",
"dep",
"det",
"Rcalib",
"LutGranularity",
"OutputLutThreshold",
"DetId");
1494 std::sort (channels.begin(), channels.end(), DetIdLess ());
1495 for (std::vector<DetId>::iterator channel = channels.begin ();
1496 channel != channels.end ();
1501 dumpId (fOutput, *channel);
1502 sprintf (buffer,
" %8.5f %15d %19d %10X\n",
1505 _outputLutThreshold,
1514 if (!fObject)
return false;
1516 while (getline(fInput, buffer)) {
1517 if (buffer.at(0) ==
'#')
continue;
1518 std::vector <std::string> items =
splitString (buffer);
1519 if (items.size()==0)
continue;
1521 if (items.size() < 9) {
1522 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 9 items: subDet, side_ring, slice, type, subChannel, LS, Value, UpperLimit, LowerLimit" << std::endl;
1528 unsigned int slice, subchan;
1529 switch (items[0].at(1)) {
1546 from_string<int>(sidering, items[1],
std::dec);
1547 from_string<unsigned int>(slice, items[2],
std::dec);
1549 from_string<unsigned int>(subchan, items[4],
std::dec);
1556 from_string<int>(LS, items[5],
std::dec);
1559 from_string<float>(lower, items[8],
std::dec);
1567 if (!(fObject->
addValue(newVal))) {
1569 <<
"\nwas not added to the HcalDcsValues object." << std::endl;
1579 fOutput <<
"# subDet side_ring slice type subChan LS Value UpperLimit LowerLimit DcsId\n";
1585 for (HcalDcsValues::DcsSet::const_iterator
val = vals.begin();
1586 val != vals.end(); ++
val) {
1589 switch (valId.subdet()) {
1603 fOutput << valId.subdet() <<
' ';
1607 fOutput << valId.ring() <<
' ';
1609 fOutput << valId.zside() <<
' ';
1611 fOutput << valId.slice() <<
' ' 1612 << valId.typeString(valId.type()) <<
' ' 1613 << valId.subchannel() <<
' ';
1614 fOutput <<
val->LS() <<
' ' 1615 <<
val->getValue() <<
' ' 1616 <<
val->getUpperLimit() <<
' ' 1617 <<
val->getLowerLimit() <<
' ';
1618 fOutput << std::hex <<
val->DcsId() <<
std::dec <<
'\n';
1637 while (fInput.getline(buffer, 1024)) {
1638 if (buffer [0] ==
'#')
continue;
1640 if (items.size () < 8) {
1641 if (items.size()==0)
continue;
1643 edm::LogError(
"MapFormat") <<
"HcalDcsMap-> Bad line: " << buffer
1644 <<
"\n line must contain 8 items: line side_ring slice subchannel subdet ieta iphi depth";
1650 int ring = atoi(items[1].c_str());
1651 unsigned int slice = atoi (items [2].c_str());
1652 unsigned int subchannel = atoi (items [3].c_str());
1698 if (items[4].
find(
"CALIB")!=std::string::npos){
1701 else if (items[4].
find(
"HB")!=std::string::npos){
1704 else if (items[4].
find(
"HE")!=std::string::npos){
1707 else if (items[4].
find(
"HO")!=std::string::npos){
1710 else if (items[4].
find(
"HF")!=std::string::npos){
1714 edm::LogError(
"MapFormat") <<
"HcalDcsMap-> Unknown subdetector, line is not accepted: " << items[5];
1717 HcalDcsDetId dcsId(subdet, ring, slice, type, subchannel);
1721 id = converter.
getId();
1724 edm::LogWarning(
"Invalid HCAL channel") <<
"HcalDcsMap-> invalid channel: " 1728 << items [7] << std::endl;
1742 sprintf (buf,
"# %7s %10s %6s %8s %7s %5s %5s %6s",
1743 "i",
"side_ring",
"slice",
"subchan",
"subdet",
"ieta",
"iphi",
"depth");
1744 fOutput << buf << std::endl;
1746 unsigned int line_counter = 0;
1753 sprintf (buf,
" %8X %10d %6d %8d %7s %5s %5s %6s",
1758 _converter.getFlavor().c_str(),
1759 _converter.getField1().c_str(),
1760 _converter.getField2().c_str(),
1761 _converter.getField3().c_str()
1763 fOutput << buf << std::endl;
1773 if (!fObject)
return false;
1775 while (fInput.getline(buffer, 1024)) {
1776 if (buffer [0] ==
'#')
continue;
1778 if (items.size()==0)
continue;
1779 if (items.size () != 9) {
1780 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain at 9 least items: eta, phi, depth, subdet, firstSample, samplesToAdd, ExpectedPeak, MinEnergy, and a set of comma-separated coefficients" << std::endl;
1788 atoi (items [4].c_str()),
1789 atoi (items [5].c_str()),
1790 atoi (items [6].c_str()),
1791 atof (items [7].c_str()),
1803 sprintf (buffer,
"# %15s %15s %15s %15s %15s %15s %15s %15s %30s\n",
"eta",
"phi",
"dep",
"det",
"FirstSample",
"SamplesToAdd",
"ExpectedPeak",
"MinEnergy",
"Coefficients");
1806 std::sort (channels.begin(), channels.end(), DetIdLess ());
1807 for (std::vector<DetId>::iterator channel = channels.begin ();
1808 channel != channels.end ();
1813 sprintf (buffer,
" %15u %15u %15u %15f",
1828 if (
x<coef.size()-1)
1831 sprintf(buffer,
"\n");
1841 unsigned int all(0), good(0);
1842 while (fInput.getline(buffer, 1024)) {
1844 if (buffer [0] ==
'#')
continue;
1846 if (items.size () != 6) {
1847 edm::LogError(
"Format Error") <<
"HcalFrontEndMap-> line ignored: " << buffer;
1853 int rm = atoi (items [5].c_str());
1857 edm::LogInfo(
"MapFormat") <<
"HcalFrontEndMap:: processed " << good <<
" records in " <<
all <<
" record" << std::endl;
1864 sprintf (buffer,
"# %15s %15s %15s %15s %8s %8s\n",
"eta",
"phi",
"dep",
"det",
"rbx",
"rm");
1867 std::vector<DetId> channels = fObject.
allDetIds();
1868 std::sort (channels.begin(), channels.end(), DetIdLess ());
1869 for (std::vector<DetId>::iterator channel = channels.begin ();
1870 channel != channels.end (); ++channel) {
1873 dumpId (fOutput, *channel);
1874 sprintf (buffer,
" %8s %8d \n", rbx.c_str(),
rm);
1883 if (!fObject)
return false;
1885 while (fInput.getline(buffer, 1024)) {
1886 if (buffer [0] ==
'#')
continue;
1888 if (items.size()==0)
continue;
1889 if (items.size () < 9) {
1890 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 9 items: eta, phi, depth, subdet, 5x values" << std::endl;
1896 atof(items[5].c_str()),
1897 atof(items[6].c_str()),
1898 atoi(items[7].c_str()),
1899 atof(items[8].c_str()));
1909 sprintf (buffer,
"# %15s %15s %15s %15s %8s %15s %15s %8s %15s\n",
1910 "eta",
"phi",
"dep",
"det",
"type",
"fcByPE",
"darkCurrent",
1914 std::sort (channels.begin(), channels.end(), DetIdLess ());
1915 for (std::vector<DetId>::iterator channel = channels.begin ();
1916 channel != channels.end ();
1924 sprintf (buffer,
" %8d %15.6f %15.6f %8d %15.6f\n", type, fcByPE,
1925 darkC, auxi1, auxi2);
1935 unsigned int all(0), good(0);
1936 while (fInput.getline(buffer, 1024)) {
1938 if (buffer [0] ==
'#')
continue;
1940 if (items.size () != 8) {
1941 edm::LogError(
"MapFormat") <<
"HcalSiPMCharacteristics-> line ignored: " << buffer;
1946 int type = atoi (items [0].c_str());
1947 int pixels = atoi (items [1].c_str());
1948 float parL0 = atof (items [2].c_str());
1949 float parL1 = atof (items [3].c_str());
1950 float parL2 = atof (items [4].c_str());
1951 float cTalk = atof (items [5].c_str());
1952 int auxi1 = atoi (items [6].c_str());
1953 float auxi2 = atof (items [7].c_str());
1954 fObject->
loadObject (type, pixels, parL0, parL1, parL2, cTalk, auxi1, auxi2);
1957 edm::LogInfo(
"MapFormat") <<
"HcalSiPMCharacteristics:: processed " << good <<
" records in " <<
all <<
" record" << std::endl;
1964 sprintf (buffer,
"# %8s %8s %15s %15s %15s %15s %8s %15s\n",
"type",
1965 "pixels",
"parLin1",
"parLin2",
"parLin3",
"crossTalk",
"auxi1",
1970 for (
unsigned int k=0;
k<
size; ++
k) {
1975 const int auxi1 = fObject.
getAuxi1(type);
1976 const float auxi2 = fObject.
getAuxi2(type);
1977 const float par0 = (pars.size() > 0) ? pars[0] : 0;
1978 const float par1 = (pars.size() > 1) ? pars[1] : 0;
1979 const float par2 = (pars.size() > 2) ? pars[2] : 0;
1980 sprintf (buffer,
" %8d %8d %15.6e %15.6e %15.6e %15.6f %8d %15.6f\n",
1981 type, pixels, par0, par1, par2, cTalk, auxi1, auxi2);
1990 if (!fObject)
return false;
1992 while (fInput.getline(buffer, 1024)) {
1993 if (buffer [0] ==
'#')
continue;
1995 if (items.size()==0)
continue;
1996 if (items.size () < 8) {
1997 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 8 items: eta, phi, depth, subdet, 4x values" << std::endl;
2003 atoi(items[4].c_str()),
2004 atoi(items[5].c_str()),
2005 atoi(items[6].c_str()),
2006 atoi(items[7].c_str()));
2016 sprintf (buffer,
"# %15s %15s %15s %15s %15s %15s %15s %15s\n",
2017 "eta",
"phi",
"dep",
"det",
"Mask",
"FGBitInfo",
"auxi1",
"auxi2");
2020 std::sort (channels.begin(), channels.end(), DetIdLess ());
2021 for (std::vector<DetId>::iterator channel = channels.begin ();
2022 channel != channels.end ();
2029 sprintf (buffer,
" %15d %15d %15d %15d \n", mask, fgBitInfo, auxi1, auxi2);
2039 unsigned int all(0), good(0);
2040 while (fInput.getline(buffer, 1024)) {
2042 if (buffer [0] ==
'#')
continue;
2044 if (items.size () != 6) {
2045 edm::LogError(
"Format Error") <<
"HcalTPParameters-> line ignored: " << buffer;
2050 int version = atoi (items [0].c_str());
2051 int adcCut = atoi (items [1].c_str());
2052 uint64_t tdcMask = strtoull(items [2].c_str(),
NULL,16);
2053 uint32_t tbits = atoi (items [3].c_str());
2054 int auxi1 = atoi (items [4].c_str());
2055 int auxi2 = atoi (items [5].c_str());
2056 fObject->
loadObject (version, adcCut, tdcMask, tbits, auxi1, auxi2);
2059 edm::LogInfo(
"MapFormat") <<
"HcalTPParameters:: processed " << good <<
" records in " <<
all <<
" record" << std::endl;
2066 sprintf (buffer,
"# %15s %15s %16s %15s %15s %15s\n",
"FGAlgo_HBHE",
2067 "ADCThrHF",
"TDCMaskHF",
"STBitsHF",
"auxi1",
"auxi2");
2074 const int auxi1 = fObject.
getAuxi1();
2075 const int auxi2 = fObject.
getAuxi2();
2077 sprintf (buffer,
" %15d %15d %16jx %15x %15d %15d\n", version, adcCut, tdcMask, tbits, auxi1, auxi2);
2087 sprintf (buffer,
"# %15s %15s %15s %15s %8s %8s %8s %8s %8s %8s %8s %8s %10s\n",
2088 "eta",
"phi",
"dep",
"det",
"pedcap0",
"pedcap1",
"pedcap2",
"pedcap3",
"gaincap0",
"gaincap1",
"gaincap2",
"gaincap3",
"DetId");
2092 std::sort (channels.begin(), channels.end(), DetIdLess ());
2093 for (std::vector<DetId>::iterator channel = channels.begin (); channel != channels.end (); ++channel) {
2094 dumpId (fOutput, *channel);
2096 sprintf (buffer,
" %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %10X\n",
2106 sprintf (buffer,
"# %15s %15s %15s %15s %8s %8s %8s %8s %9s %9s %9s %9s %10s\n",
2107 "eta",
"phi",
"dep",
"det",
"pedwcap0",
"pedwcap1",
"pedwcap2",
"pedwcap3",
"gainwcap0",
"gainwcap1",
"gainwcap2",
"gainwcap3",
"DetId");
2111 std::sort (channels.begin(), channels.end(), DetIdLess ());
2112 for (std::vector<DetId>::iterator channel = channels.begin (); channel != channels.end (); ++channel) {
2113 dumpId (fOutput, *channel);
2115 sprintf (buffer,
" %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %10X\n",
2117 values.
gain(0), values.
gain(1), values.
gain(2), values.
gain(3), channel->rawId ());
const std::string & getField1() const
void dumpIdShort(std::ostream &fOutput, DetId id)
float getPedestal() const
unsigned int firstSample() const
static const HcalDetId Undefined
void setAlgoString(std::string fAlgo)
int fiberIndex() const
get the fiber index. For VME 1-8 (which of eight fibers carried by a spigot), for uTCA fibers are zer...
void setUnitADC(bool isADC)
double gain(int fCapId) const
get gain width for capid=0..3
float slope(unsigned fCapId, unsigned fRange) const
int getAuxi1() const
get Axiliary words
double respcorrgain(int fCapId) const
get response corrected gain for capid=0..3
unsigned int param2() const
std::vector< DetId > getAllChannels() const
bool getHcalSingleIntObject(std::istream &fInput, T *fObject, S *fCondObject)
uint64_t getTDCMaskHF() const
get TDC mask for HF
std::vector< unsigned int > signalTS() const
bool from_string(T &t, const std::string &s, std::ios_base &(*f)(std::ios_base &))
bool isHcalZDCDetId() const
bool getHcalSingleFloatObject(std::istream &fInput, T *fObject, S *fCondObject)
static int slb(const HcalTriggerPrimitiveSample &theSample)
unsigned int pileupCleaningID() const
const HcalQIECoder * getCoder(DetId fId) const
get QIE parameters
bool timeSmearing() const
unsigned int packingScheme() const
float getSigma(int fCapId1, int fCapId2) const
get correlation element for capId1/2 = 0..3
bool mapGeomId2DcsId(HcalDetId fId, HcalDcsDetId fDcsId)
uint32_t HFdigiflagSamplesToAdd() const
bool getHcalMatrixObject(std::istream &fInput, T *fObject, S *fCondObject)
std::vector< float > splitStringToFloatByComma(const std::string &fLine)
DcsSet const & getAllSubdetValues(DcsSubDet subd) const
static unsigned int getId(void)
bool correctForPhaseContainment() const
int getType() const
get SiPM type
int htrSlot() const
get the htr slot
std::vector< unsigned int > splitStringToIntByComma(const std::string &fLine)
double pedestal(int fCapId) const
get pedestal for capid=0..3
const Item * getValues(DetId fId, bool throwOnFail=true) const
void setOffset(unsigned fCapId, unsigned fRange, float fValue)
bool dumpHcalSingleFloatObject(std::ostream &fOutput, const T &fObject)
unsigned int noiseFlaggingID() const
void dumpId(std::ostream &fOutput, DetId id)
bool mapEId2tId(HcalElectronicsId fElectronicsId, HcalTrigTowerDetId fTriggerId)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const HcalCalibrationQIECoder * getCoder(DetId fId) const
get QIE parameters
std::vector< std::string > splitString(const std::string &fLine)
std::vector< DetId > getAllChannels() const
unsigned int leakCorrectionID() const
bool addCoder(const HcalQIECoder &fCoder)
int crateId() const
get the readout VME crate number
int readoutVMECrateId() const
get the readout VME crate number
void dumpId(std::ostream &fOutput, DetId id)
float getCrossTalk(int type) const
get cross talk
unsigned int param1() const
unsigned int specialCaseID() const
uint32_t rawId() const
get the raw id
U second(std::pair< T, U > const &p)
const_iterator endById(void) const
bool isHcalZDCDetId() const
const std::string & getField3() const
bool isHcalTrigTowerDetId() const
std::vector< HcalDcsValue > DcsSet
void setUnitADC(bool isADC)
float getRespGain() const
double pedestal(int fCapId) const
get pedestal width for capid=0..3
int htrTopBottom() const
get the htr top/bottom (1=top/0=bottom), valid for VME
float offset(unsigned fCapId, unsigned fRange) const
const_iterator beginById(void) const
bool loadObject(int type, int pixels, float parLin1, float parLin2, float parLin3, float crossTalk, int auxi1=0, float auxi2=0)
std::vector< DetId > getAllChannels() const
unsigned int param1() const
unsigned int nhits() const
std::vector< DetId > allDetIds() const
HcalDetId getHcalDetId(void)
int getFGVersionHBHE() const
get FineGrain Algorithm Version for HBHE
bool correctForTimeslew() const
bool correctTiming() const
int dccid() const
get the (Hcal local) DCC id for VME, crate number for uTCA
HcalDcsDetId getHcalDcsDetId(void)
bool dumpHcalMatrixObject(std::ostream &fOutput, const T &fObject)
uint32_t HFdigiflagExpectedPeak() const
unsigned int getTypes() const
get # of types
int fiberChanId() const
get the fiber channel id (which of channels on a fiber)
float getDarkCurrent() const
get dark current
std::string getTagString() const
unsigned int samplesToAdd() const
void setMinCharges(const float fValue[32])
uint32_t getHFTriggerInfo() const
get Self Trigger bits
bool mapEId2chId(HcalElectronicsId fElectronicsId, DetId fId)
float correctionPhaseNS() const
int spigot() const
get the spigot (input number on DCC, AMC card number for uTCA)
unsigned int pulseShapeID() const
static DcsType DcsTypeFromString(const std::string &str)
bin
set the eta bin as selection string.
const HcalCalibrationWidths & getCalibrationWidths(const DetId id) const
int slbChannelIndex() const
get the SLB channel index (valid only for VME trigger-chain ids)
std::vector< double > HFdigiflagCoefficients() const
void setHTR(int crate, int slot, int tb)
const std::string & getField2() const
int getAuxi1(int type) const
get auxiliary words
std::string getAlgoString() const
std::vector< HcalElectronicsId > allElectronicsId() const
unsigned long long uint64_t
int getType(unsigned int k) const
uint32_t HFdigiflagFirstSample() const
bool isHcalCalibDetId() const
const int lookupRM(DetId fId) const
brief lookup the RM associated with the given logical id
const HcalCalibrations & getCalibrations(const DetId id) const
int slot() const
get the htr or uHTR slot
std::vector< float > getNonLinearities(int type) const
get nonlinearity constants
double S(const TLorentzVector &, const TLorentzVector &)
bool isTriggerChainId() const
void loadObject(int version, int adcCut, uint64_t tdcMask, uint32_t tbits, int auxi1, int auxi2)
unsigned int signalShape() const
static const HcalTrigTowerDetId Undefined
bool addValue(HcalDcsValue const &newVal)
bool getHcalObject(std::istream &fInput, T *fObject, S *fCondObject)
bool getObject(std::istream &fInput, HcalPedestals *fObject)
DetId getId(const std::vector< std::string > &items)
unsigned int binOfMaximum() const
bool dumpObject(std::ostream &fOutput, const HcalPedestals &fObject)
int slbSiteNumber() const
get the SLB site number (valid only for VME trigger-chain ids)
bool loadObject(DetId fId, int rm, std::string rbx)
load a new entry
uint32_t getFGBitInfo() const
get FG bit information
unsigned int packingScheme() const
const float * getValues() const
get value for all capId = 0..3
bool dumpHcalObject(std::ostream &fOutput, const T &fObject)
std::vector< unsigned int > noiseTS() const
const DetId lookupTrigger(HcalElectronicsId fId) const
brief lookup the trigger logical detid associated with the given electronics id
float getAuxi2(int type) const
const std::string & getFlavor() const
unsigned int firstAuxTS() const
const float * minCharges() const
void setTagString(std::string fTag)
uint32_t getValue() const
bool correctForLeadingEdge() const
bool addCoder(const HcalCalibrationQIECoder &fCoder)
bool addValues(const Item &myItem)
int getPixels(int type) const
get # of pixels
Readout chain identification for Hcal.
void setSigma(int fCapId1, int fCapId2, float fSigma)
void setSlope(unsigned fCapId, unsigned fRange, float fValue)
const std::string lookupRBX(DetId fId) const
brief lookup the RBX associated with the given logical id
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
int getADCThresholdHF() const
get ADC threshold fof TDC mask of HF
float getFCByPE() const
get fcByPE
bool dumpHcalSingleIntObject(std::ostream &fOutput, const T &fObject)
unsigned int timeslewCorrectionID() const
uint32_t getMask() const
get mask for channel validity and self trigger information
std::vector< double > splitStringToDoubleByComma(const std::string &fLine)
double HFdigiflagMinEThreshold() const
bool useLeakCorrection() const