|
|
Go to the documentation of this file.
45 mf_ =
new TFile(outputFilename,
"RECREATE");
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());
bool wasLEDTrigger() const
returns true if this was a LED trigger
float time() const
get the hit time (if available)
std::vector< T >::const_iterator const_iterator
void processDigi(const HBHEDigiCollection &hbhedigic)
HcalCalibRecHit recoCalib(const HcalCalibDataFrame &cdigi, double calibFC2GeV)
void SetEventType(const HcalTBTriggerData &trigd)
bool wasSpillIgnorantPedestalTrigger() const
returns true if this trigger was a calibration trigger
const_iterator begin() const
bool wasInSpillPedestalTrigger() const
returns true if this was an in-spill pedestal trigger
Readout chain identification for Hcal.
HcalQLPlotAnalAlgos(const char *outputFilename, const edm::ParameterSet &histoParams)
float amplitude() const
get the amplitude (generally fC, but can vary)
HcalQLPlotHistoMgr::EventType triggerID_
const_iterator end() const
int presamples() const
number of samples before the sample from the triggered beam crossing (according to the hardware)
iterator find(key_type k)
bool wasOutSpillPedestalTrigger() const
returns true if this was an out-of-spill pedestal trigger
bool wasLaserTrigger() const
returns true if this was a laser trigger
int size() const
total number of samples in the digi
bool wasBeamTrigger() const
returns true if this trigger came from beam data
const HcalCalibDetId & id() const
HcalQLPlotHistoMgr * histos_
void processRH(const HBHERecHitCollection &hbherhc, const HBHEDigiCollection &hbhedgc)
TH1 * GetAHistogram(const HcalDetId &id, const HcalElectronicsId &eid, HistType ht, EventType et)