34 #include "TLorentzVector.h" 98 fSPEAmp = odp->GetSPECumulativeAmplitude();
145 std::vector<std::string> histnames;
148 for(
unsigned int i = 0; i < WaveformHandle->size(); ++i)
161 unsigned int pulsenum = 0;
163 sprintf(HistName,
"Event_%d_OpDet_%i_Pulse_%i", evt.
id().
event(), ThePulse.
OpChannel(), pulsenum);
164 auto p = std::find(histnames.begin(), histnames.end(), HistName);
165 if ( p != histnames.end() ) {
171 histnames.push_back(HistName);
178 TH1D* PulseHist =
nullptr;
181 PulseHist= tfs->
make<TH1D>(HistName,
";t (ns);",
187 sprintf(HistName,
"Event_%d_uni_OpDet_%i_Pulse_%i", evt.
id().
event(), ThePulse.
OpChannel(), pulsenum);
188 TH1D* UnipolarHist =
nullptr;
191 UnipolarHist= tfs->
make<TH1D>(HistName,
";t (ns);",
197 for(
unsigned int binNum = 0; binNum < ThePulse.
Waveform().size(); ++binNum)
202 (
double) ThePulse.
Waveform()[binNum] );
205 double BinContent = (double) ThePulse.
Waveform()[binNum] +
206 (double) UnipolarHist->GetBinContent(binNum-1);
208 UnipolarHist->SetBinContent(binNum,BinContent);
210 UnipolarHist->SetBinContent(binNum,0);
unsigned short OpChannel() const
const std::vector< short > & Waveform() const
std::string fInstanceName
#define DEFINE_ART_MODULE(klass)
T get(std::string const &key) const
EDAnalyzer(Table< Config > const &config)
OpDigiAna(const fhicl::ParameterSet &)
T * make(ARGS...args) const
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
void analyze(const art::Event &)
EventNumber_t event() const
art framework interface to geometry description