CMS 3D CMS Logo

CastorPedestalsAnalysis.cc
Go to the documentation of this file.
1 // Original Author: Steven Won
2 // Original Author: Alan Campbell for castor
3 // Created: Fri May 2 15:34:43 CEST 2008
4 // Written to replace the combination of HcalPedestalAnalyzer and HcalPedestalAnalysis
5 // This code runs 1000x faster and produces all outputs from a single run
6 // (ADC, fC in .txt plus an .xml file)
7 //
8 #include <memory>
10 
12  : castorDigiCollectionTag(ps.getParameter<edm::InputTag>("castorDigiCollectionTag")) {
13  hiSaveFlag = ps.getUntrackedParameter<bool>("hiSaveFlag", false);
14  dumpXML = ps.getUntrackedParameter<bool>("dumpXML", false);
15  verboseflag = ps.getUntrackedParameter<bool>("verbose", false);
16  firstTS = ps.getUntrackedParameter<int>("firstTS", 0);
17  lastTS = ps.getUntrackedParameter<int>("lastTS", 9);
18  firsttime = true;
19 }
20 
22  CastorPedestals* rawPedsItem = new CastorPedestals(true);
23  CastorPedestalWidths* rawWidthsItem = new CastorPedestalWidths(true);
24  CastorPedestals* rawPedsItemfc = new CastorPedestals(false);
25  CastorPedestalWidths* rawWidthsItemfc = new CastorPedestalWidths(false);
26 
27  //Calculate pedestal constants
28  std::cout << "Calculating Pedestal constants...\n";
29  std::vector<NewPedBunch>::iterator bunch_it;
30  for (bunch_it = Bunches.begin(); bunch_it != Bunches.end(); ++bunch_it) {
31  if (bunch_it->usedflag) {
32  if (verboseflag)
33  std::cout << "Analyzing channel sector= " << bunch_it->detid.sector()
34  << " module = " << bunch_it->detid.module() << std::endl;
35  //pedestal constant is the mean
36  bunch_it->cap[0] /= bunch_it->num[0][0];
37  bunch_it->cap[1] /= bunch_it->num[1][1];
38  bunch_it->cap[2] /= bunch_it->num[2][2];
39  bunch_it->cap[3] /= bunch_it->num[3][3];
40  bunch_it->capfc[0] /= bunch_it->num[0][0];
41  bunch_it->capfc[1] /= bunch_it->num[1][1];
42  bunch_it->capfc[2] /= bunch_it->num[2][2];
43  bunch_it->capfc[3] /= bunch_it->num[3][3];
44  //widths are the covariance matrix--assumed symmetric
45  bunch_it->sig[0][0] = (bunch_it->prod[0][0] / bunch_it->num[0][0]) - (bunch_it->cap[0] * bunch_it->cap[0]);
46  bunch_it->sig[0][1] = (bunch_it->prod[0][1] / bunch_it->num[0][1]) - (bunch_it->cap[0] * bunch_it->cap[1]);
47  bunch_it->sig[0][2] = (bunch_it->prod[0][2] / bunch_it->num[0][2]) - (bunch_it->cap[0] * bunch_it->cap[2]);
48  bunch_it->sig[0][3] = (bunch_it->prod[0][3] / bunch_it->num[0][3]) - (bunch_it->cap[0] * bunch_it->cap[3]);
49  bunch_it->sig[1][0] = (bunch_it->prod[1][0] / bunch_it->num[1][0]) - (bunch_it->cap[1] * bunch_it->cap[0]);
50  bunch_it->sig[1][1] = (bunch_it->prod[1][1] / bunch_it->num[1][1]) - (bunch_it->cap[1] * bunch_it->cap[1]);
51  bunch_it->sig[1][2] = (bunch_it->prod[1][2] / bunch_it->num[1][2]) - (bunch_it->cap[1] * bunch_it->cap[2]);
52  bunch_it->sig[1][3] = (bunch_it->prod[1][3] / bunch_it->num[1][3]) - (bunch_it->cap[1] * bunch_it->cap[3]);
53  bunch_it->sig[2][0] = (bunch_it->prod[2][0] / bunch_it->num[2][0]) - (bunch_it->cap[2] * bunch_it->cap[0]);
54  bunch_it->sig[2][1] = (bunch_it->prod[2][1] / bunch_it->num[2][1]) - (bunch_it->cap[2] * bunch_it->cap[1]);
55  bunch_it->sig[2][2] = (bunch_it->prod[2][2] / bunch_it->num[2][2]) - (bunch_it->cap[2] * bunch_it->cap[2]);
56  bunch_it->sig[2][3] = (bunch_it->prod[2][3] / bunch_it->num[2][3]) - (bunch_it->cap[2] * bunch_it->cap[3]);
57  bunch_it->sig[3][0] = (bunch_it->prod[3][0] / bunch_it->num[3][0]) - (bunch_it->cap[3] * bunch_it->cap[0]);
58  bunch_it->sig[3][1] = (bunch_it->prod[3][1] / bunch_it->num[3][1]) - (bunch_it->cap[3] * bunch_it->cap[1]);
59  bunch_it->sig[3][2] = (bunch_it->prod[3][2] / bunch_it->num[3][2]) - (bunch_it->cap[3] * bunch_it->cap[2]);
60  bunch_it->sig[3][3] = (bunch_it->prod[3][3] / bunch_it->num[3][3]) - (bunch_it->cap[3] * bunch_it->cap[3]);
61 
62  bunch_it->sigfc[0][0] =
63  (bunch_it->prodfc[0][0] / bunch_it->num[0][0]) - (bunch_it->capfc[0] * bunch_it->capfc[0]);
64  bunch_it->sigfc[0][1] =
65  (bunch_it->prodfc[0][1] / bunch_it->num[0][1]) - (bunch_it->capfc[0] * bunch_it->capfc[1]);
66  bunch_it->sigfc[0][2] =
67  (bunch_it->prodfc[0][2] / bunch_it->num[0][2]) - (bunch_it->capfc[0] * bunch_it->capfc[2]);
68  bunch_it->sigfc[0][3] =
69  (bunch_it->prodfc[0][3] / bunch_it->num[0][3]) - (bunch_it->capfc[0] * bunch_it->capfc[3]);
70  bunch_it->sigfc[1][0] =
71  (bunch_it->prodfc[1][0] / bunch_it->num[1][0]) - (bunch_it->capfc[1] * bunch_it->capfc[0]);
72  bunch_it->sigfc[1][1] =
73  (bunch_it->prodfc[1][1] / bunch_it->num[1][1]) - (bunch_it->capfc[1] * bunch_it->capfc[1]);
74  bunch_it->sigfc[1][2] =
75  (bunch_it->prodfc[1][2] / bunch_it->num[1][2]) - (bunch_it->capfc[1] * bunch_it->capfc[2]);
76  bunch_it->sigfc[1][3] =
77  (bunch_it->prodfc[1][3] / bunch_it->num[1][3]) - (bunch_it->capfc[1] * bunch_it->capfc[3]);
78  bunch_it->sigfc[2][0] =
79  (bunch_it->prodfc[2][0] / bunch_it->num[2][0]) - (bunch_it->capfc[2] * bunch_it->capfc[0]);
80  bunch_it->sigfc[2][1] =
81  (bunch_it->prodfc[2][1] / bunch_it->num[2][1]) - (bunch_it->capfc[2] * bunch_it->capfc[1]);
82  bunch_it->sigfc[2][2] =
83  (bunch_it->prodfc[2][2] / bunch_it->num[2][2]) - (bunch_it->capfc[2] * bunch_it->capfc[2]);
84  bunch_it->sigfc[2][3] =
85  (bunch_it->prodfc[2][3] / bunch_it->num[2][3]) - (bunch_it->capfc[2] * bunch_it->capfc[3]);
86  bunch_it->sigfc[3][0] =
87  (bunch_it->prodfc[3][0] / bunch_it->num[3][0]) - (bunch_it->capfc[3] * bunch_it->capfc[0]);
88  bunch_it->sigfc[3][1] =
89  (bunch_it->prodfc[3][1] / bunch_it->num[3][1]) - (bunch_it->capfc[3] * bunch_it->capfc[1]);
90  bunch_it->sigfc[3][2] =
91  (bunch_it->prodfc[3][2] / bunch_it->num[3][2]) - (bunch_it->capfc[3] * bunch_it->capfc[2]);
92  bunch_it->sigfc[3][3] =
93  (bunch_it->prodfc[3][3] / bunch_it->num[3][3]) - (bunch_it->capfc[3] * bunch_it->capfc[3]);
94 
95  for (int i = 0; i != 3; i++) {
96  CASTORMeans->Fill(bunch_it->cap[i]);
97  CASTORWidths->Fill(bunch_it->sig[i][i]);
98  }
99 
100  //if(bunch_it->detid.subdet() == 1){
101 
102  int fillphi = bunch_it->detid.sector();
103  //if (bunch_it->detid.depth()==4) fillphi++;
104 
105  // dephist[bunch_it->detid.module()-1]->Fill(bunch_it->detid.ieta(),fillphi,
106  // (bunch_it->cap[0]+bunch_it->cap[1]+bunch_it->cap[2]+bunch_it->cap[3])/4);
107  dephist->Fill(bunch_it->detid.module(),
108  fillphi,
109  (bunch_it->cap[0] + bunch_it->cap[1] + bunch_it->cap[2] + bunch_it->cap[3]) / 4);
110 
111  const CastorPedestal item(bunch_it->detid,
112  bunch_it->cap[0],
113  bunch_it->cap[1],
114  bunch_it->cap[2],
115  bunch_it->cap[3],
116  bunch_it->sig[0][0],
117  bunch_it->sig[1][1],
118  bunch_it->sig[2][2],
119  bunch_it->sig[3][3]);
120  rawPedsItem->addValues(item);
121  CastorPedestalWidth widthsp(bunch_it->detid);
122  widthsp.setSigma(0, 0, bunch_it->sig[0][0]);
123  widthsp.setSigma(0, 1, bunch_it->sig[0][1]);
124  widthsp.setSigma(0, 2, bunch_it->sig[0][2]);
125  widthsp.setSigma(0, 3, bunch_it->sig[0][3]);
126  widthsp.setSigma(1, 0, bunch_it->sig[1][0]);
127  widthsp.setSigma(1, 1, bunch_it->sig[1][1]);
128  widthsp.setSigma(1, 2, bunch_it->sig[1][2]);
129  widthsp.setSigma(1, 3, bunch_it->sig[1][3]);
130  widthsp.setSigma(2, 0, bunch_it->sig[2][0]);
131  widthsp.setSigma(2, 1, bunch_it->sig[2][1]);
132  widthsp.setSigma(2, 2, bunch_it->sig[2][2]);
133  widthsp.setSigma(2, 3, bunch_it->sig[2][3]);
134  widthsp.setSigma(3, 0, bunch_it->sig[3][0]);
135  widthsp.setSigma(3, 1, bunch_it->sig[3][1]);
136  widthsp.setSigma(3, 2, bunch_it->sig[3][2]);
137  widthsp.setSigma(3, 3, bunch_it->sig[3][3]);
138  rawWidthsItem->addValues(widthsp);
139 
140  const CastorPedestal itemfc(bunch_it->detid,
141  bunch_it->capfc[0],
142  bunch_it->capfc[1],
143  bunch_it->capfc[2],
144  bunch_it->capfc[3],
145  bunch_it->sigfc[0][0],
146  bunch_it->sigfc[1][1],
147  bunch_it->sigfc[2][2],
148  bunch_it->sigfc[3][3]);
149  rawPedsItemfc->addValues(itemfc);
150  CastorPedestalWidth widthspfc(bunch_it->detid);
151  widthspfc.setSigma(0, 0, bunch_it->sigfc[0][0]);
152  widthspfc.setSigma(0, 1, bunch_it->sigfc[0][1]);
153  widthspfc.setSigma(0, 2, bunch_it->sigfc[0][2]);
154  widthspfc.setSigma(0, 3, bunch_it->sigfc[0][3]);
155  widthspfc.setSigma(1, 0, bunch_it->sigfc[1][0]);
156  widthspfc.setSigma(1, 1, bunch_it->sigfc[1][1]);
157  widthspfc.setSigma(1, 2, bunch_it->sigfc[1][2]);
158  widthspfc.setSigma(1, 3, bunch_it->sigfc[1][3]);
159  widthspfc.setSigma(2, 0, bunch_it->sigfc[2][0]);
160  widthspfc.setSigma(2, 1, bunch_it->sigfc[2][1]);
161  widthspfc.setSigma(2, 2, bunch_it->sigfc[2][2]);
162  widthspfc.setSigma(2, 3, bunch_it->sigfc[2][3]);
163  widthspfc.setSigma(3, 0, bunch_it->sigfc[3][0]);
164  widthspfc.setSigma(3, 1, bunch_it->sigfc[3][1]);
165  widthspfc.setSigma(3, 2, bunch_it->sigfc[3][2]);
166  widthspfc.setSigma(3, 3, bunch_it->sigfc[3][3]);
167  rawWidthsItemfc->addValues(widthspfc);
168  }
169  }
170 
171  // dump the resulting list of pedestals into a file
172  std::ofstream outStream1(pedsADCfilename.c_str());
173  CastorDbASCIIIO::dumpObject(outStream1, (*rawPedsItem));
174  std::ofstream outStream2(widthsADCfilename.c_str());
175  CastorDbASCIIIO::dumpObject(outStream2, (*rawWidthsItem));
176 
177  std::ofstream outStream3(pedsfCfilename.c_str());
178  CastorDbASCIIIO::dumpObject(outStream3, (*rawPedsItemfc));
179  std::ofstream outStream4(widthsfCfilename.c_str());
180  CastorDbASCIIIO::dumpObject(outStream4, (*rawWidthsItemfc));
181 
182  if (dumpXML) {
183  std::ofstream outStream5(XMLfilename.c_str());
184  // CastorCondXML::dumpObject (outStream5, runnum, runnum, runnum, XMLtag, 1, (*rawPedsItem), (*rawWidthsItem));
185  }
186 
187  if (hiSaveFlag) {
188  theFile->Write();
189  } else {
190  theFile->cd();
191  theFile->cd("CASTOR");
192  CASTORMeans->Write();
193  CASTORWidths->Write();
194  }
195  theFile->cd();
196  dephist->Write();
197  dephist->SetDrawOption("colz");
198  dephist->GetXaxis()->SetTitle("module");
199  dephist->GetYaxis()->SetTitle("sector");
200 
201  //for (int n=0; n!= 4; n++)
202  //{
203  //dephist[n]->Write();
204  //dephist[n]->SetDrawOption("colz");
205  //dephist[n]->GetXaxis()->SetTitle("i#eta");
206  //dephist[n]->GetYaxis()->SetTitle("i#phi");
207  //}
208 
209  std::stringstream tempstringout;
210  tempstringout << runnum;
211  std::string name1 = tempstringout.str() + "_pedplots_1d.png";
212  std::string name2 = tempstringout.str() + "_pedplots_2d.png";
213 
214  TStyle* theStyle = new TStyle("style", "null");
215  theStyle->SetPalette(1, nullptr);
216  theStyle->SetCanvasDefH(1200); //Height of canvas
217  theStyle->SetCanvasDefW(1600); //Width of canvas
218 
219  gStyle = theStyle;
220  /*
221  TCanvas * c1 = new TCanvas("c1","graph",1);
222  c1->Divide(2,2);
223  c1->cd(1);
224  CASTORMeans->Draw();
225  c1->SaveAs(name1.c_str());
226 
227  theStyle->SetOptStat("n");
228  gStyle = theStyle;
229 
230  TCanvas * c2 = new TCanvas("c2","graph",1);
231  // c2->Divide(2,2);
232  c2->cd(1);
233  dephist->Draw();
234  dephist->SetDrawOption("colz");
235  //c2->cd(2);
236  //dephist[1]->Draw();
237  //dephist[1]->SetDrawOption("colz");
238  //c2->cd(3);
239  //dephist[2]->Draw();
240  //dephist[2]->SetDrawOption("colz");
241  //c2->cd(4);
242  //dephist[3]->Draw();
243  //dephist[3]->SetDrawOption("colz");
244  c2->SaveAs(name2.c_str());
245 */
246  std::cout << "Writing ROOT file... ";
247  theFile->Close();
248  std::cout << "ROOT file closed.\n";
249 }
250 
251 // ------------ method called to for each event ------------
253  using namespace edm;
254  using namespace std;
255 
257  e.getByLabel(castorDigiCollectionTag, castor);
258 
260  iSetup.get<CastorDbRecord>().get(conditions);
261 
262  const CastorQIEShape* shape = conditions->getCastorShape();
263 
264  if (firsttime) {
265  runnum = e.id().run();
266  std::string runnum_string;
267  std::stringstream tempstringout;
268  tempstringout << runnum;
269  runnum_string = tempstringout.str();
270  ROOTfilename = runnum_string + "-peds_ADC.root";
271  pedsADCfilename = runnum_string + "-peds_ADC.txt";
272  pedsfCfilename = runnum_string + "-peds_fC.txt";
273  widthsADCfilename = runnum_string + "-widths_ADC.txt";
274  widthsfCfilename = runnum_string + "-widths_fC.txt";
275  XMLfilename = runnum_string + "-peds_ADC_complete.xml";
276  XMLtag = "Castor_pedestals_" + runnum_string;
277 
278  theFile = new TFile(ROOTfilename.c_str(), "RECREATE");
279  theFile->cd();
280  // Create sub-directories
281  theFile->mkdir("CASTOR");
282  theFile->cd();
283 
284  CASTORMeans = new TH1F("All Ped Means CASTOR", "All Ped Means CASTOR", 100, 0, 9);
285  CASTORWidths = new TH1F("All Ped Widths CASTOR", "All Ped Widths CASTOR", 100, 0, 3);
286 
287  dephist = new TH2F("Pedestals (ADC)", "All Castor", 14, 0., 14.5, 16, .5, 16.5);
288  // dephist[0] = new TH2F("Pedestals (ADC)","Depth 1",89, -44, 44, 72, .5, 72.5);
289  // dephist[1] = new TH2F("Pedestals (ADC)","Depth 2",89, -44, 44, 72, .5, 72.5);
290  // dephist[2] = new TH2F("Pedestals (ADC)","Depth 3",89, -44, 44, 72, .5, 72.5);
291  // dephist[3] = new TH2F("Pedestals (ADC)","Depth 4",89, -44, 44, 72, .5, 72.5);
292 
294  iSetup.get<CastorElectronicsMapRcd>().get(refEMap);
295  const CastorElectronicsMap* myRefEMap = refEMap.product();
296  std::vector<HcalGenericDetId> listEMap = myRefEMap->allPrecisionId();
297  for (std::vector<HcalGenericDetId>::const_iterator it = listEMap.begin(); it != listEMap.end(); ++it) {
298  HcalGenericDetId mygenid(it->rawId());
299  if (mygenid.isHcalCastorDetId()) {
300  NewPedBunch a;
301  HcalCastorDetId chanid(mygenid.rawId());
302  a.detid = chanid;
303  a.usedflag = false;
304  string type;
305  type = "CASTOR";
306  for (int i = 0; i != 4; i++) {
307  a.cap[i] = 0;
308  a.capfc[i] = 0;
309  for (int j = 0; j != 4; j++) {
310  a.sig[i][j] = 0;
311  a.sigfc[i][j] = 0;
312  a.prod[i][j] = 0;
313  a.prodfc[i][j] = 0;
314  a.num[i][j] = 0;
315  }
316  }
317  Bunches.push_back(a);
318  }
319  }
320  firsttime = false;
321  }
322 
323  std::vector<NewPedBunch>::iterator bunch_it;
324 
325  for (CastorDigiCollection::const_iterator j = castor->begin(); j != castor->end(); ++j) {
326  const CastorDataFrame digi = (const CastorDataFrame)(*j);
327  for (bunch_it = Bunches.begin(); bunch_it != Bunches.end(); ++bunch_it)
328  if (bunch_it->detid.rawId() == digi.id().rawId())
329  break;
330  bunch_it->usedflag = true;
331  for (int ts = firstTS; ts != lastTS + 1; ts++) {
332  const CastorQIECoder* coder = conditions->getCastorCoder(digi.id().rawId());
333  bunch_it->num[digi.sample(ts).capid()][digi.sample(ts).capid()] += 1;
334  bunch_it->cap[digi.sample(ts).capid()] += digi.sample(ts).adc();
335  double charge1 = coder->charge(*shape, digi.sample(ts).adc(), digi.sample(ts).capid());
336  bunch_it->capfc[digi.sample(ts).capid()] += charge1;
337  bunch_it->prod[digi.sample(ts).capid()][digi.sample(ts).capid()] +=
338  (digi.sample(ts).adc() * digi.sample(ts).adc());
339  bunch_it->prodfc[digi.sample(ts).capid()][digi.sample(ts).capid()] += charge1 * charge1;
340  if ((ts + 1 < digi.size()) && (ts + 1 < lastTS)) {
341  bunch_it->prod[digi.sample(ts).capid()][digi.sample(ts + 1).capid()] +=
342  digi.sample(ts).adc() * digi.sample(ts + 1).adc();
343  double charge2 = coder->charge(*shape, digi.sample(ts + 1).adc(), digi.sample(ts + 1).capid());
344  bunch_it->prodfc[digi.sample(ts).capid()][digi.sample(ts + 1).capid()] += charge1 * charge2;
345  bunch_it->num[digi.sample(ts).capid()][digi.sample(ts + 1).capid()] += 1;
346  }
347  if ((ts + 2 < digi.size()) && (ts + 2 < lastTS)) {
348  bunch_it->prod[digi.sample(ts).capid()][digi.sample(ts + 2).capid()] +=
349  digi.sample(ts).adc() * digi.sample(ts + 2).adc();
350  double charge2 = coder->charge(*shape, digi.sample(ts + 2).adc(), digi.sample(ts + 2).capid());
351  bunch_it->prodfc[digi.sample(ts).capid()][digi.sample(ts + 2).capid()] += charge1 * charge2;
352  bunch_it->num[digi.sample(ts).capid()][digi.sample(ts + 2).capid()] += 1;
353  }
354  if ((ts + 3 < digi.size()) && (ts + 3 < lastTS)) {
355  bunch_it->prod[digi.sample(ts).capid()][digi.sample(ts + 3).capid()] +=
356  digi.sample(ts).adc() * digi.sample(ts + 3).adc();
357  double charge2 = coder->charge(*shape, digi.sample(ts + 3).adc(), digi.sample(ts + 3).capid());
358  bunch_it->prodfc[digi.sample(ts).capid()][digi.sample(ts + 3).capid()] += charge1 * charge2;
359  bunch_it->num[digi.sample(ts).capid()][digi.sample(ts + 3).capid()] += 1;
360  }
361  }
362  }
363 
364  //this is the last brace
365 }
366 
367 //define this as a plug-in
CastorPedestalsAnalysis::Bunches
std::vector< NewPedBunch > Bunches
Definition: CastorPedestalsAnalysis.h:83
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
CastorPedestalsAnalysis.h
CastorPedestalsAnalysis::runnum
int runnum
Definition: CastorPedestalsAnalysis.h:88
CastorPedestalsAnalysis::hiSaveFlag
bool hiSaveFlag
Definition: CastorPedestalsAnalysis.h:85
CastorPedestalsAnalysis::dumpXML
bool dumpXML
Definition: CastorPedestalsAnalysis.h:86
mps_fire.i
i
Definition: mps_fire.py:428
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
HcalGenericDetId
Definition: HcalGenericDetId.h:15
CastorPedestalsAnalysis::firsttime
bool firsttime
Definition: CastorPedestalsAnalysis.h:107
CastorPedestalsAnalysis::dephist
TH2F * dephist
Definition: CastorPedestalsAnalysis.h:104
HcalQIESample::adc
constexpr int adc() const
get the ADC sample
Definition: HcalQIESample.h:43
edm
HLT enums.
Definition: AlignableModifier.h:19
CastorPedestalsAnalysis::XMLtag
std::string XMLtag
Definition: CastorPedestalsAnalysis.h:97
gather_cfg.cout
cout
Definition: gather_cfg.py:144
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
CastorPedestalsAnalysis::widthsfCfilename
std::string widthsfCfilename
Definition: CastorPedestalsAnalysis.h:95
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
CastorDataFrame::id
const HcalCastorDetId & id() const
Definition: CastorDataFrame.h:22
CastorPedestal
Definition: CastorPedestal.h:16
CastorPedestalWidth
Definition: CastorPedestalWidth.h:16
edm::Handle
Definition: AssociativeIterator.h:50
CastorPedestalsAnalysis::CASTORMeans
TH1F * CASTORMeans
Definition: CastorPedestalsAnalysis.h:100
CastorPedestalsAnalysis::lastTS
int lastTS
Definition: CastorPedestalsAnalysis.h:90
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
CastorPedestalsAnalysis::castorDigiCollectionTag
edm::InputTag castorDigiCollectionTag
Definition: CastorPedestalsAnalysis.h:109
CastorPedestalsAnalysis::ROOTfilename
std::string ROOTfilename
Definition: CastorPedestalsAnalysis.h:91
edm::ESHandle
Definition: DTSurvey.h:22
CastorPedestalsAnalysis::~CastorPedestalsAnalysis
~CastorPedestalsAnalysis() override
Definition: CastorPedestalsAnalysis.cc:21
CastorPedestals
Definition: CastorPedestals.h:18
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalCastorDetId
Definition: HcalCastorDetId.h:23
CastorDataFrame::sample
const HcalQIESample & sample(int i) const
access a sample
Definition: CastorDataFrame.h:39
CastorDataFrame
Definition: CastorDataFrame.h:15
CastorDbASCIIIO::dumpObject
bool dumpObject(std::ostream &fOutput, const CastorPedestals &fObject)
Definition: CastorDbASCIIIO.cc:323
edm::ParameterSet
Definition: ParameterSet.h:47
CastorDataFrame::size
int size() const
total number of samples in the digi
Definition: CastorDataFrame.h:26
a
double a
Definition: hdecay.h:119
CastorQIECoder::charge
float charge(const CastorQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.
Definition: CastorQIECoder.cc:17
CastorPedestalsAnalysis::XMLfilename
std::string XMLfilename
Definition: CastorPedestalsAnalysis.h:96
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
CastorPedestalsAnalysis::verboseflag
bool verboseflag
Definition: CastorPedestalsAnalysis.h:87
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:39
CastorCondObjectContainer::addValues
bool addValues(const Item &myItem)
Definition: CastorCondObjectContainer.h:98
CastorPedestalsAnalysis::widthsADCfilename
std::string widthsADCfilename
Definition: CastorPedestalsAnalysis.h:94
HcalQIESample::capid
constexpr int capid() const
get the Capacitor id
Definition: HcalQIESample.h:47
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
CastorPedestalsAnalysis::CASTORWidths
TH1F * CASTORWidths
Definition: CastorPedestalsAnalysis.h:101
CastorPedestalsAnalysis::pedsfCfilename
std::string pedsfCfilename
Definition: CastorPedestalsAnalysis.h:93
CastorDbRecord
Definition: CastorDbRecord.h:29
submitPVValidationJobs.conditions
list conditions
Definition: submitPVValidationJobs.py:674
std
Definition: JetResolutionObject.h:76
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
CastorPedestalsAnalysis::pedsADCfilename
std::string pedsADCfilename
Definition: CastorPedestalsAnalysis.h:92
CastorPedestalWidth::setSigma
void setSigma(int fCapId1, int fCapId2, float fSigma)
Definition: CastorPedestalWidth.cc:38
CastorPedestalsAnalysis
Definition: CastorPedestalsAnalysis.h:72
CastorPedestalsAnalysis::theFile
TFile * theFile
Definition: CastorPedestalsAnalysis.h:106
CastorElectronicsMapRcd
Definition: CastorElectronicsMapRcd.h:4
CastorPedestalWidths
Definition: CastorPedestalWidths.h:18
CastorQIECoder
Definition: CastorQIECoder.h:21
CastorPedestalsAnalysis::CastorPedestalsAnalysis
CastorPedestalsAnalysis(const edm::ParameterSet &ps)
Definition: CastorPedestalsAnalysis.cc:11
CastorElectronicsMap
Definition: CastorElectronicsMap.h:30
CastorPedestalsAnalysis::firstTS
int firstTS
Definition: CastorPedestalsAnalysis.h:89
NewPedBunch
Definition: CastorPedestalsAnalysis.h:60
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
CastorElectronicsMap::allPrecisionId
std::vector< HcalGenericDetId > allPrecisionId() const
Definition: CastorElectronicsMap.cc:178
edm::Event
Definition: Event.h:73
hfnoseParametersInitialization_cfi.name2
name2
Definition: hfnoseParametersInitialization_cfi.py:8
CastorQIEShape
Definition: CastorQIEShape.h:14
castorDigitizer_cfi.castor
castor
Definition: castorDigitizer_cfi.py:9
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
CastorPedestalsAnalysis::analyze
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
Definition: CastorPedestalsAnalysis.cc:252