CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GlobalDigisProducer.cc
Go to the documentation of this file.
1 
13 
15  fName(""), verbosity(0), frequency(0), label(""), getAllProvenances(false),
16  printProvenanceInfo(false), theCSCStripPedestalSum(0),
17  theCSCStripPedestalCount(0), count(0)
18 {
19  std::string MsgLoggerCat = "GlobalDigisProducer_GlobalDigisProducer";
20 
21  // get information from parameter set
22  fName = iPSet.getUntrackedParameter<std::string>("Name");
23  verbosity = iPSet.getUntrackedParameter<int>("Verbosity");
24  frequency = iPSet.getUntrackedParameter<int>("Frequency");
25  label = iPSet.getParameter<std::string>("Label");
26  edm::ParameterSet m_Prov =
27  iPSet.getParameter<edm::ParameterSet>("ProvenanceLookup");
29  m_Prov.getUntrackedParameter<bool>("GetAllProvenances");
31  m_Prov.getUntrackedParameter<bool>("PrintProvenanceInfo");
32 
33  //get Labels to use to extract information
34  ECalEBSrc_ = iPSet.getParameter<edm::InputTag>("ECalEBSrc");
35  ECalEESrc_ = iPSet.getParameter<edm::InputTag>("ECalEESrc");
36  ECalESSrc_ = iPSet.getParameter<edm::InputTag>("ECalESSrc");
37  HCalSrc_ = iPSet.getParameter<edm::InputTag>("HCalSrc");
38  HCalDigi_ = iPSet.getParameter<edm::InputTag>("HCalDigi");
39  SiStripSrc_ = iPSet.getParameter<edm::InputTag>("SiStripSrc");
40  SiPxlSrc_ = iPSet.getParameter<edm::InputTag>("SiPxlSrc");
41  MuDTSrc_ = iPSet.getParameter<edm::InputTag>("MuDTSrc");
42  MuCSCStripSrc_ = iPSet.getParameter<edm::InputTag>("MuCSCStripSrc");
43  MuCSCWireSrc_ = iPSet.getParameter<edm::InputTag>("MuCSCWireSrc");
44 
45  // use value of first digit to determine default output level (inclusive)
46  // 0 is none, 1 is basic, 2 is fill output, 3 is gather output
47  verbosity %= 10;
48 
49  // create persistent object
50  produces<PGlobalDigi>(label);
51 
52  // print out Parameter Set information being used
53  if (verbosity >= 0) {
54  edm::LogInfo(MsgLoggerCat)
55  << "\n===============================\n"
56  << "Initialized as EDProducer with parameter values:\n"
57  << " Name = " << fName << "\n"
58  << " Verbosity = " << verbosity << "\n"
59  << " Frequency = " << frequency << "\n"
60  << " Label = " << label << "\n"
61  << " GetProv = " << getAllProvenances << "\n"
62  << " PrintProv = " << printProvenanceInfo << "\n"
63  << " ECalEBSrc = " << ECalEBSrc_.label()
64  << ":" << ECalEBSrc_.instance() << "\n"
65  << " ECalEESrc = " << ECalEESrc_.label()
66  << ":" << ECalEESrc_.instance() << "\n"
67  << " ECalESSrc = " << ECalESSrc_.label()
68  << ":" << ECalESSrc_.instance() << "\n"
69  << " HCalSrc = " << HCalSrc_.label()
70  << ":" << HCalSrc_.instance() << "\n"
71  << " HCalDigi = " << HCalDigi_.label()
72  << ":" << HCalDigi_.instance() << "\n"
73  << " SiStripSrc = " << SiStripSrc_.label()
74  << ":" << SiStripSrc_.instance() << "\n"
75  << " SiPixelSrc = " << SiPxlSrc_.label()
76  << ":" << SiPxlSrc_.instance() << "\n"
77  << " MuDTSrc = " << MuDTSrc_.label()
78  << ":" << MuDTSrc_.instance() << "\n"
79  << " MuCSCStripSrc = " << MuCSCStripSrc_.label()
80  << ":" << MuCSCStripSrc_.instance() << "\n"
81  << " MuCSCWireSrc = " << MuCSCWireSrc_.label()
82  << ":" << MuCSCWireSrc_.instance() << "\n"
83  << "===============================\n";
84  }
85 
86  // set default constants
87  // ECal
88  ECalgainConv_[0] = 0.;
89  ECalgainConv_[1] = 1.;
90  ECalgainConv_[2] = 2.;
91  ECalgainConv_[3] = 12.;
92  ECalbarrelADCtoGeV_ = 0.035;
93  ECalendcapADCtoGeV_ = 0.06;
94 
95 }
96 
98 {
99 }
100 
102 {
103  std::string MsgLoggerCat = "GlobalDigisProducer_beginJob";
104 
105 // // setup calorimeter constants from service
106 // edm::ESHandle<EcalADCToGeVConstant> pAgc;
107 // iSetup.get<EcalADCToGeVConstantRcd>().get(pAgc);
108 // const EcalADCToGeVConstant* agc = pAgc.product();
109 
110  EcalMGPAGainRatio * defaultRatios = new EcalMGPAGainRatio();
111 
112  ECalgainConv_[0] = 0.;
113  ECalgainConv_[1] = 1.;
114  ECalgainConv_[2] = defaultRatios->gain12Over6() ;
115  ECalgainConv_[3] = ECalgainConv_[2]*(defaultRatios->gain6Over1()) ;
116 
117  delete defaultRatios;
118 
119 // ECalbarrelADCtoGeV_ = agc->getEBValue();
120 // ECalendcapADCtoGeV_ = agc->getEEValue();
121 
122  if (verbosity >= 0) {
123  edm::LogInfo(MsgLoggerCat)
124  << "Modified Calorimeter gain constants: g0 = " << ECalgainConv_[0]
125  << ", g1 = " << ECalgainConv_[1] << ", g2 = " << ECalgainConv_[2]
126  << ", g3 = " << ECalgainConv_[3];
127 // edm::LogInfo(MsgLoggerCat)
128 // << "Modified Calorimeter ADCtoGeV constants: barrel = "
129 // << ECalbarrelADCtoGeV_ << ", endcap = " << ECalendcapADCtoGeV_;
130  }
131 
132  // clear storage vectors
133  clear();
134  return;
135 }
136 
138 {
139  std::string MsgLoggerCat = "GlobalDigisProducer_endJob";
140  if (verbosity >= 0)
141  edm::LogInfo(MsgLoggerCat)
142  << "Terminating having processed " << count << " events.";
143  return;
144 }
145 
147  const edm::EventSetup& iSetup)
148 {
149  std::string MsgLoggerCat = "GlobalDigisProducer_produce";
150 
151  // keep track of number of events processed
152  ++count;
153 
154 
155  // THIS BLOCK MIGRATED HERE FROM beginJob:
156  // setup calorimeter constants from service
158  iSetup.get<EcalADCToGeVConstantRcd>().get(pAgc);
159  const EcalADCToGeVConstant* agc = pAgc.product();
162  if (verbosity >= 0) {
163  edm::LogInfo(MsgLoggerCat)
164  << "Modified Calorimeter ADCtoGeV constants: barrel = "
165  << ECalbarrelADCtoGeV_ << ", endcap = " << ECalendcapADCtoGeV_;
166  }
167 
168 
169  // get event id information
170  int nrun = iEvent.id().run();
171  int nevt = iEvent.id().event();
172 
173  if (verbosity > 0) {
174  edm::LogInfo(MsgLoggerCat)
175  << "Processing run " << nrun << ", event " << nevt
176  << " (" << count << " events total)";
177  } else if (verbosity == 0) {
178  if (nevt%frequency == 0 || nevt == 1) {
179  edm::LogInfo(MsgLoggerCat)
180  << "Processing run " << nrun << ", event " << nevt
181  << " (" << count << " events total)";
182  }
183  }
184 
185  // clear event holders
186  clear();
187 
188  // look at information available in the event
189  if (getAllProvenances) {
190 
191  std::vector<const edm::Provenance*> AllProv;
192  iEvent.getAllProvenance(AllProv);
193 
194  if (verbosity >= 0)
195  edm::LogInfo(MsgLoggerCat)
196  << "Number of Provenances = " << AllProv.size();
197 
198  if (printProvenanceInfo && (verbosity >= 0)) {
199  TString eventout("\nProvenance info:\n");
200 
201  for (unsigned int i = 0; i < AllProv.size(); ++i) {
202  eventout += "\n ******************************";
203  eventout += "\n Module : ";
204  //eventout += (AllProv[i]->product).moduleLabel();
205  eventout += AllProv[i]->moduleLabel();
206  eventout += "\n ProductID : ";
207  //eventout += (AllProv[i]->product).productID_.id_;
208  eventout += AllProv[i]->productID().id();
209  eventout += "\n ClassName : ";
210  //eventout += (AllProv[i]->product).fullClassName_;
211  eventout += AllProv[i]->className();
212  eventout += "\n InstanceName : ";
213  //eventout += (AllProv[i]->product).productInstanceName_;
214  eventout += AllProv[i]->productInstanceName();
215  eventout += "\n BranchName : ";
216  //eventout += (AllProv[i]->product).branchName_;
217  eventout += AllProv[i]->branchName();
218  }
219  eventout += "\n ******************************\n";
220  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
221  printProvenanceInfo = false;
222  }
223  getAllProvenances = false;
224  }
225 
226  // call fill functions
227  // gather Ecal information from event
228  fillECal(iEvent, iSetup);
229  // gather Hcal information from event
230  fillHCal(iEvent, iSetup);
231  // gather Track information from event
232  fillTrk(iEvent, iSetup);
233  // gather Muon information from event
234  fillMuon(iEvent, iSetup);
235 
236  if (verbosity > 0)
237  edm::LogInfo (MsgLoggerCat)
238  << "Done gathering data from event.";
239 
240  // produce object to put into event
241  std::auto_ptr<PGlobalDigi> pOut(new PGlobalDigi);
242 
243  if (verbosity > 2)
244  edm::LogInfo (MsgLoggerCat)
245  << "Saving event contents:";
246 
247  // call store functions
248  // store ECal information in produce
249  storeECal(*pOut);
250  // store HCal information in produce
251  storeHCal(*pOut);
252  // store Track information in produce
253  storeTrk(*pOut);
254  // store Muon information in produce
255  storeMuon(*pOut);
256 
257  // store information in event
258  iEvent.put(pOut,label);
259 
260  return;
261 }
262 
264  const edm::EventSetup& iSetup)
265 {
266  std::string MsgLoggerCat = "GlobalDigisProducer_fillECal";
267 
268  TString eventout;
269  if (verbosity > 0)
270  eventout = "\nGathering info:";
271 
272  // extract crossing frame from event
273  //edm::Handle<CrossingFrame> crossingFrame;
274  edm::Handle<CrossingFrame<PCaloHit> > crossingFrame;
275  //iEvent.getByType(crossingFrame);
276  //if (!crossingFrame.isValid()) {
277  // edm::LogWarning(MsgLoggerCat)
278  // << "Unable to crossingFrame in event!";
279  // return;
280  //}
281 
283  //extract EB information
285  bool isBarrel = true;
286  edm::Handle<EBDigiCollection> EcalDigiEB;
287  iEvent.getByLabel(ECalEBSrc_, EcalDigiEB);
288  if (!EcalDigiEB.isValid()) {
289  edm::LogWarning(MsgLoggerCat)
290  << "Unable to find EcalDigiEB in event!";
291  return;
292  }
293  if ( EcalDigiEB->size() == 0) isBarrel = false;
294 
295  if (isBarrel) {
296 
297  // loop over simhits
298  const std::string barrelHitsName("EcalHitsEB");
299  iEvent.getByLabel("mix",barrelHitsName,crossingFrame);
300  if (!crossingFrame.isValid()) {
301  edm::LogWarning(MsgLoggerCat)
302  << "Unable to find cal barrel crossingFrame in event!";
303  return;
304  }
305  //std::auto_ptr<MixCollection<PCaloHit> >
306  //barrelHits(new MixCollection<PCaloHit>
307  // (crossingFrame.product(), barrelHitsName));
308  std::auto_ptr<MixCollection<PCaloHit> >
309  barrelHits(new MixCollection<PCaloHit>(crossingFrame.product()));
310 
311  // keep track of sum of simhit energy in each crystal
312  MapType ebSimMap;
314  = barrelHits->begin();
315  hitItr != barrelHits->end();
316  ++hitItr) {
317 
318  EBDetId ebid = EBDetId(hitItr->id());
319 
320  uint32_t crystid = ebid.rawId();
321  ebSimMap[crystid] += hitItr->energy();
322  }
323 
324  // loop over digis
325  const EBDigiCollection *barrelDigi = EcalDigiEB.product();
326 
327  std::vector<double> ebAnalogSignal;
328  std::vector<double> ebADCCounts;
329  std::vector<double> ebADCGains;
330  ebAnalogSignal.reserve(EBDataFrame::MAXSAMPLES);
331  ebADCCounts.reserve(EBDataFrame::MAXSAMPLES);
332  ebADCGains.reserve(EBDataFrame::MAXSAMPLES);
333 
334  int i = 0;
335  for (unsigned int digis=0; digis<EcalDigiEB->size(); ++digis)
336  {
337  //for (std::vector<EBDataFrame>::const_iterator digis =
338  // barrelDigi->begin();
339  // digis != barrelDigi->end();
340  // ++digis) {
341 
342  ++i;
343 
344  EBDataFrame ebdf = (*barrelDigi)[digis];
345  int nrSamples = ebdf.size();
346 
347  EBDetId ebid = ebdf.id () ;
348  //EBDetId ebid = digis->id();
349 
350  double Emax = 0;
351  int Pmax = 0;
352  double pedestalPreSample = 0.;
353  double pedestalPreSampleAnalog = 0.;
354 
355  for (int sample = 0 ; sample < nrSamples; ++sample) {
356  //for (int sample = 0; sample < digis->size(); ++sample) {
357  ebAnalogSignal[sample] = 0.;
358  ebADCCounts[sample] = 0.;
359  ebADCGains[sample] = -1.;
360  }
361 
362  // calculate maximum energy and pedestal
363  for (int sample = 0 ; sample < nrSamples; ++sample) {
364  //for (int sample = 0; sample < digis->size(); ++sample) {
365 
366  EcalMGPASample thisSample = ebdf[sample];
367  ebADCCounts[sample] = (thisSample.adc());
368  ebADCGains[sample] = (thisSample.gainId());
369  ebAnalogSignal[sample] =
370  (ebADCCounts[sample] * ECalgainConv_[(int)ebADCGains[sample]]
372  if (Emax < ebAnalogSignal[sample]) {
373  Emax = ebAnalogSignal[sample];
374  Pmax = sample;
375  }
376  if ( sample < 3 ) {
377  pedestalPreSample += ebADCCounts[sample] ;
378  pedestalPreSampleAnalog +=
379  ebADCCounts[sample] * ECalgainConv_[(int)ebADCGains[sample]]
380  * ECalbarrelADCtoGeV_ ;
381  }
382 
383  }
384  pedestalPreSample /= 3. ;
385  pedestalPreSampleAnalog /= 3. ;
386 
387  // calculate pedestal subtracted digi energy in the crystal
388  double Erec = Emax - pedestalPreSampleAnalog
389  * ECalgainConv_[(int)ebADCGains[Pmax]];
390 
391  // gather necessary information
392  EBCalAEE.push_back(Erec);
393  EBCalSHE.push_back(ebSimMap[ebid.rawId()]);
394  EBCalmaxPos.push_back(Pmax);
395  }
396 
397  if (verbosity > 1) {
398  eventout += "\n Number of EBDigis collected:.............. ";
399  eventout += i;
400  }
401  }
402 
404  //extract EE information
406  bool isEndCap = true;
407  edm::Handle<EEDigiCollection> EcalDigiEE;
408  iEvent.getByLabel(ECalEESrc_, EcalDigiEE);
409  if (!EcalDigiEE.isValid()) {
410  edm::LogWarning(MsgLoggerCat)
411  << "Unable to find EcalDigiEE in event!";
412  return;
413  }
414  if (EcalDigiEE->size() == 0) isEndCap = false;
415 
416  if (isEndCap) {
417 
418  // loop over simhits
419  const std::string endcapHitsName("EcalHitsEE");
420  iEvent.getByLabel("mix",endcapHitsName,crossingFrame);
421  if (!crossingFrame.isValid()) {
422  edm::LogWarning(MsgLoggerCat)
423  << "Unable to find cal endcap crossingFrame in event!";
424  return;
425  }
426  //std::auto_ptr<MixCollection<PCaloHit> >
427  // endcapHits(new MixCollection<PCaloHit>
428  // (crossingFrame.product(), endcapHitsName));
429  std::auto_ptr<MixCollection<PCaloHit> >
430  endcapHits(new MixCollection<PCaloHit>(crossingFrame.product()));
431 
432  // keep track of sum of simhit energy in each crystal
433  MapType eeSimMap;
435  = endcapHits->begin();
436  hitItr != endcapHits->end();
437  ++hitItr) {
438 
439  EEDetId eeid = EEDetId(hitItr->id());
440 
441  uint32_t crystid = eeid.rawId();
442  eeSimMap[crystid] += hitItr->energy();
443  }
444 
445  // loop over digis
446  const EEDigiCollection *endcapDigi = EcalDigiEE.product();
447 
448  std::vector<double> eeAnalogSignal;
449  std::vector<double> eeADCCounts;
450  std::vector<double> eeADCGains;
451  eeAnalogSignal.reserve(EEDataFrame::MAXSAMPLES);
452  eeADCCounts.reserve(EEDataFrame::MAXSAMPLES);
453  eeADCGains.reserve(EEDataFrame::MAXSAMPLES);
454 
455  int i = 0;
456  //for (std::vector<EEDataFrame>::const_iterator digis =
457  // endcapDigi->begin();
458  // digis != endcapDigi->end();
459  // ++digis) {
460  for (unsigned int digis=0; digis<EcalDigiEE->size(); ++digis){
461 
462  ++i;
463 
464  EEDataFrame eedf = (*endcapDigi)[digis];
465  int nrSamples = eedf.size();
466 
467  EEDetId eeid = eedf.id () ;
468  //EEDetId eeid = digis->id();
469 
470  double Emax = 0;
471  int Pmax = 0;
472  double pedestalPreSample = 0.;
473  double pedestalPreSampleAnalog = 0.;
474 
475  for (int sample = 0 ; sample < nrSamples; ++sample) {
476  //for (int sample = 0; sample < digis->size(); ++sample) {
477  eeAnalogSignal[sample] = 0.;
478  eeADCCounts[sample] = 0.;
479  eeADCGains[sample] = -1.;
480  }
481 
482  // calculate maximum enery and pedestal
483  for (int sample = 0 ; sample < nrSamples; ++sample) {
484  //for (int sample = 0; sample < digis->size(); ++sample) {
485 
486  EcalMGPASample thisSample = eedf[sample];
487 
488  eeADCCounts[sample] = (thisSample.adc());
489  eeADCGains[sample] = (thisSample.gainId());
490  eeAnalogSignal[sample] =
491  (eeADCCounts[sample] * ECalgainConv_[(int)eeADCGains[sample]]
493  if (Emax < eeAnalogSignal[sample]) {
494  Emax = eeAnalogSignal[sample];
495  Pmax = sample;
496  }
497  if ( sample < 3 ) {
498  pedestalPreSample += eeADCCounts[sample] ;
499  pedestalPreSampleAnalog +=
500  eeADCCounts[sample] * ECalgainConv_[(int)eeADCGains[sample]]
501  * ECalbarrelADCtoGeV_ ;
502  }
503 
504  }
505  pedestalPreSample /= 3. ;
506  pedestalPreSampleAnalog /= 3. ;
507 
508  // calculate pedestal subtracted digi energy in the crystal
509  double Erec = Emax - pedestalPreSampleAnalog
510  * ECalgainConv_[(int)eeADCGains[Pmax]];
511 
512  // gather necessary information
513  EECalAEE.push_back(Erec);
514  EECalSHE.push_back(eeSimMap[eeid.rawId()]);
515  EECalmaxPos.push_back(Pmax);
516  }
517 
518  if (verbosity > 1) {
519  eventout += "\n Number of EEDigis collected:.............. ";
520  eventout += i;
521  }
522  }
523 
525  //extract ES information
527  bool isPreshower = true;
528  edm::Handle<ESDigiCollection> EcalDigiES;
529  iEvent.getByLabel(ECalESSrc_, EcalDigiES);
530  if (!EcalDigiES.isValid()) {
531  edm::LogWarning(MsgLoggerCat)
532  << "Unable to find EcalDigiES in event!";
533  return;
534  }
535  if (EcalDigiES->size() == 0) isPreshower = false;
536 
537  if (isPreshower) {
538 
539  // loop over simhits
540  const std::string preshowerHitsName("EcalHitsES");
541  iEvent.getByLabel("mix",preshowerHitsName,crossingFrame);
542  if (!crossingFrame.isValid()) {
543  edm::LogWarning(MsgLoggerCat)
544  << "Unable to find cal preshower crossingFrame in event!";
545  return;
546  }
547  //std::auto_ptr<MixCollection<PCaloHit> >
548  // preshowerHits(new MixCollection<PCaloHit>
549  // (crossingFrame.product(), preshowerHitsName));
550  std::auto_ptr<MixCollection<PCaloHit> >
551  preshowerHits(new MixCollection<PCaloHit>(crossingFrame.product()));
552 
553  // keep track of sum of simhit energy in each crystal
554  MapType esSimMap;
556  = preshowerHits->begin();
557  hitItr != preshowerHits->end();
558  ++hitItr) {
559 
560  ESDetId esid = ESDetId(hitItr->id());
561 
562  uint32_t crystid = esid.rawId();
563  esSimMap[crystid] += hitItr->energy();
564  }
565 
566  // loop over digis
567  const ESDigiCollection *preshowerDigi = EcalDigiES.product();
568 
569  std::vector<double> esADCCounts;
570  esADCCounts.reserve(ESDataFrame::MAXSAMPLES);
571 
572  int i = 0;
573  for (unsigned int digis=0; digis<EcalDigiES->size(); ++digis) {
574  //for (std::vector<ESDataFrame>::const_iterator digis =
575  // preshowerDigi->begin();
576  // digis != preshowerDigi->end();
577  // ++digis) {
578 
579  ++i;
580 
581 
582  ESDataFrame esdf = (*preshowerDigi)[digis];
583  int nrSamples = esdf.size();
584 
585  ESDetId esid = esdf.id () ;
586  // ESDetId esid = digis->id();
587 
588  for (int sample = 0 ; sample < nrSamples; ++sample) {
589  //for (int sample = 0; sample < digis->size(); ++sample) {
590  esADCCounts[sample] = 0.;
591  }
592 
593  // gether ADC counts
594  for (int sample = 0 ; sample < nrSamples; ++sample) {
595 
596  ESSample thisSample = esdf[sample];
597  //for (int sample = 0; sample < digis->size(); ++sample) {
598  esADCCounts[sample] = (thisSample.adc());
599  }
600 
601  ESCalADC0.push_back(esADCCounts[0]);
602  ESCalADC1.push_back(esADCCounts[1]);
603  ESCalADC2.push_back(esADCCounts[2]);
604  ESCalSHE.push_back(esSimMap[esid.rawId()]);
605  }
606 
607  if (verbosity > 1) {
608  eventout += "\n Number of ESDigis collected:.............. ";
609  eventout += i;
610  }
611  }
612 
613  if (verbosity > 0)
614  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
615 
616  return;
617 }
618 
620 {
621  std::string MsgLoggerCat = "GlobalDigisProducer_storeECal";
622 
623  if (verbosity > 2) {
624  TString eventout("\n nEBDigis = ");
625  eventout += EBCalmaxPos.size();
626  for (unsigned int i = 0; i < EBCalmaxPos.size(); ++i) {
627  eventout += "\n (maxPos, AEE, SHE) = (";
628  eventout += EBCalmaxPos[i];
629  eventout += ", ";
630  eventout += EBCalAEE[i];
631  eventout += ", ";
632  eventout += EBCalSHE[i];
633  eventout += ")";
634  }
635  eventout += "\n nEEDigis = ";
636  eventout += EECalmaxPos.size();
637  for (unsigned int i = 0; i < EECalmaxPos.size(); ++i) {
638  eventout += "\n (maxPos, AEE, SHE) = (";
639  eventout += EECalmaxPos[i];
640  eventout += ", ";
641  eventout += EECalAEE[i];
642  eventout += ", ";
643  eventout += EECalSHE[i];
644  eventout += ")";
645  }
646  eventout += "\n nESDigis = ";
647  eventout += ESCalADC0.size();
648  for (unsigned int i = 0; i < ESCalADC0.size(); ++i) {
649  eventout += "\n (ADC0, ADC1, ADC2, SHE) = (";
650  eventout += ESCalADC0[i];
651  eventout += ", ";
652  eventout += ESCalADC1[i];
653  eventout += ", ";
654  eventout += ESCalADC2[i];
655  eventout += ", ";
656  eventout += ESCalSHE[i];
657  eventout += ")";
658  }
659  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
660  }
661 
665 
666  return;
667 }
668 
670  const edm::EventSetup& iSetup)
671 {
672  std::string MsgLoggerCat = "GlobalDigisProducer_fillHCal";
673 
674  TString eventout;
675  if (verbosity > 0)
676  eventout = "\nGathering info:";
677 
678  // get calibration info
679  edm::ESHandle<HcalDbService> HCalconditions;
680  iSetup.get<HcalDbRecord>().get(HCalconditions);
681  if (!HCalconditions.isValid()) {
682  edm::LogWarning(MsgLoggerCat)
683  << "Unable to find HCalconditions in event!";
684  return;
685  }
686  //HcalCalibrations calibrations;
687  CaloSamples tool;
688 
690  // extract simhit info
693  iEvent.getByLabel(HCalSrc_,hcalHits);
694  if (!hcalHits.isValid()) {
695  edm::LogWarning(MsgLoggerCat)
696  << "Unable to find hcalHits in event!";
697  return;
698  }
699  const edm::PCaloHitContainer *simhitResult = hcalHits.product();
700 
701  MapType fHBEnergySimHits;
702  MapType fHEEnergySimHits;
703  MapType fHOEnergySimHits;
704  MapType fHFEnergySimHits;
705  for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin();
706  simhits != simhitResult->end();
707  ++simhits) {
708 
709  HcalDetId detId(simhits->id());
710  uint32_t cellid = detId.rawId();
711 
712  if (detId.subdet() == sdHcalBrl){
713  fHBEnergySimHits[cellid] += simhits->energy();
714  }
715  if (detId.subdet() == sdHcalEC){
716  fHEEnergySimHits[cellid] += simhits->energy();
717  }
718  if (detId.subdet() == sdHcalOut){
719  fHOEnergySimHits[cellid] += simhits->energy();
720  }
721  if (detId.subdet() == sdHcalFwd){
722  fHFEnergySimHits[cellid] += simhits->energy();
723  }
724  }
725 
727  // get HBHE information
730  iEvent.getByLabel(HCalDigi_,hbhe);
731  if (!hbhe.isValid()) {
732  edm::LogWarning(MsgLoggerCat)
733  << "Unable to find HBHEDataFrame in event!";
734  return;
735  }
737 
738  int iHB = 0;
739  int iHE = 0;
740  for (ihbhe = hbhe->begin(); ihbhe != hbhe->end(); ++ihbhe) {
741  HcalDetId cell(ihbhe->id());
742 
743  if ((cell.subdet() == sdHcalBrl) || (cell.subdet() == sdHcalEC)) {
744 
745  //HCalconditions->makeHcalCalibration(cell, &calibrations);
746  const HcalCalibrations& calibrations =
747  HCalconditions->getHcalCalibrations(cell);
748  const HcalQIECoder *channelCoder = HCalconditions->getHcalCoder(cell);
749  const HcalQIEShape *shape = HCalconditions->getHcalShape(channelCoder);
750 
751  HcalCoderDb coder(*channelCoder, *shape);
752  coder.adc2fC(*ihbhe, tool);
753 
754  // get HB info
755  if (cell.subdet() == sdHcalBrl) {
756 
757  ++iHB;
758  float fDigiSum = 0.0;
759  for (int ii = 0; ii < tool.size(); ++ii) {
760  // default ped is 4.5
761  int capid = (*ihbhe)[ii].capid();
762  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
763  }
764 
765  HBCalAEE.push_back(fDigiSum);
766  HBCalSHE.push_back(fHBEnergySimHits[cell.rawId()]);
767  }
768 
769  // get HE info
770  if (cell.subdet() == sdHcalEC) {
771 
772  ++iHE;
773  float fDigiSum = 0.0;
774  for (int ii = 0; ii < tool.size(); ++ii) {
775  int capid = (*ihbhe)[ii].capid();
776  fDigiSum += (tool[ii]-calibrations.pedestal(capid));
777  }
778 
779  HECalAEE.push_back(fDigiSum);
780  HECalSHE.push_back(fHEEnergySimHits[cell.rawId()]);
781  }
782  }
783  }
784 
785  if (verbosity > 1) {
786  eventout += "\n Number of HBDigis collected:.............. ";
787  eventout += iHB;
788  }
789 
790  if (verbosity > 1) {
791  eventout += "\n Number of HEDigis collected:.............. ";
792  eventout += iHE;
793  }
794 
796  // get HO information
799  iEvent.getByLabel(HCalDigi_,ho);
800  if (!ho.isValid()) {
801  edm::LogWarning(MsgLoggerCat)
802  << "Unable to find HODataFrame in event!";
803  return;
804  }
806 
807  int iHO = 0;
808  for (iho = ho->begin(); iho != ho->end(); ++iho) {
809  HcalDetId cell(iho->id());
810 
811  if (cell.subdet() == sdHcalOut) {
812 
813  //HCalconditions->makeHcalCalibration(cell, &calibrations);
814  const HcalCalibrations& calibrations =
815  HCalconditions->getHcalCalibrations(cell);
816  const HcalQIECoder *channelCoder = HCalconditions->getHcalCoder(cell);
817  const HcalQIEShape *shape = HCalconditions->getHcalShape(channelCoder);
818 
819  HcalCoderDb coder (*channelCoder, *shape);
820  coder.adc2fC(*iho, tool);
821 
822  ++iHO;
823  float fDigiSum = 0.0;
824  for (int ii = 0; ii < tool.size(); ++ii) {
825  // default ped is 4.5
826  int capid = (*iho)[ii].capid();
827  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
828  }
829 
830  HOCalAEE.push_back(fDigiSum);
831  HOCalSHE.push_back(fHOEnergySimHits[cell.rawId()]);
832  }
833  }
834 
835  if (verbosity > 1) {
836  eventout += "\n Number of HODigis collected:.............. ";
837  eventout += iHO;
838  }
839 
841  // get HF information
844  iEvent.getByLabel(HCalDigi_,hf);
845  if (!hf.isValid()) {
846  edm::LogWarning(MsgLoggerCat)
847  << "Unable to find HFDataFrame in event!";
848  return;
849  }
851 
852  int iHF = 0;
853  for (ihf = hf->begin(); ihf != hf->end(); ++ihf) {
854  HcalDetId cell(ihf->id());
855 
856  if (cell.subdet() == sdHcalFwd) {
857 
858  //HCalconditions->makeHcalCalibration(cell, &calibrations);
859  const HcalCalibrations& calibrations =
860  HCalconditions->getHcalCalibrations(cell);
861  const HcalQIECoder *channelCoder = HCalconditions->getHcalCoder(cell);
862  const HcalQIEShape *shape = HCalconditions->getHcalShape(channelCoder);
863 
864  HcalCoderDb coder (*channelCoder, *shape);
865  coder.adc2fC(*ihf, tool);
866 
867  ++iHF;
868  float fDigiSum = 0.0;
869  for (int ii = 0; ii < tool.size(); ++ii) {
870  // default ped is 1.73077
871  int capid = (*ihf)[ii].capid();
872  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
873  }
874 
875  HFCalAEE.push_back(fDigiSum);
876  HFCalSHE.push_back(fHFEnergySimHits[cell.rawId()]);
877  }
878  }
879 
880  if (verbosity > 1) {
881  eventout += "\n Number of HFDigis collected:.............. ";
882  eventout += iHF;
883  }
884 
885  if (verbosity > 0)
886  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
887 
888  return;
889 }
890 
892 {
893  std::string MsgLoggerCat = "GlobalDigisProducer_storeHCal";
894 
895  if (verbosity > 2) {
896  TString eventout("\n nHBDigis = ");
897  eventout += HBCalAEE.size();
898  for (unsigned int i = 0; i < HBCalAEE.size(); ++i) {
899  eventout += "\n (AEE, SHE) = (";
900  eventout += HBCalAEE[i];
901  eventout += ", ";
902  eventout += HBCalSHE[i];
903  eventout += ")";
904  }
905  eventout += "\n nHEDigis = ";
906  eventout += HECalAEE.size();
907  for (unsigned int i = 0; i < HECalAEE.size(); ++i) {
908  eventout += "\n (AEE, SHE) = (";
909  eventout += HECalAEE[i];
910  eventout += ", ";
911  eventout += HECalSHE[i];
912  eventout += ")";
913  }
914  eventout += "\n nHODigis = ";
915  eventout += HOCalAEE.size();
916  for (unsigned int i = 0; i < HOCalAEE.size(); ++i) {
917  eventout += "\n (AEE, SHE) = (";
918  eventout += HOCalAEE[i];
919  eventout += ", ";
920  eventout += HOCalSHE[i];
921  eventout += ")";
922  }
923  eventout += "\n nHFDigis = ";
924  eventout += HFCalAEE.size();
925  for (unsigned int i = 0; i < HFCalAEE.size(); ++i) {
926  eventout += "\n (AEE, SHE) = (";
927  eventout += HFCalAEE[i];
928  eventout += ", ";
929  eventout += HFCalSHE[i];
930  eventout += ")";
931  }
932 
933  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
934  }
935 
940 
941  return;
942 }
943 
945  const edm::EventSetup& iSetup)
946 {
947  //Retrieve tracker topology from geometry
948  edm::ESHandle<TrackerTopology> tTopoHandle;
949  iSetup.get<IdealGeometryRecord>().get(tTopoHandle);
950  const TrackerTopology* const tTopo = tTopoHandle.product();
951 
952 
953  std::string MsgLoggerCat = "GlobalDigisProducer_fillTrk";
954 
955  TString eventout;
956  if (verbosity > 0)
957  eventout = "\nGathering info:";
958 
959  // get strip information
961  iEvent.getByLabel(SiStripSrc_, stripDigis);
962  if (!stripDigis.isValid()) {
963  edm::LogWarning(MsgLoggerCat)
964  << "Unable to find stripDigis in event!";
965  return;
966  }
967 
968  int nStripBrl = 0, nStripFwd = 0;
970  for (DSViter = stripDigis->begin(); DSViter != stripDigis->end();
971  ++DSViter) {
972  unsigned int id = DSViter->id;
973  DetId detId(id);
977 
978  // get TIB
979  if (detId.subdetId() == sdSiTIB) {
980 
981  for (iter = begin; iter != end; ++iter) {
982  ++nStripBrl;
983  if (tTopo->tibLayer(id) == 1) {
984  TIBL1ADC.push_back((*iter).adc());
985  TIBL1Strip.push_back((*iter).strip());
986  }
987  if (tTopo->tibLayer(id) == 2) {
988  TIBL2ADC.push_back((*iter).adc());
989  TIBL2Strip.push_back((*iter).strip());
990  }
991  if (tTopo->tibLayer(id) == 3) {
992  TIBL3ADC.push_back((*iter).adc());
993  TIBL3Strip.push_back((*iter).strip());
994  }
995  if (tTopo->tibLayer(id) == 4) {
996  TIBL4ADC.push_back((*iter).adc());
997  TIBL4Strip.push_back((*iter).strip());
998  }
999  }
1000  }
1001 
1002  // get TOB
1003  if (detId.subdetId() == sdSiTOB) {
1004 
1005  for (iter = begin; iter != end; ++iter) {
1006  ++nStripBrl;
1007  if (tTopo->tobLayer(id) == 1) {
1008  TOBL1ADC.push_back((*iter).adc());
1009  TOBL1Strip.push_back((*iter).strip());
1010  }
1011  if (tTopo->tobLayer(id) == 2) {
1012  TOBL2ADC.push_back((*iter).adc());
1013  TOBL2Strip.push_back((*iter).strip());
1014  }
1015  if (tTopo->tobLayer(id) == 3) {
1016  TOBL3ADC.push_back((*iter).adc());
1017  TOBL3Strip.push_back((*iter).strip());
1018  }
1019  if (tTopo->tobLayer(id) == 4) {
1020  TOBL4ADC.push_back((*iter).adc());
1021  TOBL4Strip.push_back((*iter).strip());
1022  }
1023  }
1024  }
1025 
1026  // get TID
1027  if (detId.subdetId() == sdSiTID) {
1028 
1029  for (iter = begin; iter != end; ++iter) {
1030  ++nStripFwd;
1031  if (tTopo->tidWheel(id) == 1) {
1032  TIDW1ADC.push_back((*iter).adc());
1033  TIDW1Strip.push_back((*iter).strip());
1034  }
1035  if (tTopo->tidWheel(id) == 2) {
1036  TIDW2ADC.push_back((*iter).adc());
1037  TIDW2Strip.push_back((*iter).strip());
1038  }
1039  if (tTopo->tidWheel(id) == 3) {
1040  TIDW3ADC.push_back((*iter).adc());
1041  TIDW3Strip.push_back((*iter).strip());
1042  }
1043  }
1044  }
1045 
1046  // get TEC
1047  if (detId.subdetId() == sdSiTEC) {
1048 
1049  for (iter = begin; iter != end; ++iter) {
1050  ++nStripFwd;
1051  if (tTopo->tecWheel(id) == 1) {
1052  TECW1ADC.push_back((*iter).adc());
1053  TECW1Strip.push_back((*iter).strip());
1054  }
1055  if (tTopo->tecWheel(id) == 2) {
1056  TECW2ADC.push_back((*iter).adc());
1057  TECW2Strip.push_back((*iter).strip());
1058  }
1059  if (tTopo->tecWheel(id) == 3) {
1060  TECW3ADC.push_back((*iter).adc());
1061  TECW3Strip.push_back((*iter).strip());
1062  }
1063  if (tTopo->tecWheel(id) == 4) {
1064  TECW4ADC.push_back((*iter).adc());
1065  TECW4Strip.push_back((*iter).strip());
1066  }
1067  if (tTopo->tecWheel(id) == 5) {
1068  TECW5ADC.push_back((*iter).adc());
1069  TECW5Strip.push_back((*iter).strip());
1070  }
1071  if (tTopo->tecWheel(id) == 6) {
1072  TECW6ADC.push_back((*iter).adc());
1073  TECW6Strip.push_back((*iter).strip());
1074  }
1075  if (tTopo->tecWheel(id) == 7) {
1076  TECW7ADC.push_back((*iter).adc());
1077  TECW7Strip.push_back((*iter).strip());
1078  }
1079  if (tTopo->tecWheel(id) == 8) {
1080  TECW8ADC.push_back((*iter).adc());
1081  TECW8Strip.push_back((*iter).strip());
1082  }
1083  }
1084  }
1085  } // end loop over DataSetVector
1086 
1087  if (verbosity > 1) {
1088  eventout += "\n Number of BrlStripDigis collected:........ ";
1089  eventout += nStripBrl;
1090  }
1091 
1092  if (verbosity > 1) {
1093  eventout += "\n Number of FrwdStripDigis collected:....... ";
1094  eventout += nStripFwd;
1095  }
1096 
1097  // get pixel information
1099  iEvent.getByLabel(SiPxlSrc_, pixelDigis);
1100  if (!pixelDigis.isValid()) {
1101  edm::LogWarning(MsgLoggerCat)
1102  << "Unable to find pixelDigis in event!";
1103  return;
1104  }
1105 
1106  int nPxlBrl = 0, nPxlFwd = 0;
1108  for (DPViter = pixelDigis->begin(); DPViter != pixelDigis->end();
1109  ++DPViter) {
1110  unsigned int id = DPViter->id;
1111  DetId detId(id);
1115 
1116  // get Barrel pixels
1117  if (detId.subdetId() == sdPxlBrl) {
1118 
1119  for (iter = begin; iter != end; ++iter) {
1120  ++nPxlBrl;
1121  if (tTopo->pxbLayer(id) == 1) {
1122  BRL1ADC.push_back((*iter).adc());
1123  BRL1Row.push_back((*iter).row());
1124  BRL1Col.push_back((*iter).column());
1125  }
1126  if (tTopo->pxbLayer(id) == 2) {
1127  BRL2ADC.push_back((*iter).adc());
1128  BRL2Row.push_back((*iter).row());
1129  BRL2Col.push_back((*iter).column());
1130  }
1131  if (tTopo->pxbLayer(id) == 3) {
1132  BRL3ADC.push_back((*iter).adc());
1133  BRL3Row.push_back((*iter).row());
1134  BRL3Col.push_back((*iter).column());
1135  }
1136  }
1137  }
1138 
1139  // get Forward pixels
1140  if (detId.subdetId() == sdPxlFwd) {
1141 
1142  for (iter = begin; iter != end; ++iter) {
1143  ++nPxlFwd;
1144  if (tTopo->pxfDisk(id) == 1) {
1145  if (tTopo->pxfSide(id) == 1) {
1146  FWD1nADC.push_back((*iter).adc());
1147  FWD1nRow.push_back((*iter).row());
1148  FWD1nCol.push_back((*iter).column());
1149  }
1150  if (tTopo->pxfSide(id) == 2) {
1151  FWD1pADC.push_back((*iter).adc());
1152  FWD1pRow.push_back((*iter).row());
1153  FWD1pCol.push_back((*iter).column());
1154  }
1155  }
1156  if (tTopo->pxfDisk(id) == 2) {
1157  if (tTopo->pxfSide(id) == 1) {
1158  FWD2nADC.push_back((*iter).adc());
1159  FWD2nRow.push_back((*iter).row());
1160  FWD2nCol.push_back((*iter).column());
1161  }
1162  if (tTopo->pxfSide(id) == 2) {
1163  FWD2pADC.push_back((*iter).adc());
1164  FWD2pRow.push_back((*iter).row());
1165  FWD2pCol.push_back((*iter).column());
1166  }
1167  }
1168  }
1169  }
1170  }
1171 
1172  if (verbosity > 1) {
1173  eventout += "\n Number of BrlPixelDigis collected:........ ";
1174  eventout += nPxlBrl;
1175  }
1176 
1177  if (verbosity > 1) {
1178  eventout += "\n Number of FrwdPixelDigis collected:....... ";
1179  eventout += nPxlFwd;
1180  }
1181 
1182  if (verbosity > 0)
1183  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1184 
1185  return;
1186 }
1187 
1189 {
1190  std::string MsgLoggerCat = "GlobalDigisProducer_storeTrk";
1191 
1192  if (verbosity > 2) {
1193 
1194  // strip output
1195  TString eventout("\n nTIBL1 = ");
1196  eventout += TIBL1ADC.size();
1197  for (unsigned int i = 0; i < TIBL1ADC.size(); ++i) {
1198  eventout += "\n (ADC, strip) = (";
1199  eventout += TIBL1ADC[i];
1200  eventout += ", ";
1201  eventout += TIBL1Strip[i];
1202  eventout += ")";
1203  }
1204  eventout += "\n nTIBL2 = ";
1205  eventout += TIBL2ADC.size();
1206  for (unsigned int i = 0; i < TIBL2ADC.size(); ++i) {
1207  eventout += "\n (ADC, strip) = (";
1208  eventout += TIBL2ADC[i];
1209  eventout += ", ";
1210  eventout += TIBL2Strip[i];
1211  eventout += ")";
1212  }
1213  eventout += "\n nTIBL3 = ";
1214  eventout += TIBL3ADC.size();
1215  for (unsigned int i = 0; i < TIBL3ADC.size(); ++i) {
1216  eventout += "\n (ADC, strip) = (";
1217  eventout += TIBL3ADC[i];
1218  eventout += ", ";
1219  eventout += TIBL3Strip[i];
1220  eventout += ")";
1221  }
1222  eventout += "\n nTIBL4 = ";
1223  eventout += TIBL4ADC.size();
1224  for (unsigned int i = 0; i < TIBL4ADC.size(); ++i) {
1225  eventout += "\n (ADC, strip) = (";
1226  eventout += TIBL4ADC[i];
1227  eventout += ", ";
1228  eventout += TIBL4Strip[i];
1229  eventout += ")";
1230  }
1231  eventout += "\n nTOBL1 = ";
1232  eventout += TOBL1ADC.size();
1233  for (unsigned int i = 0; i < TOBL1ADC.size(); ++i) {
1234  eventout += "\n (ADC, strip) = (";
1235  eventout += TOBL1ADC[i];
1236  eventout += ", ";
1237  eventout += TOBL1Strip[i];
1238  eventout += ")";
1239  }
1240  eventout += "\n nTOBL2 = ";
1241  eventout += TOBL2ADC.size();
1242  for (unsigned int i = 0; i < TOBL2ADC.size(); ++i) {
1243  eventout += "\n (ADC, strip) = (";
1244  eventout += TOBL2ADC[i];
1245  eventout += ", ";
1246  eventout += TOBL2Strip[i];
1247  eventout += ")";
1248  }
1249  eventout += "\n nTOBL3 = ";
1250  eventout += TOBL3ADC.size();
1251  for (unsigned int i = 0; i < TOBL3ADC.size(); ++i) {
1252  eventout += "\n (ADC, strip) = (";
1253  eventout += TOBL3ADC[i];
1254  eventout += ", ";
1255  eventout += TOBL3Strip[i];
1256  eventout += ")";
1257  }
1258  eventout += "\n nTOBL4 = ";
1259  eventout += TOBL4ADC.size();
1260  for (unsigned int i = 0; i < TOBL4ADC.size(); ++i) {
1261  eventout += "\n (ADC, strip) = (";
1262  eventout += TOBL4ADC[i];
1263  eventout += ", ";
1264  eventout += TOBL4Strip[i];
1265  eventout += ")";
1266  }
1267  eventout += "\n nTIDW1 = ";
1268  eventout += TIDW1ADC.size();
1269  for (unsigned int i = 0; i < TIDW1ADC.size(); ++i) {
1270  eventout += "\n (ADC, strip) = (";
1271  eventout += TIDW1ADC[i];
1272  eventout += ", ";
1273  eventout += TIDW1Strip[i];
1274  eventout += ")";
1275  }
1276  eventout += "\n nTIDW2 = ";
1277  eventout += TIDW2ADC.size();
1278  for (unsigned int i = 0; i < TIDW2ADC.size(); ++i) {
1279  eventout += "\n (ADC, strip) = (";
1280  eventout += TIDW2ADC[i];
1281  eventout += ", ";
1282  eventout += TIDW2Strip[i];
1283  eventout += ")";
1284  }
1285  eventout += "\n nTIDW3 = ";
1286  eventout += TIDW3ADC.size();
1287  for (unsigned int i = 0; i < TIDW3ADC.size(); ++i) {
1288  eventout += "\n (ADC, strip) = (";
1289  eventout += TIDW3ADC[i];
1290  eventout += ", ";
1291  eventout += TIDW3Strip[i];
1292  eventout += ")";
1293  }
1294  eventout += "\n nTECW1 = ";
1295  eventout += TECW1ADC.size();
1296  for (unsigned int i = 0; i < TECW1ADC.size(); ++i) {
1297  eventout += "\n (ADC, strip) = (";
1298  eventout += TECW1ADC[i];
1299  eventout += ", ";
1300  eventout += TECW1Strip[i];
1301  eventout += ")";
1302  }
1303  eventout += "\n nTECW2 = ";
1304  eventout += TECW2ADC.size();
1305  for (unsigned int i = 0; i < TECW2ADC.size(); ++i) {
1306  eventout += "\n (ADC, strip) = (";
1307  eventout += TECW2ADC[i];
1308  eventout += ", ";
1309  eventout += TECW2Strip[i];
1310  eventout += ")";
1311  }
1312  eventout += "\n nTECW3 = ";
1313  eventout += TECW3ADC.size();
1314  for (unsigned int i = 0; i < TECW3ADC.size(); ++i) {
1315  eventout += "\n (ADC, strip) = (";
1316  eventout += TECW3ADC[i];
1317  eventout += ", ";
1318  eventout += TECW3Strip[i];
1319  eventout += ")";
1320  }
1321  eventout += "\n nTECW4 = ";
1322  eventout += TECW4ADC.size();
1323  for (unsigned int i = 0; i < TECW4ADC.size(); ++i) {
1324  eventout += "\n (ADC, strip) = (";
1325  eventout += TECW4ADC[i];
1326  eventout += ", ";
1327  eventout += TECW4Strip[i];
1328  eventout += ")";
1329  }
1330  eventout += "\n nTECW5 = ";
1331  eventout += TECW5ADC.size();
1332  for (unsigned int i = 0; i < TECW5ADC.size(); ++i) {
1333  eventout += "\n (ADC, strip) = (";
1334  eventout += TECW5ADC[i];
1335  eventout += ", ";
1336  eventout += TECW5Strip[i];
1337  eventout += ")";
1338  }
1339  eventout += "\n nTECW6 = ";
1340  eventout += TECW6ADC.size();
1341  for (unsigned int i = 0; i < TECW6ADC.size(); ++i) {
1342  eventout += "\n (ADC, strip) = (";
1343  eventout += TECW6ADC[i];
1344  eventout += ", ";
1345  eventout += TECW6Strip[i];
1346  eventout += ")";
1347  }
1348  eventout += "\n nTECW7 = ";
1349  eventout += TECW7ADC.size();
1350  for (unsigned int i = 0; i < TECW7ADC.size(); ++i) {
1351  eventout += "\n (ADC, strip) = (";
1352  eventout += TECW7ADC[i];
1353  eventout += ", ";
1354  eventout += TECW7Strip[i];
1355  eventout += ")";
1356  }
1357  eventout += "\n nTECW8 = ";
1358  eventout += TECW8ADC.size();
1359  for (unsigned int i = 0; i < TECW8ADC.size(); ++i) {
1360  eventout += "\n (ADC, strip) = (";
1361  eventout += TECW8ADC[i];
1362  eventout += ", ";
1363  eventout += TECW8Strip[i];
1364  eventout += ")";
1365  }
1366 
1367  // pixel output
1368  eventout += "\n nBRL1 = ";
1369  eventout += BRL1ADC.size();
1370  for (unsigned int i = 0; i < BRL1ADC.size(); ++i) {
1371  eventout += "\n (ADC, row, column) = (";
1372  eventout += BRL1ADC[i];
1373  eventout += ", ";
1374  eventout += BRL1Row[i];
1375  eventout += ", ";
1376  eventout += BRL1Col[i];
1377  eventout += ")";
1378  }
1379  eventout += "\n nBRL2 = ";
1380  eventout += BRL2ADC.size();
1381  for (unsigned int i = 0; i < BRL2ADC.size(); ++i) {
1382  eventout += "\n (ADC, row, column) = (";
1383  eventout += BRL2ADC[i];
1384  eventout += ", ";
1385  eventout += BRL2Row[i];
1386  eventout += ", ";
1387  eventout += BRL2Col[i];
1388  eventout += ")";
1389  }
1390  eventout += "\n nBRL3 = ";
1391  eventout += BRL3ADC.size();
1392  for (unsigned int i = 0; i < BRL3ADC.size(); ++i) {
1393  eventout += "\n (ADC, row, column) = (";
1394  eventout += BRL3ADC[i];
1395  eventout += ", ";
1396  eventout += BRL3Row[i];
1397  eventout += ", ";
1398  eventout += BRL3Col[i];
1399  eventout += ")";
1400  }
1401  eventout += "\n nFWD1p = ";
1402  eventout += FWD1pADC.size();
1403  for (unsigned int i = 0; i < FWD1pADC.size(); ++i) {
1404  eventout += "\n (ADC, row, column) = (";
1405  eventout += FWD1pADC[i];
1406  eventout += ", ";
1407  eventout += FWD1pRow[i];
1408  eventout += ", ";
1409  eventout += FWD1pCol[i];
1410  eventout += ")";
1411  }
1412  eventout += "\n nFWD1p = ";
1413  eventout += FWD1nADC.size();
1414  for (unsigned int i = 0; i < FWD1nADC.size(); ++i) {
1415  eventout += "\n (ADC, row, column) = (";
1416  eventout += FWD1nADC[i];
1417  eventout += ", ";
1418  eventout += FWD1nRow[i];
1419  eventout += ", ";
1420  eventout += FWD1nCol[i];
1421  eventout += ")";
1422  }
1423  eventout += "\n nFWD1p = ";
1424  eventout += FWD2pADC.size();
1425  for (unsigned int i = 0; i < FWD2pADC.size(); ++i) {
1426  eventout += "\n (ADC, row, column) = (";
1427  eventout += FWD2pADC[i];
1428  eventout += ", ";
1429  eventout += FWD2pRow[i];
1430  eventout += ", ";
1431  eventout += FWD2pCol[i];
1432  eventout += ")";
1433  }
1434  eventout += "\n nFWD2p = ";
1435  eventout += FWD2nADC.size();
1436  for (unsigned int i = 0; i < FWD2nADC.size(); ++i) {
1437  eventout += "\n (ADC, row, column) = (";
1438  eventout += FWD2nADC[i];
1439  eventout += ", ";
1440  eventout += FWD2nRow[i];
1441  eventout += ", ";
1442  eventout += FWD2nCol[i];
1443  eventout += ")";
1444  }
1445 
1446  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1447  }
1448 
1449  // strip output
1466  product.putTECW6Digis(TECW6ADC,TECW6Strip);
1468  product.putTECW8Digis(TECW8ADC,TECW8Strip);
1469 
1470  // pixel output
1471  product.putBRL1Digis(BRL1ADC, BRL1Row, BRL1Col);
1472  product.putBRL2Digis(BRL2ADC, BRL2Row, BRL2Col);
1473  product.putBRL3Digis(BRL3ADC, BRL3Row, BRL3Col);
1478 
1479  return;
1480 }
1481 
1483  const edm::EventSetup& iSetup)
1484 {
1485  std::string MsgLoggerCat = "GlobalDigisProducer_fillMuon";
1486 
1487  TString eventout;
1488  if (verbosity > 0)
1489  eventout = "\nGathering info:";
1490 
1491  // get DT information
1493  iEvent.getByLabel(MuDTSrc_, dtDigis);
1494  if (!dtDigis.isValid()) {
1495  edm::LogWarning(MsgLoggerCat)
1496  << "Unable to find dtDigis in event!";
1497  return;
1498  }
1499 
1500  int nDt = 0;
1502  for (detUnitIt = dtDigis->begin(); detUnitIt != dtDigis->end();
1503  ++detUnitIt) {
1504 
1505  const DTLayerId& id = (*detUnitIt).first;
1506  const DTDigiCollection::Range& range = (*detUnitIt).second;
1507 
1508  for (DTDigiCollection::const_iterator digiIt = range.first;
1509  digiIt != range.second;
1510  ++digiIt) {
1511 
1512  ++nDt;
1513 
1514  DTWireId wireId(id,(*digiIt).wire());
1515  if (wireId.station() == 1) {
1516  MB1SLayer.push_back(id.superlayer());
1517  MB1Time.push_back((*digiIt).time());
1518  MB1Layer.push_back(id.layer());
1519  }
1520  if (wireId.station() == 2) {
1521  MB2SLayer.push_back(id.superlayer());
1522  MB2Time.push_back((*digiIt).time());
1523  MB2Layer.push_back(id.layer());
1524  }
1525  if (wireId.station() == 3) {
1526  MB3SLayer.push_back(id.superlayer());
1527  MB3Time.push_back((*digiIt).time());
1528  MB3Layer.push_back(id.layer());
1529  }
1530  if (wireId.station() == 4) {
1531  MB4SLayer.push_back(id.superlayer());
1532  MB4Time.push_back((*digiIt).time());
1533  MB4Layer.push_back(id.layer());
1534  }
1535  }
1536  }
1537 
1538  if (verbosity > 1) {
1539  eventout += "\n Number of DtMuonDigis collected:.......... ";
1540  eventout += nDt;
1541  }
1542 
1543  // get CSC Strip information
1545  iEvent.getByLabel(MuCSCStripSrc_, strips);
1546  if (!strips.isValid()) {
1547  edm::LogWarning(MsgLoggerCat)
1548  << "Unable to find muon strips in event!";
1549  return;
1550  }
1551 
1552  int nStrips = 0;
1553  for (CSCStripDigiCollection::DigiRangeIterator j = strips->begin();
1554  j != strips->end();
1555  ++j) {
1556 
1557  std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
1558  std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
1559 
1560  for ( ; digiItr != last; ++digiItr) {
1561  ++nStrips;
1562 
1563  // average pedestals
1564  std::vector<int> adcCounts = digiItr->getADCCounts();
1565  theCSCStripPedestalSum += adcCounts[0];
1566  theCSCStripPedestalSum += adcCounts[1];
1568 
1569  // if there are enough pedestal statistics
1570  if (theCSCStripPedestalCount > 100) {
1572  if (adcCounts[5] > (pedestal + 100))
1573  CSCStripADC.push_back(adcCounts[4] - pedestal);
1574  }
1575  }
1576  }
1577 
1578  if (verbosity > 1) {
1579  eventout += "\n Number of CSCStripDigis collected:........ ";
1580  eventout += nStrips;
1581  }
1582 
1583  // get CSC Wire information
1585  iEvent.getByLabel(MuCSCWireSrc_, wires);
1586  if (!wires.isValid()) {
1587  edm::LogWarning(MsgLoggerCat)
1588  << "Unable to find muon wires in event!";
1589  return;
1590  }
1591 
1592  int nWires = 0;
1593  for (CSCWireDigiCollection::DigiRangeIterator j = wires->begin();
1594  j != wires->end();
1595  ++j) {
1596 
1597  std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
1598  std::vector<CSCWireDigi>::const_iterator endDigi = (*j).second.second;
1599 
1600  for ( ; digiItr != endDigi; ++digiItr) {
1601  ++nWires;
1602 
1603  CSCWireTime.push_back(digiItr->getTimeBin());
1604  }
1605  }
1606 
1607  if (verbosity > 1) {
1608  eventout += "\n Number of CSCWireDigis collected:......... ";
1609  eventout += nWires;
1610  }
1611 
1612  if (verbosity > 0)
1613  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1614 
1615  return;
1616 }
1617 
1619 {
1620  std::string MsgLoggerCat = "GlobalDigisProducer_storeMuon";
1621 
1622  if (verbosity > 2) {
1623 
1624  // dt output
1625  TString eventout("\n nMB1 = ");
1626  eventout += MB1SLayer.size();
1627  for (unsigned int i = 0; i < MB1SLayer.size(); ++i) {
1628  eventout += "\n (slayer, time, layer) = (";
1629  eventout += MB1SLayer[i];
1630  eventout += ", ";
1631  eventout += MB1Time[i];
1632  eventout += ", ";
1633  eventout += MB1Layer[i];
1634  eventout += ")";
1635  }
1636  eventout += "\n nMB2 = ";
1637  eventout += MB2SLayer.size();
1638  for (unsigned int i = 0; i < MB2SLayer.size(); ++i) {
1639  eventout += "\n (slayer, time, layer) = (";
1640  eventout += MB2SLayer[i];
1641  eventout += ", ";
1642  eventout += MB2Time[i];
1643  eventout += ", ";
1644  eventout += MB2Layer[i];
1645  eventout += ")";
1646  }
1647  eventout += "\n nMB3 = ";
1648  eventout += MB3SLayer.size();
1649  for (unsigned int i = 0; i < MB3SLayer.size(); ++i) {
1650  eventout += "\n (slayer, time, layer) = (";
1651  eventout += MB3SLayer[i];
1652  eventout += ", ";
1653  eventout += MB3Time[i];
1654  eventout += ", ";
1655  eventout += MB3Layer[i];
1656  eventout += ")";
1657  }
1658  eventout += "\n nMB2 = ";
1659  eventout += MB4SLayer.size();
1660  for (unsigned int i = 0; i < MB4SLayer.size(); ++i) {
1661  eventout += "\n (slayer, time, layer) = (";
1662  eventout += MB4SLayer[i];
1663  eventout += ", ";
1664  eventout += MB4Time[i];
1665  eventout += ", ";
1666  eventout += MB4Layer[i];
1667  eventout += ")";
1668  }
1669 
1670  // CSC Strip
1671  eventout += "\n nCSCStrip = ";
1672  eventout += CSCStripADC.size();
1673  for (unsigned int i = 0; i < CSCStripADC.size(); ++i) {
1674  eventout += "\n (adc) = (";
1675  eventout += CSCStripADC[i];
1676  eventout += ")";
1677  }
1678 
1679  // CSC Wire
1680  eventout += "\n nCSCWire = ";
1681  eventout += CSCWireTime.size();
1682  for (unsigned int i = 0; i < CSCWireTime.size(); ++i) {
1683  eventout += "\n (time) = (";
1684  eventout += CSCWireTime[i];
1685  eventout += ")";
1686  }
1687 
1688  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1689  }
1690 
1695 
1696  product.putCSCstripDigis(CSCStripADC);
1697 
1698  product.putCSCwireDigis(CSCWireTime);
1699 
1700  return;
1701 }
1702 
1704 {
1705  std::string MsgLoggerCat = "GlobalDigisProducer_clear";
1706 
1707  if (verbosity > 0)
1708  edm::LogInfo(MsgLoggerCat)
1709  << "Clearing event holders";
1710 
1711  // reset electromagnetic info
1712  // EE info
1713  EECalmaxPos.clear();
1714  EECalAEE.clear();
1715  EECalSHE.clear();
1716  // EB info
1717  EBCalmaxPos.clear();
1718  EBCalAEE.clear();
1719  EBCalSHE.clear();
1720  // ES info
1721  ESCalADC0.clear();
1722  ESCalADC1.clear();
1723  ESCalADC2.clear();
1724  ESCalSHE.clear();
1725 
1726  // reset HCal Info
1727  HBCalAEE.clear();
1728  HBCalSHE.clear();
1729  HECalAEE.clear();
1730  HECalSHE.clear();
1731  HOCalAEE.clear();
1732  HOCalSHE.clear();
1733  HFCalAEE.clear();
1734  HFCalSHE.clear();
1735 
1736  // reset Track Info
1737  TIBL1ADC.clear();
1738  TIBL2ADC.clear();
1739  TIBL3ADC.clear();
1740  TIBL4ADC.clear();
1741  TIBL1Strip.clear();
1742  TIBL2Strip.clear();
1743  TIBL3Strip.clear();
1744  TIBL4Strip.clear();
1745 
1746  TOBL1ADC.clear();
1747  TOBL2ADC.clear();
1748  TOBL3ADC.clear();
1749  TOBL4ADC.clear();
1750  TOBL1Strip.clear();
1751  TOBL2Strip.clear();
1752  TOBL3Strip.clear();
1753  TOBL4Strip.clear();
1754 
1755  TIDW1ADC.clear();
1756  TIDW2ADC.clear();
1757  TIDW3ADC.clear();
1758  TIDW1Strip.clear();
1759  TIDW2Strip.clear();
1760  TIDW3Strip.clear();
1761 
1762  TECW1ADC.clear();
1763  TECW2ADC.clear();
1764  TECW3ADC.clear();
1765  TECW4ADC.clear();
1766  TECW5ADC.clear();
1767  TECW6ADC.clear();
1768  TECW7ADC.clear();
1769  TECW8ADC.clear();
1770  TECW1Strip.clear();
1771  TECW2Strip.clear();
1772  TECW3Strip.clear();
1773  TECW4Strip.clear();
1774  TECW5Strip.clear();
1775  TECW6Strip.clear();
1776  TECW7Strip.clear();
1777  TECW8Strip.clear();
1778 
1779  BRL1ADC.clear();
1780  BRL1Row.clear();
1781  BRL1Col.clear();
1782  BRL2ADC.clear();
1783  BRL2Row.clear();
1784  BRL2Col.clear();
1785  BRL3ADC.clear();
1786  BRL3Row.clear();
1787  BRL3Col.clear();
1788 
1789  FWD1pADC.clear();
1790  FWD1pRow.clear();
1791  FWD1pCol.clear();
1792  FWD1nADC.clear();
1793  FWD1nRow.clear();
1794  FWD1nCol.clear();
1795  FWD2pADC.clear();
1796  FWD2pRow.clear();
1797  FWD2pCol.clear();
1798  FWD2nADC.clear();
1799  FWD2nRow.clear();
1800  FWD2nCol.clear();
1801 
1802  //muon clear
1803  MB1SLayer.clear();
1804  MB1Time.clear();
1805  MB1Layer.clear();
1806  MB2SLayer.clear();
1807  MB2Time.clear();
1808  MB2Layer.clear();
1809  MB3SLayer.clear();
1810  MB3Time.clear();
1811  MB3Layer.clear();
1812  MB4SLayer.clear();
1813  MB4Time.clear();
1814  MB4Layer.clear();
1815 
1816  CSCStripADC.clear();
1817 
1818  CSCWireTime.clear();
1819 
1820  return;
1821 }
1822 
1823 //define this as a plug-in
1824 //DEFINE_FWK_MODULE(GlobalDigisProducer);
RunNumber_t run() const
Definition: EventID.h:42
void putTECW7Digis(const std::vector< float > &adc, const std::vector< int > &strip)
void putTOBL4Digis(const std::vector< float > &adc, const std::vector< int > &strip)
T getParameter(std::string const &) const
EventNumber_t event() const
Definition: EventID.h:44
T getUntrackedParameter(std::string const &, T const &) const
void getAllProvenance(std::vector< Provenance const * > &provenances) const
Definition: Event.cc:78
int i
Definition: DBlmapReader.cc:9
void putFWD2pDigis(const std::vector< float > &adc, const std::vector< int > &row, const std::vector< int > &column)
void putTOBL1Digis(const std::vector< float > &adc, const std::vector< int > &strip)
std::vector< PCaloHit > PCaloHitContainer
std::map< uint32_t, float, std::less< uint32_t > > MapType
key_type id() const
Definition: EBDataFrame.h:32
int ihf
unsigned int tibLayer(const DetId &id) const
void putBRL3Digis(const std::vector< float > &adc, const std::vector< int > &row, const std::vector< int > &column)
static const int sdHcalOut
edm::InputTag MuCSCStripSrc_
const ESDetId & id() const
Definition: ESDataFrame.h:21
unsigned int pxfDisk(const DetId &id) const
static const int sdSiTID
void putMB1Digis(const std::vector< int > &slayer, const std::vector< float > &time, const std::vector< int > &layer)
std::vector< T >::const_iterator const_iterator
unsigned int tidWheel(const DetId &id) const
double pedestal(int fCapId) const
get pedestal for capid=0..3
void fillTrk(edm::Event &, const edm::EventSetup &)
void putHOCalDigis(const std::vector< float > &aee, const std::vector< float > &she)
int size() const
Definition: ESDataFrame.h:23
virtual void beginJob(void)
void putFWD2nDigis(const std::vector< float > &adc, const std::vector< int > &row, const std::vector< int > &column)
void storeECal(PGlobalDigi &)
int ii
Definition: cuy.py:588
void putFWD1nDigis(const std::vector< float > &adc, const std::vector< int > &row, const std::vector< int > &column)
int gainId() const
get the gainId (2 bits)
void putTECW8Digis(const std::vector< float > &adc, const std::vector< int > &strip)
void putFWD1pDigis(const std::vector< float > &adc, const std::vector< int > &row, const std::vector< int > &column)
int size() const
Definition: EcalDataFrame.h:27
void putTIDW3Digis(const std::vector< float > &adc, const std::vector< int > &strip)
void putTECW3Digis(const std::vector< float > &adc, const std::vector< int > &strip)
void putBRL1Digis(const std::vector< float > &adc, const std::vector< int > &row, const std::vector< int > &column)
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
void fillMuon(edm::Event &, const edm::EventSetup &)
GlobalDigisProducer(const edm::ParameterSet &)
void putTECW6Digis(const std::vector< float > &adc, const std::vector< int > &strip)
int iEvent
Definition: GenABIO.cc:243
void putHBCalDigis(const std::vector< float > &aee, const std::vector< float > &she)
void putTECW2Digis(const std::vector< float > &adc, const std::vector< int > &strip)
static const int sdSiTIB
void putEBCalDigis(const std::vector< int > &maxpos, const std::vector< double > &aee, const std::vector< float > &she)
static const int sdPxlBrl
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:94
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const
Definition: HcalCoderDb.cc:46
void putTECW1Digis(const std::vector< float > &adc, const std::vector< int > &strip)
static const int MAXSAMPLES
Definition: ESDataFrame.h:32
void putHFCalDigis(const std::vector< float > &aee, const std::vector< float > &she)
void putTECW4Digis(const std::vector< float > &adc, const std::vector< int > &strip)
void putTOBL2Digis(const std::vector< float > &adc, const std::vector< int > &strip)
void storeTrk(PGlobalDigi &)
int j
Definition: DBlmapReader.cc:9
void storeHCal(PGlobalDigi &)
virtual void produce(edm::Event &, const edm::EventSetup &)
void putESCalDigis(const std::vector< float > &adc0, const std::vector< float > &adc1, const std::vector< float > &adc2, const std::vector< float > &she)
static const int sdSiTOB
float gain6Over1() const
#define end
Definition: vmac.h:38
bool isValid() const
Definition: HandleBase.h:76
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
void putTECW5Digis(const std::vector< float > &adc, const std::vector< int > &strip)
void putMB4Digis(const std::vector< int > &slayer, const std::vector< float > &time, const std::vector< int > &layer)
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:356
key_type id() const
Definition: EEDataFrame.h:29
void putBRL2Digis(const std::vector< float > &adc, const std::vector< int > &row, const std::vector< int > &column)
unsigned int pxbLayer(const DetId &id) const
Definition: DetId.h:20
std::map< int, double, std::less< int > > ECalgainConv_
void putHECalDigis(const std::vector< float > &aee, const std::vector< float > &she)
int size() const
get the size
Definition: CaloSamples.h:26
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
void putEECalDigis(const std::vector< int > &maxpos, const std::vector< double > &aee, const std::vector< float > &she)
static const int sdHcalFwd
float gain12Over6() const
std::vector< DigiType >::const_iterator const_iterator
void putTIBL1Digis(const std::vector< float > &adc, const std::vector< int > &strip)
T const * product() const
Definition: Handle.h:74
static const int sdHcalBrl
void putMB2Digis(const std::vector< int > &slayer, const std::vector< float > &time, const std::vector< int > &layer)
std::string const & label() const
Definition: InputTag.h:42
edm::EventID id() const
Definition: EventBase.h:56
static const int sdSiTEC
#define begin
Definition: vmac.h:31
void putTIDW2Digis(const std::vector< float > &adc, const std::vector< int > &strip)
void storeMuon(PGlobalDigi &)
void putMB3Digis(const std::vector< int > &slayer, const std::vector< float > &time, const std::vector< int > &layer)
unsigned int pxfSide(const DetId &id) const
std::pair< const_iterator, const_iterator > Range
int adc() const
get the ADC sample (singed 16 bits)
Definition: ESSample.h:18
void fillHCal(edm::Event &, const edm::EventSetup &)
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:341
static const int sdPxlFwd
void fillECal(edm::Event &, const edm::EventSetup &)
void putCSCwireDigis(const std::vector< float > &time)
collection_type::const_iterator const_iterator
Definition: DetSet.h:34
bool isValid() const
Definition: ESHandle.h:37
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:106
void putTIBL4Digis(const std::vector< float > &adc, const std::vector< int > &strip)
void putTIBL2Digis(const std::vector< float > &adc, const std::vector< int > &strip)
void putTIBL3Digis(const std::vector< float > &adc, const std::vector< int > &strip)
unsigned int tecWheel(const DetId &id) const
std::string const & instance() const
Definition: InputTag.h:43
static const int sdHcalEC
static const int MAXSAMPLES
Definition: EcalDataFrame.h:49
void putTOBL3Digis(const std::vector< float > &adc, const std::vector< int > &strip)
void putCSCstripDigis(const std::vector< float > &adc)
unsigned int tobLayer(const DetId &id) const
int adc() const
get the ADC sample (12 bits)
void putTIDW1Digis(const std::vector< float > &adc, const std::vector< int > &strip)