17 #include "art_root_io/TFileService.h" 66 fSPEAmp = odp->GetSPECumulativeAmplitude();
97 std::vector<std::string> histnames;
100 for (
unsigned int i = 0; i < WaveformHandle->size(); ++i) {
112 unsigned int pulsenum = 0;
115 HistName,
"Event_%d_OpDet_%i_Pulse_%i", evt.
id().
event(), ThePulse.
OpChannel(), pulsenum);
116 auto p = std::find(histnames.begin(), histnames.end(), HistName);
117 if (p != histnames.end()) {
123 histnames.push_back(HistName);
128 TH1D* PulseHist =
nullptr;
130 PulseHist = tfs->make<TH1D>(HistName,
138 "Event_%d_uni_OpDet_%i_Pulse_%i",
142 TH1D* UnipolarHist =
nullptr;
144 UnipolarHist = tfs->make<TH1D>(HistName,
151 for (
unsigned int binNum = 0; binNum < ThePulse.
Waveform().size(); ++binNum) {
157 (double)ThePulse.
Waveform()[binNum] + (double)UnipolarHist->GetBinContent(binNum - 1);
159 UnipolarHist->SetBinContent(binNum, BinContent);
161 UnipolarHist->SetBinContent(binNum, 0);
unsigned short OpChannel() const
EDAnalyzer(fhicl::ParameterSet const &pset)
const std::vector< short > & Waveform() const
std::string fInstanceName
#define DEFINE_ART_MODULE(klass)
T get(std::string const &key) const
OpDigiAna(const fhicl::ParameterSet &)
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
void analyze(const art::Event &)
EventNumber_t event() const