67 edm::LogError(
"HcalQLPlotAnalAlgos::begin") <<
"Trigger Type unrecognized, aborting";
76 for (it = hbherhc.
begin(); it != hbherhc.
end(); it++) {
80 if (dit != hbhedgc.
end())
83 edm::LogWarning(
"HcalQLPlotAnalAlgos::processRH") <<
"No digi found for id" <<
id;
89 ehist->Fill(it->energy());
94 thist->Fill(it->time());
102 for (it = horhc.
begin(); it != horhc.
end(); it++) {
106 if (dit != hodgc.
end())
109 edm::LogWarning(
"HcalQLPlotAnalAlgos::processRH") <<
"No digi found for id" <<
id;
115 ehist->Fill(it->energy());
120 thist->Fill(it->time());
128 for (it = hfrhc.
begin(); it != hfrhc.
end(); it++) {
132 if (dit != hfdgc.
end())
135 edm::LogWarning(
"HcalQLPlotAnalAlgos::processRH") <<
"No digi found for id" <<
id;
141 ehist->Fill(it->energy());
146 thist->Fill(it->time());
154 for (it = hbhedigic.
begin(); it != hbhedigic.
end(); it++) {
160 for (
int bin = 0;
bin < it->size();
bin++)
161 phist->Fill(
bin * 1.0, (*it)[
bin].nominal_fC());
167 for (
int bin = 0;
bin < it->size();
bin++)
168 phist->Fill((*it)[
bin].adc());
177 for (it = hodigic.
begin(); it != hodigic.
end(); it++) {
183 for (
int bin = 0;
bin < it->size();
bin++)
184 phist->Fill(
bin * 1.0, (*it)[
bin].nominal_fC());
190 for (
int bin = 0;
bin < it->size();
bin++)
191 phist->Fill((*it)[
bin].adc());
200 for (it = hfdigic.
begin(); it != hfdigic.
end(); it++) {
206 for (
int bin = 0;
bin < it->size();
bin++)
207 phist->Fill(
bin * 1.0, (*it)[
bin].nominal_fC());
213 for (
int bin = 0;
bin < it->size();
bin++)
214 phist->Fill((*it)[
bin].adc());
221 double nominal_ped = (cdigi[0].nominal_fC() + cdigi[1].nominal_fC()) / 2.0;
226 for (
int i = 0;
i < cdigi.
size();
i++) {
227 double ampl = (cdigi[
i].nominal_fC() - nominal_ped) * calibFC2GeV;
237 float t0 = (
maxI > 0) ? (fabs((cdigi[
maxI - 1].nominal_fC() - nominal_ped)) * calibFC2GeV) : 0.0;
238 float t2 = fabs((cdigi[
maxI + 1].nominal_fC() - nominal_ped) * calibFC2GeV);
239 float wpksamp = (maxA + 2.0 *
t2) / (
t0 + maxA +
t2);
248 for (it = calibdigic.
begin(); it != calibdigic.
end(); it++) {
254 for (
int bin = 0;
bin < it->size();
bin++)
255 phist->Fill(
bin * 1.0, (*it)[
bin].nominal_fC());
269 thist->Fill(rh.
time());
int presamples() const
number of samples before the sample from the triggered beam crossing (according to the hardware) ...
bool wasLEDTrigger() const
returns true if this was a LED trigger
void processDigi(const HBHEDigiCollection &hbhedigic)
std::vector< T >::const_iterator const_iterator
int size() const
total number of samples in the digi
Log< level::Error, false > LogError
HcalCalibRecHit recoCalib(const HcalCalibDataFrame &cdigi, double calibFC2GeV)
bool wasSpillIgnorantPedestalTrigger() const
returns true if this trigger was a calibration trigger
float time() const
get the hit time (if available)
float amplitude() const
get the amplitude (generally fC, but can vary)
const HcalCalibDetId & id() const
void processRH(const HBHERecHitCollection &hbherhc, const HBHEDigiCollection &hbhedgc)
const_iterator begin() const
bool wasInSpillPedestalTrigger() const
returns true if this was an in-spill pedestal trigger
bool wasOutSpillPedestalTrigger() const
returns true if this was an out-of-spill pedestal trigger
void SetEventType(const HcalTBTriggerData &trigd)
HcalQLPlotAnalAlgos(const char *outputFilename, const edm::ParameterSet &histoParams)
const_iterator end() const
HcalQLPlotHistoMgr * histos_
TH1 * GetAHistogram(const HcalDetId &id, const HcalElectronicsId &eid, HistType ht, EventType et)
iterator find(key_type k)
bool wasLaserTrigger() const
returns true if this was a laser trigger
bool wasBeamTrigger() const
returns true if this trigger came from beam data
Log< level::Warning, false > LogWarning
HcalQLPlotHistoMgr::EventType triggerID_
Readout chain identification for Hcal.