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 
17 
32 
37 
40 
41 #include "TProfile.h"
42 #include "TH1.h"
43 #include "TH2.h"
44 #include "TCanvas.h"
45 #include "TStyle.h"
46 
47 #include <cmath>
48 #include <iostream>
49 #include <map>
50 #include <memory>
51 #include <iomanip>
52 #include <fstream>
53 #include <vector>
54 #include <string>
55 
56 namespace edm {
57  class ParameterSet;
58  class Event;
59  class EventSetup;
60 } // namespace edm
61 
62 struct NewPedBunch {
64  bool usedflag;
65  float cap[4];
66  float capfc[4];
67  float sig[4][4];
68  float sigfc[4][4];
69  float prod[4][4];
70  float prodfc[4][4];
71  int num[4][4];
72 };
73 
74 class CastorPedestalsAnalysis : public edm::one::EDAnalyzer<edm::one::SharedResources> {
75 public:
76  //Constructor
78  //Destructor
79  ~CastorPedestalsAnalysis() override;
80  //Analysis
81  void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override;
82 
83 private:
84  //Container for data, 1 per channel
85  std::vector<NewPedBunch> Bunches;
89  //Flag for saving histos
90  const bool hiSaveFlag;
91  const bool dumpXML;
92  const bool verboseflag;
93  const int firstTS;
94  const int lastTS;
95  bool firsttime;
96  int runnum;
105 
106  TH1F* CASTORMeans;
108 
109  // TH2F *dephist[4];
110  TH2F* dephist;
111 };
112 
114  : castorDigiCollectionToken_(
115  consumes<CastorDigiCollection>(ps.getParameter<edm::InputTag>("castorDigiCollectionTag"))),
118  hiSaveFlag(ps.getUntrackedParameter<bool>("hiSaveFlag", false)),
119  dumpXML(ps.getUntrackedParameter<bool>("dumpXML", false)),
120  verboseflag(ps.getUntrackedParameter<bool>("verbose", false)),
121  firstTS(ps.getUntrackedParameter<int>("firstTS", 0)),
122  lastTS(ps.getUntrackedParameter<int>("lastTS", 9)) {
123  usesResource(TFileService::kSharedResource);
124 
125  firsttime = true;
126 }
127 
129  CastorPedestals* rawPedsItem = new CastorPedestals(true);
130  CastorPedestalWidths* rawWidthsItem = new CastorPedestalWidths(true);
131  CastorPedestals* rawPedsItemfc = new CastorPedestals(false);
132  CastorPedestalWidths* rawWidthsItemfc = new CastorPedestalWidths(false);
133 
134  //Calculate pedestal constants
135  std::cout << "Calculating Pedestal constants...\n";
136  std::vector<NewPedBunch>::iterator bunch_it;
137  for (bunch_it = Bunches.begin(); bunch_it != Bunches.end(); ++bunch_it) {
138  if (bunch_it->usedflag) {
139  if (verboseflag)
140  std::cout << "Analyzing channel sector= " << bunch_it->detid.sector()
141  << " module = " << bunch_it->detid.module() << std::endl;
142  //pedestal constant is the mean
143  bunch_it->cap[0] /= bunch_it->num[0][0];
144  bunch_it->cap[1] /= bunch_it->num[1][1];
145  bunch_it->cap[2] /= bunch_it->num[2][2];
146  bunch_it->cap[3] /= bunch_it->num[3][3];
147  bunch_it->capfc[0] /= bunch_it->num[0][0];
148  bunch_it->capfc[1] /= bunch_it->num[1][1];
149  bunch_it->capfc[2] /= bunch_it->num[2][2];
150  bunch_it->capfc[3] /= bunch_it->num[3][3];
151  //widths are the covariance matrix--assumed symmetric
152  bunch_it->sig[0][0] = (bunch_it->prod[0][0] / bunch_it->num[0][0]) - (bunch_it->cap[0] * bunch_it->cap[0]);
153  bunch_it->sig[0][1] = (bunch_it->prod[0][1] / bunch_it->num[0][1]) - (bunch_it->cap[0] * bunch_it->cap[1]);
154  bunch_it->sig[0][2] = (bunch_it->prod[0][2] / bunch_it->num[0][2]) - (bunch_it->cap[0] * bunch_it->cap[2]);
155  bunch_it->sig[0][3] = (bunch_it->prod[0][3] / bunch_it->num[0][3]) - (bunch_it->cap[0] * bunch_it->cap[3]);
156  bunch_it->sig[1][0] = (bunch_it->prod[1][0] / bunch_it->num[1][0]) - (bunch_it->cap[1] * bunch_it->cap[0]);
157  bunch_it->sig[1][1] = (bunch_it->prod[1][1] / bunch_it->num[1][1]) - (bunch_it->cap[1] * bunch_it->cap[1]);
158  bunch_it->sig[1][2] = (bunch_it->prod[1][2] / bunch_it->num[1][2]) - (bunch_it->cap[1] * bunch_it->cap[2]);
159  bunch_it->sig[1][3] = (bunch_it->prod[1][3] / bunch_it->num[1][3]) - (bunch_it->cap[1] * bunch_it->cap[3]);
160  bunch_it->sig[2][0] = (bunch_it->prod[2][0] / bunch_it->num[2][0]) - (bunch_it->cap[2] * bunch_it->cap[0]);
161  bunch_it->sig[2][1] = (bunch_it->prod[2][1] / bunch_it->num[2][1]) - (bunch_it->cap[2] * bunch_it->cap[1]);
162  bunch_it->sig[2][2] = (bunch_it->prod[2][2] / bunch_it->num[2][2]) - (bunch_it->cap[2] * bunch_it->cap[2]);
163  bunch_it->sig[2][3] = (bunch_it->prod[2][3] / bunch_it->num[2][3]) - (bunch_it->cap[2] * bunch_it->cap[3]);
164  bunch_it->sig[3][0] = (bunch_it->prod[3][0] / bunch_it->num[3][0]) - (bunch_it->cap[3] * bunch_it->cap[0]);
165  bunch_it->sig[3][1] = (bunch_it->prod[3][1] / bunch_it->num[3][1]) - (bunch_it->cap[3] * bunch_it->cap[1]);
166  bunch_it->sig[3][2] = (bunch_it->prod[3][2] / bunch_it->num[3][2]) - (bunch_it->cap[3] * bunch_it->cap[2]);
167  bunch_it->sig[3][3] = (bunch_it->prod[3][3] / bunch_it->num[3][3]) - (bunch_it->cap[3] * bunch_it->cap[3]);
168 
169  bunch_it->sigfc[0][0] =
170  (bunch_it->prodfc[0][0] / bunch_it->num[0][0]) - (bunch_it->capfc[0] * bunch_it->capfc[0]);
171  bunch_it->sigfc[0][1] =
172  (bunch_it->prodfc[0][1] / bunch_it->num[0][1]) - (bunch_it->capfc[0] * bunch_it->capfc[1]);
173  bunch_it->sigfc[0][2] =
174  (bunch_it->prodfc[0][2] / bunch_it->num[0][2]) - (bunch_it->capfc[0] * bunch_it->capfc[2]);
175  bunch_it->sigfc[0][3] =
176  (bunch_it->prodfc[0][3] / bunch_it->num[0][3]) - (bunch_it->capfc[0] * bunch_it->capfc[3]);
177  bunch_it->sigfc[1][0] =
178  (bunch_it->prodfc[1][0] / bunch_it->num[1][0]) - (bunch_it->capfc[1] * bunch_it->capfc[0]);
179  bunch_it->sigfc[1][1] =
180  (bunch_it->prodfc[1][1] / bunch_it->num[1][1]) - (bunch_it->capfc[1] * bunch_it->capfc[1]);
181  bunch_it->sigfc[1][2] =
182  (bunch_it->prodfc[1][2] / bunch_it->num[1][2]) - (bunch_it->capfc[1] * bunch_it->capfc[2]);
183  bunch_it->sigfc[1][3] =
184  (bunch_it->prodfc[1][3] / bunch_it->num[1][3]) - (bunch_it->capfc[1] * bunch_it->capfc[3]);
185  bunch_it->sigfc[2][0] =
186  (bunch_it->prodfc[2][0] / bunch_it->num[2][0]) - (bunch_it->capfc[2] * bunch_it->capfc[0]);
187  bunch_it->sigfc[2][1] =
188  (bunch_it->prodfc[2][1] / bunch_it->num[2][1]) - (bunch_it->capfc[2] * bunch_it->capfc[1]);
189  bunch_it->sigfc[2][2] =
190  (bunch_it->prodfc[2][2] / bunch_it->num[2][2]) - (bunch_it->capfc[2] * bunch_it->capfc[2]);
191  bunch_it->sigfc[2][3] =
192  (bunch_it->prodfc[2][3] / bunch_it->num[2][3]) - (bunch_it->capfc[2] * bunch_it->capfc[3]);
193  bunch_it->sigfc[3][0] =
194  (bunch_it->prodfc[3][0] / bunch_it->num[3][0]) - (bunch_it->capfc[3] * bunch_it->capfc[0]);
195  bunch_it->sigfc[3][1] =
196  (bunch_it->prodfc[3][1] / bunch_it->num[3][1]) - (bunch_it->capfc[3] * bunch_it->capfc[1]);
197  bunch_it->sigfc[3][2] =
198  (bunch_it->prodfc[3][2] / bunch_it->num[3][2]) - (bunch_it->capfc[3] * bunch_it->capfc[2]);
199  bunch_it->sigfc[3][3] =
200  (bunch_it->prodfc[3][3] / bunch_it->num[3][3]) - (bunch_it->capfc[3] * bunch_it->capfc[3]);
201 
202  for (int i = 0; i != 3; i++) {
203  CASTORMeans->Fill(bunch_it->cap[i]);
204  CASTORWidths->Fill(bunch_it->sig[i][i]);
205  }
206 
207  //if(bunch_it->detid.subdet() == 1){
208 
209  int fillphi = bunch_it->detid.sector();
210  //if (bunch_it->detid.depth()==4) fillphi++;
211 
212  // dephist[bunch_it->detid.module()-1]->Fill(bunch_it->detid.ieta(),fillphi,
213  // (bunch_it->cap[0]+bunch_it->cap[1]+bunch_it->cap[2]+bunch_it->cap[3])/4);
214  dephist->Fill(bunch_it->detid.module(),
215  fillphi,
216  (bunch_it->cap[0] + bunch_it->cap[1] + bunch_it->cap[2] + bunch_it->cap[3]) / 4);
217 
218  const CastorPedestal item(bunch_it->detid,
219  bunch_it->cap[0],
220  bunch_it->cap[1],
221  bunch_it->cap[2],
222  bunch_it->cap[3],
223  bunch_it->sig[0][0],
224  bunch_it->sig[1][1],
225  bunch_it->sig[2][2],
226  bunch_it->sig[3][3]);
227  rawPedsItem->addValues(item);
228  CastorPedestalWidth widthsp(bunch_it->detid);
229  widthsp.setSigma(0, 0, bunch_it->sig[0][0]);
230  widthsp.setSigma(0, 1, bunch_it->sig[0][1]);
231  widthsp.setSigma(0, 2, bunch_it->sig[0][2]);
232  widthsp.setSigma(0, 3, bunch_it->sig[0][3]);
233  widthsp.setSigma(1, 0, bunch_it->sig[1][0]);
234  widthsp.setSigma(1, 1, bunch_it->sig[1][1]);
235  widthsp.setSigma(1, 2, bunch_it->sig[1][2]);
236  widthsp.setSigma(1, 3, bunch_it->sig[1][3]);
237  widthsp.setSigma(2, 0, bunch_it->sig[2][0]);
238  widthsp.setSigma(2, 1, bunch_it->sig[2][1]);
239  widthsp.setSigma(2, 2, bunch_it->sig[2][2]);
240  widthsp.setSigma(2, 3, bunch_it->sig[2][3]);
241  widthsp.setSigma(3, 0, bunch_it->sig[3][0]);
242  widthsp.setSigma(3, 1, bunch_it->sig[3][1]);
243  widthsp.setSigma(3, 2, bunch_it->sig[3][2]);
244  widthsp.setSigma(3, 3, bunch_it->sig[3][3]);
245  rawWidthsItem->addValues(widthsp);
246 
247  const CastorPedestal itemfc(bunch_it->detid,
248  bunch_it->capfc[0],
249  bunch_it->capfc[1],
250  bunch_it->capfc[2],
251  bunch_it->capfc[3],
252  bunch_it->sigfc[0][0],
253  bunch_it->sigfc[1][1],
254  bunch_it->sigfc[2][2],
255  bunch_it->sigfc[3][3]);
256  rawPedsItemfc->addValues(itemfc);
257  CastorPedestalWidth widthspfc(bunch_it->detid);
258  widthspfc.setSigma(0, 0, bunch_it->sigfc[0][0]);
259  widthspfc.setSigma(0, 1, bunch_it->sigfc[0][1]);
260  widthspfc.setSigma(0, 2, bunch_it->sigfc[0][2]);
261  widthspfc.setSigma(0, 3, bunch_it->sigfc[0][3]);
262  widthspfc.setSigma(1, 0, bunch_it->sigfc[1][0]);
263  widthspfc.setSigma(1, 1, bunch_it->sigfc[1][1]);
264  widthspfc.setSigma(1, 2, bunch_it->sigfc[1][2]);
265  widthspfc.setSigma(1, 3, bunch_it->sigfc[1][3]);
266  widthspfc.setSigma(2, 0, bunch_it->sigfc[2][0]);
267  widthspfc.setSigma(2, 1, bunch_it->sigfc[2][1]);
268  widthspfc.setSigma(2, 2, bunch_it->sigfc[2][2]);
269  widthspfc.setSigma(2, 3, bunch_it->sigfc[2][3]);
270  widthspfc.setSigma(3, 0, bunch_it->sigfc[3][0]);
271  widthspfc.setSigma(3, 1, bunch_it->sigfc[3][1]);
272  widthspfc.setSigma(3, 2, bunch_it->sigfc[3][2]);
273  widthspfc.setSigma(3, 3, bunch_it->sigfc[3][3]);
274  rawWidthsItemfc->addValues(widthspfc);
275  }
276  }
277 
278  // dump the resulting list of pedestals into a file
279  std::ofstream outStream1(pedsADCfilename.c_str());
280  CastorDbASCIIIO::dumpObject(outStream1, (*rawPedsItem));
281  std::ofstream outStream2(widthsADCfilename.c_str());
282  CastorDbASCIIIO::dumpObject(outStream2, (*rawWidthsItem));
283 
284  std::ofstream outStream3(pedsfCfilename.c_str());
285  CastorDbASCIIIO::dumpObject(outStream3, (*rawPedsItemfc));
286  std::ofstream outStream4(widthsfCfilename.c_str());
287  CastorDbASCIIIO::dumpObject(outStream4, (*rawWidthsItemfc));
288 
289  if (dumpXML) {
290  std::ofstream outStream5(XMLfilename.c_str());
291  // CastorCondXML::dumpObject (outStream5, runnum, runnum, runnum, XMLtag, 1, (*rawPedsItem), (*rawWidthsItem));
292  }
293 
294  dephist->SetDrawOption("colz");
295  dephist->GetXaxis()->SetTitle("module");
296  dephist->GetYaxis()->SetTitle("sector");
297 
298  std::stringstream tempstringout;
299  tempstringout << runnum;
300  std::string name1 = tempstringout.str() + "_pedplots_1d.png";
301  std::string name2 = tempstringout.str() + "_pedplots_2d.png";
302 
303  TStyle* theStyle = new TStyle("style", "null");
304  theStyle->SetPalette(1, nullptr);
305  theStyle->SetCanvasDefH(1200); //Height of canvas
306  theStyle->SetCanvasDefW(1600); //Width of canvas
307 
308  gStyle = theStyle;
309  /*
310  TCanvas * c1 = new TCanvas("c1","graph",1);
311  c1->Divide(2,2);
312  c1->cd(1);
313  CASTORMeans->Draw();
314  c1->SaveAs(name1.c_str());
315 
316  theStyle->SetOptStat("n");
317  gStyle = theStyle;
318 
319  TCanvas * c2 = new TCanvas("c2","graph",1);
320  // c2->Divide(2,2);
321  c2->cd(1);
322  dephist->Draw();
323  dephist->SetDrawOption("colz");
324  //c2->cd(2);
325  //dephist[1]->Draw();
326  //dephist[1]->SetDrawOption("colz");
327  //c2->cd(3);
328  //dephist[2]->Draw();
329  //dephist[2]->SetDrawOption("colz");
330  //c2->cd(4);
331  //dephist[3]->Draw();
332  //dephist[3]->SetDrawOption("colz");
333  c2->SaveAs(name2.c_str());
334 */
335  /*
336  std::cout << "Writing ROOT file... ";
337  theFile->Close();
338  std::cout << "ROOT file closed.\n";
339  */
340 }
341 
342 // ------------ method called to for each event ------------
345 
346  auto conditions = &iSetup.getData(tok_cond_);
347  const CastorQIEShape* shape = conditions->getCastorShape();
348 
349  if (firsttime) {
350  runnum = e.id().run();
351  std::string runnum_string;
352  std::stringstream tempstringout;
353  tempstringout << runnum;
354  runnum_string = tempstringout.str();
355  ROOTfilename = runnum_string + "-peds_ADC.root";
356  pedsADCfilename = runnum_string + "-peds_ADC.txt";
357  pedsfCfilename = runnum_string + "-peds_fC.txt";
358  widthsADCfilename = runnum_string + "-widths_ADC.txt";
359  widthsfCfilename = runnum_string + "-widths_fC.txt";
360  XMLfilename = runnum_string + "-peds_ADC_complete.xml";
361  XMLtag = "Castor_pedestals_" + runnum_string;
362 
364  fs->mkdir("CASTOR");
365  CASTORMeans = fs->make<TH1F>("All Ped Means CASTOR", "All Ped Means CASTOR", 100, 0, 9);
366  CASTORWidths = fs->make<TH1F>("All Ped Widths CASTOR", "All Ped Widths CASTOR", 100, 0, 3);
367 
368  dephist = fs->make<TH2F>("Pedestals (ADC)", "All Castor", 14, 0., 14.5, 16, .5, 16.5);
369 
370  const CastorElectronicsMap* myRefEMap = &iSetup.getData(tok_map_);
371  std::vector<HcalGenericDetId> listEMap = myRefEMap->allPrecisionId();
372  for (std::vector<HcalGenericDetId>::const_iterator it = listEMap.begin(); it != listEMap.end(); ++it) {
373  HcalGenericDetId mygenid(it->rawId());
374  if (mygenid.isHcalCastorDetId()) {
375  NewPedBunch a;
376  HcalCastorDetId chanid(mygenid.rawId());
377  a.detid = chanid;
378  a.usedflag = false;
379  std::string type = "CASTOR";
380  for (int i = 0; i != 4; i++) {
381  a.cap[i] = 0;
382  a.capfc[i] = 0;
383  for (int j = 0; j != 4; j++) {
384  a.sig[i][j] = 0;
385  a.sigfc[i][j] = 0;
386  a.prod[i][j] = 0;
387  a.prodfc[i][j] = 0;
388  a.num[i][j] = 0;
389  }
390  }
391  Bunches.push_back(a);
392  }
393  }
394  firsttime = false;
395  }
396 
397  std::vector<NewPedBunch>::iterator bunch_it;
398 
399  for (CastorDigiCollection::const_iterator j = castor->begin(); j != castor->end(); ++j) {
400  const CastorDataFrame digi = (const CastorDataFrame)(*j);
401  for (bunch_it = Bunches.begin(); bunch_it != Bunches.end(); ++bunch_it)
402  if (bunch_it->detid.rawId() == digi.id().rawId())
403  break;
404  bunch_it->usedflag = true;
405  for (int ts = firstTS; ts != lastTS + 1; ts++) {
406  const CastorQIECoder* coder = conditions->getCastorCoder(digi.id().rawId());
407  bunch_it->num[digi.sample(ts).capid()][digi.sample(ts).capid()] += 1;
408  bunch_it->cap[digi.sample(ts).capid()] += digi.sample(ts).adc();
409  double charge1 = coder->charge(*shape, digi.sample(ts).adc(), digi.sample(ts).capid());
410  bunch_it->capfc[digi.sample(ts).capid()] += charge1;
411  bunch_it->prod[digi.sample(ts).capid()][digi.sample(ts).capid()] +=
412  (digi.sample(ts).adc() * digi.sample(ts).adc());
413  bunch_it->prodfc[digi.sample(ts).capid()][digi.sample(ts).capid()] += charge1 * charge1;
414  if ((ts + 1 < digi.size()) && (ts + 1 < lastTS)) {
415  bunch_it->prod[digi.sample(ts).capid()][digi.sample(ts + 1).capid()] +=
416  digi.sample(ts).adc() * digi.sample(ts + 1).adc();
417  double charge2 = coder->charge(*shape, digi.sample(ts + 1).adc(), digi.sample(ts + 1).capid());
418  bunch_it->prodfc[digi.sample(ts).capid()][digi.sample(ts + 1).capid()] += charge1 * charge2;
419  bunch_it->num[digi.sample(ts).capid()][digi.sample(ts + 1).capid()] += 1;
420  }
421  if ((ts + 2 < digi.size()) && (ts + 2 < lastTS)) {
422  bunch_it->prod[digi.sample(ts).capid()][digi.sample(ts + 2).capid()] +=
423  digi.sample(ts).adc() * digi.sample(ts + 2).adc();
424  double charge2 = coder->charge(*shape, digi.sample(ts + 2).adc(), digi.sample(ts + 2).capid());
425  bunch_it->prodfc[digi.sample(ts).capid()][digi.sample(ts + 2).capid()] += charge1 * charge2;
426  bunch_it->num[digi.sample(ts).capid()][digi.sample(ts + 2).capid()] += 1;
427  }
428  if ((ts + 3 < digi.size()) && (ts + 3 < lastTS)) {
429  bunch_it->prod[digi.sample(ts).capid()][digi.sample(ts + 3).capid()] +=
430  digi.sample(ts).adc() * digi.sample(ts + 3).adc();
431  double charge2 = coder->charge(*shape, digi.sample(ts + 3).adc(), digi.sample(ts + 3).capid());
432  bunch_it->prodfc[digi.sample(ts).capid()][digi.sample(ts + 3).capid()] += charge1 * charge2;
433  bunch_it->num[digi.sample(ts).capid()][digi.sample(ts + 3).capid()] += 1;
434  }
435  }
436  }
437 
438  //this is the last brace
439 }
440 
441 //define this as a plug-in
const edm::ESGetToken< CastorDbService, CastorDbRecord > tok_cond_
static const std::string kSharedResource
Definition: TFileService.h:76
float charge(const CastorQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
void setSigma(int fCapId1, int fCapId2, float fSigma)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
std::vector< NewPedBunch > Bunches
def dumpXML(db, tag, since, filename='dump.xml')
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
const HcalQIESample & sample(int i) const
access a sample
std::vector< T >::const_iterator const_iterator
int size() const
total number of samples in the digi
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
HcalCastorDetId detid
const HcalCastorDetId & id() const
bool dumpObject(std::ostream &fOutput, const CastorPedestals &fObject)
std::vector< HcalGenericDetId > allPrecisionId() const
const edm::EDGetTokenT< CastorDigiCollection > castorDigiCollectionToken_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
CastorPedestalsAnalysis(const edm::ParameterSet &ps)
bool addValues(const Item &myItem)
const edm::ESGetToken< CastorElectronicsMap, CastorElectronicsMapRcd > tok_map_
constexpr int capid() const
get the Capacitor id
Definition: HcalQIESample.h:47
HLT enums.
constexpr int adc() const
get the ADC sample
Definition: HcalQIESample.h:43
double a
Definition: hdecay.h:121
Definition: event.py:1