14 f =
new TFile(
rootfile.c_str(),
"RECREATE");
17 ocMapUp =
new TH2F(
"ocMapUp",
"occupancy_map_updated_gains", 83, -41.5, 41.5, 72, 0.5, 72.5);
18 ocMapRef =
new TH2F(
"ocMapRef",
"occupancy_map_updated_gains", 83, -41.5, 41.5, 72, 0.5, 72.5);
22 diffUpRefCap0 =
new TH1F(
"diffUpRefCap0",
"difference_update_reference_Cap0", 100, -0.5, 0.5);
23 ratioUpRefCap0 =
new TH1F(
"ratioUpRefCap0",
"ration_update_reference_Cap0", 100, 0.5, 1.5);
24 gainsUpCap0 =
new TH1F(
"gainsUpCap0",
"gains_update_Cap0", 100, 0.0, 0.6);
25 gainsRefCap0 =
new TH1F(
"gainsRefCap0",
"gains_reference_Cap0", 100, 0.0, 0.6);
27 diffUpRefCap1 =
new TH1F(
"diffUpRefCap1",
"difference_update_reference_Cap1", 100, -0.5, 0.5);
28 ratioUpRefCap1 =
new TH1F(
"ratioUpRefCap1",
"ration_update_reference_Cap1", 100, 0.5, 1.5);
29 gainsUpCap1 =
new TH1F(
"gainsUpCap1",
"gains_update_Cap1", 100, 0.0, 0.6);
30 gainsRefCap1 =
new TH1F(
"gainsRefCap1",
"gains_reference_Cap1", 100, 0.0, 0.6);
32 diffUpRefCap2 =
new TH1F(
"diffUpRefCap2",
"difference_update_reference_Cap2", 100, -0.5, 0.5);
33 ratioUpRefCap2 =
new TH1F(
"ratioUpRefCap2",
"ration_update_reference_Cap2", 100, 0.5, 1.5);
34 gainsUpCap2 =
new TH1F(
"gainsUpCap2",
"gains_update_Cap2", 100, 0.0, 0.6);
35 gainsRefCap2 =
new TH1F(
"gainsRefCap2",
"gains_reference_Cap2", 100, 0.0, 0.6);
37 diffUpRefCap3 =
new TH1F(
"diffUpRefCap3",
"difference_update_reference_Cap3", 100, -0.5, 0.5);
38 ratioUpRefCap3 =
new TH1F(
"ratioUpRefCap3",
"ration_update_reference_Cap3", 100, 0.5, 1.5);
39 gainsUpCap3 =
new TH1F(
"gainsUpCap3",
"gains_update_Cap3", 100, 0.0, 0.6);
40 gainsRefCap3 =
new TH1F(
"gainsRefCap3",
"gains_reference_Cap3", 100, 0.0, 0.6);
48 bool epsilonflag =
false;
49 bool notequalsflag =
false;
68 std::cout <<
"--- Dumping Gains - update ---" << std::endl;
72 std::ofstream outStream2(
dumprefs.c_str());
73 std::cout <<
"--- Dumping Gains - reference ---" << std::endl;
80 std::vector<DetId>::const_iterator cell;
83 for (std::vector<DetId>::const_iterator it = listRefChan.begin(); it != listRefChan.end(); it++) {
97 cell =
std::find(listNewChan.begin(), listNewChan.end(), (*it));
98 if (cell != listNewChan.end())
110 if (fabs(valCap0up - valCap0) >
epsilon)
112 if (fabs(valCap1up - valCap1) >
epsilon)
114 if (fabs(valCap2up - valCap2) >
epsilon)
116 if (fabs(valCap3up - valCap3) >
epsilon)
119 if (valCap0up != valCap0)
120 notequalsflag =
true;
121 if (valCap1up != valCap1)
122 notequalsflag =
true;
123 if (valCap2up != valCap2)
124 notequalsflag =
true;
125 if (valCap3up != valCap3)
126 notequalsflag =
true;
134 for (std::vector<DetId>::const_iterator it = listNewChan.begin(); it != listNewChan.end(); it++) {
148 throw cms::Exception(
"DataDoesNotMatch") <<
"Values differ by more than deltaG" << std::endl;
150 std::cout <<
"These gains do not differ by more than deltaG" << std::endl;
155 throw cms::Exception(
"DataDoesNotMatch") <<
"Values do not match" << std::endl;
157 std::cout <<
"These gains are identical" << std::endl;
166 for (std::vector<DetId>::const_iterator it = listRefChan.begin(); it != listRefChan.end(); it++) {
169 cell =
std::find(listNewChan.begin(), listNewChan.end(), mydetid);
170 if (cell == listNewChan.end())
187 std::vector<HcalGenericDetId> listEMap = myRefEMap->
allPrecisionId();
189 for (std::vector<HcalGenericDetId>::const_iterator it = listEMap.begin(); it != listEMap.end(); it++) {
191 if (
std::find(listResult.begin(), listResult.end(), mydetid) == listResult.end()) {
200 std::ofstream outStream3(
outfile.c_str());
201 std::cout <<
"--- Dumping Gains - the combined ones ---" << std::endl;