25 #include "TOctalFADCIsland.h"
26 #include "TOctalFADCBankReader.h"
76 for(std::map<std::string, std::string>::iterator mapIter = bank_to_detector_map.begin();
77 mapIter != bank_to_detector_map.end(); mapIter++) {
80 std::string histname =
"h" + detname +
"_ShortPulseTimes";
81 std::string histtitle =
"Plot of the short pulse times for the " + detname +
" detector";
82 TH1D* hShortPulseTime =
new TH1D(histname.c_str(),histtitle.c_str(),240,0,120e6);
83 hShortPulseTime->GetXaxis()->SetTitle(
"Pulse time (ns)");
84 hShortPulseTime->GetXaxis()->CenterTitle(1);
85 hShortPulseTime->GetYaxis()->SetTitle(
"Number of 4-sample pulses");
86 hShortPulseTime->GetYaxis()->CenterTitle(1);
89 std::string histname2 =
"h" + detname +
"_NonShortPulseTimes";
90 std::string histtitle2 =
"Plot of the non-short pulse times for the " + detname +
" detector";
91 TH1D* hNonShortPulseTime =
new TH1D(histname2.c_str(),histtitle2.c_str(),240,0,120e6);
92 hNonShortPulseTime->GetXaxis()->SetTitle(
"Pulse time (ns)");
93 hNonShortPulseTime->GetXaxis()->CenterTitle(1);
94 hNonShortPulseTime->GetYaxis()->SetTitle(
"Number of all other pulses");
95 hNonShortPulseTime->GetYaxis()->CenterTitle(1);
98 time_short_pulse_histogram_map[mapIter->first] = hShortPulseTime;
99 time_nshort_pulse_histogram_map[mapIter->first] = hNonShortPulseTime;
112 int midas_event_number = pheader->serial_number;
116 typedef pair<string, vector<TPulseIsland*> > TStringPulseIslandPair;
117 typedef map<string, vector<TPulseIsland*> >::iterator map_iterator;
121 TStringPulseIslandMap& pulse_islands_map =
125 for (map_iterator theMapIter = pulse_islands_map.begin(); theMapIter != pulse_islands_map.end(); theMapIter++)
127 std::string bankname = theMapIter->first;
128 std::vector<TPulseIsland*> thePulses = theMapIter->second;
131 for (std::vector<TPulseIsland*>::iterator thePulseIter = thePulses.begin(); thePulseIter != thePulses.end(); thePulseIter++) {
132 if (gSetup->
GetDetectorName(theMapIter->first)==
"CDG0" && ((*thePulseIter)->GetSamples().size()>0))
printf(
"\nfound caen\n");
135 if ((*thePulseIter)->GetSamples().size()==4) time_short_pulse_histogram_map[bankname]->Fill((*thePulseIter)->GetPulseTime());
136 else time_nshort_pulse_histogram_map[bankname]->Fill((*thePulseIter)->GetPulseTime());