49 mf_ =
new TFile(outputFilename,
"RECREATE");
75 "Trigger Type unrecognized, aborting";
86 for (it = hbherhc.
begin();
92 if (dit != hbhedgc.
end())
96 "No digi found for id" << id;
102 ehist->Fill(it->energy());
107 thist->Fill(it->time());
117 for (it = horhc.
begin();
123 if (dit != hodgc.
end())
127 "No digi found for id" << id;
133 ehist->Fill(it->energy());
138 thist->Fill(it->time());
148 for (it = hfrhc.
begin();
154 if (dit != hfdgc.
end())
158 "No digi found for id" << id;
164 ehist->Fill(it->energy());
169 thist->Fill(it->time());
178 for (it = hbhedigic.
begin();
179 it != hbhedigic.
end();
187 phist->Fill(
bin*1.0,(*it)[
bin].nominal_fC());
194 phist->Fill((*it)[
bin].adc());
204 for (it = hodigic.
begin();
213 phist->Fill(
bin*1.0,(*it)[
bin].nominal_fC());
220 phist->Fill((*it)[
bin].adc());
230 for (it = hfdigic.
begin();
239 phist->Fill(
bin*1.0,(*it)[
bin].nominal_fC());
246 phist->Fill((*it)[
bin].adc());
255 double nominal_ped = (cdigi[0].nominal_fC() + cdigi[1].nominal_fC())/2.0;
260 for (
int i=0;
i<cdigi.
size();
i++) {
261 double ampl = (cdigi[
i].nominal_fC()-nominal_ped)*calibFC2GeV;
271 float t0 = (maxI > 0) ? (fabs((cdigi[maxI-1].nominal_fC()-nominal_ped))*calibFC2GeV):0.0;
272 float t2 = fabs((cdigi[maxI+1].nominal_fC()-nominal_ped)*calibFC2GeV);
273 float wpksamp = (maxA + 2.0*
t2) / (t0 + maxA + t2);
284 for (it = calibdigic.
begin();
285 it != calibdigic.
end();
293 phist->Fill(
bin*1.0,(*it)[
bin].nominal_fC());
307 thist->Fill(rh.
time());
float amplitude() const
get the amplitude (generally fC, but can vary)
HcalQLPlotAnalAlgos(const char *outputFilename, edm::ParameterSet histoParams)
bool wasLEDTrigger() const
returns true if this was a LED trigger
void processDigi(const HBHEDigiCollection &hbhedigic)
std::vector< T >::const_iterator const_iterator
int presamples() const
number of samples before the sample from the triggered beam crossing (according to the hardware) ...
HcalCalibRecHit recoCalib(const HcalCalibDataFrame &cdigi, double calibFC2GeV)
int size() const
total number of samples in the digi
auto const T2 &decltype(t1.eta()) t2
bool wasOutSpillPedestalTrigger() const
returns true if this was an out-of-spill pedestal trigger
void processRH(const HBHERecHitCollection &hbherhc, const HBHEDigiCollection &hbhedgc)
const HcalCalibDetId & id() const
void SetEventType(const HcalTBTriggerData &trigd)
HcalQLPlotHistoMgr * histos_
const_iterator end() const
TH1 * GetAHistogram(const HcalDetId &id, const HcalElectronicsId &eid, HistType ht, EventType et)
float time() const
get the hit time (if available)
iterator find(key_type k)
bool wasSpillIgnorantPedestalTrigger() const
returns true if this trigger was a calibration trigger
bool wasInSpillPedestalTrigger() const
returns true if this was an in-spill pedestal trigger
bool wasBeamTrigger() const
returns true if this trigger came from beam data
bool wasLaserTrigger() const
returns true if this was a laser trigger
HcalQLPlotHistoMgr::EventType triggerID_
Readout chain identification for Hcal [31:26] Unused (so far) [25] Trigger-chain id flag [24:20] Read...
const_iterator begin() const