33 #include "canvas/Persistency/Common/FindManyP.h" 37 #include "art_root_io/TFileService.h" 38 #include "art_root_io/TFileDirectory.h" 85 std::map< int, int >
ADC;
131 fADCTree->Branch(
"Channel7", &
fmaxadc7,
"Channel7/F");
132 fADCTree->Branch(
"Channel3", &
fmaxadc3,
"Channel3/F");
133 fADCTree->Branch(
"distpe", &
fdistpe,
"distpe/F");
134 fADCTree->Branch(
"pedestal", &
fpedestal,
"pedestal/F");
135 fADCTree->Branch(
"thres3", &
fthres3,
"thres3/F");
136 fADCTree->Branch(
"thres7", &
fthres7,
"thres7/F");
137 fADCTree->Branch(
"PE7", &
fpe7,
"PE7/F");
138 fADCTree->Branch(
"PE3", &
fpe3,
"PE3/F");
139 fADCTree->Branch(
"ADC7", &
fadc7,
"ADC7/F");
140 fADCTree->Branch(
"ADC3", &
fadc3,
"ADC3/F");
141 fADCTree->Branch(
"Baseline3", &
fbaseline3,
"Baseline3/F");
142 fADCTree->Branch(
"Baseline7", &
fbaseline7,
"Baseline7/F");
143 fADCTree->Branch(
"adcval7", &
fadcval7);
144 fADCTree->Branch(
"adcval3", &
fadcval3);
160 fSampleFreq = clockData.OpticalClock().Frequency();
162 int n = 0;
int ntick = 0;
int three = 0;
int seven = 0;
163 long int adcmax = 0;
long int adcval = 0;
long int adcval3 = 0, adcval7 = 0, sig_adcval3 = 0, sig_adcval7 = 0;
165 double sumthres7 = 0, pedist3 = 0, pedist7 = 0, thres = 0, thres3 = 0, thres7 = 0;
168 for (
size_t i = 0;
i < OpDetWaveformHandle->size();
i++)
177 if (channel ==3) three++;
178 if (channel ==7) seven++;
180 if(channel != 3 && channel != 7)
continue;
206 Waveforms[
channel] =
tfs->make<TH2D>(Form(
"waveform_%d",channel),Form(
"waveform_%d",channel), 2000,0,2000, 20000, 0, 20000);
216 for (
size_t tick = 0;
tick < waveformPtr->size();
tick++) {
219 adcval = waveformPtr->at(
tick);
225 if (
tick <= 700){thres += adcval; n++; adcval3 = waveformPtr->at(
tick) - 1587;
228 if (tick < 1300 && tick > 790){
229 sig_adcval3 = waveformPtr->at(
tick) - 1587;
230 pedist3 += sig_adcval3;}}
237 if (
tick <= 700){sumthres7 += adcval; ntick++; adcval7 = waveformPtr->at(
tick) - 1524; thres7 += adcval7;}
238 if (tick < 1300 && tick > 790){
239 sig_adcval7 = waveformPtr->at(
tick) -1524;
240 pedist7 += sig_adcval7;}}
338 pwavep->Fill(iadc,adcval,1); // (x,y,weight=1)
339 // hist->SetBinContent(iadc+1,adcval);
std::map< int, int > threshold
std::map< size_t, TH2D * > persistent_waveform_
std::map< int, int >::iterator i
Handle< PROD > getHandle(SelectorBase const &) const
std::vector< Int_t > fadcval7
ICEBERGPDSSPMonitor(fhicl::ParameterSet const &pset)
std::map< int, int >::iterator adcit
EDAnalyzer(fhicl::ParameterSet const &pset)
std::map< int, int > countWaveform
std::vector< Int_t > fadcval3
ICEBERGPDSSPMonitor & operator=(ICEBERGPDSSPMonitor const &)=delete
std::map< int, int > maxadc
#define DEFINE_ART_MODULE(klass)
std::string fOpHitModuleLabel
std::map< int, int >::iterator itr
void analyze(art::Event const &evt) override
std::map< int, TH1F * > maxadchist
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
std::string fOpDetWaveformModuleLabel
static int max(int a, int b)
std::map< int, TH1D * > avgWaveforms
std::map< size_t, TH2D * > Waveforms
art::ServiceHandle< art::TFileService > tfs