118 std::string runnum_string;
119 std::stringstream tempstringout;
121 runnum_string = tempstringout.str();
123 std::string rootfilename = runnum_string +
"-MCwidths.root";
124 theFile =
new TFile(rootfilename.c_str(),
"RECREATE");
126 for(
int i = 0;
i!= 10;
i++)
128 tempstringout.str(
"");
130 std::string histname3 = tempstringout.str();
131 std::string histname2 =
"Mean covariance TS ";
132 std::string histname1 =
"HB ";
133 std::string histname = histname1 + histname2 + histname3;
134 HBMeans[
i] =
new TProfile(histname.c_str(),histname1.c_str(), 10, -0.50, 9.5);
136 histname = histname1 + histname2 + histname3;
137 HEMeans[
i] =
new TProfile(histname.c_str(),histname1.c_str(), 10, -0.50, 9.5);
139 histname = histname1 + histname2 + histname3;
140 HFMeans[
i] =
new TProfile(histname.c_str(),histname1.c_str(), 10, -0.50, 9.5);
142 histname = histname1 + histname2 + histname3;
143 HOMeans[
i] =
new TProfile(histname.c_str(),histname1.c_str(), 10, -0.50, 9.5);
149 std::vector<HcalGenericDetId> listEMap = myRefEMap->
allPrecisionId();
150 for (std::vector<HcalGenericDetId>::const_iterator it = listEMap.begin(); it != listEMap.end(); it++)
153 if(mygenid.isHcalDetId())
159 for(
int i = 0; i != 4; i++)
161 for(
int j = 0;
j != 10;
j++){
162 for(
int k = 0;
k != 10;
k++)
175 std::vector<MCWidthsBunch>::iterator bunch_it;
180 for(bunch_it =
Bunches.begin(); bunch_it !=
Bunches.end(); bunch_it++)
181 if(bunch_it->detid.rawId() == digi.
id().
rawId())
break;
183 const HcalPedestal* peds = (myRefPeds->getValues( searchid ));
184 bunch_it->usedflag =
true;
186 for(
int ts = 0; ts != 10; ts++)
188 for(
int j = ts;
j != 10;
j++){
189 bunch_it->num[firstcapid][ts][
j] += 1;
190 bunch_it->prod[firstcapid][ts][
j] +=
191 ((digi.
sample(
j).
adc()-peds->getValue(firstcapid))
200 for(bunch_it =
Bunches.begin(); bunch_it !=
Bunches.end(); bunch_it++)
201 if(bunch_it->detid.rawId() == digi.
id().
rawId())
break;
203 const HcalPedestal* peds = (myRefPeds->getValues( searchid ));
204 bunch_it->usedflag =
true;
206 for(
int ts = 0; ts != 10; ts++)
208 for(
int j = ts;
j != 10;
j++){
209 bunch_it->num[firstcapid][ts][
j] += 1;
210 bunch_it->prod[firstcapid][ts][
j] +=
211 ((digi.
sample(
j).
adc()-peds->getValue(firstcapid))
220 for(bunch_it =
Bunches.begin(); bunch_it !=
Bunches.end(); bunch_it++)
221 if(bunch_it->detid.rawId() == digi.
id().
rawId())
break;
223 const HcalPedestal* peds = (myRefPeds->getValues( searchid ));
224 bunch_it->usedflag =
true;
226 for(
int ts = 0; ts != 10; ts++)
228 for(
int j = ts;
j != 10;
j++){
229 bunch_it->num[firstcapid][ts][
j] += 1;
230 bunch_it->prod[firstcapid][ts][
j] +=
231 ((digi.
sample(
j).
adc()-peds->getValue(firstcapid))
std::string widthsfilename
int adc() const
get the ADC sample
std::vector< T >::const_iterator const_iterator
const HcalQIESample & sample(int i) const
access a sample
const HcalDetId & id() const
uint32_t rawId() const
get the raw id
std::vector< MCWidthsBunch > Bunches
const HcalQIESample & sample(int i) const
access a sample
std::vector< HcalGenericDetId > allPrecisionId() const
int capid() const
get the Capacitor id
const HcalQIESample & sample(int i) const
access a sample
T const * product() const
const HcalDetId & id() const
const HcalDetId & id() const