48 mf_ =
new TFile(outputFilename,
"RECREATE");
74 "Trigger Type unrecognized, aborting";
85 for (it = hbherhc.
begin();
91 if (dit != hbhedgc.
end())
95 "No digi found for id" << id;
101 ehist->Fill(it->energy());
106 thist->Fill(it->time());
116 for (it = horhc.
begin();
122 if (dit != hodgc.
end())
126 "No digi found for id" << id;
132 ehist->Fill(it->energy());
137 thist->Fill(it->time());
147 for (it = hfrhc.
begin();
153 if (dit != hfdgc.
end())
157 "No digi found for id" << id;
163 ehist->Fill(it->energy());
168 thist->Fill(it->time());
177 for (it = hbhedigic.
begin();
178 it != hbhedigic.
end();
186 phist->Fill(
bin*1.0,(*it)[
bin].nominal_fC());
193 phist->Fill((*it)[
bin].adc());
203 for (it = hodigic.
begin();
212 phist->Fill(
bin*1.0,(*it)[
bin].nominal_fC());
219 phist->Fill((*it)[
bin].adc());
229 for (it = hfdigic.
begin();
238 phist->Fill(
bin*1.0,(*it)[
bin].nominal_fC());
245 phist->Fill((*it)[
bin].adc());
254 double nominal_ped = (cdigi[0].nominal_fC() + cdigi[1].nominal_fC())/2.0;
259 for (
int i=0;
i<cdigi.
size();
i++) {
260 double ampl = (cdigi[
i].nominal_fC()-nominal_ped)*calibFC2GeV;
270 float t0 = (maxI > 0) ? (fabs((cdigi[maxI-1].nominal_fC()-nominal_ped))*calibFC2GeV):0.0;
271 float t2 = fabs((cdigi[maxI+1].nominal_fC()-nominal_ped)*calibFC2GeV);
272 float wpksamp = (maxA + 2.0*t2) / (t0 + maxA + t2);
283 for (it = calibdigic.
begin();
284 it != calibdigic.
end();
292 phist->Fill(
bin*1.0,(*it)[
bin].nominal_fC());
306 thist->Fill(rh.
time());
float amplitude() const
get the amplitude (generally fC, but can vary)
bool wasLEDTrigger() const
returns true if this was a LED trigger
void processDigi(const HBHEDigiCollection &hbhedigic)
std::vector< HBHERecHit >::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
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)
HcalQLPlotAnalAlgos(const char *outputFilename, const edm::ParameterSet &histoParams)
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.
const_iterator begin() const