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